Mercurial > projects > dil
view trunk/src/dil/ast/Declaration.d @ 654:2a71e2f50e13
Moved class Declaration to its own module.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Tue, 15 Jan 2008 16:22:49 +0100 |
parents | |
children | 3b34f6a95a27 |
line wrap: on
line source
/++ Author: Aziz Köksal License: GPL3 +/ module dil.ast.Declaration; import dil.ast.Node; import dil.Enums; /// The root class of all declarations. abstract class Declaration : Node { bool hasBody; this() { super(NodeCategory.Declaration); } // Members relevant to semantic phase. StorageClass stc; /// The storage class of this declaration. Protection prot; /// The protection attribute of this declaration. final bool isStatic() { return !!(stc & StorageClass.Static); } final bool isPublic() { return !!(prot & Protection.Public); } final void setStorageClass(StorageClass stc) { this.stc = stc; } final void setProtection(Protection prot) { this.prot = prot; } }