1
0
forked from GitHub/gf-core

data structures for param values with number, preparing optimized pattern matching in grammar compilation

This commit is contained in:
aarne
2008-12-08 07:15:19 +00:00
parent cbb495f5d9
commit de8bea8d69
8 changed files with 35 additions and 38 deletions

View File

@@ -201,6 +201,7 @@ trt trm = case trm of
FV ts -> P.EVariants $ map trt ts
Strs tt -> P.EStrs $ map trt tt
EData -> P.EData
Val te _ _ -> trt te ----
_ -> error $ "not yet" +++ show trm ----
trp :: Patt -> P.Patt
@@ -228,6 +229,7 @@ trp p = case p of
PChars s -> P.PChars s
PM m c -> P.PM (tri m) (tri c)
PVal p _ _ -> trp p ----
trAssign (lab, (mty, t)) = maybe (P.LDDef x t') (\ty -> P.LDFull x (trt ty) t') mty
where