mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 11:12:37 +00:00
(cherry picked from commit 1b9f37c6dc)
This commit is contained in:
@@ -316,13 +316,7 @@ distinction between ``foo`` and ``Foo``.
|
||||
Stropping
|
||||
---------
|
||||
|
||||
`Stropping <https://en.wikipedia.org/wiki/Stropping_(syntax)>`_
|
||||
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>`_
|
||||
with languages where that identifier is not a reserved keyword.
|
||||
|
||||
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.
|
||||
If a keyword is enclosed in backticks it loses its keyword property and becomes an ordinary identifier.
|
||||
|
||||
Examples
|
||||
|
||||
|
||||
Reference in New Issue
Block a user