# HG changeset patch # User Aziz K?ksal # Date 1196807593 -3600 # Node ID b991f49628a8174eaf55265b3e1414a63c78c7a7 # Parent 47be6bfe39cd4c67782190b1510330706c9d566f Forgot committing Parser.d as well. diff -r 47be6bfe39cd -r b991f49628a8 trunk/src/dil/Parser.d --- a/trunk/src/dil/Parser.d Tue Dec 04 23:31:20 2007 +0100 +++ b/trunk/src/dil/Parser.d Tue Dec 04 23:33:13 2007 +0100 @@ -56,7 +56,7 @@ ImportDeclaration[] imports; - this(char[] srcText, string filePath) + this(char[] srcText, string filePath, InformationManager infoMan = null) { lx = new Lexer(srcText, filePath); } @@ -837,18 +837,26 @@ decl = new PragmaDeclaration(ident, args, decls); break; - // Protection attributes - case T.Private: - case T.Package: - case T.Protected: - case T.Public: - case T.Export: - auto tok = token.type; + default: + // Protection attributes + Protection prot; + switch (token.type) + { + case T.Private: + prot = Protection.Private; break; + case T.Package: + prot = Protection.Package; break; + case T.Protected: + prot = Protection.Protected; break; + case T.Public: + prot = Protection.Public; break; + case T.Export: + prot = Protection.Export; break; + default: + assert(0); + } nT(); - decl = new AttributeDeclaration(tok, parseDeclarationsBlock()); - break; - default: - assert(0); + decl = new ProtectionDeclaration(prot, parseDeclarationsBlock()); } return decl; } @@ -4386,7 +4394,7 @@ ++errorCount; return; } - auto location = Lexer.getLocation(this.token); + auto location = this.token.getLocation(); auto msg = Format(_arguments, _argptr, GetMsg(mid)); errors ~= new Information(InfoType.Parser, mid, location, msg); }