Fix #15806
This commit is contained in:
parent
9ab1a86b5b
commit
c56a6133bb
1 changed files with 2 additions and 1 deletions
|
|
@ -320,6 +320,7 @@ Stropping
|
||||||
allows the same letter sequence to be used both as a keyword and as an identifier, this simplifies parsing and
|
allows the same letter sequence to be used both as a keyword and as an identifier, this simplifies parsing and
|
||||||
`FFI <https://en.wikipedia.org/wiki/Foreign_function_interface>`_
|
`FFI <https://en.wikipedia.org/wiki/Foreign_function_interface>`_
|
||||||
with languages where that identifier is not a reserved keyword.
|
with languages where that identifier is not a reserved keyword.
|
||||||
|
|
||||||
For example, allowing a variable named `if` without clashing with the keyword `if`.
|
For example, allowing a variable named `if` without clashing with the keyword `if`.
|
||||||
In Nim, this is achieved via backticks, allowing any reserved word to be used as an identifier.
|
In Nim, this is achieved via backticks, allowing any reserved word to be used as an identifier.
|
||||||
|
|
||||||
|
|
@ -330,7 +331,7 @@ Examples
|
||||||
|
|
||||||
.. code-block:: nim
|
.. code-block:: nim
|
||||||
type Type = object
|
type Type = object
|
||||||
`int`: int
|
`int`: int
|
||||||
|
|
||||||
let `object` = Type(`int`: 9)
|
let `object` = Type(`int`: 9)
|
||||||
assert `object` is Type
|
assert `object` is Type
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue