Skip to content

Commit e96bbd7

Browse files
committed
Remove needless parse.y new_nil macro
In the past parse.y and ripper had different `new_nil` definition so that `new_nil` returns `nil` for ripper. ```c // parse.y #define new_nil(loc) NEW_NIL(loc) // ripper #define new_nil(loc) Qnil ``` However Rearchitect Ripper (89cfc15) removed `new_nil` definition for ripper then this commit removes needless parse.y macro and uses `NEW_NIL` directly.
1 parent b79ef73 commit e96bbd7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

parse.y

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,6 @@ last_expr_node(NODE *expr)
13931393

13941394
static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
13951395
static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1396-
#define new_nil(loc) NEW_NIL(loc)
13971396
static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
13981397
static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
13991398
static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
@@ -4451,7 +4450,7 @@ primary : inline_primary
44514450
}
44524451
| keyword_not '(' rparen
44534452
{
4454-
$$ = call_uni_op(p, method_cond(p, new_nil(&@2), &@2), METHOD_NOT, &@1, &@$);
4453+
$$ = call_uni_op(p, method_cond(p, NEW_NIL(&@2), &@2), METHOD_NOT, &@1, &@$);
44554454
/*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
44564455
}
44574456
| fcall brace_block

0 commit comments

Comments
 (0)