Mercurial > projects > dang
comparison ast/Stmt.d @ 202:cba8d8c063f3
Stub Statements.
author | dan amlund <danamlund@gmail.com> |
---|---|
date | Mon, 11 Aug 2008 19:33:11 +0200 |
parents | |
children | 28beb8b110ee |
comparison
equal
deleted
inserted
replaced
201:4f94b5adbc8a | 202:cba8d8c063f3 |
---|---|
1 module ast.Stmt; | |
2 | |
3 /** | |
4 The base class for all Statements. | |
5 */ | |
6 class Stmt | |
7 { | |
8 bool isCompoundStmt() { return false; } | |
9 bool isDeclStmt() { return false; } | |
10 bool isExpStmt() { return false; } | |
11 bool isReturnStmt() { return false; } | |
12 bool isIfStmt() { return false; } | |
13 bool isWhileStmt() { return false; } | |
14 bool isForStmt() { return false; } | |
15 bool isSwitchStmt() { return false; } | |
16 bool isForeachStmt() { return false; } | |
17 bool isAssertStmt() { return false; } | |
18 } | |
19 | |
20 /** | |
21 CompoundStmt | |
22 */ | |
23 class CompoundStmt : Stmt | |
24 { | |
25 override bool isCompoundStmt() { return true; } | |
26 } | |
27 | |
28 /** | |
29 DeclStmt | |
30 */ | |
31 class DeclStmt : Stmt | |
32 { | |
33 override bool isDeclStmt() { return true; } | |
34 } | |
35 | |
36 /** | |
37 ExpStmt | |
38 */ | |
39 class ExpStmt : Stmt | |
40 { | |
41 override bool isExpStmt() { return true; } | |
42 } | |
43 | |
44 /** | |
45 ReturnStmt | |
46 */ | |
47 class ReturnStmt : Stmt | |
48 { | |
49 override bool isReturnStmt() { return true; } | |
50 } | |
51 | |
52 /** | |
53 IfStmt | |
54 */ | |
55 class IfStmt : Stmt | |
56 { | |
57 override bool isIfStmt() { return true; } | |
58 } | |
59 | |
60 /** | |
61 WhileStmt | |
62 */ | |
63 class WhileStmt : Stmt | |
64 { | |
65 override bool isWhileStmt() { return true; } | |
66 } | |
67 | |
68 /** | |
69 ForStmt | |
70 */ | |
71 class ForStmt : Stmt | |
72 { | |
73 override bool isForStmt() { return true; } | |
74 } | |
75 | |
76 /** | |
77 SwitchStmt | |
78 */ | |
79 class SwitchStmt : Stmt | |
80 { | |
81 override bool isSwitchStmt() { return true; } | |
82 } | |
83 | |
84 /** | |
85 ForeachStmt | |
86 */ | |
87 class ForeachStmt : Stmt | |
88 { | |
89 override bool isForeachStmt() { return true; } | |
90 } | |
91 | |
92 /** | |
93 AssertStmt | |
94 */ | |
95 class AssertStmt : Stmt | |
96 { | |
97 override bool isAssertStmt() { return true; } | |
98 } |