Skip to content

Commit

Permalink
tools,doc: enable ecmaVersion 2021 in acorn parser
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
aduh95 authored and BethGriggs committed Dec 10, 2020
1 parent a4f44e6 commit c225144
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/doc/apilinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ inputs.forEach((file) => {

// Parse source.
const source = fs.readFileSync(file, 'utf8');
const ast = acorn.parse(
source,
{ allowReturnOutsideFunction: true, ecmaVersion: 10, locations: true });
const ast = acorn.parse(source, {
allowReturnOutsideFunction: true,
ecmaVersion: 'latest',
locations: true,
});
const program = ast.body;

// Build link
Expand Down

0 comments on commit c225144

Please sign in to comment.