Mercurial > projects > dang
diff ast/Decl.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 | a14ac9e5c858 |
children | 362265427838 |
line wrap: on
line diff
--- a/ast/Decl.d Mon Jul 21 19:17:56 2008 +0200 +++ b/ast/Decl.d Mon Jul 21 20:35:03 2008 +0200 @@ -10,6 +10,7 @@ import sema.Scope, sema.Symbol, sema.DType, + sema.VC, basic.SmallArray, basic.Attribute; @@ -35,6 +36,10 @@ { } + void verify(VC vc) + { + } + DType type() { if (sym !is null) @@ -80,10 +85,6 @@ this.init = e; } - void simplify() - { - } - override DType type() { return env.findType(varType.get); @@ -171,6 +172,12 @@ stmt.simplify(); } + override void verify(VC vc) + { + foreach (stmt; statements) + stmt.verify(vc); + } + override DFunction type() { if (myType !is null) @@ -212,6 +219,12 @@ { } + override void verify(VC vc) + { + foreach (decl; decls) + decl.verify(vc); + } + override DType type() { return env.findType(identifier.get);