davidbonnet / astring

🌳 Tiny and fast JavaScript code generator from an ESTree-compliant AST.

Home Page:https://david.bonnet.cc/astring/demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support ES2022

sxzz opened this issue · comments

Motivation

Acorn already supports ES2022, astring will emit errors in ES2022 syntax.

Expected behavior

Support ES2022

Actual behavior

/********/node_modules/astring/dist/astring.js:267
          this[statement.type](statement, state);
                              ^
TypeError: this[statement.type] is not a function

statement.type = PropertyDefinition