lexToken :: Parser Char TokenValue
lexToken =
//Comments
- (list (fromString "//") >>| until top (item '\n') >>| lexToken) <|>
+ (list (fromString "//") >>| until top ((item '\n' >>| return Void) <|> eof) >>| lexToken) <|>
(list (fromString "/*") >>| until top (list (fromString "*/")) >>| lexToken) <|>
//Keyword tokens
(lexKw "var" VarToken) <|>
instance toString Error
+//(`until`) infix 1
+
runParser :: (Parser a b) [a] -> (Either Error b, [a])
(<?>) :: (Parser a b) (String, Int) -> Parser a b
fail :: Parser a b