Mercurial > projects > dil
changeset 535:bdd49ad84f5f
Fixed parsing bug in parseVariableOrFunction().
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Tue, 18 Dec 2007 00:32:30 +0100 |
parents | 581b3cf3fe8f |
children | 0781ac288537 |
files | trunk/src/dil/Parser.d |
diffstat | 1 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/dil/Parser.d Mon Dec 17 22:16:13 2007 +0100 +++ b/trunk/src/dil/Parser.d Tue Dec 18 00:32:30 2007 +0100 @@ -508,9 +508,12 @@ d.setProtection(protection); return set(d, begin); } - // Type VariableName DeclaratorSuffix - ident = requireIdentifier(MSG.ExpectedVariableName); - type = parseDeclaratorSuffix(type); + else + { + // Type VariableName DeclaratorSuffix + ident = requireIdentifier(MSG.ExpectedVariableName); + type = parseDeclaratorSuffix(type); + } } // It's a variable declaration. @@ -3756,8 +3759,8 @@ else params = parseParameterList(); - type = set(new CFuncPointerType(type, params), begin); - return type; + type = new CFuncPointerType(type, params); + return set(type, begin); } Type parseDeclarator(ref Identifier* ident, bool identOptional = false)