From 5cd29b37f7946ac05783bae777be8503182a8b8e Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Fri, 2 Oct 2020 19:17:47 +0800 Subject: feat(cli/repl): enable await and let re-declarations (#7784) This enables `replMode` during evaluations which allows for top level await and let re-declarations. --- cli/repl.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'cli/repl.rs') diff --git a/cli/repl.rs b/cli/repl.rs index 57e517bd7..1c723ec59 100644 --- a/cli/repl.rs +++ b/cli/repl.rs @@ -126,9 +126,7 @@ pub async fn run( Some(json!({ "expression": format!("'use strict'; void 0;\n{}", &wrapped_line), "contextId": context_id, - // TODO(caspervonb) set repl mode to true to enable const redeclarations and top - // level await - "replMode": false, + "replMode": true, })), ) .await?; @@ -145,9 +143,7 @@ pub async fn run( Some(json!({ "expression": format!("'use strict'; void 0;\n{}", &line), "contextId": context_id, - // TODO(caspervonb) set repl mode to true to enable const redeclarations and top - // level await - "replMode": false, + "replMode": true, })), ) .await? -- cgit v1.2.3