diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-01-17 20:31:08 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-01-17 20:31:08 +0100 |
commit | 484e285cfd096e49ebf19dc9d66ddb303411caf4 (patch) | |
tree | c9518db992fd09279ff28d42f7fe8db575fc0606 /doc | |
parent | dda01cb726eb990232647e7155e6159512bc1408 (diff) | |
parent | a4aeb6fbecaabed2ae14c2405d9caa6699aec43e (diff) | |
download | Nim-484e285cfd096e49ebf19dc9d66ddb303411caf4.tar.gz |
Merge branch 'multi-line-comments' into devel
Diffstat (limited to 'doc')
-rw-r--r-- | doc/manual/lexing.txt | 29 |
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 ---------------------- |