comparison trunk/src/dil/Parser.d @ 379:a92f7826a4fa

- Fix in parseTemplateArguments_(): calling nested parseType_() instead of parseType() in try_().
author aziz
date Sat, 08 Sep 2007 20:23:02 +0000
parents 906599374b69
children 33b566df6af4
comparison
equal deleted inserted replaced
378:ffb92a52ff44 379:a92f7826a4fa
4012 { 4012 {
4013 auto begin = token; 4013 auto begin = token;
4014 auto targs = new TemplateArguments; 4014 auto targs = new TemplateArguments;
4015 while (1) 4015 while (1)
4016 { 4016 {
4017 Type parseType_()
4018 {
4019 auto type = parseType();
4020 if (token.type == T.Comma || token.type == T.RParen)
4021 return type;
4022 ++errorCount; // Cause try_() to fail.
4023 return null;
4024 }
4017 bool success; 4025 bool success;
4018 auto typeArgument = try_(parseType(), success); 4026 auto typeArgument = try_(parseType_(), success);
4019 if (success) 4027 if (success)
4020 // TemplateArgument: 4028 // TemplateArgument:
4021 // Type 4029 // Type
4022 // Symbol 4030 // Symbol
4023 targs ~= typeArgument; 4031 targs ~= typeArgument;