model: rta uses its visitor only to visit FFI extern methods
[nit.git] / src / test_parser.nit
index 78f5799..91851ba 100644 (file)
@@ -15,7 +15,7 @@
 # limitations under the License.
 
 # Program used to test the NIT parser
-package test_parser
+module test_parser
 
 import parser
 
@@ -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)