aboutsummaryrefslogtreecommitdiffstats
path: root/node.h
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-06-04 23:11:38 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-06-04 23:17:18 +0900
commit0872ea53303499caf3584e40f2a5438e86eb4fed (patch)
tree5f855704bd7f6a7d8cfa182fc19821ec7ab5cfa8 /node.h
parent39eae6bf89773ef830b632c02737545ab9eedd35 (diff)
downloadruby-0872ea53303499caf3584e40f2a5438e86eb4fed.tar.gz
node.h: Avoid a magic number to represent excessed comma
`(ID)1` was assigned to NODE_ARGS#rest_arg for `{|x,| }`. This change removes the magic number by introducing an explicit macro variable for it: NODE_SPECIAL_EXCESSED_COMMA.
Diffstat (limited to 'node.h')
-rw-r--r--node.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/node.h b/node.h
index 57a0ea3932..539c3724a9 100644
--- a/node.h
+++ b/node.h
@@ -383,6 +383,7 @@ typedef struct RNode {
#define NODE_REQUIRED_KEYWORD_P(node) ((node)->nd_value == NODE_SPECIAL_REQUIRED_KEYWORD)
#define NODE_SPECIAL_NO_NAME_REST ((NODE *)-1)
#define NODE_NAMED_REST_P(node) ((node) != NODE_SPECIAL_NO_NAME_REST)
+#define NODE_SPECIAL_EXCESSED_COMMA ((ID)1)
VALUE rb_node_case_when_optimizable_literal(const NODE *const node);