mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +00:00
LibGUI: Highlight new JS tokens
This commit is contained in:
parent
e273203d27
commit
d439013903
Notes:
sideshowbarker
2024-07-19 08:19:03 +09:00
Author: https://github.com/oriko1010 Commit: https://github.com/SerenityOS/serenity/commit/d439013903a Pull-request: https://github.com/SerenityOS/serenity/pull/1450
1 changed files with 6 additions and 0 deletions
|
@ -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) };
|
||||
|
|
Loading…
Add table
Reference in a new issue