Commit fa1128fe authored by Camil Staps's avatar Camil Staps 🐧

saplcg: add ignore field to ignore system modules

parent 3661fd4e
...@@ -19,6 +19,7 @@ import Sapl.Target.JS.CodeGeneratorJS ...@@ -19,6 +19,7 @@ import Sapl.Target.JS.CodeGeneratorJS
, paths :: ![FilePath] , paths :: ![FilePath]
, libraries :: ![String] , libraries :: ![String]
, modules :: ![String] , modules :: ![String]
, ignore :: ![String]
, trampoline :: !Bool , trampoline :: !Bool
} }
...@@ -28,6 +29,7 @@ defaultOptions = ...@@ -28,6 +29,7 @@ defaultOptions =
, paths = ["."] , paths = ["."]
, libraries = ["StdEnv"] , libraries = ["StdEnv"]
, modules = [] , modules = []
, ignore = ["StdBool", "StdChar", "StdFile", "StdInt", "StdMisc", "StdReal", "StdString"]
, trampoline = False , trampoline = False
} }
...@@ -54,6 +56,7 @@ Start w ...@@ -54,6 +56,7 @@ Start w
| isError opts = error noUsage (join "\n" $ fromError opts) w | isError opts = error noUsage (join "\n" $ fromError opts) w
# opts = fromOk opts # opts = fromOk opts
# opts & modules = removeMembers opts.modules opts.ignore
| isEmpty opts.modules = error usage "No modules given" w | isEmpty opts.modules = error usage "No modules given" w
# (files,(pst,w)) = mapSt (parseModule opts) opts.modules (defaultParserState,w) # (files,(pst,w)) = mapSt (parseModule opts) opts.modules (defaultParserState,w)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment