Parses invalid continue statement - not nested within an iteration statement
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.1k
- Forks
- 773
- PR merge metrics
- No merged PRs in 30d
Description
Steps to reproduce
esprima.parse('a: { continue a; }')
esprima.parse('a: continue a; ')
Expected output
Should throw an error
Actual output
Parses invalid AST node
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 two JavaScript examples in the issue against Esprima and inspect the parser path that handles continue statements and labels. The fix is done when both invalid forms throw an error instead of producing an AST node; add or update a regression test if the repository's existing test location is identified.
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
- Clearly specified
- Newbie friendliness
- 48/100