mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Show node IDs in dump
This commit is contained in:
parent
c2ed5ab08b
commit
6504ca006b
1 changed files with 2 additions and 2 deletions
4
node.c
4
node.c
|
@ -28,8 +28,8 @@
|
||||||
#define A_LONG(val) rb_str_catf(buf, "%ld", (val))
|
#define A_LONG(val) rb_str_catf(buf, "%ld", (val))
|
||||||
#define A_LIT(lit) AR(rb_dump_literal(lit))
|
#define A_LIT(lit) AR(rb_dump_literal(lit))
|
||||||
#define A_NODE_HEADER(node, term) \
|
#define A_NODE_HEADER(node, term) \
|
||||||
rb_str_catf(buf, "@ %s (line: %d, location: (%d,%d)-(%d,%d))%s"term, \
|
rb_str_catf(buf, "@ %s (id: %d, line: %d, location: (%d,%d)-(%d,%d))%s"term, \
|
||||||
ruby_node_name(nd_type(node)), nd_line(node), \
|
ruby_node_name(nd_type(node)), nd_node_id(node), nd_line(node), \
|
||||||
nd_first_lineno(node), nd_first_column(node), \
|
nd_first_lineno(node), nd_first_column(node), \
|
||||||
nd_last_lineno(node), nd_last_column(node), \
|
nd_last_lineno(node), nd_last_column(node), \
|
||||||
(node->flags & NODE_FL_NEWLINE ? "*" : ""))
|
(node->flags & NODE_FL_NEWLINE ? "*" : ""))
|
||||||
|
|
Loading…
Add table
Reference in a new issue