fix: higlight async and of in REPL (#8569)

This commit is contained in:
Liam Murphy 2020-12-02 06:52:03 +11:00 committed by GitHub
parent 108972c966
commit c74132d3cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()
}