From: Mart Lubbers Date: Mon, 29 Feb 2016 19:24:33 +0000 (+0100) Subject: lex X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=7c16c9353b324301ee8c028e39c33aa2a46895f8;p=cc1516.git lex --- diff --git a/src/lex.icl b/src/lex.icl index a6f31ab..8dc82e9 100644 --- a/src/lex.icl +++ b/src/lex.icl @@ -15,7 +15,7 @@ lexer r = case runParser lexProgram r of (Left e, _) = Left $ toString e lexProgram :: Parser Char [Token] -lexProgram = some lexToken >>= \ts->pure (map (\t->(0, 0, t)) ts) +lexProgram = some lexToken <* eof >>= \ts->pure (map (\t->(0, 0, t)) ts) lexToken :: Parser Char TokenValue lexToken =