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

Finally fix QLike values #63

Closed xsawyerx closed 4 years ago

xsawyerx commented 4 years ago

The combination of parens for non-spaced delimited values (like q*/s/m/y/tr) is causing them to be parsed as subroutines if they do have a space.

There is also a significant change as part of this (which has a test added to it):

Foo->method();        # Foo class
Foo::Bar->method();   # Foo::Bar class
Foo::Bar()->method(); # Foo class, Bar function in Foo class
Foo::Bar::->method(); # Fails <-- This is new!
Foo::Bar->method;     # Fails (don't know if it's new or not, but now there's a test!)

I added a bunch of tests and fixed the code.