diff options
author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-20 11:06:05 +0000 |
---|---|---|
committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-20 11:06:05 +0000 |
commit | 2bfbec874518d5efd5baf4381af7c47b78775c23 (patch) | |
tree | b4eecd5ffa7fb60048abb3d19df371a6ff970a85 | |
parent | ecc627b20aa011616d29a765448957c445be7a62 (diff) | |
download | ruby-2bfbec874518d5efd5baf4381af7c47b78775c23.tar.gz |
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
-rw-r--r-- | parse.y | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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); |