diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-01-16 21:40:54 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-01-16 21:40:54 +0100 |
commit | 2e71bd50b26e6165121a3076f7dc70175e9f1f55 (patch) | |
tree | b52a9f1361323889b31b8289ae5b6138aacca09d /doc | |
parent | 2910096ccec456aa6493d06c9cc36bb70acd2988 (diff) | |
download | Nim-2e71bd50b26e6165121a3076f7dc70175e9f1f55.tar.gz |
implements multi-line-comments; pounds are stripped from the doc comments
Diffstat (limited to 'doc')
-rw-r--r-- | doc/manual/lexing.txt | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/doc/manual/lexing.txt b/doc/manual/lexing.txt index 7f81ab422..a5c3dfd6d 100644 --- a/doc/manual/lexing.txt +++ b/doc/manual/lexing.txt @@ -69,6 +69,44 @@ 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.] + +.. code-block:: nim + #[[comment here]] + +.. code-block:: nim + #[[[comment here]]] + +.. code-block:: nim + #[[[[comment here]]]] + +The number of opening brackets must match the number of closing brackets +but they do not nest in the traditional sense: + +.. code-block:: nim + # Does not comment out 'p' properly: + #[ + proc p[T](x: T) = discard + ] + +Multiline documentation comments look like: + +.. code-block:: nim + proc foo = + ##[Long documentation comment + here. + ] + + Identifiers & Keywords ---------------------- |