Improved error message for invalid instructions
This commit is contained in:
@ -37,6 +37,6 @@ func parseNode(tokens token.List, source []byte, nodes AST) (Node, error) {
|
||||
return &Call{Expression: expr}, nil
|
||||
|
||||
default:
|
||||
return nil, errors.New(&errors.InvalidInstruction{Instruction: expr.Token.Text(source)}, nil, expr.Token.Position)
|
||||
return nil, errors.New(&errors.InvalidInstruction{Instruction: tokens.Text(source)}, nil, tokens[0].Position)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user