mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 17:58:18 +03:00
LibCpp: Support Lexing escaped newlines
This commit is contained in:
parent
5c19a48b95
commit
1bd6705636
Notes:
sideshowbarker
2024-07-18 18:24:52 +09:00
Author: https://github.com/itamar8910 Commit: https://github.com/SerenityOS/serenity/commit/1bd6705636b Pull-request: https://github.com/SerenityOS/serenity/pull/6916 Reviewed-by: https://github.com/awesomekling
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user