view trunk/src/cmd/ASTStats.d @ 643:3bd947eb72c2

Added module cmd.ASTStats.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Mon, 14 Jan 2008 14:55:49 +0100
parents
children d422e5f2f3ea
line wrap: on
line source

/++
  Author: Aziz Köksal
  License: GPL3
+/
module cmd.ASTStats;

import dil.ast.DefaultVisitor;
import dil.ast.Node;

class ASTStats : DefaultVisitor
{
  uint[] table; /// Table for counting nodes.

  uint[] count(Node root)
  {
    table = new uint[classNames.length];
    super.visitN(root);
    return table;
  }

  // TODO: add visit methods.
}