mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-08-25 13:46:23 -06:00
Export a grammar in source format to JSON
This commit is contained in:
@@ -72,6 +72,8 @@ compileSourceFiles opts fs =
|
||||
when (FmtCanonicalJson `elem` ofmts) $
|
||||
do (gr_canon,_) <- runCheck (grammar2canonical opts absname gr)
|
||||
writeExport (render absname ++ ".json", encode (grammar2json gr_canon))
|
||||
when (FmtSourceJson `elem` ofmts) $
|
||||
do writeExport (render absname ++ ".json", encode (grammar2json gr))
|
||||
where
|
||||
ofmts = flag optOutputFormats opts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user