added command line option for selftest, still needs to implement
[cc1516.git] / lex.icl
diff --git a/lex.icl b/lex.icl
index 21a29e9..e3fb2c1 100644 (file)
--- a/lex.icl
+++ b/lex.icl
@@ -9,6 +9,7 @@ import StdChar
 import StdString
 
 import yard
+from AST import :: Pos(..)
 
 :: LexItem
        = LexToken Int TokenValue
@@ -30,7 +31,7 @@ lexProgram line column = lexToken >>= \t->case t of
        (LexItemError e) = fail <?>
                PositionalError line column ("LexerError: " +++ e)
        (LexToken c t) = lexProgram line (column+c)
-               >>= \rest->pure [{line=line, column=column, token=t}:rest]
+               >>= \rest->pure [({line=line,col=column}, t):rest]
 
 lexToken :: Parser Char LexItem
 lexToken =