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

Rename NonBrace* rules #85

Open vickenty opened 4 years ago

vickenty commented 4 years ago

After fixing empty hash literals in #84, NonBrace expressions do not live up to their name, because they can now begin with a brace.

xsawyerx commented 2 years ago

@vickenty Thoughts for a new name? :)

vickenty commented 2 years ago

My memory about this is somewhat fuzzy, so my suggestion might not make a lot of sense. But taking a quick look at the grammar, NonBrace rules are used when there is also a NonEmptyBlock alternative for the same position, so perhaps NonBlock would work?

xsawyerx commented 2 years ago

Originally NonBrace were introduced to handle the ambiguity of top-level braces being either a hashref or a bare block.

sub foo {
    { 'foo' => 'bar' } # Hmm...
}

So maybe NonHashref instead? I don't know...

By the way, a small note here, email me when you get a chance! (MYCPANID AT cpan DOT org).