You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However the generated ESTree AST slightly differs:
The Oxc AST differs slightly from the estree AST by removing ambiguous nodes and introducing distinct types.
For example, instead of using a generic estreeIdentifier,
the Oxc AST provides specific types such as BindingIdentifier, IdentifierReference, and IdentifierName.
This clear distinction greatly enhances the development experience by aligning more closely with the ECMAScript specification.
But it would be pretty awesome if it was supported!
The additional distinct types is quite a big change I would think:
There's a performance overhead, but parsing a big document with OXC is still faster than what I do today. I have a transformer implemented in SWC, but I would like to replace that with JS instead. My initial experiments tell me that I can shave of a few ms by doing it this way.
Another fast ESTree parser is oxc.
https://github.com/web-infra-dev/oxc#-ast-and-parser
However the generated ESTree AST slightly differs:
But it would be pretty awesome if it was supported!
The additional distinct types is quite a big change I would think:
OXC ESTree AST
Regular ESTree AST
I haven't found another library for traversing a OXC compatible ESTree in Javascript yet.
The node types are available in https://github.com/web-infra-dev/oxc/tree/main/crates/oxc_ast/src
The text was updated successfully, but these errors were encountered: