summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-03 01:04:30 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-03 01:16:57 +0900
commit2544bf9452b5208a450509aa219bc33aeffbd292 (patch)
tree932f79fda43a474a7fbd6ed3a8ddd87e55b86f73 /parse.y
parent242e58db2f34c3e35265fc393cd7c5c792e65754 (diff)
New macro `NEW_RIPPER` instead of `NEW_CDECL`
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index bbe460b901..75f5aa2285 100644
--- a/parse.y
+++ b/parse.y
@@ -559,6 +559,7 @@ static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYP
#define get_num(num) (num)
#else /* RIPPER */
#define NODE_RIPPER NODE_CDECL
+#define NEW_RIPPER(a,b,c,loc) (VALUE)NEW_CDECL(a,b,c,loc)
static inline int ripper_is_node_yylval(VALUE n);
@@ -568,7 +569,7 @@ ripper_new_yylval(struct parser_params *p, ID a, VALUE b, VALUE c)
if (ripper_is_node_yylval(c)) c = RNODE(c)->nd_cval;
add_mark_object(p, b);
add_mark_object(p, c);
- return (VALUE)NEW_CDECL(a, b, c, &NULL_LOC);
+ return NEW_RIPPER(a, b, c, &NULL_LOC);
}
static inline int