diff options
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -1453,7 +1453,10 @@ stmt : keyword_alias fitem {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);} fitem | stmt modifier_rescue stmt { /*%%%*/ - NODE *resq = new_resbody(0, remove_begin($3), 0, &@$); + YYLTYPE location; + location.first_loc = @2.first_loc; + location.last_loc = @3.last_loc; + NODE *resq = new_resbody(0, remove_begin($3), 0, &location); $$ = new_rescue(remove_begin($1), resq, 0, &@$); /*% $$ = dispatch2(rescue_mod, $1, $3); @@ -1572,8 +1575,11 @@ command_rhs : command_call %prec tOP_ASGN | command_call modifier_rescue stmt { /*%%%*/ + YYLTYPE location; + location.first_loc = @2.first_loc; + location.last_loc = @3.last_loc; value_expr($1); - $$ = new_rescue($1, new_resbody(0, remove_begin($3), 0, &@$), 0, &@$); + $$ = new_rescue($1, new_resbody(0, remove_begin($3), 0, &location), 0, &@$); /*% $$ = dispatch2(rescue_mod, $1, $3); %*/ @@ -2423,8 +2429,11 @@ arg_rhs : arg %prec tOP_ASGN | arg modifier_rescue arg { /*%%%*/ + YYLTYPE location; + location.first_loc = @2.first_loc; + location.last_loc = @3.last_loc; value_expr($1); - $$ = new_rescue($1, new_resbody(0, remove_begin($3), 0, &@$), 0, &@$); + $$ = new_rescue($1, new_resbody(0, remove_begin($3), 0, &location), 0, &@$); /*% $$ = dispatch2(rescue_mod, $1, $3); %*/ |