node.c: Fix format and example of NODE_OPCALL
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ec959fbb4b
commit
bd97ca443f
11
node.c
11
node.c
@ -478,7 +478,6 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case NODE_CALL:
|
case NODE_CALL:
|
||||||
case NODE_OPCALL:
|
|
||||||
ANN("method invocation");
|
ANN("method invocation");
|
||||||
ANN("format: [nd_recv].[nd_mid]([nd_args])");
|
ANN("format: [nd_recv].[nd_mid]([nd_args])");
|
||||||
ANN("example: obj.foo(1)");
|
ANN("example: obj.foo(1)");
|
||||||
@ -488,6 +487,16 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node)
|
|||||||
F_NODE(nd_args, "arguments");
|
F_NODE(nd_args, "arguments");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case NODE_OPCALL:
|
||||||
|
ANN("method invocation");
|
||||||
|
ANN("format: [nd_recv] [nd_mid] [nd_args]");
|
||||||
|
ANN("example: foo + bar");
|
||||||
|
F_ID(nd_mid, "method id");
|
||||||
|
F_NODE(nd_recv, "receiver");
|
||||||
|
LAST_NODE;
|
||||||
|
F_NODE(nd_args, "arguments");
|
||||||
|
return;
|
||||||
|
|
||||||
case NODE_FCALL:
|
case NODE_FCALL:
|
||||||
ANN("function call");
|
ANN("function call");
|
||||||
ANN("format: [nd_mid]([nd_args])");
|
ANN("format: [nd_mid]([nd_args])");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user