[backport] Fix spelling typos (#12755)

This commit is contained in:
Brian Wignall
2019-11-28 02:30:55 -05:00
committed by Miran
parent fd85a5ae05
commit a7aeabb9d2
10 changed files with 18 additions and 18 deletions

View File

@@ -216,7 +216,7 @@ The solution is to **re-play** the module's top level statements.
This solves the problem without having to special case the logic
that fills the internal seqs which are affected by the pragmas.
In fact, this decribes how the AST should be stored in the database,
In fact, this describes how the AST should be stored in the database,
as a "shallow" tree. Let's assume we compile module ``m`` with the
following contents:

View File

@@ -1644,7 +1644,7 @@ object branch, the initialization is considered valid. This analysis only works
for immutable discriminators of an ordinal type and disregards ``elif``
branches. For discriminator values with a ``range`` type, the compiler
checks if the entire range of possible values for the discriminator value is
valid for the choosen object branch.
valid for the chosen object branch.
A small example:
@@ -3440,14 +3440,14 @@ different; for this a special setter syntax is needed:
## setter of hostAddr.
## This accesses the 'host' field and is not a recursive call to
## ``host=`` because the builtin dot access is preferred if it is
## avaliable:
## available:
s.host = value
proc host*(s: Socket): int {.inline.} =
## getter of hostAddr
## This accesses the 'host' field and is not a recursive call to
## ``host`` because the builtin dot access is preferred if it is
## avaliable:
## available:
s.host
.. code-block:: nim
@@ -5409,7 +5409,7 @@ expression by coercing it to a corresponding ``static`` type:
echo static(fac(5)), " ", static[bool](16.isPowerOfTwo)
The complier will report any failure to evaluate the expression or a
The compiler will report any failure to evaluate the expression or a
possible type mismatch error.
typedesc[T]
@@ -5421,7 +5421,7 @@ all values must have a type, ``typedesc`` is considered their special type.
``typedesc`` acts like a generic type. For instance, the type of the symbol
``int`` is ``typedesc[int]``. Just like with regular generic types, when the
generic param is ommited, ``typedesc`` denotes the type class of all types.
generic param is omitted, ``typedesc`` denotes the type class of all types.
As a syntactic convenience, you can also use ``typedesc`` as a modifier.
Procs featuring ``typedesc`` params are considered implicitly generic.

View File

@@ -27,7 +27,7 @@ Package level objects
Every Nim module resides in a (nimble) package. An object type can be attached
to the package it resides in. If that is done, the type can be referenced from
other modules as an `incomplete`:idx: object type. This feature allows to
break up recursive type dependencies accross module boundaries. Incomplete
break up recursive type dependencies across module boundaries. Incomplete
object types are always passed ``byref`` and can only be used in pointer like
contexts (``var/ref/ptr IncompleteObject``) in general since the compiler does
not yet know the size of the object. To complete an incomplete object
@@ -267,7 +267,7 @@ calls can use the ``do`` keyword:
``do`` is written after the parentheses enclosing the regular proc params.
The proc expression represented by the do block is appended to them.
In calls using the command syntax, the do block will bind to the immediately
preceeding expression, transforming it in a call.
preceding expression, transforming it in a call.
``do`` with parentheses is an anonymous ``proc``; however a ``do`` without
parentheses is just a block of code. The ``do`` notation can be used to
@@ -1618,7 +1618,7 @@ Aliasing restrictions in parameter passing
==========================================
**Note**: The aliasing restrictions are currently not enforced by the
implementation and need to be fleshed out futher.
implementation and need to be fleshed out further.
"Aliasing" here means that the underlying storage locations overlap in memory
at runtime. An "output parameter" is a parameter of type ``var T``, an input