summary refs log tree commit diff stats
path: root/doc/manual
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2016-01-18 10:55:23 +0100
committerAraq <rumpf_a@web.de>2016-01-18 10:55:23 +0100
commit55c1f3d30ce5d2ab8745ab2b98a38a605c690a54 (patch)
treed729e8c0d7c929208c84450ad4a449e3eb32491e /doc/manual
parent68cbb4d2b4bc408e13fc27e6d054e3a0bb98bfb4 (diff)
parent2309975f782bf59b240e3874d5c31b4b299eca5d (diff)
downloadNim-55c1f3d30ce5d2ab8745ab2b98a38a605c690a54.tar.gz
Merge branch 'devel' of https://github.com/nim-lang/Nim into devel
Diffstat (limited to 'doc/manual')
-rw-r--r--doc/manual/lexing.txt28
-rw-r--r--doc/manual/procs.txt8
-rw-r--r--doc/manual/syntax.txt8
3 files changed, 40 insertions, 4 deletions
diff --git a/doc/manual/lexing.txt b/doc/manual/lexing.txt
index 7f81ab422..5990dff07 100644
--- a/doc/manual/lexing.txt
+++ b/doc/manual/lexing.txt
@@ -69,6 +69,34 @@ Documentation comments are tokens; they are only allowed at certain places in
 the input file as they belong to the syntax tree!
 
 
+Multiline comments
+------------------
+
+Starting with version 0.13.0 of the language Nim supports multiline comments.
+They look like:
+
+.. code-block:: nim
+  #[Comment here.
+  Multiple lines
+  are not a problem.]#
+
+Multiline comments support nesting:
+
+.. code-block:: nim
+  #[  #[ Multiline comment in already
+     commented out code. ]#
+  proc p[T](x: T) = discard
+  ]#
+
+Multiline documentation comments look like and support nesting too:
+
+.. code-block:: nim
+  proc foo =
+    ##[Long documentation comment
+    here.
+    ]##
+
+
 Identifiers & Keywords
 ----------------------
 
diff --git a/doc/manual/procs.txt b/doc/manual/procs.txt
index ee74b2ea6..654893286 100644
--- a/doc/manual/procs.txt
+++ b/doc/manual/procs.txt
@@ -236,8 +236,6 @@ executable code.
 Do notation
 -----------
 
-**Note:** The future of the ``do`` notation is uncertain.
-
 As a special more convenient notation, proc expressions involved in procedure
 calls can use the ``do`` keyword:
 
@@ -251,10 +249,12 @@ calls can use the ``do`` keyword:
 ``do`` is written after the parentheses enclosing the regular proc params.
 The proc expression represented by the do block is appended to them.
 
-More than one ``do`` block can appear in a single call:
+``do`` with parentheses is an anonymous ``proc``; however a ``do`` without
+parentheses is just a block of code. The ``do`` notation can be used to
+pass multiple blocks to a macro:
 
 .. code-block:: nim
-  proc performWithUndo(task: proc(), undo: proc()) = ...
+  macro performWithUndo(task, undo: untyped) = ...
 
   performWithUndo do:
     # multiple-line block of code
diff --git a/doc/manual/syntax.txt b/doc/manual/syntax.txt
index c444a3995..ca3b582ca 100644
--- a/doc/manual/syntax.txt
+++ b/doc/manual/syntax.txt
@@ -64,6 +64,14 @@ Precedence level    Operators                                      First charact
 ================  ===============================================  ==================  ===============
 
 
+Whether an operator is used a prefix operator is also affected by preceeding whitespace (this parsing change was introduced with version 0.13.0):
+
+.. code-block:: nim
+  echo $foo
+  # is parsed as
+  echo($foo)
+
+
 Strong spaces
 -------------