LibCpp: Support Lexing escaped newlines

This commit is contained in:
Itamar 2021-05-07 15:44:34 +03:00 committed by Andreas Kling
commit 1bd6705636
Notes: sideshowbarker 2024-07-18 18:24:52 +09:00

View file

@ -757,6 +757,13 @@ Vector<Token> Lexer::lex()
commit_token(Token::Type::Identifier); commit_token(Token::Type::Identifier);
continue; continue;
} }
if (ch == '\\' && peek(1) == '\n') {
consume();
consume();
continue;
}
dbgln("Unimplemented token character: {}", ch); dbgln("Unimplemented token character: {}", ch);
emit_single_char_token(Token::Type::Unknown); emit_single_char_token(Token::Type::Unknown);
} }