Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ function parseCode(code, offset) {
// Parse the read code until the correct expression is found.
do {
try {
node = parseExpressionAt(code, start, { ecmaVersion: 11 });
node = parseExpressionAt(code, start, { ecmaVersion: 2021 });
Comment thread
targos marked this conversation as resolved.
Resolved
start = node.end + 1 || start;
// Find the CallExpression in the tree.
node = findNodeAround(node, offset, 'CallExpression');
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/repl/await.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function processTopLevelAwait(src) {
const wrappedArray = wrapped.split('');
let root;
try {
root = parser.parse(wrapped, { ecmaVersion: 11 });
root = parser.parse(wrapped, { ecmaVersion: 2021 });
Comment thread
targos marked this conversation as resolved.
Resolved
} catch {
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/repl/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,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: 11 });
RecoverableParser.parse(code, { ecmaVersion: 2021 });
Comment thread
targos marked this conversation as resolved.
Resolved

// Odd case: the underlying JS engine (V8, Chakra) rejected this input
// but Acorn detected no issue. Presume that additional text won't
Expand Down