Use call_op2 instead of call_op and tCOLON2

This commit is contained in:
ydah 2025-04-14 22:05:08 +09:00 committed by Yudai Takada
parent c13ac4d615
commit 1c8154e5c9
Notes: git 2025-04-14 14:14:14 +00:00

View File

@ -5255,18 +5255,12 @@ method_call : fcall paren_args
$$ = new_qcall(p, idCOLON2, $1, $3, 0, &@3, &@$); $$ = new_qcall(p, idCOLON2, $1, $3, 0, &@3, &@$);
/*% ripper: call!($:1, $:2, $:3) %*/ /*% ripper: call!($:1, $:2, $:3) %*/
} }
| primary_value call_op paren_args | primary_value call_op2 paren_args
{ {
$$ = new_qcall(p, $2, $1, idCall, $3, &@2, &@$); $$ = new_qcall(p, $2, $1, idCall, $3, &@2, &@$);
nd_set_line($$, @2.end_pos.lineno); nd_set_line($$, @2.end_pos.lineno);
/*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/ /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
} }
| primary_value tCOLON2 paren_args
{
$$ = new_qcall(p, idCOLON2, $1, idCall, $3, &@2, &@$);
nd_set_line($$, @2.end_pos.lineno);
/*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
}
| keyword_super paren_args | keyword_super paren_args
{ {
rb_code_location_t lparen_loc = @2; rb_code_location_t lparen_loc = @2;