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

Remove indirect notation #10

Closed xsawyerx closed 4 years ago

xsawyerx commented 4 years ago

Seems like we're able to parse indirect notation using ArrowIndirectCall. I suggest we remove it.

gonzus commented 4 years ago

Keep in mind that it takes work to make a grammar parse your language, and it takes a lot more work to make a grammar parse only your language.

vickenty commented 4 years ago

Closures and callbacks are pretty common, how else you would invoke them?

xsawyerx commented 4 years ago

I'm not sure I follow all the comments.

@vickenty, can you give ma an example of using ArrowIndirectCall that is not an indirect object notation?

vickenty commented 4 years ago

Sorry, I got confused. I thought it was parsing $foo->(). Actually ArrowIndirectCall covers code like $foo->$bar(...). Still, I think indirect object notation is different (new Pkg(...)).

xsawyerx commented 4 years ago

In the case of $foo->$bar, ArrowIndirectCall makes sense.

Indirect object (or method) notation shouldn't be supported.

Closing the ticket as it was my misunderstanding.