From 2235803ee223b641adc8672f157186d076b19c33 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Wed, 21 Aug 2013 14:50:20 -0400 Subject: [PATCH 1/1] test_parser: display node type and quoted contents Signed-off-by: Jean Privat --- src/test_parser.nit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test_parser.nit b/src/test_parser.nit index 78f5799..654e9cd 100644 --- a/src/test_parser.nit +++ b/src/test_parser.nit @@ -25,9 +25,9 @@ class PrintTreeVisitor redef fun visit(n) do if n isa Token then - printn(" " * _rank, n.to_s, " ... ", n.location, "\n") + printn(" " * _rank, n.class_name, " \"", n.text.escape_to_c, "\" ", n.location, "\n") else - printn(" " * _rank, n.location, "\n") + printn(" " * _rank, n.class_name, " ", n.location, "\n") end _rank = _rank + 1 n.visit_all(self) -- 1.7.9.5