diff options
| author | aarne <aarne@cs.chalmers.se> | 2008-03-15 21:02:59 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2008-03-15 21:02:59 +0000 |
| commit | 6cbb8086c8bcaca638b993a75017b7738cd923c9 (patch) | |
| tree | 5f8584f310d1a40f3ac85cfe17c7bc0eae656e38 /src/GF/Source/SourceToGrammar.hs | |
| parent | e60237136b0a8285874fd57d38ec3518aa94b162 (diff) | |
putting pattern macros in place (not properly tested yet)
Diffstat (limited to 'src/GF/Source/SourceToGrammar.hs')
| -rw-r--r-- | src/GF/Source/SourceToGrammar.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/GF/Source/SourceToGrammar.hs b/src/GF/Source/SourceToGrammar.hs index b2151affb..132bd4704 100644 --- a/src/GF/Source/SourceToGrammar.hs +++ b/src/GF/Source/SourceToGrammar.hs @@ -496,6 +496,9 @@ transExp x = case x of ELetb defs exp -> transExp $ ELet defs exp EWhere exp defs -> transExp $ ELet defs exp + EPattType typ -> liftM G.EPattType (transExp typ) + EPatt patt -> liftM G.EPatt (transPatt patt) + ELString (LString str) -> return $ G.K str ELin id -> liftM G.LiT $ transIdent id @@ -608,6 +611,8 @@ transPatt x = case x of PAs x p -> liftM2 G.PAs (transIdent x) (transPatt p) PChar -> return G.PChar PChars s -> return $ G.PChars s + PMacro c -> liftM G.PMacro $ transIdent c + PM m c -> liftM2 G.PM (transIdent m) (transIdent c) transBind :: Bind -> Err Ident transBind x = case x of |
