mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00:00
LibCpp: Fix lexing & parsing of non-terminated strings
This commit is contained in:
parent
2da5ecba41
commit
8ace2cfa18
3 changed files with 25 additions and 9 deletions
|
@ -640,6 +640,10 @@ Vector<Token> Lexer::lex()
|
|||
}
|
||||
}
|
||||
|
||||
// If string is not terminated - stop before EOF
|
||||
if (!peek(1))
|
||||
break;
|
||||
|
||||
if (consume() == '"')
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue