diff trunk/src/dil/ast/DefaultVisitor.d @ 769:5e3ef1b2011c

Added and improved documentation.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sun, 17 Feb 2008 02:21:55 +0100
parents 0af3b145a405
children 3b34f6a95a27
line wrap: on
line diff
--- a/trunk/src/dil/ast/DefaultVisitor.d	Sat Feb 16 22:10:21 2008 +0100
+++ b/trunk/src/dil/ast/DefaultVisitor.d	Sun Feb 17 02:21:55 2008 +0100
@@ -14,10 +14,8 @@
        dil.ast.Parameters;
 import common;
 
-/++
-  This huge template function, when instantiated for a certain node class,
-  generates a body of visit method calls on the subnodes.
-+/
+/// This huge template function, when instantiated for a certain node class,
+/// generates a body of calls to visit() on the subnodes.
 returnType!(T.stringof) visitDefault(T)(T t)
 {
   assert(t !is null, "node passed to visitDefault() is null");
@@ -348,13 +346,14 @@
   return t;
 }
 
-/++
-  Generate default visit methods.
-  E.g:
-  private mixin .visitDefault!(ClassDeclaration) _ClassDeclaration;
-  override returnType!("ClassDeclaration") visit(ClassDeclaration node)
-  { return _ClassDeclaration.visitDefault(node); }
-+/
+/// Generates the default visit methods.
+///
+/// E.g:
+/// ---
+/// private mixin .visitDefault!(ClassDeclaration) _ClassDeclaration;
+/// override returnType!("ClassDeclaration") visit(ClassDeclaration node)
+/// { return _ClassDeclaration.visitDefault(node); }
+/// ---
 char[] generateDefaultVisitMethods()
 {
   char[] text;
@@ -365,9 +364,7 @@
 }
 // pragma(msg, generateDefaultVisitMethods());
 
-/++
-  This class provides default methods for traversing nodes in a syntax tree.
-+/
+/// This class provides default methods for traversing nodes in a syntax tree.
 class DefaultVisitor : Visitor
 {
   // Comment out if too many errors are shown.