parsing and desugaring of do blocks. (Some inference issues remain.)

This commit is contained in:
2024-10-29 20:20:05 -07:00
parent e8de2d4ccd
commit b844d0b676
6 changed files with 91 additions and 23 deletions

View File

@@ -5,11 +5,11 @@ import Text.Lexer.Tokenizer
import Lib.Token
keywords : List String
keywords = ["let", "in", "where", "case", "of", "data", "U",
keywords = ["let", "in", "where", "case", "of", "data", "U", "do",
"ptype", "pfunc", "module", "infixl", "infixr", "infix"]
specialOps : List String
specialOps = ["->", ":", "=>", ":=", "="]
specialOps = ["->", ":", "=>", ":=", "=", "<-"]
checkKW : String -> Token Kind
checkKW s = if elem s keywords then Tok Keyword s else Tok Ident s