primitive string and int, primitive functions, codegen fixes

This commit is contained in:
2024-08-22 19:41:24 -07:00
parent dfa6b835b0
commit 9db5649446
14 changed files with 142 additions and 29 deletions

View File

@@ -138,7 +138,7 @@ Monad Parser where
pred : (BTok -> Bool) -> String -> Parser String
pred f msg = P $ \toks,com,col =>
case toks of
(t :: ts) => if f t then OK (value t) ts com else Fail False (error toks "\{msg} vt:\{value t}") toks com
(t :: ts) => if f t then OK (value t) ts com else Fail False (error toks "\{msg} at \{show $ kind t}:\{value t}") toks com
[] => Fail False (error toks "\{msg} at EOF") toks com
export