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

Better recovery after errors #157

Closed
TwitchBronBron opened this issue Feb 6, 2019 · 1 comment · Fixed by #214
Closed

Better recovery after errors #157

TwitchBronBron opened this issue Feb 6, 2019 · 1 comment · Fixed by #214

Comments

@TwitchBronBron
Copy link
Contributor

If there is invalid syntax above a for loop, the end for ends up with a parser error. Is there a way to improve the way the parser recovers so that the error is contained to the 1=1 line?

function Main1()
  1=1
  for each num in [1,2,3]
    print num
  end for
end function

image

@TwitchBronBron
Copy link
Contributor Author

I'm working on this one.

sjbarag pushed a commit that referenced this issue Mar 23, 2019
Sometimes a parse error causes the `block` function to consume all of
the remaining tokens. This PR fixes that issue by discarding the line,
which should drastically improve parse error recovery.

fixes #157
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant