From 3c9d655b883129765c3716c209dee5d38d72f8f6 Mon Sep 17 00:00:00 2001 From: apense Date: Mon, 15 Jun 2015 16:03:04 -0400 Subject: [PATCH] Added raw string literal function calls docs Got curious as to how re"..." worked. --- doc/astspec.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/astspec.txt b/doc/astspec.txt index 0a7c29db7..6b64e5b91 100644 --- a/doc/astspec.txt +++ b/doc/astspec.txt @@ -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 ``[]`` ---------------------------