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

{amod} Unclear parse error with "!*" #124

Open
asmaloney opened this issue May 31, 2022 · 0 comments
Open

{amod} Unclear parse error with "!*" #124

asmaloney opened this issue May 31, 2022 · 0 comments
Labels
investigate language amod language changes

Comments

@asmaloney
Copy link
Owner

Currently, using the following construct (see Example_productionNotWildcard in amod_productions_test.go):

match { goal [foo: ?blat !*] }

will produce this parse error (via participle):

ERROR: unexpected token "!" (expected "]") (line 9, col 27)

Need to investigate why we get this strange message. The grammar is clear:

PatternSlotItem
         ::= '!'? ( 'nil' | ident | number | patternvar )
           | patternwildcard

Screen Shot 2022-05-31 at 12 59 33 PM

I would expect an error more along the lines:

ERROR: unexpected token "*" (expected "nil | ident| number | patternvar") (line 9, col 27)
@asmaloney asmaloney added language amod language changes investigate labels May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate language amod language changes
Projects
None yet
Development

No branches or pull requests

1 participant