Doesn't fail on invalid nested pattern
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.1k
- Forks
- 773
- PR merge metrics
- No merged PRs in 30d
Description
Esprima accepts invalid nested parenthesized pattern.
Steps to reproduce
esprima.parse('({ src: ([dest]) } = obj)')
Expected output
Throws an error
Actual output
Outputs invalid AST
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 reproducing the issue with esprima.parse('({ src: ([dest]) } = obj)') and inspect the parser's handling of nested parenthesized patterns. Done means the invalid input throws an error instead of producing an AST.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100