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