From e7849335176adaa883b08e7c54bda5c380734238 Mon Sep 17 00:00:00 2001 From: CPunch Date: Thu, 26 Nov 2020 12:54:45 -0600 Subject: [PATCH] fixed lexer errors --- src/cparse.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/cparse.c b/src/cparse.c index 344eb4a..75d1821 100644 --- a/src/cparse.c +++ b/src/cparse.c @@ -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); } }