view ast/Stmt.d @ 203:28beb8b110ee

proper stub
author dan amlund <danamlund@gmail.com>
date Mon, 11 Aug 2008 19:43:17 +0200
parents cba8d8c063f3
children 227d6a8fb574
line wrap: on
line source

module ast.Stmt;

/**
  The base class for all Statements.
  */
class Stmt
{
    bool isCompundStmt() { return false; }
    CompoundStmt asCompoundStmt() { return null; }

    bool isDeclStmt() { return false; }
    DeclStmt asDeclStmt() { return null; }

    bool isExpStmt() { return false; }
    ExpStmt asExpStmt() { return null; }

    bool isReturnStmt() { return false; }
    ReturnStmt asReturnStmt() { return null; }

    bool isIfStmt() { return false; }
    IfStmt asIfStmt() { return null; }

    bool isWhileStmt() { return false; }
    WhileStmt asWhileStmt() { return null; }

    bool isForStmt() { return false; }
    ForStmt asForStmt() { return null; }

    bool isSwitchStmt() { return false; }
    SwitchStmt asSwitchStmt() { return null; }

    bool isForeachStmt() { return false; }
    ForeachStmt asForeachStmt() { return null; }

    bool isAssertStmt() { return false; }
    AssertStmt asAssertStmt() { return null; }
}

/**
  CompoundStmt
  */
class CompoundStmt : Stmt
{
    override bool isCompoundStmt() { return true; }
    override CompoundStmt asCompoundStmt() { return this; }
}

/**
  DeclStmt
  */
class DeclStmt : Stmt
{
    override bool isDeclStmt() { return true; }
    override DeclStmt asDeclStmt() { return this; }
}

/**
  ExpStmt
  */
class ExpStmt : Stmt
{
    override bool isExpStmt() { return true; }
    override ExpStmt asExpStmt() { return this; }
}

/**
  ReturnStmt
  */
class ReturnStmt : Stmt
{
    override bool isReturnStmt() { return true; }
    override ReturnStmt asReturnStmt() { return this; }
}

/**
  IfStmt
  */
class IfStmt : Stmt
{
    override bool isIfStmt() { return true; }
    override IfStmt asIfStmt() { return this; }
}

/**
  WhileStmt
  */
class WhileStmt : Stmt
{
    override bool isWhileStmt() { return true; }
    override WhileStmt asWhileStmt() { return this; }
}

/**
  ForStmt
  */
class ForStmt : Stmt
{
    override bool isForStmt() { return true; }
    override ForStmt asForStmt() { return this; }
}

/**
  SwitchStmt
  */
class SwitchStmt : Stmt
{
    override bool isSwitchStmt() { return true; }
    override SwitchStmt asSwitchStmt() { return this; }
}

/**
  ForeachStmt
  */
class ForeachStmt : Stmt
{
    override bool isForeachStmt() { return true; }
    override ForeachStmt asForeachStmt() { return this; }
}

/**
  AssertStmt
  */
class AssertStmt : Stmt
{
    override bool isAssertStmt() { return true; }
    override AssertStmt asAssertStmt() { return this; }
}