summaryrefslogtreecommitdiff
path: root/src/GF/Compile.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Compile.hs')
-rw-r--r--src/GF/Compile.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/GF/Compile.hs b/src/GF/Compile.hs
index d4b3a9df3..e7e16013c 100644
--- a/src/GF/Compile.hs
+++ b/src/GF/Compile.hs
@@ -76,7 +76,10 @@ optimize opts = cse . suf
buildParser :: Options -> PGF -> PGF
buildParser opts =
- if flag optBuildParser opts then addParsers opts else id
+ case flag optBuildParser opts of
+ BuildParser -> addParsers opts
+ DontBuildParser -> id
+ BuildParserOnDemand -> mapConcretes (\cnc -> cnc { cflags = Map.insert (mkCId "parser") "ondemand" (cflags cnc) })
batchCompile :: Options -> [FilePath] -> IOE SourceGrammar
batchCompile opts files = do