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

node.c: show newline node mark

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-01-08 06:55:12 +00:00
parent 80768abe69
commit 39c7700d13

7
node.c
View file

@ -24,8 +24,11 @@
#define A_LIT(lit) AR(rb_inspect(lit))
#define A_OPERATOR(id) add_operator(buf, (id))
#define A_NODE_HEADER(node, 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_first_lineno(node), nd_first_column(node), nd_last_lineno(node), nd_last_column(node))
rb_str_catf(buf, "@ %s (line: %d, code_range: (%d,%d)-(%d,%d))%s"term, \
ruby_node_name(nd_type(node)), nd_line(node), \
nd_first_lineno(node), nd_first_column(node), \
nd_last_lineno(node), nd_last_column(node), \
(node->flags & NODE_FL_NEWLINE ? "*" : ""))
#define A_FIELD_HEADER(len, name, term) \
rb_str_catf(buf, "+- %.*s:"term, (len), (name))
#define D_FIELD_HEADER(len, name, term) (A_INDENT, A_FIELD_HEADER(len, name, term))