fixed lexer errors

This commit is contained in:
CPunch 2020-11-26 12:54:45 -06:00
parent 9ccb258a93
commit e784933517
1 changed files with 1 additions and 5 deletions

View File

@ -152,11 +152,7 @@ static void advance(CParseState *pstate) {
pstate->current = cosmoL_scanToken(pstate->lex);
if (pstate->current.type == TOKEN_ERROR) {
// go ahead and consume the rest of the errors so it doesn't cascade
CToken temp;
do {
temp = cosmoL_scanToken(pstate->lex);
} while(temp.type == TOKEN_ERROR);
errorAtCurrent(pstate, pstate->current.start);
}
}