summaryrefslogtreecommitdiff
path: root/src/GF/Devel/GFC.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2007-10-09 12:51:09 +0000
committeraarne <aarne@cs.chalmers.se>2007-10-09 12:51:09 +0000
commitf93c17c7b1884fc495092f592e34c706751eb49e (patch)
treedb0016715965e24b54314292f26b5eb5acf362b5 /src/GF/Devel/GFC.hs
parent38a517aafa380a58e5398b71904b054ddefa4555 (diff)
GFCCtoJS in Devel
Diffstat (limited to 'src/GF/Devel/GFC.hs')
-rw-r--r--src/GF/Devel/GFC.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/GF/Devel/GFC.hs b/src/GF/Devel/GFC.hs
index 0d8df98a1..206d54206 100644
--- a/src/GF/Devel/GFC.hs
+++ b/src/GF/Devel/GFC.hs
@@ -2,6 +2,7 @@ module Main where
import GF.Devel.Compile
import GF.Devel.GrammarToGFCC
+import GF.Devel.GFCCtoJS
import GF.GFCC.OptimizeGFCC
import GF.GFCC.CheckGFCC
import GF.GFCC.DataGFCC
@@ -24,6 +25,12 @@ main = do
let target = abs ++ ".gfcc"
writeFile target (printGFCC gc)
putStrLn $ "wrote file " ++ target
+ if oElem (iOpt "js") opts
+ then do
+ let js = abs ++ ".js"
+ writeFile js (gfcc2js gc)
+ putStrLn $ "wrote file " ++ js
+ else return ()
_ -> do
mapM_ (batchCompile opts) (map return fs)
putStrLn "Done."