diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-12 03:26:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-12 03:26:24 +0000 |
commit | 617bc7162a2c8f8fdc5caa848853253714139f05 (patch) | |
tree | 8e1117da779b222ae4f09c2d31e3642b210176f9 | |
parent | fba5f0d769103c207aefb9604ceb295feb15d6f4 (diff) | |
download | ruby-617bc7162a2c8f8fdc5caa848853253714139f05.tar.gz |
parse.y: move ripper_id2sym
* parse.y (new_attr_op_assign): move ripper_id2sym from each
rules.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | parse.y | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -518,7 +518,7 @@ static int id_is_var_gen(struct parser_params *parser, ID id); static VALUE new_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE op, VALUE rhs); static VALUE new_attr_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE type, VALUE attr, VALUE op, VALUE rhs); -#define new_attr_op_assign(lhs, type, attr, op, rhs) new_attr_op_assign_gen(parser, (lhs), (type), (attr), (op), (rhs)) +#define new_attr_op_assign(lhs, type, attr, op, rhs) new_attr_op_assign_gen(parser, (lhs), ripper_id2sym(type), (attr), (op), (rhs)) #endif /* !RIPPER */ @@ -1253,12 +1253,12 @@ stmt : keyword_alias fitem {lex_state = EXPR_FNAME;} fitem | primary_value '.' tIDENTIFIER tOP_ASGN command_call { value_expr($5); - $$ = new_attr_op_assign($1, ripper_id2sym('.'), $3, $4, $5); + $$ = new_attr_op_assign($1, '.', $3, $4, $5); } | primary_value '.' tCONSTANT tOP_ASGN command_call { value_expr($5); - $$ = new_attr_op_assign($1, ripper_id2sym('.'), $3, $4, $5); + $$ = new_attr_op_assign($1, '.', $3, $4, $5); } | primary_value tCOLON2 tCONSTANT tOP_ASGN command_call { @@ -1273,7 +1273,7 @@ stmt : keyword_alias fitem {lex_state = EXPR_FNAME;} fitem | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call { value_expr($5); - $$ = new_attr_op_assign($1, ID2SYM(idCOLON2), $3, $4, $5); + $$ = new_attr_op_assign($1, idCOLON2, $3, $4, $5); } | backref tOP_ASGN command_call { @@ -2057,17 +2057,17 @@ arg : lhs '=' arg | primary_value '.' tIDENTIFIER tOP_ASGN arg { value_expr($5); - $$ = new_attr_op_assign($1, ripper_id2sym('.'), $3, $4, $5); + $$ = new_attr_op_assign($1, '.', $3, $4, $5); } | primary_value '.' tCONSTANT tOP_ASGN arg { value_expr($5); - $$ = new_attr_op_assign($1, ripper_id2sym('.'), $3, $4, $5); + $$ = new_attr_op_assign($1, '.', $3, $4, $5); } | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg { value_expr($5); - $$ = new_attr_op_assign($1, ID2SYM(idCOLON2), $3, $4, $5); + $$ = new_attr_op_assign($1, idCOLON2, $3, $4, $5); } | primary_value tCOLON2 tCONSTANT tOP_ASGN arg { |