зеркало из https://github.com/github/ruby.git
Move internal NODE_DEF_TEMP to parse.y
This commit is contained in:
Родитель
a472fd55da
Коммит
70e1635950
1
ast.c
1
ast.c
|
@ -678,7 +678,6 @@ node_children(rb_ast_t *ast, const NODE *node)
|
|||
case NODE_ERROR:
|
||||
return rb_ary_new_from_node_args(ast, 0);
|
||||
case NODE_ARGS_AUX:
|
||||
case NODE_DEF_TEMP:
|
||||
case NODE_RIPPER:
|
||||
case NODE_RIPPER_VALUES:
|
||||
case NODE_LAST:
|
||||
|
|
|
@ -493,7 +493,6 @@ count_nodes(int argc, VALUE *argv, VALUE os)
|
|||
COUNT_NODE(NODE_ARYPTN);
|
||||
COUNT_NODE(NODE_FNDPTN);
|
||||
COUNT_NODE(NODE_HSHPTN);
|
||||
COUNT_NODE(NODE_DEF_TEMP);
|
||||
COUNT_NODE(NODE_RIPPER);
|
||||
COUNT_NODE(NODE_RIPPER_VALUES);
|
||||
COUNT_NODE(NODE_ERROR);
|
||||
|
|
|
@ -1104,7 +1104,6 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node)
|
|||
return;
|
||||
|
||||
case NODE_ARGS_AUX:
|
||||
case NODE_DEF_TEMP:
|
||||
case NODE_RIPPER:
|
||||
case NODE_RIPPER_VALUES:
|
||||
case NODE_LAST:
|
||||
|
|
8
parse.y
8
parse.y
|
@ -1080,6 +1080,12 @@ static rb_node_error_t *rb_node_error_new(struct parser_params *p, const YYLTYPE
|
|||
|
||||
#endif
|
||||
|
||||
enum internal_node_type {
|
||||
NODE_INTERNAL_ONLY = NODE_LAST,
|
||||
NODE_DEF_TEMP,
|
||||
NODE_INTERNAL_LAST
|
||||
};
|
||||
|
||||
/* This node is parse.y internal */
|
||||
typedef struct RNode_DEF_TEMP {
|
||||
NODE node;
|
||||
|
@ -12157,7 +12163,7 @@ rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc)
|
|||
static rb_node_def_temp_t *
|
||||
rb_node_def_temp_new(struct parser_params *p, ID nd_vid, ID nd_mid, NODE *nd_head, long nd_nth, struct lex_context ctxt, const YYLTYPE *loc)
|
||||
{
|
||||
rb_node_def_temp_t *n = NODE_NEWNODE(NODE_DEF_TEMP, rb_node_def_temp_t, loc);
|
||||
rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
|
||||
n->nd_vid = nd_vid;
|
||||
n->nd_mid = nd_mid;
|
||||
n->nd_head = nd_head;
|
||||
|
|
|
@ -131,7 +131,6 @@ enum node_type {
|
|||
NODE_HSHPTN,
|
||||
NODE_FNDPTN,
|
||||
NODE_ERROR,
|
||||
NODE_DEF_TEMP,
|
||||
NODE_RIPPER,
|
||||
NODE_RIPPER_VALUES,
|
||||
NODE_LAST
|
||||
|
|
Загрузка…
Ссылка в новой задаче