LibCpp: Fix lexing & parsing of non-terminated strings

This commit is contained in:
Itamar 2021-02-10 22:15:38 +02:00 committed by Andreas Kling
commit 8ace2cfa18
Notes: sideshowbarker 2024-07-18 22:21:40 +09:00
3 changed files with 25 additions and 9 deletions

View file

@ -640,6 +640,10 @@ Vector<Token> Lexer::lex()
}
}
// If string is not terminated - stop before EOF
if (!peek(1))
break;
if (consume() == '"')
break;
}