Commits

allisonrandal  committed dda759b

Fix assignment operators. Patch from Sean Smith.

  • Participants
  • Parent commits 9d38cc2

Comments (0)

Files changed (2)

File src/parser/actions.nqp

 }
 
 method augmented_assignment_stmt($/) {
-    my $past := $($<augop>);
-    $past.push( $($<target>) );
-    $past.push( $($<expression>) );
+    my $op := $( $<augop> );
+    my $lhs := $( $<target> );
+    my $expr := $( $<expression> );
+    $op.push( $lhs );
+    $op.push( $expr );
+    my $past := PAST::Op.new( $lhs, $op, :pasttype('bind'), :node($/) );
     make $past;
 }
 

File src/parser/grammar.pg

     | '>>=' {*}         #= shr
     | '<<=' {*}         #= shl
     | '&='  {*}         #= band
-    | '^='  {*}         #= bxor
+    | '^='  {*}         #= bxor PPP
     | '|='  {*}         #= bor
 }