forked from GitHub/gf-core
grammar printing options in gf3 and gfc
This commit is contained in:
14
src/GF/Devel/PrintGFCC.hs
Normal file
14
src/GF/Devel/PrintGFCC.hs
Normal file
@@ -0,0 +1,14 @@
|
||||
module GF.Devel.PrintGFCC where
|
||||
|
||||
import GF.GFCC.DataGFCC (GFCC,printGFCC)
|
||||
import GF.Devel.GFCCtoHaskell
|
||||
import GF.Devel.GFCCtoJS
|
||||
|
||||
-- top-level access to code generation
|
||||
|
||||
prGFCC :: String -> GFCC -> String
|
||||
prGFCC printer gr = case printer of
|
||||
"haskell" -> grammar2haskell gr
|
||||
"haskell_gadt" -> grammar2haskellGADT gr
|
||||
"js" -> gfcc2js gr
|
||||
_ -> printGFCC gr
|
||||
Reference in New Issue
Block a user