changeset 203:28beb8b110ee

proper stub
author dan amlund <danamlund@gmail.com>
date Mon, 11 Aug 2008 19:43:17 +0200
parents cba8d8c063f3
children 227d6a8fb574
files ast/Stmt.d
diffstat 1 files changed, 30 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ast/Stmt.d	Mon Aug 11 19:33:11 2008 +0200
+++ b/ast/Stmt.d	Mon Aug 11 19:43:17 2008 +0200
@@ -5,16 +5,35 @@
   */
 class Stmt
 {
-    bool isCompoundStmt() { return false; }
+    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; }
 }
 
 /**
@@ -23,6 +42,7 @@
 class CompoundStmt : Stmt
 {
     override bool isCompoundStmt() { return true; }
+    override CompoundStmt asCompoundStmt() { return this; }
 }
 
 /**
@@ -31,6 +51,7 @@
 class DeclStmt : Stmt
 {
     override bool isDeclStmt() { return true; }
+    override DeclStmt asDeclStmt() { return this; }
 }
 
 /**
@@ -39,6 +60,7 @@
 class ExpStmt : Stmt
 {
     override bool isExpStmt() { return true; }
+    override ExpStmt asExpStmt() { return this; }
 }
 
 /**
@@ -47,6 +69,7 @@
 class ReturnStmt : Stmt
 {
     override bool isReturnStmt() { return true; }
+    override ReturnStmt asReturnStmt() { return this; }
 }
 
 /**
@@ -55,6 +78,7 @@
 class IfStmt : Stmt
 {
     override bool isIfStmt() { return true; }
+    override IfStmt asIfStmt() { return this; }
 }
 
 /**
@@ -63,6 +87,7 @@
 class WhileStmt : Stmt
 {
     override bool isWhileStmt() { return true; }
+    override WhileStmt asWhileStmt() { return this; }
 }
 
 /**
@@ -71,6 +96,7 @@
 class ForStmt : Stmt
 {
     override bool isForStmt() { return true; }
+    override ForStmt asForStmt() { return this; }
 }
 
 /**
@@ -79,6 +105,7 @@
 class SwitchStmt : Stmt
 {
     override bool isSwitchStmt() { return true; }
+    override SwitchStmt asSwitchStmt() { return this; }
 }
 
 /**
@@ -87,6 +114,7 @@
 class ForeachStmt : Stmt
 {
     override bool isForeachStmt() { return true; }
+    override ForeachStmt asForeachStmt() { return this; }
 }
 
 /**
@@ -95,4 +123,5 @@
 class AssertStmt : Stmt
 {
     override bool isAssertStmt() { return true; }
+    override AssertStmt asAssertStmt() { return this; }
 }