Merge pull request #473 from gradha/pr_doc_improvements

Doc improvements
This commit is contained in:
Araq 2013-06-09 14:43:33 -07:00
commit c5e07af902
7 changed files with 40 additions and 7 deletions

View file

@ -255,6 +255,22 @@ Parsers
This is a low level module that implements an extremely efficient buffering This is a low level module that implements an extremely efficient buffering
scheme for lexers and parsers. This is used by the diverse parsing modules. scheme for lexers and parsers. This is used by the diverse parsing modules.
* `highlite <highlite.html>`_
Source highlighter for programming or markup languages. Currently
only few languages are supported, other languages may be added.
The interface supports one language nested in another.
* `rst <rst.html>`_
This module implements a reStructuredText parser. A large subset
is implemented. Some features of the markdown wiki syntax are
also supported.
* `rstast <rstast.html>`_
This module implements an AST for the reStructuredText parser.
* `rstgen <rstgen.html>`_
This module implements a generator of HTML/Latex from reStructuredText.
XML Processing XML Processing
-------------- --------------

View file

@ -1388,7 +1388,7 @@ accesses its environment. If it does so, it has the calling convention
Distinct type Distinct type
------------- -------------
A distinct type is new type derived from a `base type`:idx: that is A `distinct type`:idx: is new type derived from a `base type`:idx: that is
incompatible with its base type. In particular, it is an essential property incompatible with its base type. In particular, it is an essential property
of a distinct type that it **does not** imply a subtype relation between it of a distinct type that it **does not** imply a subtype relation between it
and its base type. Explicit type conversions from a distinct type to its and its base type. Explicit type conversions from a distinct type to its
@ -1435,7 +1435,7 @@ number without unit; and the same holds for division:
This quickly gets tedious. The implementations are trivial and the compiler This quickly gets tedious. The implementations are trivial and the compiler
should not generate all this code only to optimize it away later - after all should not generate all this code only to optimize it away later - after all
``+`` for dollars should produce the same binary code as ``+`` for ints. ``+`` for dollars should produce the same binary code as ``+`` for ints.
The pragma ``borrow`` has been designed to solve this problem; in principle The pragma `borrow`:idx: has been designed to solve this problem; in principle
it generates the above trivial implementations: it generates the above trivial implementations:
.. code-block:: nimrod .. code-block:: nimrod

View file

@ -1182,6 +1182,21 @@ type and instead write it embedded directly as the type of the first dimension:
type type
TLightTower = array[1..10, array[north..west, TBlinkLights]] TLightTower = array[1..10, array[north..west, TBlinkLights]]
It is quite frequent to have arrays start at zero, so there's a shortcut syntax
to specify a range from zero to the specified index minus one:
.. code-block:: nimrod
type
TIntArray = array[0..5, int] # an array that is indexed with 0..5
TQuickArray = array[6, int] # an array that is indexed with 0..5
var
x: TIntArray
y: TQuickArray
x = [1, 2, 3, 4, 5, 6]
y = x
for i in low(x)..high(x):
echo(x[i], y[i])
Sequences Sequences
--------- ---------

View file

@ -7,7 +7,7 @@
# distribution, for details about the copyright. # distribution, for details about the copyright.
# #
## This module implements a `reStructuredText`:idx parser. A large ## This module implements a `reStructuredText`:idx: parser. A large
## subset is implemented. Some features of the `markdown`:idx: wiki syntax are ## subset is implemented. Some features of the `markdown`:idx: wiki syntax are
## also supported. ## also supported.

View file

@ -7,7 +7,7 @@
# distribution, for details about the copyright. # distribution, for details about the copyright.
# #
## This module implements an AST for the `reStructuredText`:idx parser. ## This module implements an AST for the `reStructuredText`:idx: parser.
import strutils import strutils

View file

@ -7,7 +7,7 @@
# distribution, for details about the copyright. # distribution, for details about the copyright.
# #
## This module implements a generator of HTML/Latex from `reStructuredText`:idx. ## This module implements a generator of HTML/Latex from `reStructuredText`:idx:.
import strutils, os, hashes, strtabs, rstast, rst, highlite import strutils, os, hashes, strtabs, rstast, rst, highlite

View file

@ -60,7 +60,9 @@ srcdoc2: "pure/collections/intsets;pure/collections/queues;pure/encodings"
srcdoc2: "pure/events;pure/collections/sequtils;pure/irc;pure/cookies" srcdoc2: "pure/events;pure/collections/sequtils;pure/irc;pure/cookies"
srcdoc2: "pure/ftpclient;pure/memfiles;pure/subexes;pure/collections/critbits" srcdoc2: "pure/ftpclient;pure/memfiles;pure/subexes;pure/collections/critbits"
srcdoc2: "pure/asyncio;pure/actors;core/locks;pure/oids;pure/endians;pure/uri" srcdoc2: "pure/asyncio;pure/actors;core/locks;pure/oids;pure/endians;pure/uri"
srcdoc2: "pure/nimprof;pure/unittest" srcdoc2: "pure/nimprof;pure/unittest;packages/docutils/highlite"
srcdoc2: "packages/docutils/rst;packages/docutils/rstast"
srcdoc2: "packages/docutils/rstgen"
webdoc: "wrappers/libcurl;pure/md5;wrappers/mysql;wrappers/iup" webdoc: "wrappers/libcurl;pure/md5;wrappers/mysql;wrappers/iup"
webdoc: "wrappers/sqlite3;wrappers/postgres;wrappers/tinyc" webdoc: "wrappers/sqlite3;wrappers/postgres;wrappers/tinyc"