mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-21 18:59:32 -06:00
writePGF now allows to select list of languages
This commit is contained in:
@@ -847,7 +847,7 @@ pgfCommands = Map.fromList [
|
||||
prGrammar pgf opts
|
||||
| isOpt "pgf" opts = do
|
||||
let outfile = valStrOpts "file" (abstractName pgf ++ ".pgf") opts
|
||||
restricted $ writePGF outfile pgf
|
||||
restricted $ writePGF outfile pgf (Just (map concreteName (optLangs pgf opts)))
|
||||
putStrLn $ "wrote file " ++ outfile
|
||||
return void
|
||||
| isOpt "cats" opts = return $ fromString $ unwords $ categories pgf
|
||||
|
||||
@@ -180,7 +180,7 @@ writeGrammar :: Options -> PGF -> IOE ()
|
||||
writeGrammar opts pgf =
|
||||
if fst (flag optLinkTargets opts)
|
||||
then do let outfile = outputPath opts (grammarName opts pgf <.> "pgf")
|
||||
writing opts outfile (writePGF outfile pgf)
|
||||
writing opts outfile (writePGF outfile pgf Nothing)
|
||||
else return ()
|
||||
|
||||
writeOutput :: Options -> FilePath-> String -> IOE ()
|
||||
|
||||
Reference in New Issue
Block a user