Browse Source

basic: call executeFinal() when OnToken() fails

Signed-off-by: Alejandro Mery <amery@jpi.io>
pr-amery-basic
Alejandro Mery 1 year ago
parent
commit
cfd4a94559
  1. 4
      basic/token.go

4
basic/token.go

@ -149,6 +149,8 @@ func (dec *decoder) OnToken(pos lexer.Position, typ parser.TokenType, value stri
return nil return nil
default: default:
// unacceptable // unacceptable
return newErrInvalidToken(t) err := newErrInvalidToken(t)
dec.executeFinal()
return err
} }
} }

Loading…
Cancel
Save