summaryrefslogtreecommitdiff
path: root/node.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-08 06:55:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-08 06:55:12 +0000
commit39c7700d13e09204741571298a84b6d068bf5c20 (patch)
treefc062fc2038929ee78ca918f35428554300e3b17 /node.c
parent80768abe692bfe55813826fd5f86e8b468701891 (diff)
node.c: show newline node mark
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'node.c')
-rw-r--r--node.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/node.c b/node.c
index bc61f3afc5..370e6df5ce 100644
--- a/node.c
+++ b/node.c
@@ -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))