basic: call executeFinal() when OnToken() fails

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-09-04 15:28:11 +00:00
parent d8af7821e4
commit cfd4a94559
+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
}
}