ast-types
ast-types copied to clipboard
Support ESTree es-proposal class features
This PR:
- updates ast-types to tolerate the final ESTree ES2022 class-features specification
- extends the existing
validateECMAScripttest function to also verify parsing with@babel/parserandacorn - adds an additional fixture to exercise new class syntax
Very happy to take any feedback, in particular on the def structure and sharing/overriding between es-proposals/babel/typescript and the test methodology.
Class Features achieved Stage 4 today: https://twitter.com/robpalmer2/status/1384208760420274176
So hopefully along with https://github.com/acornjs/acorn/issues/1025 I can remove the Draft flag 😉
Finally got back here to switch to acorn without the need for a stage-3 plugin!
Need to move from def/es-proposals.ts to def/es2022.ts now really, and that has knock-on consequences