repositories
/
cc1516.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9140117
)
lexen zonder comments
author
Mart Lubbers
<mart@martlubbers.net>
Mon, 29 Feb 2016 19:30:07 +0000
(20:30 +0100)
committer
Mart Lubbers
<mart@martlubbers.net>
Mon, 29 Feb 2016 19:30:07 +0000
(20:30 +0100)
src/lex.icl
patch
|
blob
|
history
diff --git
a/src/lex.icl
b/src/lex.icl
index
8dc82e9
..
e3c8484
100644
(file)
--- 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 =