diff options
author | Aman Gupta <aman@tmm1.net> | 2015-10-13 15:25:40 -0700 |
---|---|---|
committer | Aman Gupta <aman@tmm1.net> | 2015-10-13 15:25:40 -0700 |
commit | e2dbf222e60e00eb3f321151f4f206ed9c606a6c (patch) | |
tree | c513c0051fcb789add33cd3daaaab42344ee1da4 /compiler/options.nim | |
parent | c3415a27d77f302be4f41d5f9bbcdf7c0dd3e80a (diff) | |
parent | 7f4f37eaa20ea8aa5cf8c34e497aaa8245c590b3 (diff) | |
download | Nim-e2dbf222e60e00eb3f321151f4f206ed9c606a6c.tar.gz |
Merge remote-tracking branch 'origin/devel' into appveyor
Diffstat (limited to 'compiler/options.nim')
-rw-r--r-- | compiler/options.nim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/options.nim b/compiler/options.nim index adb340fea..98224a11d 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -86,7 +86,7 @@ type # please make sure we have under 32 options gcNone, gcBoehm, gcGo, gcMarkAndSweep, gcRefc, gcV2, gcGenerational IdeCmd* = enum - ideNone, ideSug, ideCon, ideDef, ideUse + ideNone, ideSug, ideCon, ideDef, ideUse, ideDus var gIdeCmd*: IdeCmd @@ -173,7 +173,7 @@ proc existsConfigVar*(key: string): bool = result = hasKey(gConfigVars, key) proc getConfigVar*(key: string): string = - result = gConfigVars[key] + result = gConfigVars.getOrDefault key proc setConfigVar*(key, val: string) = gConfigVars[key] = val @@ -421,6 +421,7 @@ proc parseIdeCmd*(s: string): IdeCmd = of "con": ideCon of "def": ideDef of "use": ideUse + of "dus": ideDus else: ideNone proc `$`*(c: IdeCmd): string = @@ -429,4 +430,5 @@ proc `$`*(c: IdeCmd): string = of ideCon: "con" of ideDef: "def" of ideUse: "use" + of ideDus: "dus" of ideNone: "none" |