[jruby-joni] 104/279: Better AST debug repr.

Hideki Yamane henrich at moszumanska.debian.org
Mon Nov 16 11:27:03 UTC 2015


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch debian/sid
in repository jruby-joni.

commit 6eb0d89ff01cddd0864ac3ca47ecfa4e42529591
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date:   Sat Feb 18 15:10:54 2012 +0100

    Better AST debug repr.
---
 src/org/joni/ast/Node.java       | 3 +--
 src/org/joni/ast/StringNode.java | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/org/joni/ast/Node.java b/src/org/joni/ast/Node.java
index f3061c0..5a75221 100644
--- a/src/org/joni/ast/Node.java
+++ b/src/org/joni/ast/Node.java
@@ -76,8 +76,7 @@ public abstract class Node implements NodeType {
 
     public final String toString() {
         StringBuilder s = new StringBuilder();
-        s.append("<" + getAddressName() + ">");
-        s.append("\n  parent: " + (parent == null ? "NULL" : parent.getAddressName()));
+        s.append("<" + getAddressName() + " (" + (parent == null ? "NULL" : parent.getAddressName())  + ")>");
         return s + toString(0);
     }
 
diff --git a/src/org/joni/ast/StringNode.java b/src/org/joni/ast/StringNode.java
index 57e33c5..fb83567 100644
--- a/src/org/joni/ast/StringNode.java
+++ b/src/org/joni/ast/StringNode.java
@@ -94,7 +94,7 @@ public final class StringNode extends Node implements StringType {
     @Override
     public String toString(int level) {
         StringBuilder value = new StringBuilder();
-        value.append("\n  bytes: \'");
+        value.append("\n  bytes: '");
         for (int i=p; i<end; i++) {
             if ((bytes[i] & 0xff) >= 0x20 && (bytes[i] & 0xff) < 0x7f) {
                 value.append((char)bytes[i]);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jruby-joni.git



More information about the pkg-java-commits mailing list