summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-09-03 20:15:27 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-09-03 20:15:27 +0200
commitcb0450398a5695e1e1193e6c49ff9c7548980438 (patch)
tree42de5386b44c366eb58d367c48f953d4a6e6cc38
parent07a986afa169c6277a1b7c1be0f49b29b5ed228a (diff)
downloadNim-cb0450398a5695e1e1193e6c49ff9c7548980438.tar.gz
introduce --oldgensym:on rather than --useVersion
-rw-r--r--changelog.md2
-rw-r--r--compiler/commands.nim6
2 files changed, 4 insertions, 4 deletions
diff --git a/changelog.md b/changelog.md
index 35639adc4..f135fa585 100644
--- a/changelog.md
+++ b/changelog.md
@@ -13,7 +13,7 @@
 - The language definition and compiler are now stricter about ``gensym``'ed
   symbols in hygienic templates. See the section in the
   [manual](https://nim-lang.org/docs/manual.html#templates-hygiene-in-templates)
-  for further details. Use the compiler switch `--useVersion:0.19` for a
+  for further details. Use the compiler switch `--oldgensym:on` for a
   transition period.
 
 
diff --git a/compiler/commands.nim b/compiler/commands.nim
index 1123996c1..386b29f8f 100644
--- a/compiler/commands.nim
+++ b/compiler/commands.nim
@@ -783,15 +783,15 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
   of "expandmacro":
     expectArg(conf, switch, arg, pass, info)
     conf.macrosToExpand[arg] = "T"
+  of "oldgensym":
+    processOnOffSwitchG(conf, {optNimV019}, arg, pass, info)
   of "useversion":
     expectArg(conf, switch, arg, pass, info)
     case arg
-    of "0.19":
-      conf.globalOptions.incl optNimV019
     of "1.0":
       discard "the default"
     else:
-      localError(conf, info, "unknown Nim version; currently supported values are: {0.19, 1.0}")
+      localError(conf, info, "unknown Nim version; currently supported values are: {1.0}")
   of "":
     conf.projectName = "-"
   else: