Skip to content

Commit 3e7598d

Browse files
aduh95BethGriggs
authored andcommittedDec 15, 2020
tools,doc: enable ecmaVersion 2021 in acorn parser
PR-URL: #35994 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 3a08afc commit 3e7598d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎tools/doc/apilinks.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ inputs.forEach((file) => {
5454

5555
// Parse source.
5656
const source = fs.readFileSync(file, 'utf8');
57-
const ast = acorn.parse(
58-
source,
59-
{ allowReturnOutsideFunction: true, ecmaVersion: 10, locations: true });
57+
const ast = acorn.parse(source, {
58+
allowReturnOutsideFunction: true,
59+
ecmaVersion: 'latest',
60+
locations: true,
61+
});
6062
const program = ast.body;
6163

6264
// Build link

0 commit comments

Comments
 (0)
Please sign in to comment.