Mercurial > projects > dil
changeset 148:e3e4d3314166
- Implemented parsing protection attributes.
author | aziz |
---|---|
date | Thu, 12 Jul 2007 14:31:02 +0000 |
parents | e46b3415ec16 |
children | 37e2e0d06013 |
files | trunk/src/Declarations.d trunk/src/Parser.d |
diffstat | 2 files changed, 15 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/Declarations.d Thu Jul 12 14:20:05 2007 +0000 +++ b/trunk/src/Declarations.d Thu Jul 12 14:31:02 2007 +0000 @@ -6,6 +6,7 @@ import Expressions; import Types; import Statements; +import Token; class Declaration { @@ -341,3 +342,15 @@ this.decls = decls; } } + +class ProtectionDeclaration : Declaration +{ + TOK protection; + Declaration[] decls; + this(TOK protection, Declaration[] decls) + { + super(true); + this.protection = protection; + this.decls = decls; + } +}
--- a/trunk/src/Parser.d Thu Jul 12 14:20:05 2007 +0000 +++ b/trunk/src/Parser.d Thu Jul 12 14:31:02 2007 +0000 @@ -296,8 +296,9 @@ case T.Package: case T.Protected: case T.Public: + case T.Export: + decl = new ProtectionDeclaration(token.type, parseDeclarationsBlock()); break; - case T.Export: case T.Override: case T.Deprecated: case T.Abstract: