more work on casetree

This commit is contained in:
2024-08-31 14:47:49 -07:00
parent 987ab18b94
commit f3c02ed987
7 changed files with 184 additions and 131 deletions

View File

@@ -24,6 +24,10 @@ public export
FC : Type
FC = (Int,Int)
public export
interface HasFC a where
getFC : a -> FC
%name FC fc
export
@@ -159,8 +163,8 @@ mutual
-- withIndentationBlock - sets the col
export
getFC : Parser FC
getFC = P $ \toks,com, (l,c) => case toks of
getPos : Parser FC
getPos = P $ \toks,com, (l,c) => case toks of
[] => OK emptyFC toks com
(t :: ts) => OK (start t) toks com