lexer: fix `EOF::parser_index` generation.
[nit.git] / src / parser / xss / tokens.xss
index e1a4e33..c1b37cb 100644 (file)
@@ -25,39 +25,19 @@ $ end
 $ end
 class EOF
        super Token
-private init noinit do end
 end
 class PError
        super EOF
-private init noinit do end
 end
 class PLexerError
        super PError
-private init noinit do end
 end
 class PParserError
        super PError
-private init noinit do end
 end
 $ end template
 
 $ template make_tokens()
-
-redef class Token
-    var _text: nullable String
-
-    redef fun text
-    do
-        var res = _text
-        if res != null then return res
-        res = location.text
-       _text = res
-       return res
-    end
-
-    fun parser_index: Int is abstract
-end
-
 $ foreach {//token}
 $ if {@parser_index}
 redef class @ename
@@ -80,41 +60,6 @@ redef class EOF
     do
        return ${tokens/eof/@parser_index}
     end
-
-    init(loc: Location)
-    do
-        _text = ""
-               _location = loc
-    end
 end
 
-redef class PError
-    readable var _message: String
-
-    init init_error(message: String, loc: Location)
-    do
-               init(loc)
-               _message = message
-    end
-end
-
-redef class PLexerError
-    readable var _string: String
-
-    init init_lexer_error(message: String, loc: Location, string: String)
-    do
-               init_error(message, loc)
-               _string = string
-    end
-end
-
-redef class PParserError
-    readable var _token: Token
-
-    init init_parser_error(message: String, loc: Location, token: Token)
-    do
-               init_error(message, loc)
-               _token = token
-    end
-end
 $ end template