From 1ec8694c9e91772c116718138d593f75e707f247 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Sat, 21 Oct 2017 14:32:32 +0000 Subject: [PATCH] Define the macro separately for ruby parser and for ripper * parse.y (new_op_assign): Define the macro separately for ruby parser and for ripper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parse.y b/parse.y index 488f328896..125904c583 100644 --- a/parse.y +++ b/parse.y @@ -442,6 +442,7 @@ static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*,int); #define node_assign(node1, node2, column) node_assign_gen(parser, (node1), (node2), (column)) static NODE *new_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs, int column); +#define new_op_assign(lhs, op, rhs, column) new_op_assign_gen(parser, (lhs), (op), (rhs), (column)) static NODE *new_attr_op_assign_gen(struct parser_params *parser, NODE *lhs, ID atype, ID attr, ID op, NODE *rhs, int column); #define new_attr_op_assign(lhs, type, attr, op, rhs, column) new_attr_op_assign_gen(parser, (lhs), (type), (attr), (op), (rhs), (column)) static NODE *new_const_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs, int column); @@ -600,6 +601,7 @@ static VALUE new_qcall_gen(struct parser_params *parser, VALUE q, VALUE r, VALUE #define new_nil() Qnil static VALUE new_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE op, VALUE rhs, int column); +#define new_op_assign(lhs, op, rhs, column) new_op_assign_gen(parser, (lhs), (op), (rhs), (column)) 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, column) new_attr_op_assign_gen(parser, (lhs), (type), (attr), (op), (rhs)) #define new_const_op_assign(lhs, op, rhs, column) new_op_assign(lhs, op, rhs, column) @@ -634,8 +636,6 @@ static VALUE parser_reg_compile(struct parser_params*, VALUE, int, VALUE *); #endif /* !RIPPER */ -#define new_op_assign(lhs, op, rhs, column) new_op_assign_gen(parser, (lhs), (op), (rhs), (column)) - RUBY_SYMBOL_EXPORT_BEGIN VALUE rb_parser_reg_compile(struct parser_params* parser, VALUE str, int options); int rb_reg_fragment_setenc(struct parser_params*, VALUE, int);