mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
node.c: Add NODE_OP_CDECL to dump node list.
* node.c (dump_node): Add NODE_OP_CDECL to dump node list. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2075bc5178
commit
0c8292cb1b
1 changed files with 16 additions and 0 deletions
16
node.c
16
node.c
|
@ -484,6 +484,22 @@ dump_node(VALUE buf, VALUE indent, int comment, NODE *node)
|
|||
F_NODE(nd_value, "rvalue");
|
||||
break;
|
||||
|
||||
case NODE_OP_CDECL:
|
||||
ANN("constant declaration with operator");
|
||||
ANN("format: [nd_head](constant) [nd_aid]= [nd_value]");
|
||||
ANN("example: A::B ||= 1");
|
||||
F_NODE(nd_head, "variable");
|
||||
F_CUSTOM1(nd_aid, "operator") {
|
||||
switch (node->nd_aid) {
|
||||
case 0: A("0 (||)"); break;
|
||||
case 1: A("1 (&&)"); break;
|
||||
default: A_ID(node->nd_mid);
|
||||
}
|
||||
};
|
||||
LAST_NODE;
|
||||
F_NODE(nd_value, "rvalue");
|
||||
break;
|
||||
|
||||
case NODE_CALL:
|
||||
case NODE_OPCALL:
|
||||
ANN("method invocation");
|
||||
|
|
Loading…
Reference in a new issue