-
Notifications
You must be signed in to change notification settings - Fork 289
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
[LANGUAGE] improved error productions for non decimals #4817
Conversation
Works for all tests except: TestsLevel17.test_if_no_colon_after_pressed_gives_parse_error where E AssertionError: False is not true error is given.
non decimal should be finished. test error randomly disappeared on my pc.
…into error-productions-2
Hi @akseron! I updated the broken test. I am not sure why the parser gets confused with the new rule, but it is ok for me, the previous location was also wrong haha, and we need to aim to not give a ParseError anyway in such a situation. So I am good with shipping this, If you are also, set it to Ready for Review and I will approve! |
Oh great thank you! I was already planning to ask about changing the error_location since it seemed hard coded but it's great that you already fixed it haha. It was indeed a fix to 4670 so this should do it. A last question I had about it was that during the last Hedy contributors meeting, I was told I had to refactor the code but I am not certain if that is necessary here. I will set it to Ready to Review in case it is not 👍 |
Perfect! Can you add that to the original description? If you add "fixes #4670" then the issue will close automatically!
Ah I wam not there so I don't know who said that and what refactoring they asked for (just "refactoring" is a but vague) Maybe you can ask who said that for their input? |
Hi @akseron! You don't need to refactor your code, that's true! I thought you needed to force push main back, but you're right that that is not necessary! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thanks for the hard work @akseron!
Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork). |
Changes in error production and regex to support better syntax error messages for non decimal numbers. Currently regex allows non decimals, however they are unfunctional and provide complex parse errors. Fixes #4670.