diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-05-24 23:35:23 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-05-24 23:35:39 +0200 |
commit | bcc91a319c7b638c3db2da6afe6bd2b06ebf7e0e (patch) | |
tree | c80f47b77cfd2cc307acf915b1baa576f9a9e643 /compiler/scriptconfig.nim | |
parent | 749abfc39c870ad2ee94b070277391d0a64143c1 (diff) | |
download | Nim-bcc91a319c7b638c3db2da6afe6bd2b06ebf7e0e.tar.gz |
Nimscript knows about the command line defines
Diffstat (limited to 'compiler/scriptconfig.nim')
-rw-r--r-- | compiler/scriptconfig.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/scriptconfig.nim b/compiler/scriptconfig.nim index 22cd282fd..d04fd5231 100644 --- a/compiler/scriptconfig.nim +++ b/compiler/scriptconfig.nim @@ -118,10 +118,10 @@ proc setupVM*(module: PSym; scriptName: string): PEvalContext = processSwitch(a.getString 0, a.getString 1, passPP, unknownLineInfo()) -proc runNimScript*(scriptName: string) = +proc runNimScript*(scriptName: string; freshDefines=true) = passes.gIncludeFile = includeModule passes.gImportModule = importModule - initDefines() + if freshDefines: initDefines() defineSymbol("nimscript") defineSymbol("nimconfig") |