mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-01 15:22:50 -06:00
Copy command-line flags to in-memory module when reading from a .gfo file. This maeans that command-line flags get put in the .pgf file.
This commit is contained in:
@@ -42,7 +42,11 @@ getSourceModule opts file0 = do
|
||||
string <- readFileIOE file
|
||||
let tokens = myLexer string
|
||||
mo1 <- ioeErr $ pModDef tokens
|
||||
ioeErr $ transModDef mo1
|
||||
mo2 <- ioeErr $ transModDef mo1
|
||||
return $ addOptionsToModule opts mo2
|
||||
|
||||
addOptionsToModule :: Options -> SourceModule -> SourceModule
|
||||
addOptionsToModule opts = mapSourceModule (\m -> m { flags = flags m `addOptions` opts })
|
||||
|
||||
-- FIXME: should use System.IO.openTempFile
|
||||
runPreprocessor :: FilePath -> String -> IOE FilePath
|
||||
|
||||
Reference in New Issue
Block a user