[前][次][番号順一覧][スレッド一覧]

ruby-changes:48904

From: mame <ko1@a...>
Date: Tue, 5 Dec 2017 13:23:12 +0900 (JST)
Subject: [ruby-changes:48904] mame:r61022 (trunk): node.c: a simple notation for code range of NODEs

mame	2017-12-05 13:23:06 +0900 (Tue, 05 Dec 2017)

  New Revision: 61022

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61022

  Log:
    node.c: a simple notation for code range of NODEs
    
    This affects only `--dump=parsetree` and `--dump=parsetree_with_comment`.

  Modified files:
    trunk/node.c
Index: node.c
===================================================================
--- node.c	(revision 61021)
+++ node.c	(revision 61022)
@@ -23,7 +23,7 @@ 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, 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))

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]