-
Notifications
You must be signed in to change notification settings - Fork 47
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
Improve error reporting for some parsing and typechecking errors #723
Conversation
Maybe you already knew this, but using |
Thanks!
And I'm not sure we'll find all issues on time. |
True, I didn't have time to rerun the test yesterday and thought that all of them were passing |
@marcoeilers btw this is already an issue in current silver:
since |
b5787a3
to
95e6bf0
Compare
e96d29f
to
7217062
Compare
@marcoeilers this is ready to merge |
Two files here (https://github.com/viperproject/se_vcg_comparison/tree/main/bench_selection) that should parse don't:
|
@marcoeilers One issue is that
looks like a function call at the end of the first assign... |
@marcoeilers do you think that it's reasonable to require a function call
|
My immediate thoughts would be that 1) IMO newlines should be like any other whitespace, but 2) do we need to allow any whitespace before that parenthesis? |
@marcoeilers I'm not sure. The only reason I see for allowing it is for formatting reasons, but I've never seen anyone formatting calls with any whitespace before the
due to a cut after |
Hm. Might be a topic for the Viper meeting? |
Yep we should discuss it then, for now does the thing I pushed look reasonable? It solves the two parse issues you had |
9b4a646
to
18fd658
Compare
Subsumed by #764 |
I've added cuts in various places in the parser (notably in
exp
). This caused issues with parsing[exp]
vs[exp..]
(using("[" ~ exp ~ ".." ~ Pass ~ "]") | ("[" ~ exp ~ "]") | ...
caused the cut in the first case to prevent backtracking and getting to the other case, this should also be avoided in general see Avoid Backtracking) which had to be fixed.I also changed the duplicate identifier error to instead use the span of the found duplicate rather than the first declaration.
If there aren't any major issues, can we merge this before the release @marcoeilers?