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
fix(ast): serialize Function.params like estree (#8772)
- part of #2854
This PR attempts to handle estree ast incompatibility of
`Function.params: FormalParameters` as mentioned in the above issue:
> `FormalParameters` is closer to ESTree now, but should be inlined
directly into `<node>.params` in multiple nodes.
Estree spec has `Function.params: Pattern[]`
https://github.com/estree/estree/blob/master/es5.md#functions, but oxc
already has `interface Pattern`, so I named it to `Function.params:
ParamPattern[]` for now.
Also I'm not sure about the testing (I suppose that's a part of
#8630), so I snapshoted one
example code. For comparison, here is acorn's output
https://astexplorer.net/#/gist/25138c0605f82dcfc1a8fd363dc2a681/5ad30d36c9f276519063e6fd2e340c113d8c85b0
---------
Co-authored-by: overlookmotel <theoverlookmotel@gmail.com>
0 commit comments