ruby-changes:48637
From: yui-knk <ko1@a...>
Date: Mon, 13 Nov 2017 10:24:23 +0900 (JST)
Subject: [ruby-changes:48637] yui-knk:r60752 (trunk): Print last location of a node
yui-knk 2017-11-13 10:24:16 +0900 (Mon, 13 Nov 2017) New Revision: 60752 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60752 Log: Print last location of a node * node.c (A_NODE_HEADER): Print last location of a node. Modified files: trunk/node.c Index: node.c =================================================================== --- node.c (revision 60751) +++ node.c (revision 60752) @@ -23,7 +23,8 @@ https://github.com/ruby/ruby/blob/trunk/node.c#L23 #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. lineno: %d, column: %d)"term, ruby_node_name(nd_type(node)), nd_line(node), nd_lineno(node), nd_column(node)) + rb_str_catf(buf, "@ %s (line: %d, first_lineno: %d, first_column: %d, last_lineno: %d, last_column: %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)) #define D_FIELD_HEADER(len, name, term) (A_INDENT, A_FIELD_HEADER(len, name, term)) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/