small documentation improvements
This commit is contained in:
parent
f96ec25ed2
commit
b0dc877cc3
3 changed files with 10 additions and 9 deletions
|
|
@ -2858,9 +2858,9 @@ compatibility:
|
||||||
For a routine ``p`` the compiler uses inference rules to determine the set of
|
For a routine ``p`` the compiler uses inference rules to determine the set of
|
||||||
possibly raised exceptions; the algorithm operates on ``p``'s call graph:
|
possibly raised exceptions; the algorithm operates on ``p``'s call graph:
|
||||||
|
|
||||||
1. Every indirect call via some proc type ``T`` is assumed to
|
1. Every indirect call via some proc type ``T`` is assumed to
|
||||||
raise ``system.E_Base`` (the base type of the exception hierarchy) and thus
|
raise ``system.E_Base`` (the base type of the exception hierarchy) and
|
||||||
any exception unless ``T`` has an explicit ``raises`` list.
|
thus any exception unless ``T`` has an explicit ``raises`` list.
|
||||||
2. Every call to a proc ``q`` which has an unknown body (due to a forward
|
2. Every call to a proc ``q`` which has an unknown body (due to a forward
|
||||||
declaration or an ``importc`` pragma) is assumed to
|
declaration or an ``importc`` pragma) is assumed to
|
||||||
raise ``system.E_Base`` unless ``q`` has an explicit ``raises`` list.
|
raise ``system.E_Base`` unless ``q`` has an explicit ``raises`` list.
|
||||||
|
|
@ -2914,7 +2914,7 @@ effects up to the ``effects``'s position:
|
||||||
proc p(what: bool) =
|
proc p(what: bool) =
|
||||||
if what:
|
if what:
|
||||||
raise newException(EIO, "IO")
|
raise newException(EIO, "IO")
|
||||||
{.effect.}
|
{.effects.}
|
||||||
else:
|
else:
|
||||||
raise newException(EOS, "OS")
|
raise newException(EOS, "OS")
|
||||||
|
|
||||||
|
|
@ -3522,7 +3522,7 @@ BindSym
|
||||||
The above ``debug`` macro relies on the fact that ``write``, ``writeln`` and
|
The above ``debug`` macro relies on the fact that ``write``, ``writeln`` and
|
||||||
``stdout`` are declared in the system module and thus visible in the
|
``stdout`` are declared in the system module and thus visible in the
|
||||||
instantiating context. There is a way to use bound identifiers
|
instantiating context. There is a way to use bound identifiers
|
||||||
(aka `symbols`:idx) instead of using unbound identifiers. The ``bindSym``
|
(aka `symbols`:idx:) instead of using unbound identifiers. The ``bindSym``
|
||||||
builtin can be used for that:
|
builtin can be used for that:
|
||||||
|
|
||||||
.. code-block:: nimrod
|
.. code-block:: nimrod
|
||||||
|
|
@ -4038,7 +4038,7 @@ ordinary routines.
|
||||||
Move optimization
|
Move optimization
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
The ``call`` constraint is particular useful to implement a `move`:idx:
|
The ``call`` constraint is particularly useful to implement a `move`:idx:
|
||||||
optimization for types that have copying semantics:
|
optimization for types that have copying semantics:
|
||||||
|
|
||||||
.. code-block:: nimrod
|
.. code-block:: nimrod
|
||||||
|
|
|
||||||
|
|
@ -1012,10 +1012,10 @@ proc whichSection(p: TRstParser): TRstNodeKind =
|
||||||
result = rnOptionList
|
result = rnOptionList
|
||||||
else:
|
else:
|
||||||
result = rnParagraph
|
result = rnParagraph
|
||||||
of tkWord, tkOther, tkWhite:
|
of tkWord, tkOther, tkWhite:
|
||||||
if match(p, tokenAfterNewLine(p), "ai"): result = rnHeadline
|
if match(p, tokenAfterNewLine(p), "ai"): result = rnHeadline
|
||||||
elif isDefList(p): result = rnDefList
|
|
||||||
elif match(p, p.idx, "e) ") or match(p, p.idx, "e. "): result = rnEnumList
|
elif match(p, p.idx, "e) ") or match(p, p.idx, "e. "): result = rnEnumList
|
||||||
|
elif isDefList(p): result = rnDefList
|
||||||
else: result = rnParagraph
|
else: result = rnParagraph
|
||||||
else: result = rnLeaf
|
else: result = rnLeaf
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -390,7 +390,8 @@ proc renderField(d: PDoc, n: PRstNode, result: var string) =
|
||||||
if d.target == outLatex:
|
if d.target == outLatex:
|
||||||
var fieldname = addNodes(n.sons[0])
|
var fieldname = addNodes(n.sons[0])
|
||||||
var fieldval = esc(d.target, strip(addNodes(n.sons[1])))
|
var fieldval = esc(d.target, strip(addNodes(n.sons[1])))
|
||||||
if cmpIgnoreStyle(fieldname, "author") == 0:
|
if cmpIgnoreStyle(fieldname, "author") == 0 or
|
||||||
|
cmpIgnoreStyle(fieldname, "authors") == 0:
|
||||||
if d.meta[metaAuthor].len == 0:
|
if d.meta[metaAuthor].len == 0:
|
||||||
d.meta[metaAuthor] = fieldval
|
d.meta[metaAuthor] = fieldval
|
||||||
b = true
|
b = true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue