basic: refactor error handling

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-09-02 01:06:01 +00:00
parent 754642e98f
commit 7a4e31b937
2 changed files with 13 additions and 13 deletions
+3 -1
View File
@@ -149,6 +149,8 @@ func (dec *decoder) OnToken(pos lexer.Position, typ parser.TokenType, value stri
return nil
default:
// unacceptable
return newErrInvalidToken(t)
err := newErrInvalidToken(t)
dec.executeFinal()
return err
}
}