summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiam Murphy <43807659+Liamolucko@users.noreply.github.com>2020-12-02 06:52:03 +1100
committerGitHub <noreply@github.com>2020-12-01 14:52:03 -0500
commitc74132d3cd33a1b07103a49ba2e15dc8bc7ffaea (patch)
tree5cf26249c40924a549b769001a9c24a139c1fa06
parent108972c966d66691c64e90fcdde0584a910b96d5 (diff)
fix: higlight `async` and `of` in REPL (#8569)
-rw-r--r--cli/tools/repl.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/tools/repl.rs b/cli/tools/repl.rs
index c610d7e66..9b4d94a23 100644
--- a/cli/tools/repl.rs
+++ b/cli/tools/repl.rs
@@ -238,6 +238,8 @@ impl Highlighter for LineHighlighter {
colors::gray(&line[span]).to_string()
} else if ident == *"Infinity" || ident == *"NaN" {
colors::yellow(&line[span]).to_string()
+ } else if ident == *"async" || ident == *"of" {
+ colors::cyan(&line[span]).to_string()
} else {
line[span].to_string()
}