Update acorn for optional chaining support

This commit is contained in:
David Edmondson
2021-09-01 19:22:12 -07:00
parent 5dd6145d53
commit 38880f69e1
3 changed files with 116 additions and 101 deletions
+1 -1
View File
@@ -216,7 +216,7 @@ async function parseOnlyRamCalculate(otherScripts, code, workerScript) {
* that need to be parsed (i.e. are 'import'ed scripts).
*/
function parseOnlyCalculateDeps(code, currentModule) {
const ast = parse(code, {sourceType:"module", ecmaVersion: 9});
const ast = parse(code, {sourceType:"module", ecmaVersion: 'latest' });
// Everything from the global scope goes in ".". Everything else goes in ".function", where only
// the outermost layer of functions counts.