mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-02 07:42:50 -06:00
putting pattern macros in place (not properly tested yet)
This commit is contained in:
@@ -191,6 +191,9 @@ trt trm = case trm of
|
||||
EInt i -> P.EInt i
|
||||
EFloat i -> P.EFloat i
|
||||
|
||||
EPatt p -> P.EPatt (trp p)
|
||||
EPattType t -> P.EPattType (trt t)
|
||||
|
||||
Glue a b -> P.EGlue (trt a) (trt b)
|
||||
Alts (t, tt) -> P.EPre (trt t) [P.Alt (trt v) (trt c) | (v,c) <- tt]
|
||||
FV ts -> P.EVariants $ map trt ts
|
||||
@@ -221,6 +224,7 @@ trp p = case p of
|
||||
PNeg p -> P.PNeg (trp p)
|
||||
PChar -> P.PChar
|
||||
PChars s -> P.PChars s
|
||||
PM m c -> P.PM (tri m) (tri c)
|
||||
|
||||
|
||||
trAssign (lab, (mty, t)) = maybe (P.LDDef x t') (\ty -> P.LDFull x (trt ty) t') mty
|
||||
|
||||
Reference in New Issue
Block a user