[svn] r6368: nemerle/trunk/ncc/typing/Macros.n

nazgul svnadmin at nemerle.org
Sun Jun 4 16:48:16 CEST 2006


Log:
Add some comments about TraverseExpr

Author: nazgul
Date: Sun Jun  4 16:48:14 2006
New Revision: 6368

Modified:
   nemerle/trunk/ncc/typing/Macros.n

Modified: nemerle/trunk/ncc/typing/Macros.n
==============================================================================
--- nemerle/trunk/ncc/typing/Macros.n	(original)
+++ nemerle/trunk/ncc/typing/Macros.n	Sun Jun  4 16:48:14 2006
@@ -882,6 +882,17 @@
       Util.ice ("Bad constructed quoted expression in pattern matching")
   }
 
+  /**
+   * Allows recursive analysing and rewriting given parse tree expression easily. It calls supplied function on every
+   * node of tree returning its result as new node.
+   * 
+   * [ctx] - when specified, then expression is first macro-expanded and expansion result is then further analyzed
+   * [expr] - expression to be processed
+   * [in_pattern] - context boolean used to provide information if we are currently in match case pattern
+   * [call] - function called for each node of tree, first parameter hold the [in_pattern] semantics; second denotes if we are calling the 
+   *          function before processing of subnodes (==false) and after (==true) - the function is always called twice for each node;
+   *          third passes the current node to operate on; return value (used only from second/postprocess call) is used as new node value
+   */
   public TraverseExpr (ctx : option[Typer], expr : PExpr, in_pattern : bool,
                        call : bool * bool * PExpr -> PExpr) : PExpr
   {



More information about the svn mailing list