Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bug parsing destructured arrow function parameters #177

Open
axefrog opened this issue Jan 26, 2022 · 1 comment
Open

Possible bug parsing destructured arrow function parameters #177

axefrog opened this issue Jan 26, 2022 · 1 comment

Comments

@axefrog
Copy link

axefrog commented Jan 26, 2022

The parameter list for an arrow function is parsing differently than for a regular function. Specifically, when a parameter yields an ObjectBindingPattern that contains a BindingProperty where a default value has been supplied, the initializer property will remain empty (i.e. null) and the value property will be assigned an AssignmentExpression with the initializer expression appearing as the right property.

(({ a: b = c }) => {})

https://kataw.github.io/kataw/kataw_ast/?code=((%7B%20a%3A%20b%20%3D%20c%20%7D)%20%3D%3E%20%7B%7D)&method=parse&range=undefined&loc=true&next=true&cst=true&module=false&raw=undefined&jsx=undefined&directives=undefined&attachComment=undefined&webCompat=undefined&lexical=undefined

btw I've just started using kataw as of the last couple of days. I know you're mostly inactive at the moment, but I'll continue to report any issues as and if I find them. I've been silent for quite a while as you know, but I've been working on the same thing this entire time - it's just taken me a long time to get the system architecture I've been designing right. I'm hoping that I've got it right this time, which means hopefully I won't drop off the face of the earth again! Assuming that this is the case, it is still my intent to show you some of what I'm doing (when the time is right), so you can see how your library is being used.

@axefrog
Copy link
Author

axefrog commented Jan 31, 2022

@KFlash Have you moved on from this project? I'm just wondering if I should submit pull requests or if I should just fork the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant