lexer: fix `EOF::parser_index` generation.
authorJean Privat <jean@pryen.org>
Thu, 18 Sep 2014 13:21:10 +0000 (09:21 -0400)
committerJean Privat <jean@pryen.org>
Thu, 18 Sep 2014 17:04:51 +0000 (13:04 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/parser/lexer_work.nit
src/parser/xss/tokens.xss

index e7102b6..2d93018 100644 (file)
@@ -39,11 +39,6 @@ redef class Token
 end
 
 redef class EOF
-    redef fun parser_index: Int
-    do
-       return 97
-    end
-
     init init_tk(loc: Location)
     do
         _cached_text = ""
index a5536fd..c1b37cb 100644 (file)
@@ -54,4 +54,12 @@ end
 
 $ end if
 $ end foreach
+
+redef class EOF
+    redef fun parser_index: Int
+    do
+       return ${tokens/eof/@parser_index}
+    end
+end
+
 $ end template