mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
node.c: a simple notation for code range of NODEs
This affects only `--dump=parsetree` and `--dump=parsetree_with_comment`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
133b0cf211
commit
aa87ae7a04
1 changed files with 1 additions and 1 deletions
2
node.c
2
node.c
|
@ -23,7 +23,7 @@
|
|||
#define A_LONG(val) rb_str_catf(buf, "%ld", (val))
|
||||
#define A_LIT(lit) AR(rb_inspect(lit))
|
||||
#define A_NODE_HEADER(node, term) \
|
||||
rb_str_catf(buf, "@ %s (line: %d, first_lineno: %d, first_column: %d, last_lineno: %d, last_column: %d)"term, \
|
||||
rb_str_catf(buf, "@ %s (line: %d, code_range: (%d,%d)-(%d,%d))"term, \
|
||||
ruby_node_name(nd_type(node)), nd_line(node), nd_lineno(node), nd_column(node), nd_last_lineno(node), nd_last_column(node))
|
||||
#define A_FIELD_HEADER(len, name, term) \
|
||||
rb_str_catf(buf, "+- %.*s:"term, (len), (name))
|
||||
|
|
Loading…
Reference in a new issue