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 <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Derek Lewis <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
aduh95 authored and danielleadams committed Nov 9, 2020
1 parent 9d26c4d commit da3c2ab
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 da3c2ab

Please sign in to comment.