xsawyerx / guacamole

Guacamole is a parser toolkit for Standard Perl. It provides fully static BNF-based parsing capability to a reasonable subset of Perl.
https://metacpan.org/pod/Guacamole
20 stars 8 forks source link

Class methods don't work #46

Closed xsawyerx closed 4 years ago

xsawyerx commented 4 years ago
Foo->thing(); # Fails to parse

This is because Ident is not part of the matches for NonBraceExprArrow or ExprArrow. I tried adding it by it would then parse stuff like foo()->... with foo being an Ident and fail the rest of the parsing.

Not sure how to fix this. @vickenty, work your magic?

xsawyerx commented 4 years ago

$foo->thing() and "Foo"->thing()' both work fine.

xsawyerx commented 4 years ago

This is because Ident isn't anywhere in the tree of operations defined in Expression or BlockLevelExpression. I tried introducing it but no success.