Rename nd_head
in RNode_RESBODY
as nd_next
This commit is contained in:
parent
0f98d284f3
commit
e018036d89
2
ast.c
2
ast.c
@ -429,7 +429,7 @@ node_children(rb_ast_t *ast, const NODE *node)
|
||||
case NODE_RESCUE:
|
||||
return rb_ary_new_from_node_args(ast, 3, RNODE_RESCUE(node)->nd_head, RNODE_RESCUE(node)->nd_resq, RNODE_RESCUE(node)->nd_else);
|
||||
case NODE_RESBODY:
|
||||
return rb_ary_new_from_node_args(ast, 3, RNODE_RESBODY(node)->nd_args, RNODE_RESBODY(node)->nd_body, RNODE_RESBODY(node)->nd_head);
|
||||
return rb_ary_new_from_node_args(ast, 3, RNODE_RESBODY(node)->nd_args, RNODE_RESBODY(node)->nd_body, RNODE_RESBODY(node)->nd_next);
|
||||
case NODE_ENSURE:
|
||||
return rb_ary_new_from_node_args(ast, 2, RNODE_ENSURE(node)->nd_head, RNODE_ENSURE(node)->nd_ensr);
|
||||
case NODE_AND:
|
||||
|
@ -8275,7 +8275,7 @@ compile_resbody(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node,
|
||||
}
|
||||
ADD_INSN(ret, line_node, leave);
|
||||
ADD_LABEL(ret, label_miss);
|
||||
resq = RNODE_RESBODY(resq)->nd_head;
|
||||
resq = RNODE_RESBODY(resq)->nd_next;
|
||||
}
|
||||
return COMPILE_OK;
|
||||
}
|
||||
|
@ -351,7 +351,7 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node)
|
||||
F_NODE(nd_args, RNODE_RESBODY, "rescue exceptions");
|
||||
F_NODE(nd_body, RNODE_RESBODY, "rescue clause");
|
||||
LAST_NODE;
|
||||
F_NODE(nd_head, RNODE_RESBODY, "next rescue clause");
|
||||
F_NODE(nd_next, RNODE_RESBODY, "next rescue clause");
|
||||
return;
|
||||
|
||||
case NODE_ENSURE:
|
||||
|
8
parse.y
8
parse.y
@ -1078,7 +1078,7 @@ static rb_node_for_masgn_t *rb_node_for_masgn_new(struct parser_params *p, NODE
|
||||
static rb_node_retry_t *rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc);
|
||||
static rb_node_begin_t *rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
|
||||
static rb_node_rescue_t *rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc);
|
||||
static rb_node_resbody_t *rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_body, NODE *nd_head, const YYLTYPE *loc);
|
||||
static rb_node_resbody_t *rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc);
|
||||
static rb_node_ensure_t *rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc);
|
||||
static rb_node_and_t *rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc);
|
||||
static rb_node_or_t *rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc);
|
||||
@ -11651,12 +11651,12 @@ rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *
|
||||
}
|
||||
|
||||
static rb_node_resbody_t *
|
||||
rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_body, NODE *nd_head, const YYLTYPE *loc)
|
||||
rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
|
||||
{
|
||||
rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
|
||||
n->nd_head = nd_head;
|
||||
n->nd_body = nd_body;
|
||||
n->nd_args = nd_args;
|
||||
n->nd_body = nd_body;
|
||||
n->nd_next = nd_next;
|
||||
|
||||
return n;
|
||||
}
|
||||
|
@ -337,9 +337,9 @@ typedef struct RNode_RESCUE {
|
||||
typedef struct RNode_RESBODY {
|
||||
NODE node;
|
||||
|
||||
struct RNode *nd_head;
|
||||
struct RNode *nd_body;
|
||||
struct RNode *nd_args;
|
||||
struct RNode *nd_body;
|
||||
struct RNode *nd_next;
|
||||
} rb_node_resbody_t;
|
||||
|
||||
typedef struct RNode_ENSURE {
|
||||
|
Loading…
x
Reference in New Issue
Block a user