summaryrefslogtreecommitdiff
path: root/lib/internal/repl
diff options
context:
space:
mode:
authorMichaƫl Zasso <targos@protonmail.com>2019-07-12 08:53:01 +0200
committerAnna Henningsen <anna@addaleax.net>2019-07-15 00:04:50 +0200
commit60a207f5f2cbfcaf1045726e87859c67cfdbd15b (patch)
treec2c8ded69bc1d62564c1e1bbbcee5c257c356661 /lib/internal/repl
parent00464b5282724a693582079244c09a1cba5d8e08 (diff)
downloadandroid-node-v8-60a207f5f2cbfcaf1045726e87859c67cfdbd15b.tar.gz
android-node-v8-60a207f5f2cbfcaf1045726e87859c67cfdbd15b.tar.bz2
android-node-v8-60a207f5f2cbfcaf1045726e87859c67cfdbd15b.zip
deps: update acorn to 6.2.0
Includes support for bigint syntax so we can remove the acorn-bigint plugin. PR-URL: https://github.com/nodejs/node/pull/28649 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Diffstat (limited to 'lib/internal/repl')
-rw-r--r--lib/internal/repl/await.js4
-rw-r--r--lib/internal/repl/utils.js4
2 files changed, 2 insertions, 6 deletions
diff --git a/lib/internal/repl/await.js b/lib/internal/repl/await.js
index 6fb10bbba0..ed58e89529 100644
--- a/lib/internal/repl/await.js
+++ b/lib/internal/repl/await.js
@@ -6,7 +6,6 @@ const acorn = require('internal/deps/acorn/acorn/dist/acorn');
const walk = require('internal/deps/acorn/acorn-walk/dist/walk');
const privateMethods =
require('internal/deps/acorn-plugins/acorn-private-methods/index');
-const bigInt = require('internal/deps/acorn-plugins/acorn-bigint/index');
const classFields =
require('internal/deps/acorn-plugins/acorn-class-fields/index');
const numericSeparator =
@@ -16,7 +15,6 @@ const staticClassFeatures =
const parser = acorn.Parser.extend(
privateMethods,
- bigInt,
classFields,
numericSeparator,
staticClassFeatures
@@ -93,7 +91,7 @@ function processTopLevelAwait(src) {
const wrappedArray = wrapped.split('');
let root;
try {
- root = parser.parse(wrapped, { ecmaVersion: 10 });
+ root = parser.parse(wrapped, { ecmaVersion: 11 });
} catch {
return null;
}
diff --git a/lib/internal/repl/utils.js b/lib/internal/repl/utils.js
index 2ad78a8ab4..d60b332088 100644
--- a/lib/internal/repl/utils.js
+++ b/lib/internal/repl/utils.js
@@ -3,7 +3,6 @@
const acorn = require('internal/deps/acorn/acorn/dist/acorn');
const privateMethods =
require('internal/deps/acorn-plugins/acorn-private-methods/index');
-const bigInt = require('internal/deps/acorn-plugins/acorn-bigint/index');
const classFields =
require('internal/deps/acorn-plugins/acorn-class-fields/index');
const numericSeparator =
@@ -44,7 +43,6 @@ function isRecoverableError(e, code) {
const RecoverableParser = AcornParser
.extend(
privateMethods,
- bigInt,
classFields,
numericSeparator,
staticClassFeatures,
@@ -78,7 +76,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 {
- RecoverableParser.parse(code, { ecmaVersion: 10 });
+ RecoverableParser.parse(code, { ecmaVersion: 11 });
// Odd case: the underlying JS engine (V8, Chakra) rejected this input
// but Acorn detected no issue. Presume that additional text won't