diff options
-rw-r--r-- | Libraries/LibGUI/CppLexer.cpp | 16 | ||||
-rw-r--r-- | Libraries/LibGUI/CppLexer.h | 5 |
2 files changed, 21 insertions, 0 deletions
diff --git a/Libraries/LibGUI/CppLexer.cpp b/Libraries/LibGUI/CppLexer.cpp index 943cbf105f..0a34b98e18 100644 --- a/Libraries/LibGUI/CppLexer.cpp +++ b/Libraries/LibGUI/CppLexer.cpp @@ -437,6 +437,10 @@ Vector<CppToken> CppLexer::lex() emit_token_equals(CppToken::Type::Caret, CppToken::Type::CaretEquals); continue; } + if (ch == '!') { + emit_token_equals(CppToken::Type::ExclamationMark, CppToken::Type::ExclamationMarkEquals); + continue; + } if (ch == '=') { emit_token_equals(CppToken::Type::Equals, CppToken::Type::EqualsEquals); continue; @@ -473,6 +477,18 @@ Vector<CppToken> CppLexer::lex() commit_token(CppToken::Type::Pipe); continue; } + if (ch == '~') { + emit_token(CppToken::Type::Tilde); + continue; + } + if (ch == '?') { + emit_token(CppToken::Type::QuestionMark); + continue; + } + if (ch == ':') { + emit_token(CppToken::Type::Colon); + continue; + } if (ch == ';') { emit_token(CppToken::Type::Semicolon); continue; diff --git a/Libraries/LibGUI/CppLexer.h b/Libraries/LibGUI/CppLexer.h index 6a69584a88..80d468f216 100644 --- a/Libraries/LibGUI/CppLexer.h +++ b/Libraries/LibGUI/CppLexer.h @@ -67,6 +67,8 @@ namespace GUI { __TOKEN(PercentEquals) \ __TOKEN(Caret) \ __TOKEN(CaretEquals) \ + __TOKEN(ExclamationMark) \ + __TOKEN(ExclamationMarkEquals) \ __TOKEN(Equals) \ __TOKEN(EqualsEquals) \ __TOKEN(And) \ @@ -75,6 +77,9 @@ namespace GUI { __TOKEN(Pipe) \ __TOKEN(PipePipe) \ __TOKEN(PipeEquals) \ + __TOKEN(Tilde) \ + __TOKEN(QuestionMark) \ + __TOKEN(Colon) \ __TOKEN(Semicolon) \ __TOKEN(DoubleQuotedString) \ __TOKEN(SingleQuotedString) \ |