nitcc: move up `text` of token earlier to improve generated code
[nit.git] / contrib / nitcc / src / autom.nit
index d2ab41d..21d23ee 100644 (file)
@@ -745,6 +745,11 @@ private class DFAGenerator
        end
 end
 
+redef class Token
+       # The associated text (if any, ie defined in the parser part)
+       var text: nullable String is noautoinit, writable
+end
+
 # A state in a finite automaton
 class State
        # Outgoing transitions