type
[cc1516.git] / src / lex.dcl
index df25ea8..e78d495 100644 (file)
@@ -1,8 +1,12 @@
 definition module lex
 
 from Data.Either import :: Either
+from yard import :: Error
 
-:: Token :== (Int, Int, TokenValue)
+:: Token = {
+       line :: Int,
+       column :: Int,
+       token :: TokenValue}
 :: TokenValue
        //Value tokens
        = IdentToken String // Identifier
@@ -53,6 +57,6 @@ from Data.Either import :: Either
        //Special tokens
        | EndOfFileToken    // EOF
 
-:: LexerOutput :== Either String [Token]
+:: LexerOutput :== Either Error [Token]
 
 lexer :: [Char] -> LexerOutput