mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:07:45 +00:00
LibCpp: Support Lexing escaped newlines
This commit is contained in:
parent
5c19a48b95
commit
1bd6705636
1 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue