parser: Tweak parsing during error conditions

When an explicit parsing error is encountered and a CompileError raised,
apply the changes to the context state. This way, the rule that catches
the exception (e.g. Statement or Until) knows where the error occurred.

Also, changed "Expected" errors to be reported at the end of the
previous non-whitespace token.
This commit is contained in:
James Westman 2025-05-03 10:10:06 -05:00
parent 69e05bba34
commit d3c31447c9
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
6 changed files with 18 additions and 11 deletions

View file

@ -1,2 +1 @@
4,5,21,Attributes are not permitted at the top level of a menu
4,16,10,Unexpected tokens
4,5,21,Attributes are not permitted at the top level of a menu