From dea5158cbf1c11d45f2ed91d9975fbc77245e652 Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 2 Dec 2005 13:13:14 +0000 Subject: floats in GF and GFC (parsing user input still doesn't work) --- src/GF/Source/GrammarToSource.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/GF/Source/GrammarToSource.hs') diff --git a/src/GF/Source/GrammarToSource.hs b/src/GF/Source/GrammarToSource.hs index ee54d7a16..8375af2af 100644 --- a/src/GF/Source/GrammarToSource.hs +++ b/src/GF/Source/GrammarToSource.hs @@ -172,7 +172,8 @@ trt trm = case trm of K a -> P.EString a C a b -> P.EConcat (trt a) (trt b) - EInt i -> P.EInt $ toInteger i + EInt i -> P.EInt i + EFloat i -> P.EFloat i 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] @@ -192,7 +193,8 @@ trp p = case p of PP p c a -> P.PQC (tri p) (tri c) (map trp a) PR r -> P.PR [P.PA [trLabelIdent l] (trp p) | (l,p) <- r] PString s -> P.PStr s - PInt i -> P.PInt $ toInteger i + PInt i -> P.PInt i + PFloat i -> P.PFloat i PT t p -> trp p ---- prParenth (prt p +++ ":" +++ prt t) -- cgit v1.2.3