Project

General

Profile

Bug #15673 ยป ripper.patch

kddnewton (Kevin Newton), 03/18/2019 07:33 PM

View differences:

parse.y
#define get_value(val) ripper_get_value(val)
static VALUE assignable(struct parser_params*,VALUE);
static int id_is_var(struct parser_params *p, ID id);
static bool parser_numbered_param(struct parser_params *p, unsigned long n);
#define method_cond(p,node,loc) (node)
#define call_bin_op(p, recv,id,arg1,op_loc,loc) dispatch3(binary, (recv), STATIC_ID2SYM(id), (arg1))
......
/*%%%*/
if (!($$ = gettable(p, $1, &@$))) $$ = NEW_BEGIN(0, &@$);
/*%
if (id_is_var(p, get_id($1))) {
if (parser_numbered_param(p, $1) || id_is_var(p, get_id($1))) {
$$ = dispatch1(var_ref, $1);
}
else {
    (1-1/1)