parser: also visit EOF token
[nit.git] / src / parser / parser_prod.nit
index c45fdb7..d9929e7 100644 (file)
@@ -33,16 +33,6 @@ redef class ANode
        # Visit all nodes in reverse order.
        # Thus, call "v.visit(e)" for each node e starting from the last child
        fun visit_all_reverse(v: Visitor) is abstract
-
-       # Debug method: output a message prefixed with the location.
-       fun printl(str: String)
-       do
-               if location == null then
-                       print("???: {str}\n")
-               else
-                       print("{location}: {str}\n")
-               end
-       end
 end
 
 redef class Token
@@ -9748,10 +9738,12 @@ redef class Start
         if _n_base != null then
             v.enter_visit(_n_base.as(not null))
         end
+       v.enter_visit(_n_eof)
     end
 
     redef fun visit_all_reverse(v: Visitor)
     do
+       v.enter_visit(_n_eof)
         if _n_base != null then
             v.enter_visit(_n_base.as(not null))
         end