docgen understands and ignores *when false*

This commit is contained in:
Araq 2010-11-18 22:26:20 +01:00
commit adf13aaea3
18 changed files with 1194 additions and 79 deletions

View file

@ -2542,10 +2542,10 @@ cannot be inherited from.
Pure pragma
-----------
The `pure`:idx: pragma serves two completely different purposes:
1) To mark a procedure that Nimrod should not generate any exit statements like
1. To mark a procedure that Nimrod should not generate any exit statements like
``return result;`` in the generated code. This is useful for procs that only
consist of an assembler statement.
2) To mark an object type so that its type field should be omitted. This is
2. To mark an object type so that its type field should be omitted. This is
necessary for binary compatibility with other compiled languages.
@ -2795,7 +2795,7 @@ a dynamic library. The pragma then has no argument and has to be used in
conjunction with the ``exportc`` pragma:
.. code-block:: Nimrod
proc exportme(): int {.cdecl, export, dynlib.}
proc exportme(): int {.cdecl, exportc, dynlib.}
This is only useful if the program is compiled as a dynamic library via the
``--app:lib`` command line option.

View file

@ -98,6 +98,11 @@ macro meaning
``\i`` ignore case for matching; use this at the start of the PEG
``\y`` ignore style for matching; use this at the start of the PEG
``\ident`` a standard ASCII identifier: ``[a-zA-Z_][a-zA-Z_0-9]*``
``\letter`` any Unicode letter
``\upper`` any Unicode uppercase letter
``\lower`` any Unicode lowercase letter
``\title`` any Unicode title letter
``\white`` any Unicode whitespace character
============== ============================================================
A backslash followed by a letter is a built-in macro, otherwise it

View file

@ -75,9 +75,9 @@ Inheritance is done with the ``object of`` syntax. Multiple inheritance is
currently not supported. If an object type has no suitable ancestor, ``TObject``
can be used as its ancestor, but this is only a convention.
**Note**: Aggregation (*has-a* relation) is often preferable to inheritance
**Note**: Composition (*has-a* relation) is often preferable to inheritance
(*is-a* relation) for simple code reuse. Since objects are value types in
Nimrod, aggregation is as efficient as inheritance.
Nimrod, composition is as efficient as inheritance.
Mutually recursive types
@ -487,7 +487,7 @@ The example shows a generic binary tree. Depending on context, the brackets are
used either to introduce type parameters or to instantiate a generic proc,
iterator or type. As the example shows, generics work with overloading: the
best match of ``add`` is used. The built-in ``add`` procedure for sequences
is not hidden and used in the ``preorder`` iterator.
is not hidden and is used in the ``preorder`` iterator.
Templates