diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2021-08-06 10:36:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-06 10:36:16 -0400 |
commit | 466d3df9d1ff43e16e1a2c20b7792de664547b48 (patch) | |
tree | 170b2ab1097331d976ccee47671964b2ebdcc974 /cli/tools/repl.rs | |
parent | e9ddc7a41ad7ea02172d88e95c82d007d8d5df63 (diff) |
refactor: make `ParsedModule` implement `Sync` (#11581)
Diffstat (limited to 'cli/tools/repl.rs')
-rw-r--r-- | cli/tools/repl.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/tools/repl.rs b/cli/tools/repl.rs index 5b0d78841..d527ea868 100644 --- a/cli/tools/repl.rs +++ b/cli/tools/repl.rs @@ -231,7 +231,7 @@ impl Validator for EditorHelper { let mut stack: Vec<Token> = Vec::new(); let mut in_template = false; - for item in ast::lex("", ctx.input(), &MediaType::TypeScript) { + for item in ast::lex(ctx.input(), &MediaType::TypeScript) { if let TokenOrComment::Token(token) = item.inner { match token { Token::BackQuote => in_template = !in_template, @@ -302,7 +302,7 @@ impl Highlighter for EditorHelper { fn highlight<'l>(&self, line: &'l str, _: usize) -> Cow<'l, str> { let mut out_line = String::from(line); - for item in ast::lex("", line, &MediaType::TypeScript) { + for item in ast::lex(line, &MediaType::TypeScript) { // Adding color adds more bytes to the string, // so an offset is needed to stop spans falling out of sync. let offset = out_line.len() - line.len(); |