Mercurial > projects > dil
diff trunk/src/dil/Declarations.d @ 565:184a8d8bad2e
Added semantic() to StructDeclaration.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Fri, 28 Dec 2007 23:22:33 +0100 |
parents | 3c867a683258 |
children | 3ebdc510a7fc |
line wrap: on
line diff
--- a/trunk/src/dil/Declarations.d Fri Dec 28 22:32:32 2007 +0100 +++ b/trunk/src/dil/Declarations.d Fri Dec 28 23:22:33 2007 +0100 @@ -313,6 +313,20 @@ { this.alignSize = alignSize; } + + Struct struct_; /// The struct symbol for this declaration. + + override void semantic(Scope scop) + { + if (struct_) + return; + struct_ = new Struct(name); + // Create a new scope. + scop = scop.push(struct_); + // Continue semantic analysis. + decls.semantic(scop); + scop.pop(); + } } class UnionDeclaration : Declaration