summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-01-17 20:31:08 +0100
committerAndreas Rumpf <rumpf_a@web.de>2016-01-17 20:31:08 +0100
commit484e285cfd096e49ebf19dc9d66ddb303411caf4 (patch)
treec9518db992fd09279ff28d42f7fe8db575fc0606 /doc
parentdda01cb726eb990232647e7155e6159512bc1408 (diff)
parenta4aeb6fbecaabed2ae14c2405d9caa6699aec43e (diff)
downloadNim-484e285cfd096e49ebf19dc9d66ddb303411caf4.tar.gz
Merge branch 'multi-line-comments' into devel
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/lexing.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/manual/lexing.txt b/doc/manual/lexing.txt
index 7f81ab422..7655964ee 100644
--- a/doc/manual/lexing.txt
+++ b/doc/manual/lexing.txt
@@ -69,6 +69,35 @@ 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
+  # Does not comment out 'p' properly:
+  #[  #[ 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
 ----------------------