# HG changeset patch # User aziz # Date 1184018885 0 # Node ID a9244d40965285a0ffefd5f41630f52f2fc2a3a7 # Parent e02b87281b4ef28cde639c35750ecf08c4545307 - Added class EmptyDeclaration. - Returning decl instead of null. diff -r e02b87281b4e -r a9244d409652 trunk/src/Declarations.d --- a/trunk/src/Declarations.d Mon Jul 09 22:03:05 2007 +0000 +++ b/trunk/src/Declarations.d Mon Jul 09 22:08:05 2007 +0000 @@ -16,6 +16,14 @@ } } +class EmptyDeclaration : Declaration +{ + this() + { + super(false); + } +} + alias string[] ModuleName; // Identifier(.Identifier)* class ModuleDeclaration : Declaration diff -r e02b87281b4e -r a9244d409652 trunk/src/Parser.d --- a/trunk/src/Parser.d Mon Jul 09 22:03:05 2007 +0000 +++ b/trunk/src/Parser.d Mon Jul 09 22:08:05 2007 +0000 @@ -162,12 +162,16 @@ break; case T.Debug: decl = parseDebugDeclaration(); + case T.Semicolon: + nT(); + decl = new EmptyDeclaration(); + break; case T.Module: // Error: module is optional and can only appear once at the top of the source file. break; default: } - return null; + return decl; } /*