diff options
| author | bjorn <bjorn@bringert.net> | 2008-10-03 07:35:26 +0000 |
|---|---|---|
| committer | bjorn <bjorn@bringert.net> | 2008-10-03 07:35:26 +0000 |
| commit | 1e8699d159dc510c300a5657e1127400030a1c10 (patch) | |
| tree | 005ec2c04d5cb6b97a6ee884c8cfd442bc3ca2d3 /src/GF/Source/SourceToGrammar.hs | |
| parent | b7fe4eacc90c538a7a366c5ee6cef2c285451c47 (diff) | |
Added | syntax for variants.
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 e80219f30..9c67f5c19 100644 --- a/src/GF/Source/SourceToGrammar.hs +++ b/src/GF/Source/SourceToGrammar.hs @@ -501,6 +501,11 @@ transExp x = case x of ECTable binds exp -> liftM2 M.mkCTable (mapM transBind binds) (transExp exp) EVariants exps -> liftM G.FV $ mapM transExp exps + EVariant exp0 exp -> do let fvList (G.FV xs) = xs + fvList t = [t] + exp0' <- transExp exp0 + exp' <- transExp exp + return $ G.FV $ fvList exp0' ++ fvList exp' EPre exp alts -> liftM2 (curry G.Alts) (transExp exp) (mapM transAltern alts) EStrs exps -> liftM G.Strs $ mapM transExp exps ESelect exp0 exp -> liftM2 G.S (transExp exp0) (transExp exp) |
