lark-parser / lark-parser/Lark.js
Bug with `interactive.accepts()`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 88
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
I believe there is a bug with the accepts() method when using interactive.
I set up a repo here demonstrating the issue.
This is the error:
I believe what is happening is that accepts is attempting to iterate with an of statement here, but it gets back an object from choices() which cannot be iterated over with of (it could be iterated over with in, which would return the object's keys).
Contributor guide
No contributing guide indexed for this repository
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 with the generated json_parser.js references in the issue, especially choices() around line 2964 and accepts() around line 2975, then run the linked demo repository to reproduce the error. Done means interactive.accepts() handles the value returned by choices() without the reported iteration failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100