X-Git-Url: http://nitlanguage.org diff --git a/lib/saxophonit/lexer.nit b/lib/saxophonit/lexer.nit index 4f77ab8..f95e5e3 100644 --- a/lib/saxophonit/lexer.nit +++ b/lib/saxophonit/lexer.nit @@ -20,8 +20,14 @@ import reader_model # They both foward the cursor to the next byte on success, but only `expect` # functions fire a fatal error on mismatch. class XophonLexer + + # The model. var reader_model: XophonReaderModel - var input: IStream is writable + + # The input to read from. + var input: Reader is writable + + # Alias to `reader_model.locator`. private var locator: SAXLocatorImpl is noinit init do @@ -344,7 +350,7 @@ class XophonLexer # match `expected`. fun expect_string(expected: String, context: String): Bool do var chars = expected.chars - var i: Int = 0 + var i = 0 while i < chars.length do if not accept(chars[i]) then