1
0
forked from GitHub/gf-core

the compiler can now boot and load an .ngf file

This commit is contained in:
krangelov
2021-09-17 13:15:58 +02:00
parent b583faa042
commit 348c348e14
4 changed files with 27 additions and 2 deletions

View File

@@ -157,7 +157,11 @@ writeOutputs opts pgf = do
-- A split PGF file is output if the @-split-pgf@ option is used.
writeGrammar :: Options -> PGF -> IOE ()
writeGrammar opts pgf =
if flag optSplitPGF opts then writeSplitPGF else writeNormalPGF
if fst (flag optLinkTargets opts)
then if flag optSplitPGF opts
then writeSplitPGF
else writeNormalPGF
else return ()
where
writeNormalPGF =
do let outfile = outputPath opts (grammarName opts pgf <.> "pgf")