diff options
author | Oriko <oriko1010@protonmail.com> | 2020-03-14 01:48:30 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-14 11:30:31 +0100 |
commit | d439013903a1e9ecfc8c8716bd88dbceb8314a6a (patch) | |
tree | 4e4b878ec25d46cd036674ab059918fca3f9e003 /Libraries/LibGUI/JSSyntaxHighlighter.cpp | |
parent | e273203d27c8a9c6a4340d0b50aa25c1666e48ec (diff) | |
download | serenity-d439013903a1e9ecfc8c8716bd88dbceb8314a6a.zip |
LibGUI: Highlight new JS tokens
Diffstat (limited to 'Libraries/LibGUI/JSSyntaxHighlighter.cpp')
-rw-r--r-- | Libraries/LibGUI/JSSyntaxHighlighter.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Libraries/LibGUI/JSSyntaxHighlighter.cpp b/Libraries/LibGUI/JSSyntaxHighlighter.cpp index 2546c9d165..19573a50bf 100644 --- a/Libraries/LibGUI/JSSyntaxHighlighter.cpp +++ b/Libraries/LibGUI/JSSyntaxHighlighter.cpp @@ -38,6 +38,7 @@ static TextStyle style_for_token_type(JS::TokenType type) case JS::TokenType::BoolLiteral: case JS::TokenType::NullLiteral: return { Color::Black, &Gfx::Font::default_bold_fixed_width_font() }; + case JS::TokenType::Await: case JS::TokenType::Catch: case JS::TokenType::Class: case JS::TokenType::Const: @@ -48,14 +49,19 @@ static TextStyle style_for_token_type(JS::TokenType type) case JS::TokenType::For: case JS::TokenType::Function: case JS::TokenType::If: + case JS::TokenType::In: + case JS::TokenType::Instanceof: case JS::TokenType::Interface: case JS::TokenType::Let: case JS::TokenType::New: case JS::TokenType::QuestionMark: case JS::TokenType::Return: case JS::TokenType::Try: + case JS::TokenType::Typeof: case JS::TokenType::Var: + case JS::TokenType::Void: case JS::TokenType::While: + case JS::TokenType::Yield: return { Color::Black, &Gfx::Font::default_bold_fixed_width_font() }; case JS::TokenType::Identifier: return { Color::from_rgb(0x092e64) }; |