[前][次][番号順一覧][スレッド一覧]

ruby-changes:48174

From: yui-knk <ko1@a...>
Date: Sat, 21 Oct 2017 23:40:29 +0900 (JST)
Subject: [ruby-changes:48174] yui-knk:r60286 (trunk): Define the macro separately for ruby parser and for ripper

yui-knk	2017-10-21 23:32:32 +0900 (Sat, 21 Oct 2017)

  New Revision: 60286

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60286

  Log:
    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.

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 60285)
+++ parse.y	(revision 60286)
@@ -442,6 +442,7 @@ static NODE *node_assign_gen(struct pars https://github.com/ruby/ruby/blob/trunk/parse.y#L442
 #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 https://github.com/ruby/ruby/blob/trunk/parse.y#L601
 
 #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 p https://github.com/ruby/ruby/blob/trunk/parse.y#L636
 
 #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);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]