From 3dd7096cb28972332716390ab62350205df519f8 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Wed, 6 Mar 2019 13:12:23 +0100 Subject: [PATCH] cleanup --- check.icl | 1 + parse.icl | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/check.icl b/check.icl index 68d258a..8a4ea5c 100644 --- a/check.icl +++ b/check.icl @@ -26,6 +26,7 @@ check fs ([Function _ _ _], _) = Left ["Start cannot have arguments"] instance toString Scheme where + toString (Forall [] t) = toString t toString (Forall as t) = concat ["A.", join " " (map toString as), ": ", toString t] instance toString Type where diff --git a/parse.icl b/parse.icl index 0c30e8c..a2c3103 100644 --- a/parse.icl +++ b/parse.icl @@ -26,6 +26,10 @@ instance toString Token where toString t = printToString t lex :: [Char] -> Either [String] [Token] lex [] = pure [] +lex ['//\n':ts] = lex ts +lex ['//',t:ts] = lex ['/','/':ts] +lex ['/**/':ts] = lex $ dropWhile ((<>)'\n') ts +lex ['/*',t:ts] = lex ['/','*':ts] lex [';':ts] = TTSemiColon <:> lex ts lex [')':ts] = TTBrackClose <:> lex ts lex ['(':ts] = TTBrackOpen <:> lex ts -- 2.20.1