mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 18:45:07 +00:00
CppLexer: Add token types for ".", "->"
This commit is contained in:
parent
95113d15fe
commit
1992dbd637
2 changed files with 11 additions and 0 deletions
|
@ -422,6 +422,11 @@ Vector<CppToken> CppLexer::lex()
|
|||
commit_token(CppToken::Type::MinusEquals);
|
||||
continue;
|
||||
}
|
||||
if (peek() == '>') {
|
||||
consume();
|
||||
commit_token(CppToken::Type::Arrow);
|
||||
continue;
|
||||
}
|
||||
commit_token(CppToken::Type::Minus);
|
||||
continue;
|
||||
}
|
||||
|
@ -493,6 +498,10 @@ Vector<CppToken> CppLexer::lex()
|
|||
emit_token(CppToken::Type::Semicolon);
|
||||
continue;
|
||||
}
|
||||
if (ch == '.') {
|
||||
emit_token(CppToken::Type::Dot);
|
||||
continue;
|
||||
}
|
||||
if (ch == '#') {
|
||||
begin_token();
|
||||
consume();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue