diff options
author | Branislav ZahradnĂk <barney@cpan.org> | 2021-12-23 23:24:09 +0100 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-02-05 20:54:09 -0700 |
commit | 7cbc5f3bc3cfc72c4863926d390e58bff4ac1800 (patch) | |
tree | d947d021a88e6170e46e3ba4c18e7aa771fa334a /perly.y | |
parent | cdcb5e192b6ad45d64cf6f02370472786bd8dfb1 (diff) | |
download | perl-7cbc5f3bc3cfc72c4863926d390e58bff4ac1800.tar.gz |
Gather all MY variants into single rule
Diffstat (limited to 'perly.y')
-rw-r--r-- | perly.y | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1198,8 +1198,6 @@ term[product] : termbinop { $$ = newCONDOP(0, $condition, $then, $else); } | REFGEN term[operand] /* \$x, \@y, \%z */ { $$ = newUNOP(OP_REFGEN, 0, $operand); } - | MY REFGEN term[operand] - { $$ = newUNOP(OP_REFGEN, 0, localize($operand,1)); } | myattrterm %prec UNIOP { $$ = $myattrterm; } | LOCAL term[operand] %prec UNIOP @@ -1346,12 +1344,15 @@ term[product] : termbinop ; /* "my" declarations, with optional attributes */ -myattrterm: MY myterm myattrlist +myattrterm + : MY myterm myattrlist { $$ = my_attrs($myterm,$myattrlist); } | MY myterm { $$ = localize($myterm,1); } | MY REFGEN myterm myattrlist { $$ = newUNOP(OP_REFGEN, 0, my_attrs($myterm,$myattrlist)); } + | MY REFGEN term[operand] + { $$ = newUNOP(OP_REFGEN, 0, localize($operand,1)); } ; /* Things that can be "my"'d */ |