mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00:00
LibCpp: Fix lexing & parsing of non-terminated strings
This commit is contained in:
parent
2da5ecba41
commit
8ace2cfa18
Notes:
sideshowbarker
2024-07-18 22:21:40 +09:00
Author: https://github.com/itamar8910
Commit: 8ace2cfa18
Pull-request: https://github.com/SerenityOS/serenity/pull/5327
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