comparison src/ast/Stmt.d @ 206:d3c148ca429b

Major moving of files. all src now goes into src, all docs in docs.
author Anders Johnsen <skabet@gmail.com>
date Tue, 12 Aug 2008 18:14:56 +0200
parents
children
comparison
equal deleted inserted replaced
205:8387cbaa85ab 206:d3c148ca429b
1 module ast.Stmt;
2
3 /**
4 The base class for all Statements.
5 */
6 class Stmt
7 {
8 bool isCompoundStmt() { return false; }
9 CompoundStmt asCompoundStmt() { return null; }
10
11 bool isDeclStmt() { return false; }
12 DeclStmt asDeclStmt() { return null; }
13
14 bool isExpStmt() { return false; }
15 ExpStmt asExpStmt() { return null; }
16
17 bool isReturnStmt() { return false; }
18 ReturnStmt asReturnStmt() { return null; }
19
20 bool isIfStmt() { return false; }
21 IfStmt asIfStmt() { return null; }
22
23 bool isWhileStmt() { return false; }
24 WhileStmt asWhileStmt() { return null; }
25
26 bool isForStmt() { return false; }
27 ForStmt asForStmt() { return null; }
28
29 bool isSwitchStmt() { return false; }
30 SwitchStmt asSwitchStmt() { return null; }
31
32 bool isForeachStmt() { return false; }
33 ForeachStmt asForeachStmt() { return null; }
34
35 bool isAssertStmt() { return false; }
36 AssertStmt asAssertStmt() { return null; }
37 }
38
39 /**
40 CompoundStmt
41 */
42 class CompoundStmt : Stmt
43 {
44 override bool isCompoundStmt() { return true; }
45 override CompoundStmt asCompoundStmt() { return this; }
46 }
47
48 /**
49 DeclStmt
50 */
51 class DeclStmt : Stmt
52 {
53 override bool isDeclStmt() { return true; }
54 override DeclStmt asDeclStmt() { return this; }
55 }
56
57 /**
58 ExpStmt
59 */
60 class ExpStmt : Stmt
61 {
62 override bool isExpStmt() { return true; }
63 override ExpStmt asExpStmt() { return this; }
64 }
65
66 /**
67 ReturnStmt
68 */
69 class ReturnStmt : Stmt
70 {
71 override bool isReturnStmt() { return true; }
72 override ReturnStmt asReturnStmt() { return this; }
73 }
74
75 /**
76 IfStmt
77 */
78 class IfStmt : Stmt
79 {
80 override bool isIfStmt() { return true; }
81 override IfStmt asIfStmt() { return this; }
82 }
83
84 /**
85 WhileStmt
86 */
87 class WhileStmt : Stmt
88 {
89 override bool isWhileStmt() { return true; }
90 override WhileStmt asWhileStmt() { return this; }
91 }
92
93 /**
94 ForStmt
95 */
96 class ForStmt : Stmt
97 {
98 override bool isForStmt() { return true; }
99 override ForStmt asForStmt() { return this; }
100 }
101
102 /**
103 SwitchStmt
104 */
105 class SwitchStmt : Stmt
106 {
107 override bool isSwitchStmt() { return true; }
108 override SwitchStmt asSwitchStmt() { return this; }
109 }
110
111 /**
112 ForeachStmt
113 */
114 class ForeachStmt : Stmt
115 {
116 override bool isForeachStmt() { return true; }
117 override ForeachStmt asForeachStmt() { return this; }
118 }
119
120 /**
121 AssertStmt
122 */
123 class AssertStmt : Stmt
124 {
125 override bool isAssertStmt() { return true; }
126 override AssertStmt asAssertStmt() { return this; }
127 }