summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/tools/repl/editor.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/tools/repl/editor.rs b/cli/tools/repl/editor.rs
index a27671b21..5c2832aab 100644
--- a/cli/tools/repl/editor.rs
+++ b/cli/tools/repl/editor.rs
@@ -389,6 +389,15 @@ impl Highlighter for EditorHelper {
// We're looking for something that looks like a function
// We use a simple heuristic: 'ident' followed by 'LParen'
colors::intense_blue(&line[range]).to_string()
+ } else if ident == *"from"
+ && matches!(
+ next,
+ Some(deno_ast::TokenOrComment::Token(Token::Str { .. }))
+ )
+ {
+ // When ident 'from' is followed by a string literal, highlight it
+ // E.g. "export * from 'something'" or "import a from 'something'"
+ colors::cyan(&line[range]).to_string()
} else {
line[range].to_string()
}