1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

node.c: stringize before expansion

* node.c (F_NODE, F_OPTION): stringize member names defined as
  macros before expansion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-03-10 07:27:40 +00:00
parent 46ac76b6ed
commit 72b3e226fc

8
node.c
View file

@ -38,8 +38,8 @@
} while (0)
#define COMPOUND_FIELD1(name, ann, block) \
COMPOUND_FIELD(FIELD_NAME_LEN(#name, ann), \
FIELD_NAME_DESC(#name, ann), \
COMPOUND_FIELD(FIELD_NAME_LEN(name, ann), \
FIELD_NAME_DESC(name, ann), \
block)
#define FIELD_NAME_DESC(name, ann) name " (" ann ")"
@ -62,9 +62,9 @@
#define F_MSG(name, ann, desc) SIMPLE_FIELD1(#name, ann) A(desc)
#define F_NODE(name, ann) \
COMPOUND_FIELD1(name, ann, dump_node(buf, indent, comment, node->name))
COMPOUND_FIELD1(#name, ann, dump_node(buf, indent, comment, node->name))
#define F_OPTION(name, ann) \
COMPOUND_FIELD1(name, ann, dump_option(buf, indent, node->name))
COMPOUND_FIELD1(#name, ann, dump_option(buf, indent, node->name))
#define ANN(ann) \
if (comment) { \