summaryrefslogtreecommitdiff
path: root/lib/internal/repl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal/repl')
-rw-r--r--lib/internal/repl/await.js2
-rw-r--r--lib/internal/repl/recoverable.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/internal/repl/await.js b/lib/internal/repl/await.js
index dfd4e93085..5a26e83557 100644
--- a/lib/internal/repl/await.js
+++ b/lib/internal/repl/await.js
@@ -68,7 +68,7 @@ function processTopLevelAwait(src) {
const wrappedArray = wrapped.split('');
let root;
try {
- root = acorn.parse(wrapped, { ecmaVersion: 8 });
+ root = acorn.parse(wrapped, { ecmaVersion: 10 });
} catch (err) {
return null;
}
diff --git a/lib/internal/repl/recoverable.js b/lib/internal/repl/recoverable.js
index 465d77451a..5d270f5146 100644
--- a/lib/internal/repl/recoverable.js
+++ b/lib/internal/repl/recoverable.js
@@ -63,7 +63,7 @@ function isRecoverableError(e, code) {
// Try to parse the code with acorn. If the parse fails, ignore the acorn
// error and return the recoverable status.
try {
- acorn.parse(code, { plugins: { replRecoverable: true } });
+ acorn.parse(code, { plugins: { replRecoverable: true }, ecmaVersion: 10 });
// Odd case: the underlying JS engine (V8, Chakra) rejected this input
// but Acorn detected no issue. Presume that additional text won't