rokucommunity / rokucommunity/brighterscript
many missing end ifs can cause the parser to get stuck forever
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 208
- Forks
- 68
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 39
Description
I'll add an isolated file to this issue in due course; but for now, the following description explains the situation:
if you have a file with a certain quantity of if's without end ifs, then it really get's it's knickers in a twist
preprocess my unit tests to prefix the asserts with if not m.currentTest.isFail then m.assertFoo, so I have more resilience in tests when a prior assert crashes
and I started using the file resolver mechanism, which caused that regex to sometime slit the if then over 2 lines
so I had a lot of missing end ifs
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 unit tests and the file resolver mechanism described in the issue, then reproduce the parser hang using an isolated file once it is attached. Trace how multiline if statements are handled and verify that inputs with missing end ifs terminate without getting stuck.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100