summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2020-05-10 12:27:36 +0430
committerAndreas Kling <kling@serenityos.org>2020-05-10 10:23:05 +0200
commitc40fd3a902e238a4d6e2920ff874927b08ee1628 (patch)
tree1e203895c787411248a17840b4e7d37daa2b4fa7 /Userland
parent8487806ec01cd44e808cfc18ca7ee51aaecae533 (diff)
downloadserenity-c40fd3a902e238a4d6e2920ff874927b08ee1628.zip
LibLine: Support RGB colors
This also patches Userland/js.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/js.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Userland/js.cpp b/Userland/js.cpp
index 14e080e27a..ed5ddb3c56 100644
--- a/Userland/js.cpp
+++ b/Userland/js.cpp
@@ -541,10 +541,10 @@ int main(int argc, char** argv)
switch (token.type()) {
case JS::TokenType::Invalid:
case JS::TokenType::Eof:
- stylize({ start, end }, { Line::Style::Foreground(Line::Style::Color::Red), Line::Style::Underline });
+ stylize({ start, end }, { Line::Style::Foreground(Line::Style::XtermColor::Red), Line::Style::Underline });
break;
case JS::TokenType::NumericLiteral:
- stylize({ start, end }, { Line::Style::Foreground(Line::Style::Color::Magenta) });
+ stylize({ start, end }, { Line::Style::Foreground(Line::Style::XtermColor::Magenta) });
break;
case JS::TokenType::StringLiteral:
case JS::TokenType::TemplateLiteralStart:
@@ -552,7 +552,7 @@ int main(int argc, char** argv)
case JS::TokenType::TemplateLiteralString:
case JS::TokenType::RegexLiteral:
case JS::TokenType::UnterminatedStringLiteral:
- stylize({ start, end }, { Line::Style::Foreground(Line::Style::Color::Green), Line::Style::Bold });
+ stylize({ start, end }, { Line::Style::Foreground(Line::Style::XtermColor::Green), Line::Style::Bold });
break;
case JS::TokenType::BracketClose:
case JS::TokenType::BracketOpen:
@@ -609,7 +609,7 @@ int main(int argc, char** argv)
break;
case JS::TokenType::BoolLiteral:
case JS::TokenType::NullLiteral:
- stylize({ start, end }, { Line::Style::Foreground(Line::Style::Color::Yellow), Line::Style::Bold });
+ stylize({ start, end }, { Line::Style::Foreground(Line::Style::XtermColor::Yellow), Line::Style::Bold });
break;
case JS::TokenType::Class:
case JS::TokenType::Const:
@@ -627,7 +627,7 @@ int main(int argc, char** argv)
case JS::TokenType::Typeof:
case JS::TokenType::Var:
case JS::TokenType::Void:
- stylize({ start, end }, { Line::Style::Foreground(Line::Style::Color::Blue), Line::Style::Bold });
+ stylize({ start, end }, { Line::Style::Foreground(Line::Style::XtermColor::Blue), Line::Style::Bold });
break;
case JS::TokenType::Await:
case JS::TokenType::Case:
@@ -642,10 +642,10 @@ int main(int argc, char** argv)
case JS::TokenType::Try:
case JS::TokenType::While:
case JS::TokenType::Yield:
- stylize({ start, end }, { Line::Style::Foreground(Line::Style::Color::Cyan), Line::Style::Italic });
+ stylize({ start, end }, { Line::Style::Foreground(Line::Style::XtermColor::Cyan), Line::Style::Italic });
break;
case JS::TokenType::Identifier:
- stylize({ start, end }, { Line::Style::Foreground(Line::Style::Color::White), Line::Style::Bold });
+ stylize({ start, end }, { Line::Style::Foreground(Line::Style::XtermColor::White), Line::Style::Bold });
default:
break;
}