summaryrefslogtreecommitdiff
path: root/cli/tools/repl/session.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/repl/session.rs')
-rw-r--r--cli/tools/repl/session.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/cli/tools/repl/session.rs b/cli/tools/repl/session.rs
index 1bc8a96d0..b122713c0 100644
--- a/cli/tools/repl/session.rs
+++ b/cli/tools/repl/session.rs
@@ -639,10 +639,11 @@ impl ReplSession {
source_map: deno_ast::SourceMapOption::None,
source_map_file: None,
inline_sources: false,
- keep_comments: false,
+ remove_comments: false,
},
)?
.into_source()
+ .into_string()?
.text;
let value = self
@@ -817,7 +818,7 @@ fn parse_source_as(
let parsed = deno_ast::parse_module(deno_ast::ParseParams {
specifier,
- text_info: deno_ast::SourceTextInfo::from_string(source),
+ text: source.into(),
media_type,
capture_tokens: true,
maybe_syntax: None,
@@ -884,7 +885,7 @@ fn analyze_jsx_pragmas(
range: comment_source_to_position_range(
c.start(),
&m,
- parsed_source.text_info(),
+ parsed_source.text_info_lazy(),
true,
),
});
@@ -898,7 +899,7 @@ fn analyze_jsx_pragmas(
range: comment_source_to_position_range(
c.start(),
&m,
- parsed_source.text_info(),
+ parsed_source.text_info_lazy(),
false,
),
});
@@ -912,7 +913,7 @@ fn analyze_jsx_pragmas(
range: comment_source_to_position_range(
c.start(),
&m,
- parsed_source.text_info(),
+ parsed_source.text_info_lazy(),
false,
),
});