X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=src%2Fparse.icl;h=ec89565f05c71a9645d3123df289adb81e73633b;hb=eb91d7c6b2010be6a43de0a978373654ba3deacc;hp=042ec474e2270fa34c0d127c2f9793e82b4f4fcb;hpb=1ff731746e0ca7be7ae4dc09bb7e86e15b5ce42c;p=cc1516.git diff --git a/src/parse.icl b/src/parse.icl index 042ec47..ec89565 100644 --- a/src/parse.icl +++ b/src/parse.icl @@ -25,7 +25,7 @@ parser (Right r) = case runParser parseProgram r of parseProgram :: Parser Token AST parseProgram = liftM2 AST (many parseVarDecl) (some parseFunDecl) -// <* satTok EndOfFileToken + <* satTok EndOfFileToken parseFunDecl :: Parser Token FunDecl parseFunDecl = liftM5 FunDecl @@ -191,7 +191,7 @@ parseSepList sep p = (liftM pure p) <|> pure empty parseIdent :: Parser Token String -parseIdent = trans2 (IdentToken []) (\(IdentToken e).toString e) +parseIdent = trans2 (IdentToken "") (\(IdentToken e).toString e) instance toString AST where toString (AST v f) = concat (