Let the scanner attempt to continue when unget() was called twice

This commit is contained in:
K. Lange 2021-03-12 19:42:18 +09:00
parent d3a614869a
commit d147de2d7f

View File

@ -271,7 +271,6 @@ static KrkToken identifier() {
void krk_ungetToken(KrkToken token) {
if (scanner.hasUnget) {
fprintf(stderr, "(internal error) Tried to unget multiple times, this is not valid.\n");
exit(1);
}
scanner.hasUnget = 1;
scanner.unget = token;