Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stop keyword parse error causes additional errors at end of file #193

Closed
TwitchBronBron opened this issue Mar 12, 2019 · 2 comments
Closed
Labels
bug Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior parser Affects this project's token parser

Comments

@TwitchBronBron
Copy link
Contributor

When the stop keyword parse error is encountered (see #192), and when there is nothing else in the body of the method, it causes a strange extra error to show up at the end of the file:

image

Adding any valid line after the stop keyword seems to mitigate the issue.

image

Is there a way to restrict this error so that it doesn't cause additional errors later in the document?

@TwitchBronBron TwitchBronBron changed the title stop keyword parse error causes additional errors at end of filesnip stop keyword parse error causes additional errors at end of file Mar 12, 2019
@sjbarag sjbarag added this to Needs triage in Issue Triage Mar 13, 2019
@sjbarag sjbarag moved this from Needs triage to Low priority in Issue Triage Mar 14, 2019
@sjbarag sjbarag added bug Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior parser Affects this project's token parser labels Mar 14, 2019
@sjbarag
Copy link
Owner

sjbarag commented Mar 14, 2019

The solution will be twofold here:

  1. Fix Stop keyword causes parse errors #192 "Stop keyword causes parse errors"
  2. Some work in Better recovery after errors #157 to make the synchronize() function a bit less greedy (details TBD at a later date though)

Thanks for striving for a good developer experience, @TwitchBronBron! I really appreciate it 😄

@TwitchBronBron
Copy link
Contributor Author

PR #214 seems to have fixed this issue.

image

Issue Triage automation moved this from Low priority to Closed May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior parser Affects this project's token parser
Projects
Development

No branches or pull requests

2 participants