summary refs log tree commit diff stats
path: root/doc/astspec.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/astspec.txt')
-rwxr-xr-xdoc/astspec.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/astspec.txt b/doc/astspec.txt
index eec2808fd..01c1adba3 100755
--- a/doc/astspec.txt
+++ b/doc/astspec.txt
@@ -20,7 +20,7 @@ contains:
 
     PNimrodNode = ref TNimrodNode
     TNimrodNode {.final.} = object
-      case kind                        ## the node's kind
+      case kind: TNimrodNodeKind       ## the node's kind
       of nnkNone, nnkEmpty, nnkNilLit:
         nil                            ## node contains no additional fields
       of nnkCharLit..nnkInt64Lit:
@@ -43,6 +43,11 @@ To specify the AST for the different Nimrod constructs, the notation
 ``nodekind(son1, son2, ...)`` or ``nodekind(value)`` or 
 ``nodekind(field=value)`` is used.
 
+Some child may be missing. Then it is ``nil``. A nil child is equivalent to 
+a node of kind ``nnkEmpty``. This is more or less a (useful) artifact from 
+the implementation. (In the compiler's implementation ``nil`` is of course 
+not the same as ``nnkEmpty``!)
+
 
 Leaf nodes/Atoms
 ================
@@ -72,8 +77,9 @@ Nimrod expression                corresponding AST
 Identifiers are ``nnkIdent`` nodes. After the name lookup pass these nodes
 get transferred into ``nnkSym`` nodes. However, a macro receives an AST that
 has not been checked for semantics and thus the identifiers have not been
-looked up. Thus macros deal with ``nnkIdent`` nodes. 
- 
+looked up. Macros should deal with ``nnkIdent`` nodes and do not need to deal
+with ``nnkSym`` nodes.
+
 
 Calls/expressions
 =================