guacamole icon indicating copy to clipboard operation
guacamole copied to clipboard

Rename NonBrace* rules

Open vickenty opened this issue 4 years ago • 3 comments

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

vickenty avatar Jun 25 '20 11:06 vickenty

@vickenty Thoughts for a new name? :)

xsawyerx avatar May 30 '22 13:05 xsawyerx

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?

vickenty avatar May 30 '22 13:05 vickenty

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).

xsawyerx avatar May 30 '22 14:05 xsawyerx