|
152 | 152 | | primary_value tLBRACK2 aref_args tRBRACK tOP_ASGN command_call |
153 | 153 | | primary_value tDOT tIDENTIFIER tOP_ASGN command_call |
154 | 154 | { |
155 | | - result = s(:op_asgn2, val[0], "#{val[2]}=".intern, val[3].intern, val[4]) |
| 155 | + result = s(:op_asgn2, val[0], op_to_setter(val[2]), value(val[3]).to_sym, val[4]) |
156 | 156 | } |
157 | 157 | | primary_value tDOT tCONSTANT tOP_ASGN command_call |
158 | 158 | | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call |
|
167 | 167 | } |
168 | 168 | | mlhs tEQL mrhs |
169 | 169 | { |
170 | | - result = s(:masgn, val[0], val[2]) |
| 170 | + result = s(:masgn, val[0], s(:array, *val[2])) |
171 | 171 | } |
172 | 172 | | expr |
173 | 173 |
|
|
436 | 436 | } |
437 | 437 | | primary_value tDOT tIDENTIFIER tOP_ASGN arg |
438 | 438 | { |
439 | | - result = s(:op_asgn2, val[0], "#{val[2]}=".intern, val[3].intern, val[4]) |
| 439 | + result = s(:op_asgn2, val[0], op_to_setter(val[2]), value(val[3]).to_sym, val[4]) |
440 | 440 | } |
441 | 441 | | primary_value tDOT tCONSTANT tOP_ASGN arg |
442 | 442 | | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg |
@@ -479,12 +479,12 @@ rule |
479 | 479 | | '-@NUM' tFLOAT tPOW arg |
480 | 480 | | tUPLUS arg |
481 | 481 | { |
482 | | - result = new_call val[1], :"+@", s(:arglist) |
| 482 | + result = new_call val[1], [:"+@", []], [] |
483 | 483 | result = val[1] if [:int, :float].include? val[1].type |
484 | 484 | } |
485 | 485 | | tUMINUS arg |
486 | 486 | { |
487 | | - result = new_call val[1], :"-@", s(:arglist) |
| 487 | + result = new_call val[1], [:"-@", []], [] |
488 | 488 | if val[1].type == :int |
489 | 489 | val[1][1] = -val[1][1] |
490 | 490 | result = val[1] |
@@ -743,11 +743,11 @@ rule |
743 | 743 | } |
744 | 744 | | tCOLON3 tCONSTANT |
745 | 745 | { |
746 | | - result = s(:colon3, val[1]) |
| 746 | + result = new_colon3(val[0], val[1]) |
747 | 747 | } |
748 | 748 | | primary_value tLBRACK2 aref_args tRBRACK |
749 | 749 | { |
750 | | - result = new_call val[0], :[], val[2] |
| 750 | + result = new_call val[0], [:[], []], val[2] |
751 | 751 | } |
752 | 752 | | tLBRACK aref_args tRBRACK |
753 | 753 | { |
@@ -1139,8 +1139,8 @@ opt_block_args_tail: tCOMMA block_args_tail |
1139 | 1139 | } |
1140 | 1140 | args then compstmt cases |
1141 | 1141 | { |
1142 | | - part = s(:when, val[2], val[4]) |
1143 | | - part.line = val[2].line |
| 1142 | + part = s(:when, s(:array, *val[2]), val[4]) |
| 1143 | + #part.line = val[2].line |
1144 | 1144 | result = [part] |
1145 | 1145 | result.push *val[5] if val[5] |
1146 | 1146 | } |
|
0 commit comments