From bc71e0c3d5abb934c24f763c7c72c84999ef0c48 Mon Sep 17 00:00:00 2001 From: Jeff MAURY Date: Fri, 17 Nov 2023 10:40:01 +0100 Subject: [PATCH] Update pkg/decompiler/utils/utils.go Co-authored-by: Philippe Martin --- pkg/decompiler/utils/utils.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkg/decompiler/utils/utils.go b/pkg/decompiler/utils/utils.go index c88f1cc..72b06cd 100644 --- a/pkg/decompiler/utils/utils.go +++ b/pkg/decompiler/utils/utils.go @@ -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 }