summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authoryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-20 11:06:05 +0000
committeryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-20 11:06:05 +0000
commit2bfbec874518d5efd5baf4381af7c47b78775c23 (patch)
treeb4eecd5ffa7fb60048abb3d19df371a6ff970a85 /parse.y
parentecc627b20aa011616d29a765448957c445be7a62 (diff)
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
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y10
1 files changed, 6 insertions, 4 deletions
diff --git a/parse.y b/parse.y
index 9c1911d640..ad67045d33 100644
--- a/parse.y
+++ b/parse.y
@@ -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);