diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-09-12 05:37:38 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-09-12 05:37:38 +0000 |
commit | fbcc6dea0c86e7e4d087f1d4b2de19b211d16647 (patch) | |
tree | 68bde87194755712893e5efa4d7f9d2f5312df10 /parse.y | |
parent | 9d823983dc3e88cb7775c78908a4bb5133ad88ac (diff) |
matz: 1.6.0 final (hopufully)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -190,7 +190,7 @@ static void top_local_setup(); %type <node> aref_args opt_block_arg block_arg stmt_rhs %type <node> mrhs superclass generic_call block_call var_ref %type <node> f_arglist f_args f_optarg f_opt f_block_arg opt_f_block_arg -%type <node> array assoc_list assocs assoc undef_list backref +%type <node> assoc_list assocs assoc undef_list backref %type <node> block_var opt_block_var brace_block do_block lhs none %type <node> mlhs mlhs_head mlhs_basic mlhs_entry mlhs_item mlhs_node %type <id> fitem variable sym symbol operation operation2 operation3 @@ -421,10 +421,6 @@ expr : mlhs '=' mrhs yyerror("return appeared outside of method"); $$ = NEW_RETURN($2); } - | kYIELD ret_args - { - $$ = NEW_YIELD($2); - } | command_call | expr kAND expr { @@ -469,6 +465,12 @@ command_call : operation call_args $$ = new_super($2); fixpos($$, $2); } + | kYIELD ret_args + { + $$ = NEW_YIELD($2); + fixpos($$, $2); + } + mlhs : mlhs_basic | tLPAREN mlhs_entry ')' @@ -1025,9 +1027,6 @@ ret_args : call_args } } -array : none - | args trailer - primary : literal { $$ = NEW_LIT($1); @@ -1083,7 +1082,7 @@ primary : literal value_expr($1); $$ = NEW_CALL($1, tAREF, $3); } - | tLBRACK array ']' + | tLBRACK aref_args ']' { if ($2 == 0) $$ = NEW_ZARRAY(); /* zero length array*/ |