summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJuan Carlos <juancarlospaco@gmail.com>2021-07-25 13:07:43 -0300
committerGitHub <noreply@github.com>2021-07-25 18:07:43 +0200
commite08ec0c6745e54de4e174970e513acef3b0d8f5e (patch)
tree9473d40a9759afad6df60d3d013a4e8e157cdfba
parent2cbfc1e51470bae7bc3570caf4432bd062f11599 (diff)
downloadNim-e08ec0c6745e54de4e174970e513acef3b0d8f5e.tar.gz
Documentation only, Sugar arrow and semicolons (#18574)
* Document that sugar arrow do not support semicolon as argument separator
-rw-r--r--lib/pure/sugar.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pure/sugar.nim b/lib/pure/sugar.nim
index 7cfa932e6..f82e1706f 100644
--- a/lib/pure/sugar.nim
+++ b/lib/pure/sugar.nim
@@ -54,6 +54,8 @@ proc createProcType(p, b: NimNode): NimNode =
 
 macro `=>`*(p, b: untyped): untyped =
   ## Syntax sugar for anonymous procedures. It also supports pragmas.
+  ##
+  ## .. warning:: Semicolons can not be used to separate procedure arguments.
   runnableExamples:
     proc passTwoAndTwo(f: (int, int) -> int): int = f(2, 2)
 
@@ -133,6 +135,8 @@ macro `=>`*(p, b: untyped): untyped =
 
 macro `->`*(p, b: untyped): untyped =
   ## Syntax sugar for procedure types. It also supports pragmas.
+  ##
+  ## .. warning:: Semicolons can not be used to separate procedure arguments.
   runnableExamples:
     proc passTwoAndTwo(f: (int, int) -> int): int = f(2, 2)
     # is the same as: