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

Parenthesized LHS is not reinterpreted as parethensized destructuring target in some edge cases #13

Open
JLHwung opened this issue Nov 9, 2020 · 2 comments

Comments

@JLHwung
Copy link

JLHwung commented Nov 9, 2020

([(a) = []] = []) => {}
async ([(a) = []] = []) => {};
function f([(a) = []] = []) {};

should throw

@KFlash
Copy link
Owner

KFlash commented Nov 9, 2020

Good catch! Note that this parser was only an experiment. What do you use Seafox for?

@JLHwung
Copy link
Author

JLHwung commented Nov 10, 2020

Oh I found this bug when I was working on babel/babel#12327. I constructed edge examples on astexplorer so I know whether Babel parsed them correctly. It is just convenient to see if these edge cases can fail other parser implementations, too.

That said I am not blocked by this issue, nor do I believe it practically block people. So take your time 😄 It is just a good-to-know issue report and offers test examples for future parser implementation.

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

2 participants