comparison sema/AstAction.d @ 143:d76cc5cad4fc

Added partial support for switches. Added support for extern(C) in CodeGen.
author Anders Johnsen <skabet@gmail.com>
date Mon, 21 Jul 2008 01:05:20 +0200
parents 2be29b296081
children 6e6355fb5f0f
comparison
equal deleted inserted replaced
142:1e48315c36fc 143:d76cc5cad4fc
169 169
170 override StmtT actOnDeclStmt(DeclT decl) 170 override StmtT actOnDeclStmt(DeclT decl)
171 { 171 {
172 Decl d = cast(Decl)decl; 172 Decl d = cast(Decl)decl;
173 return new DeclStmt(d); 173 return new DeclStmt(d);
174 }
175
176 override StmtT actOnStartOfSwitchStmt(ExprT exp)
177 {
178 return new SwitchStmt(cast(Exp)exp);
179 }
180
181 override void actOnCaseStmt(StmtT stmt, ExprT[] exps, StmtT[] stmts)
182 {
183 auto sw = cast(SwitchStmt)stmt;
184 sw.addCase(cast(Exp[])exps, cast(Stmt[])stmts);
185 }
186
187 override void actOnDefaultStmt(StmtT stmt, StmtT[] stmts)
188 {
189 auto sw = cast(SwitchStmt)stmt;
190 sw.setDefault(cast(Stmt[])stmts);
174 } 191 }
175 192
176 // -- Expressions -- 193 // -- Expressions --
177 override ExprT actOnNumericConstant(Token c) 194 override ExprT actOnNumericConstant(Token c)
178 { 195 {