Comment (computer programming): Difference between revisions

Content deleted Content added
See also: Remove links already in the doc; linked to old articles; low value
Nim: Use line/block consistently
Line 677:
 
====Nim====
[[Nim (programming language)|Nim]] usesdelimits thea 'line comment with <code>#'</code> characterand forblock inlinecomments with <code>#[</code> and <code>]#</code>. Block comments can be nested.
Multi-line block comments are opened with '#[' and closed with ']#'.
Multi-line block comments can be nested.
 
Nim also has documentation comments that use mixed [[Markdown]] and [[ReStructuredText]] markups.
TheA inlineline documentation commentscomment useuses '##' and multi-linea block documentation commentscomment are opened withuses '##[' and closed with ']##'.
The compiler can generate [[HTML]], [[LaTeX]] and [[JSON]] documentation from the documentation comments.
Documentation comments are part of the [[abstract syntax tree]] and can be extracted using macros.<ref>[https://nim-lang.github.io/Nim/macros.html#extractDocCommentsAndRunnables%2CNimNode macros.extractDocCommentsAndRunnables]</ref>