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

ruby-changes:66752

From: Nobuyoshi <ko1@a...>
Date: Mon, 12 Jul 2021 13:45:24 +0900 (JST)
Subject: [ruby-changes:66752] 6504ca006b (master): Show node IDs in dump

https://git.ruby-lang.org/ruby.git/commit/?id=6504ca006b

From 6504ca006b4a97ca875d629b5dcf942b3b8fd72a Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Mon, 12 Jul 2021 12:10:16 +0900
Subject: Show node IDs in dump

---
 node.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/node.c b/node.c
index f3dbf6e..cd1c3f0 100644
--- a/node.c
+++ b/node.c
@@ -28,8 +28,8 @@ https://github.com/ruby/ruby/blob/trunk/node.c#L28
 #define A_LONG(val) rb_str_catf(buf, "%ld", (val))
 #define A_LIT(lit) AR(rb_dump_literal(lit))
 #define A_NODE_HEADER(node, term) \
-    rb_str_catf(buf, "@ %s (line: %d, location: (%d,%d)-(%d,%d))%s"term, \
-		ruby_node_name(nd_type(node)), nd_line(node), \
+    rb_str_catf(buf, "@ %s (id: %d, line: %d, location: (%d,%d)-(%d,%d))%s"term, \
+		ruby_node_name(nd_type(node)), nd_node_id(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 ? "*" : ""))
-- 
cgit v1.1


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

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