Mercurial > projects > dil
diff trunk/src/Declarations.d @ 109:d0cc281cacbd
- Added methods parseClassDeclaration() and parseBaseClasses().
- Added classes BaseClass and ClassDeclaration, and enum Protection.
author | aziz |
---|---|
date | Sun, 08 Jul 2007 18:51:00 +0000 |
parents | 722c05bbd5eb |
children | 004d98df65af |
line wrap: on
line diff
--- a/trunk/src/Declarations.d Sun Jul 08 15:42:03 2007 +0000 +++ b/trunk/src/Declarations.d Sun Jul 08 18:51:00 2007 +0000 @@ -34,3 +34,36 @@ this.values = values; } } + +enum Protection +{ + None, + Private = 1, + Protected = 1<<1, + Package = 1<<2, + Public = 1<<3 +} + +class BaseClass +{ + Protection prot; + string ident; + this(Protection prot, string ident) + { + this.prot = prot; + this.ident = ident; + } +} + +class ClassDeclaration : Declaration +{ + string className; + BaseClass[] bases; + Declaration[] decls; + this(string className, BaseClass[] bases, Declaration[] decls) + { + this.className = className; + this.bases = bases; + this.decls = decls; + } +}