Mercurial > projects > dang
comparison ast/Module.d @ 150:6c5a3c0bb4fb
Make switch work again
Also added locations to statements (only filled out for switch)
Added a verification pass
Removed some comments
author | Anders Halager <halager@gmail.com> |
---|---|
date | Mon, 21 Jul 2008 20:35:03 +0200 |
parents | 6e6355fb5f0f |
children | 08f68d684047 |
comparison
equal
deleted
inserted
replaced
147:060b6eb16db9 | 150:6c5a3c0bb4fb |
---|---|
1 module ast.Module; | 1 module ast.Module; |
2 | 2 |
3 import sema.Scope, | 3 import sema.Scope, |
4 sema.VC, | |
4 sema.Symbol; | 5 sema.Symbol; |
5 | 6 |
6 import ast.Decl; | 7 import ast.Decl; |
7 | 8 |
8 class Module | 9 class Module |
35 assert(0, "DeclType not implemented"); | 36 assert(0, "DeclType not implemented"); |
36 } | 37 } |
37 decls ~= decl; | 38 decls ~= decl; |
38 } | 39 } |
39 | 40 |
41 void verify(VC vc) | |
42 { | |
43 foreach (decl; decls) | |
44 decl.verify(vc); | |
45 } | |
46 | |
40 VarDecl[] vars; | 47 VarDecl[] vars; |
41 FuncDecl[] functions; | 48 FuncDecl[] functions; |
42 StructDecl[] structs; | 49 StructDecl[] structs; |
43 ClassDecl[] classes; | 50 ClassDecl[] classes; |
44 InterfaceDecl[] interfaces; | 51 InterfaceDecl[] interfaces; |