1
Fork 0
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:
Itamar 2021-02-10 22:15:38 +02:00 committed by Andreas Kling
parent 2da5ecba41
commit 8ace2cfa18
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;
}