summary refs log tree commit diff stats
path: root/doc/astspec.txt
diff options
context:
space:
mode:
authorapense <apense@users.noreply.github.com>2015-06-15 16:03:04 -0400
committerapense <apense@users.noreply.github.com>2015-06-15 16:03:04 -0400
commit3c9d655b883129765c3716c209dee5d38d72f8f6 (patch)
tree82ee03d120ec7b1c9b43d2e24a4c769e8d76a789 /doc/astspec.txt
parentfce697b043efda8ac2711a958d99483605fab7f8 (diff)
downloadNim-3c9d655b883129765c3716c209dee5d38d72f8f6.tar.gz
Added raw string literal function calls docs
Got curious as to how re"..." worked.
Diffstat (limited to 'doc/astspec.txt')
-rw-r--r--doc/astspec.txt19
1 files changed, 19 insertions, 0 deletions
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 ``[]``
 ---------------------------