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

Bad error messages in parsing of assignment/swap #37

Open
mbudde opened this issue Apr 29, 2013 · 0 comments
Open

Bad error messages in parsing of assignment/swap #37

mbudde opened this issue Apr 29, 2013 · 0 comments

Comments

@mbudde
Copy link
Owner

mbudde commented Apr 29, 2013

When there's an error in the left-hand side of an assignment or swap statement the error is a little confusing. E.g.

procedure main()
    x[#] += 5

give the error

File "tests/errors/parse-error-assign.ja" in line 2, column 7:
    Unexpected "#"
    Expecting statement

The problem is that the left-values are parsed wrapped in try so when they fail, parsing of the whole statement fails.

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

No branches or pull requests

1 participant