ruby-changes:49701
From: mame <ko1@a...>
Date: Sun, 14 Jan 2018 23:01:16 +0900 (JST)
Subject: [ruby-changes:49701] mame:r61818 (trunk): parse.y: Remove almost all *_gen macros by passing parser_params explicitly
mame 2018-01-14 22:51:44 +0900 (Sun, 14 Jan 2018) New Revision: 61818 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61818 Log: parse.y: Remove almost all *_gen macros by passing parser_params explicitly In parse.y many functions were suffixed "_gen" and had companion macros to pass struct parser_params implicitly, which made parse.c bigger and more obscure. This change expands and removes almost all "*_gen" macros. This requires explicit passing of struct parser_params, i.e., we need to write "foo(p, ..)" instead of "foo(..)". However, it is just extra three letters. I believe that this is easier to understand. Modified files: trunk/node.h trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 61817) +++ parse.y (revision 61818) @@ -306,17 +306,14 @@ static int parser_yyerror(struct parser_ https://github.com/ruby/ruby/blob/trunk/parse.y#L306 static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*); -#ifndef RIPPER static inline void -rb_discard_node_gen(struct parser_params *p, NODE *n) +rb_discard_node(struct parser_params *p, NODE *n) { rb_ast_delete_node(p->ast, n); } -#define rb_discard_node(n) rb_discard_node_gen(p, (n)) -#endif static inline VALUE -add_mark_object_gen(struct parser_params *p, VALUE obj) +add_mark_object(struct parser_params *p, VALUE obj) { if (!SPECIAL_CONST_P(obj) #ifdef RIPPER @@ -327,7 +324,6 @@ add_mark_object_gen(struct parser_params https://github.com/ruby/ruby/blob/trunk/parse.y#L324 } return obj; } -#define add_mark_object(obj) add_mark_object_gen(p, (obj)) static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE, const rb_code_location_t*); #define rb_node_newnode(type, a1, a2, a3, loc) node_newnode(p, (type), (a1), (a2), (a3), (loc)) @@ -348,150 +344,97 @@ set_line_body(NODE *body, int line) https://github.com/ruby/ruby/blob/trunk/parse.y#L344 #define yyparse ruby_yyparse -static NODE *cond_gen(struct parser_params*,NODE*,int,const YYLTYPE*); -#define cond(node,loc) cond_gen(p, (node), FALSE, loc) -#define method_cond(node,loc) cond_gen(p, (node), TRUE, loc) +static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc); +static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc); #define new_nil(loc) NEW_NIL(loc) -static NODE *new_if_gen(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*); -#define new_if(cc,left,right,loc) new_if_gen(p, (cc), (left), (right), (loc)) -static NODE *new_unless_gen(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*); -#define new_unless(cc,left,right,loc) new_unless_gen(p, (cc), (left), (right), (loc)) -static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*); -#define logop(id,node1,node2,op_loc,loc) \ - logop_gen(p, ((id)==idAND||(id)==idANDOP)?NODE_AND:NODE_OR, \ - (node1), (node2), (op_loc), (loc)) +static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*); +static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*); +static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*); static NODE *newline_node(NODE*); static void fixpos(NODE*,NODE*); static int value_expr_gen(struct parser_params*,NODE*); -static void void_expr_gen(struct parser_params*,NODE*); +static void void_expr(struct parser_params*,NODE*); static NODE *remove_begin(NODE*); static NODE *remove_begin_all(NODE*); #define value_expr(node) value_expr_gen(p, (node) = remove_begin(node)) -#define void_expr0(node) void_expr_gen(p, (node)) -#define void_expr(node) void_expr0((node) = remove_begin(node)) -static void void_stmts_gen(struct parser_params*,NODE*); -#define void_stmts(node) void_stmts_gen(p, (node)) -static void reduce_nodes_gen(struct parser_params*,NODE**); -#define reduce_nodes(n) reduce_nodes_gen(p,(n)) -static void block_dup_check_gen(struct parser_params*,NODE*,NODE*); -#define block_dup_check(n1,n2) block_dup_check_gen(p,(n1),(n2)) - -static NODE *block_append_gen(struct parser_params*,NODE*,NODE*); -#define block_append(h,t) block_append_gen(p,(h),(t)) -static NODE *list_append_gen(struct parser_params*,NODE*,NODE*); -#define list_append(l,i) list_append_gen(p,(l),(i)) +static void void_stmts(struct parser_params*,NODE*); +static void reduce_nodes(struct parser_params*,NODE**); +static void block_dup_check(struct parser_params*,NODE*,NODE*); + +static NODE *block_append(struct parser_params*,NODE*,NODE*); +static NODE *list_append(struct parser_params*,NODE*,NODE*); static NODE *list_concat(NODE*,NODE*); -static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*,const YYLTYPE*); -#define arg_append(h,t,loc) arg_append_gen(p,(h),(t),(loc)) -static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*,const YYLTYPE*); -#define arg_concat(h,t,loc) arg_concat_gen(p,(h),(t),(loc)) -static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*,const YYLTYPE*); -#define literal_concat(h,t,loc) literal_concat_gen(p,(h),(t),(loc)) -static int literal_concat0(struct parser_params *, VALUE, VALUE); -static NODE *new_evstr_gen(struct parser_params*,NODE*,const YYLTYPE*); -#define new_evstr(n, loc) new_evstr_gen(p,(n),(loc)) -static NODE *evstr2dstr_gen(struct parser_params*,NODE*); -#define evstr2dstr(n) evstr2dstr_gen(p,(n)) +static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*); +static NODE *arg_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*); +static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*); +static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*); +static NODE *evstr2dstr(struct parser_params*,NODE*); static NODE *splat_array(NODE*); -static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*); -#define call_bin_op(recv,id,arg1,op_loc,loc) call_bin_op_gen(p, (recv),(id),(arg1),(op_loc),(loc)) -static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*); -#define call_uni_op(recv,id,op_loc,loc) call_uni_op_gen(p, (recv),(id),(op_loc),(loc)) -static NODE *new_qcall_gen(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc); -#define new_qcall(q,r,m,a,op_loc,loc) new_qcall_gen(p,q,r,m,a,op_loc,loc) -#define new_command_qcall(q,r,m,a,op_loc,loc) new_qcall_gen(p,q,r,m,a,op_loc,loc) -static NODE *new_command_gen(struct parser_params*p, NODE *m, NODE *a) {m->nd_args = a; return m;} -#define new_command(m,a) new_command_gen(p, m, a) -static NODE *method_add_block_gen(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc) {b->nd_iter = m; b->nd_loc = *loc; return b;} -#define method_add_block(m,b,loc) method_add_block_gen(p, m, b, loc) - -static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,NODE*,const YYLTYPE*); -#define new_args(pre,opt,rest,post,tail,loc) new_args_gen(p, (pre),(opt),(rest),(post),(tail),(loc)) -static NODE *new_args_tail_gen(struct parser_params*,NODE*,ID,ID,const YYLTYPE*); -#define new_args_tail(k,kr,b,loc) new_args_tail_gen(p, (k),(kr),(b),(loc)) -static NODE *new_kw_arg_gen(struct parser_params *p, NODE *k, const YYLTYPE *loc); -#define new_kw_arg(k,loc) new_kw_arg_gen(p, k, loc) - -static VALUE negate_lit_gen(struct parser_params*, VALUE); -#define negate_lit(lit) negate_lit_gen(p, lit) -static NODE *ret_args_gen(struct parser_params*,NODE*); -#define ret_args(node) ret_args_gen(p, (node)) +static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*); +static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*); +static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc); +#define new_command_qcall(p,q,r,m,a,op_loc,loc) new_qcall(p,q,r,m,a,op_loc,loc) +static NODE *new_command(struct parser_params *p, NODE *m, NODE *a) {m->nd_args = a; return m;} +static NODE *method_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc) {b->nd_iter = m; b->nd_loc = *loc; return b;} + +static NODE *new_args(struct parser_params*,NODE*,NODE*,ID,NODE*,NODE*,const YYLTYPE*); +static NODE *new_args_tail(struct parser_params*,NODE*,ID,ID,const YYLTYPE*); +static NODE *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc); + +static VALUE negate_lit(struct parser_params*, VALUE); +static NODE *ret_args(struct parser_params*,NODE*); static NODE *arg_blk_pass(NODE*,NODE*); -static NODE *new_yield_gen(struct parser_params*,NODE*,const YYLTYPE*); -#define new_yield(node,loc) new_yield_gen(p, (node), (loc)) -static NODE *dsym_node_gen(struct parser_params*,NODE*,const YYLTYPE*); -#define dsym_node(node,loc) dsym_node_gen(p, (node), (loc)) - -static NODE *gettable_gen(struct parser_params*,ID,const YYLTYPE*); -#define gettable(id,loc) gettable_gen(p,(id),(loc)) -static NODE *assignable_gen(struct parser_params*,ID,NODE*,const YYLTYPE*); -#define assignable(id,node,loc) assignable_gen(p, (id), (node), (loc)) - -static NODE *aryset_gen(struct parser_params*,NODE*,NODE*,const YYLTYPE*); -#define aryset(node1,node2,loc) aryset_gen(p, (node1), (node2), (loc)) -static NODE *attrset_gen(struct parser_params*,NODE*,ID,ID,const YYLTYPE*); -#define attrset(node,q,id,loc) attrset_gen(p, (node), (q), (id), (loc)) - -static void rb_backref_error_gen(struct parser_params*,NODE*); -#define rb_backref_error(n) rb_backref_error_gen(p,(n)) -static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*,const YYLTYPE*); -#define node_assign(node1, node2, loc) node_assign_gen(p, (node1), (node2), (loc)) - -static NODE *new_op_assign_gen(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc); -#define new_op_assign(lhs, op, rhs, loc) new_op_assign_gen(p, (lhs), (op), (rhs), (loc)) -static NODE *new_attr_op_assign_gen(struct parser_params *p, NODE *lhs, ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc); -#define new_attr_op_assign(lhs, type, attr, op, rhs, loc) new_attr_op_assign_gen(p, (lhs), (type), (attr), (op), (rhs), (loc)) -static NODE *new_const_op_assign_gen(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc); -#define new_const_op_assign(lhs, op, rhs, loc) new_const_op_assign_gen(p, (lhs), (op), (rhs), (loc)) +static NODE *new_yield(struct parser_params*,NODE*,const YYLTYPE*); +static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*); + +static NODE *gettable(struct parser_params*,ID,const YYLTYPE*); +static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*); -static NODE *const_path_field_gen(struct parser_params *p, NODE *head, ID mid, const YYLTYPE *loc); -#define const_path_field(w, n, loc) const_path_field_gen(p, w, n, loc) +static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*); +static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*); + +static void rb_backref_error(struct parser_params*,NODE*); +static NODE *node_assign(struct parser_params*,NODE*,NODE*,const YYLTYPE*); + +static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc); +static NODE *new_attr_op_assign(struct parser_params *p, NODE *lhs, ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc); +static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc); + +#define const_path_field(w, n, loc) NEW_COLON2(w, n, loc) #define top_const_field(n,loc) NEW_COLON3(n,loc) -static NODE *const_decl_gen(struct parser_params *p, NODE* path, const YYLTYPE *loc); -#define const_decl(path, loc) const_decl_gen(p, path, loc) +static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc); -#define var_field(n) (n) -#define backref_assign_error(n, a, loc) (rb_backref_error(n), NEW_BEGIN(0, loc)) +#define var_field(p, n) (n) +#define backref_assign_error(p, n, a, loc) (rb_backref_error(p, n), NEW_BEGIN(0, loc)) static NODE *opt_arg_append(NODE*, NODE*); static NODE *kwd_append(NODE*, NODE*); -static NODE *new_hash_gen(struct parser_params *p, NODE *hash, const YYLTYPE *loc); -#define new_hash(hash, loc) new_hash_gen(p, (hash), loc) +static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc); -static NODE *new_defined_gen(struct parser_params *p, NODE *expr, const YYLTYPE *loc); -#define new_defined(expr, loc) new_defined_gen(p, expr, loc) +static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc); -static NODE *new_regexp_gen(struct parser_params *, NODE *, int, const YYLTYPE *); -#define new_regexp(node, opt, loc) new_regexp_gen(p, node, opt, loc) +static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *); #define make_array(ary, loc) ((ary) ? (nd_set_loc(ary, loc), ary) : NEW_ZARRAY(loc)) -static NODE *new_xstring_gen(struct parser_params *, NODE *, const YYLTYPE *loc); -#define new_xstring(node, loc) new_xstring_gen(p, node, loc) +static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc); #define new_string1(str) (str) -static NODE *new_body_gen(struct parser_params *p, NODE *param, NODE *stmt, const YYLTYPE *loc); -#define new_brace_body(param, stmt, loc) new_body_gen(p, param, stmt, loc) -#define new_do_body(param, stmt, loc) new_body_gen(p, param, stmt, loc) - -static NODE *match_op_gen(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*); -#define match_op(node1,node2,op_loc,loc) match_op_gen(p, (node1), (node2), (op_loc), (loc)) - -static ID *local_tbl_gen(struct parser_params*); -#define local_tbl() local_tbl_gen(p) - -static VALUE reg_compile_gen(struct parser_params*, VALUE, int); -#define reg_compile(str,options) reg_compile_gen(p, (str), (options)) -static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int); -#define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(p, (str), (options)) -static int reg_fragment_check_gen(struct parser_params*, VALUE, int); -#define reg_fragment_check(str,options) reg_fragment_check_gen(p, (str), (options)) -static NODE *reg_named_capture_assign_gen(struct parser_params* p, VALUE regexp, const YYLTYPE *loc); -#define reg_named_capture_assign(regexp,loc) reg_named_capture_assign_gen(p,(regexp),loc) +#define new_brace_body(param, stmt, loc) NEW_ITER(param, stmt, loc) +#define new_do_body(param, stmt, loc) NEW_ITER(param, stmt, loc) + +static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*); + +static ID *local_tbl(struct parser_params*); + +static VALUE reg_compile(struct parser_params*, VALUE, int); +static void reg_fragment_setenc(struct parser_params*, VALUE, int); +static int reg_fragment_check(struct parser_params*, VALUE, int); +static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc); static NODE *parser_heredoc_dedent(struct parser_params*,NODE*); # define heredoc_dedent(str) parser_heredoc_dedent(p, (str)) @@ -502,13 +445,12 @@ static NODE *parser_heredoc_dedent(struc https://github.com/ruby/ruby/blob/trunk/parse.y#L445 #define NODE_RIPPER NODE_CDECL static inline VALUE -ripper_new_yylval_gen(struct parser_params *p, ID a, VALUE b, VALUE c) +ripper_new_yylval(struct parser_params *p, ID a, VALUE b, VALUE c) { - add_mark_object(b); - add_mark_object(c); + add_mark_object(p, b); + add_mark_object(p, c); return (VALUE)NEW_CDECL(a, b, c, &NULL_LOC); } -#define ripper_new_yylval(a, b, c) ripper_new_yylval_gen(p, a, b, c) static inline int ripper_is_node_yylval(VALUE n) @@ -524,34 +466,29 @@ static ID ripper_get_id(VALUE); https://github.com/ruby/ruby/blob/trunk/parse.y#L466 #define get_id(id) ripper_get_id(id) static VALUE ripper_get_value(VALUE); #define get_value(val) ripper_get_value(val) -static VALUE assignable_gen(struct parser_params*,VALUE); -#define assignable(lhs,node,loc) assignable_gen(p, (lhs)) -static int id_is_var_gen(struct parser_params *p, ID id); -#define id_is_var(id) id_is_var_gen(p, (id)) - -#define method_cond(node,loc) (node) -#define call_bin_op(recv,id,arg1,op_loc,loc) dispatch3(binary, (recv), STATIC_ID2SYM(id), (arg1)) -#define match_op(node1,node2,op_loc,loc) call_bin_op((node1), idEqTilde, (node2), op_loc, loc) -#define call_uni_op(recv,id,op_loc,loc) dispatch2(unary, STATIC_ID2SYM(id), (recv)) -#define logop(id,node1,node2,op_loc,loc) call_bin_op((node1), (id), (node2), op_loc, loc) -#define node_assign(node1, node2, loc) dispatch2(assign, (node1), (node2)) -static VALUE new_qcall_gen(struct parser_params *p, VALUE q, VALUE r, VALUE m, VALUE a); -#define new_qcall(q,r,m,a,op_loc,loc) new_qcall_gen(p, (r), (q), (m), (a)) -#define new_command_qcall(q,r,m,a,op_loc,loc) dispatch4(command_call, (r), (q), (m), (a)) -#define new_command(m,a) dispatch2(command, (m), (a)); +static VALUE assignable(struct parser_params*,VALUE,VALUE,const YYLTYPE*); +#define assignable(p,id,val,loc) assignable((p),(id),(VALUE)(val),(loc)) +static int id_is_var(struct parser_params *p, ID id); + +#define method_cond(p,node,loc) (node) +#define call_bin_op(p, recv,id,arg1,op_loc,loc) dispatch3(binary, (recv), STATIC_ID2SYM(id), (arg1)) +#define match_op(p,node1,node2,op_loc,loc) call_bin_op(0, (node1), idEqTilde, (node2), op_loc, loc) +#define call_uni_op(p, recv,id,op_loc,loc) dispatch2(unary, STATIC_ID2SYM(id), (recv)) +#define logop(p,id,node1,node2,op_loc,loc) call_bin_op(0, (node1), (id), (node2), op_loc, loc) +#define node_assign(p, node1, node2, loc) dispatch2(assign, (node1), (node2)) +static VALUE new_qcall(struct parser_params *p, VALUE q, VALUE r, VALUE m, VALUE a, YYLTYPE *op_loc, const YYLTYPE *loc); +#define new_command_qcall(p,q,r,m,a,op_loc,loc) dispatch4(command_call, (r), (q), (m), (a)) +#define new_command(p, m,a) dispatch2(command, (m), (a)); #define new_nil(loc) Qnil -static VALUE new_op_assign_gen(struct parser_params *p, VALUE lhs, VALUE op, VALUE rhs); -#define new_op_assign(lhs, op, rhs, loc) new_op_assign_gen(p, (lhs), (op), (rhs)) -static VALUE new_attr_op_assign_gen(struct parser_params *p, VALUE lhs, VALUE type, VALUE attr, VALUE op, VALUE rhs); -#define new_attr_op_assign(lhs, type, attr, op, rhs, loc) new_attr_op_assign_gen(p, (lhs), (type), (attr), (op), (rhs)) -#define new_const_op_assign(lhs, op, rhs, loc) new_op_assign(lhs, op, rhs, loc) +#define new_op_assign(p,lhs,op,rhs,loc) dispatch3(opassign, (lhs), (op), (rhs)) + +static VALUE new_attr_op_assign(struct parser_params *p, VALUE lhs, VALUE type, VALUE attr, VALUE op, VALUE rhs, const YYLTYPE *loc); +#define new_const_op_assign(p, lhs, op, rhs, loc) new_op_assign(p, lhs, op, rhs, loc) -static VALUE new_regexp_gen(struct parser_params *, VALUE, VALUE); -#define new_regexp(node, opt, loc) new_regexp_gen(p, node, opt) +static VALUE new_regexp(struct parser_params *, VALUE, VALUE, const YYLTYPE *); -static VALUE new_xstring_gen(struct parser_params *, VALUE); -#define new_xstring(str, loc) new_xstring_gen(p, str) +static VALUE new_xstring(struct parser_params *, VALUE, const YYLTYPE *); #define new_string1(str) dispatch1(string_literal, str) #define new_brace_body(param, stmt, loc) dispatch2(brace_block, escape_Qundef(param), stmt) @@ -559,16 +496,13 @@ static VALUE new_xstring_gen(struct pars https://github.com/ruby/ruby/blob/trunk/parse.y#L496 #define const_path_field(w, n, loc) dispatch2(const_path_field, (w), (n)) #define top_const_field(n,loc) dispatch1(top_const_field, (n)) -static VALUE const_decl_gen(struct parser_params *p, VALUE path); -#define const_decl(path, loc) const_decl_gen(p, path) +static VALUE const_decl(struct parser_params *p, VALUE path, const YYLTYPE *loc); -static VALUE var_field_gen(struct parser_params *p, VALUE a); -#define var_field(a) var_field_gen(p, (a)) -static VALUE assign_error_gen(struct parser_params *p, VALUE a); -#define assign_error(a) assign_error_gen(p, (a)) -#define backref_assign_error(n, a, loc) assign_error(a) +static VALUE var_field(struct parser_params *p, VALUE a); +static VALUE assign_error(struct parser_params *p, VALUE a); +#define backref_assign_error(p, n, a, loc) assign_error(p, a) -#define block_dup_check(n1,n2) ((void)(n1), (void)(n2)) +#define block_dup_check(p, n1,n2) ((void)(n1), (void)(n2)) #define fixpos(n1,n2) ((void)(n1), (void)(n2)) #undef nd_set_line #define nd_set_line(n,l) ((void)(n)) @@ -592,42 +526,27 @@ void rb_parser_set_location_of_none(stru https://github.com/ruby/ruby/blob/trunk/parse.y#L526 void rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc); RUBY_SYMBOL_EXPORT_END -static ID formal_argument_gen(struc (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/