1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

parse.y: Fix the compile error

* parse.y: Fix "error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]"

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yui-knk 2018-10-20 11:06:05 +00:00
parent ecc627b20a
commit 2bfbec8745

10
parse.y
View file

@ -3132,10 +3132,12 @@ lambda : {
p->lex.lpar_beg = $<num>2;
CMDARG_POP();
/*%%%*/
YYLTYPE loc = code_loc_gen(&@3, &@5);
$$ = NEW_LAMBDA($3, $5, &loc);
nd_set_line($$->nd_body, @5.end_pos.lineno);
nd_set_line($$, @3.end_pos.lineno);
{
YYLTYPE loc = code_loc_gen(&@3, &@5);
$$ = NEW_LAMBDA($3, $5, &loc);
nd_set_line($$->nd_body, @5.end_pos.lineno);
nd_set_line($$, @3.end_pos.lineno);
}
/*% %*/
/*% ripper: lambda!($3, $5) %*/
dyna_pop(p, $<vars>1);