summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
Diffstat (limited to 'perly.y')
-rw-r--r--perly.y7
1 files changed, 4 insertions, 3 deletions
diff --git a/perly.y b/perly.y
index 7c728a9127..540c7ccb35 100644
--- a/perly.y
+++ b/perly.y
@@ -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 */