diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-01 02:01:05 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-01 02:01:05 +0000 |
commit | f2d18484417fdc6e9ae4970fed7eda0de1027e91 (patch) | |
tree | 9f5586a5e6d5538834c4683b293b8c06874f1b83 /parse.y | |
parent | 844ca35a924ed2ff0de48f0e4680f05f8da234bf (diff) | |
download | ruby-f2d18484417fdc6e9ae4970fed7eda0de1027e91.tar.gz |
parse.y: f_margs parser events
* parse.y (f_margs): implemented parser events for massign
formal arguments. [ruby-core:81848] [Bug #13701]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -3027,7 +3027,6 @@ f_marg : f_norm_arg $$ = assignable($1, 0); /*%%%*/ /*% - $$ = dispatch1(mlhs_paren, $$); %*/ } | tLPAREN f_margs rparen @@ -3082,6 +3081,7 @@ f_margs : f_marg_list $$ = NEW_MASGN($1, NEW_POSTARG($$, $6)); /*% $$ = mlhs_add_star($1, $$); + $$ = mlhs_add_post($$, $6); %*/ } | f_marg_list ',' tSTAR @@ -3097,7 +3097,8 @@ f_margs : f_marg_list /*%%%*/ $$ = NEW_MASGN($1, NEW_POSTARG(-1, $5)); /*% - $$ = mlhs_add_star($1, $5); + $$ = mlhs_add_star($1, Qnil); + $$ = mlhs_add_post($$, $5); %*/ } | tSTAR f_norm_arg @@ -3115,10 +3116,8 @@ f_margs : f_marg_list /*%%%*/ $$ = NEW_MASGN(0, NEW_POSTARG($$, $4)); /*% - #if 0 - TODO: Check me - #endif - $$ = mlhs_add_star($$, $4); + $$ = mlhs_add_star(mlhs_new(), $$); + $$ = mlhs_add_post($$, $4); %*/ } | tSTAR @@ -3135,6 +3134,7 @@ f_margs : f_marg_list $$ = NEW_MASGN(0, NEW_POSTARG(-1, $3)); /*% $$ = mlhs_add_star(mlhs_new(), Qnil); + $$ = mlhs_add_post($$, $3); %*/ } ; |