summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-12-11 23:07:36 +0100
committerAndreas Rumpf <rumpf_a@web.de>2018-12-11 23:07:36 +0100
commitc682671feae3ae6c90416152f84b274cb5aa4a21 (patch)
tree60e1e7fbb482f09b9b703c50a6bb61a359cdfa73
parent5dc83d0c8fbc966d35494b3f69bcb5eadaa4f7bc (diff)
downloadNim-c682671feae3ae6c90416152f84b274cb5aa4a21.tar.gz
minor cleanups
-rw-r--r--compiler/commands.nim13
-rw-r--r--doc/advopt.txt2
-rw-r--r--doc/contributing.rst11
3 files changed, 8 insertions, 18 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim
index b962e8f39..b090a09a5 100644
--- a/compiler/commands.nim
+++ b/compiler/commands.nim
@@ -619,13 +619,12 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
     incl(conf.globalOptions, optRun)
   of "errormax":
     expectArg(conf, switch, arg, pass, info)
-    conf.errorMax = block:
-      # Note: `nim check` (etc) can overwrite this.
-      # `0` is meaningless, give it a useful meaning as in clang's -ferror-limit
-      # If user doesn't set this flag and the code doesn't either, it'd
-      # have the same effect as errorMax = 1
-      let ret = parseInt(arg)
-      if ret == 0: high(int) else: ret
+    # Note: `nim check` (etc) can overwrite this.
+    # `0` is meaningless, give it a useful meaning as in clang's -ferror-limit
+    # If user doesn't set this flag and the code doesn't either, it'd
+    # have the same effect as errorMax = 1
+    let ret = parseInt(arg)
+    conf.errorMax = if ret == 0: high(int) else: ret
   of "verbosity":
     expectArg(conf, switch, arg, pass, info)
     let verbosity = parseInt(arg)
diff --git a/doc/advopt.txt b/doc/advopt.txt
index baab4f6e5..7446775db 100644
--- a/doc/advopt.txt
+++ b/doc/advopt.txt
@@ -104,7 +104,7 @@ Advanced options:
                             value = number of processors (0 for auto-detect)
   --incremental:on|off      only recompile the changed modules (experimental!)
   --verbosity:0|1|2|3       set Nim's verbosity level (1 is default)
-  --errorMax:int            stop after n errors in semantic pass; 0 means unlimited
+  --errorMax:N              stop compilation after N errors; 0 means unlimited
   --experimental:$1
                             enable experimental language feature
   -v, --version             show detailed version information
diff --git a/doc/contributing.rst b/doc/contributing.rst
index a2c95db74..e3ab697d3 100644
--- a/doc/contributing.rst
+++ b/doc/contributing.rst
@@ -263,17 +263,8 @@ Take advantage of no implicit bool conversion
   doAssert isValid() == true
   doAssert isValid() # preferred
 
-.. _immediately_invoked_lambdas:
-Immediately invoked lambdas (https://en.wikipedia.org/wiki/Immediately-invoked_function_expression)
-
-.. code-block:: nim
-
-  let a = (proc (): auto = getFoo())()
-  let a = block:  # preferred
-    getFoo()
-
 .. _design_for_mcs:
-Design with method call syntax (UFCS in other languages) chaining in mind
+Design with method call syntax chaining in mind
 
 .. code-block:: nim