diff options
author | Sam Ruby <rubys@intertwingly.net> | 2018-08-23 22:33:47 +0300 |
---|---|---|
committer | Sam Ruby <rubys@intertwingly.net> | 2018-08-27 00:48:09 +0300 |
commit | 49bfc37241b0d306635c54c850f10669f07ff22c (patch) | |
tree | 96a48cf410f28539e273644e6813b73db8b12641 /lib/internal/repl | |
parent | 317b894b122e2c45499d6a0032adc27d85f0dd99 (diff) |
deps: import acorn@5.7.2
Imported from the tarball published on npm
(https://registry.npmjs.org/acorn/-/acorn-5.7.2.tgz).
Update to emcaScript version 10 in order to get support for
binding-less catch statements.
Also needed to parse node.js lib API in #22405.
PR-URL: https://github.com/nodejs/node/pull/22488
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'lib/internal/repl')
-rw-r--r-- | lib/internal/repl/await.js | 2 | ||||
-rw-r--r-- | lib/internal/repl/recoverable.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/internal/repl/await.js b/lib/internal/repl/await.js index dfd4e930859..5a26e835574 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 465d77451a5..5d270f5146e 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 |