Documentation only (#15968)
* Fix #15806 * https://github.com/nim-lang/Nim/pull/15968/files#r523468677
This commit is contained in:
commit
5ccfc8ccdc
1 changed files with 27 additions and 1 deletions
|
|
@ -313,6 +313,32 @@ it was not case-sensitive and underscores were ignored and there was not even a
|
|||
distinction between ``foo`` and ``Foo``.
|
||||
|
||||
|
||||
Stropping
|
||||
---------
|
||||
|
||||
If a keyword is enclosed in backticks it loses its keyword property and becomes an ordinary identifier.
|
||||
|
||||
Examples
|
||||
|
||||
.. code-block:: nim
|
||||
var `var` = "Hello Stropping"
|
||||
|
||||
.. code-block:: nim
|
||||
type Type = object
|
||||
`int`: int
|
||||
|
||||
let `object` = Type(`int`: 9)
|
||||
assert `object` is Type
|
||||
assert `object`.`int` == 9
|
||||
|
||||
var `var` = 42
|
||||
let `let` = 8
|
||||
assert `var` + `let` == 50
|
||||
|
||||
const `assert` = true
|
||||
assert `assert`
|
||||
|
||||
|
||||
String literals
|
||||
---------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue