Skip to content

Commit

Permalink
Update pkg/decompiler/utils/utils.go
Browse files Browse the repository at this point in the history
Co-authored-by: Philippe Martin <[email protected]>
  • Loading branch information
jeffmaury and feloy authored Nov 17, 2023
1 parent e6fb2fd commit bc71e0c
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions pkg/decompiler/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ var LABEL_PATTERN = regexp.MustCompile("^LABEL\\s+(.*)=(.*)$")
func Line2Node(line string, root *parser.Node) error {
if strings.HasPrefix(line, utils.LABEL_INSTRUCTION) {
return parseLabel(line, root)
} else {
result, err := parser.Parse(strings.NewReader(line))
if err != nil {
return err
}
for _, node := range result.AST.Children {
root.AddChild(node, -1, -1)
}
}
result, err := parser.Parse(strings.NewReader(line))
if err != nil {
return err
}
for _, node := range result.AST.Children {
root.AddChild(node, -1, -1)
}
return nil
}
Expand Down

0 comments on commit bc71e0c

Please sign in to comment.