nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d32ed1c
)
test_parser: display node type and quoted contents
author
Jean Privat
<jean@pryen.org>
Wed, 21 Aug 2013 18:50:20 +0000
(14:50 -0400)
committer
Jean Privat
<jean@pryen.org>
Thu, 22 Aug 2013 17:39:03 +0000
(13:39 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
src/test_parser.nit
patch
|
blob
|
history
diff --git
a/src/test_parser.nit
b/src/test_parser.nit
index
78f5799
..
654e9cd
100644
(file)
--- 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)