diff options
author | Itamar <itamar8910@gmail.com> | 2021-05-07 15:44:34 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-09 20:58:27 +0200 |
commit | 1bd6705636bed166934c92096360d52b896e0e0a (patch) | |
tree | 13c5074ef024ec990e549c8f43c0224fb3d75f14 /Userland/Libraries/LibCpp | |
parent | 5c19a48b952f07f39e00e8487aa52227a9924c28 (diff) | |
download | serenity-1bd6705636bed166934c92096360d52b896e0e0a.zip |
LibCpp: Support Lexing escaped newlines
Diffstat (limited to 'Userland/Libraries/LibCpp')
-rw-r--r-- | Userland/Libraries/LibCpp/Lexer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Libraries/LibCpp/Lexer.cpp b/Userland/Libraries/LibCpp/Lexer.cpp index bbd622ad67..b7d0917e9c 100644 --- a/Userland/Libraries/LibCpp/Lexer.cpp +++ b/Userland/Libraries/LibCpp/Lexer.cpp @@ -757,6 +757,13 @@ Vector<Token> Lexer::lex() commit_token(Token::Type::Identifier); continue; } + + if (ch == '\\' && peek(1) == '\n') { + consume(); + consume(); + continue; + } + dbgln("Unimplemented token character: {}", ch); emit_single_char_token(Token::Type::Unknown); } |