diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-04 05:48:33 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-04 05:48:33 +0000 |
commit | 3be412834d4f09eb0c2a705073ff10b1fd0d6e93 (patch) | |
tree | bb60dc27f8b5c71e6d4374925a4568bf2fab4b1b | |
parent | b17a16c279f6738070d1cb2de1f2139692850028 (diff) |
parse.y: reserved words as <id>
* parse.y (reswords): declare reserved words as <id> to remove
extra cast.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | parse.y | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -836,11 +836,7 @@ static void token_info_pop_gen(struct parser_params*, const char *token, size_t const struct vtable *vars; } -/*%%%*/ -%token -/*% -%token <val> -%*/ +%token <id> keyword_class keyword_module keyword_def @@ -920,10 +916,10 @@ static void token_info_pop_gen(struct parser_params*, const char *token, size_t %type <node> mlhs mlhs_head mlhs_basic mlhs_item mlhs_node mlhs_post mlhs_inner %type <id> fsym keyword_variable user_variable sym symbol operation operation2 operation3 %type <id> cname fname op f_rest_arg f_block_arg opt_f_block_arg f_norm_arg f_bad_arg -%type <id> f_kwrest f_label f_arg_asgn call_op call_op2 +%type <id> f_kwrest f_label f_arg_asgn call_op call_op2 reswords /*%%%*/ /*% -%type <val> program reswords then do +%type <val> program then do %*/ %token END_OF_INPUT 0 "end-of-input" %token tUPLUS RUBY_TOKEN(UPLUS) "unary+" @@ -1882,11 +1878,7 @@ fname : tIDENTIFIER | reswords { SET_LEX_STATE(EXPR_ENDFN); - /*%%%*/ - $$ = $<id>1; - /*% $$ = $1; - %*/ } ; |