diff --git a/basic/token.go b/basic/token.go index 4f2103b..fc2862b 100644 --- a/basic/token.go +++ b/basic/token.go @@ -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 } }