summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--doc/astspec.txt48
1 files changed, 48 insertions, 0 deletions
diff --git a/doc/astspec.txt b/doc/astspec.txt
index ef0c91bb8..50dfda1bc 100644
--- a/doc/astspec.txt
+++ b/doc/astspec.txt
@@ -762,6 +762,10 @@ Note that either the second or third (or both) parameters above must exist,
 as the compiler needs to know the type somehow (which it can infer from
 the given assignment).
 
+This is not the same AST for all uses of ``var``. See 
+[Procedure declaration](http://nim-lang.org/docs/macros.html#statements-procedure-declaration) 
+for details.
+
 Let section
 -----------
 
@@ -899,6 +903,32 @@ AST:
   )
   # ...
 
+Mixin statement
+---------------
+
+Concrete syntax:
+
+.. code-block:: nim
+  mixin x
+
+AST:
+
+.. code-block:: nim
+  nnkMixinStmt(nnkIdent(!"x"))
+
+Bind statement
+--------------
+
+Concrete syntax:
+
+.. code-block:: nim
+  bind x
+
+AST:
+
+.. code-block:: nim
+  nnkBindStmt(nnkIdent(!"x"))
+
 Procedure declaration
 ---------------------
 
@@ -963,6 +993,24 @@ AST:
   ),
   # ...
 
+When a procedure uses the special ``var`` type return variable, the result 
+is different from that of a var section.
+
+Concrete syntax:
+
+.. code-block:: nim
+  proc hello(): var int
+
+AST:
+
+.. code-block:: nim
+  # ...
+  nnkFormalParams(
+    nnkVarTy(
+      nnkIdent(!"int")
+    )
+  )
+
 Iterator declaration
 --------------------