Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
aduh95 authored and BethGriggs committed Dec 15, 2020
1 parent 3a08afc commit 3e7598d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/doc/apilinks.js
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 3e7598d

Please sign in to comment.