diff --git a/src/build/ast/Parse.go b/src/build/ast/Parse.go index 69e6756..674f121 100644 --- a/src/build/ast/Parse.go +++ b/src/build/ast/Parse.go @@ -61,7 +61,7 @@ func toASTNode(tokens token.List) (Node, error) { switch { case IsVariableDefinition(expr): if len(expr.Children) < 2 { - return nil, errors.New(errors.MissingAssignValue, nil, expr.LastChild().Token.End()) + return nil, errors.New(errors.MissingAssignValue, nil, expr.Token.End()) } name := expr.Children[0].Token @@ -70,7 +70,7 @@ func toASTNode(tokens token.List) (Node, error) { case IsAssignment(expr): if len(expr.Children) < 2 { - return nil, errors.New(errors.MissingAssignValue, nil, expr.LastChild().Token.End()) + return nil, errors.New(errors.MissingAssignValue, nil, expr.Token.End()) } name := expr.Children[0].Token