-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
bug: using struct-types with Capture interface is broken #140
Comments
Definitely looks like a bug.
Given the information you provided in the previous ticket, it was incorrect - it does work with other types including bool, ints, etc., just not structs. If you'd provided the above panic there, then I would have had enough information to determine that there was a bug. |
I've finally had a chance to look at this. This is a bug, but not quite the one expected. Altering the grammar to the following works as expected: - Boxes Box `@@`
+ Boxes *Box `@Ident` The
What this means in practice is that you have to capture tokens explicitly as above with However there are two bugs in Participle here:
|
cool, many thanks for the follow up. |
In setField nodes.go:592 the type is asserted to a string to assemble the slice parameter for the Capture method. That is wrong according to the following test:
This causes a type assertion panic:
btw, just closing #139 "as incorrect" was a bit offensive.
The text was updated successfully, but these errors were encountered: