Added raw string literal function calls docs
Got curious as to how re"..." worked.
This commit is contained in:
parent
fce697b043
commit
3c9d655b88
1 changed files with 19 additions and 0 deletions
|
|
@ -231,6 +231,25 @@ AST:
|
|||
nnkStrLit("hallo")
|
||||
)
|
||||
|
||||
Call with raw string literal
|
||||
----------------------------
|
||||
|
||||
This is used, for example, in the ``bindSym`` examples
|
||||
[here](http://nim-lang.org/docs/manual.html#macros-bindsym) and with
|
||||
``re"some regexp"`` in the regular expression module.
|
||||
|
||||
Concrete syntax:
|
||||
|
||||
.. code-block:: nim
|
||||
echo"abc"
|
||||
|
||||
AST:
|
||||
|
||||
.. code-block:: nim
|
||||
nnkCallStrLit(
|
||||
nnkIdent(!"echo"),
|
||||
nnkRStrLit("hello")
|
||||
)
|
||||
|
||||
Dereference operator ``[]``
|
||||
---------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue