Async binding & destructuring issues
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.1k
- Forks
- 773
- PR merge metrics
- No merged PRs in 30d
Description
After experimenting with Esprima I come across a lot of binding & destructuring issues. Cases that actually should fail, but doesn't.
I used the ASTExplorer to verify this.
Steps to reproduce
// parenthesized
esprima.parse('async ((x, y, z)) => 0 ')
// nested
esprima.parse('async(async(async(async(async(async())))))')
// others
esprima.parse('async(a)(s)(y)(n)(c)')
esprima.parse('async (async () => a) => a')
esprima.parse('async(async() () => {})(async() () => {})(y)(n)(c)')
esprima.parse('async().foo13 () => 1')
esprima.parse('async(async() () => {})(async() () => {})(async() () => {})(async() () => {})(async() () => {})')
esprima.parse('async().foo13 () => 1')
esprima.parse('async()(async() => {})')
Expected output
This cases should all throw an syntax error
Actual output
Parses as normal, and doesn't throw any errors
Relevant references
V8, Acorn, Test262 among others
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the listed Esprima.parse reproductions and compare their behavior with V8, Acorn, and Test262, as referenced in the issue. Trace the parser path for async binding and destructuring cases; the work is done when each invalid example consistently throws a syntax error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100