changeset 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 ffb92a52ff44
children d2cdfeed0f6f
files trunk/src/cmd/Generate.d trunk/src/dil/Parser.d
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/trunk/src/cmd/Generate.d	Sat Sep 08 18:53:02 2007 +0000
+++ b/trunk/src/cmd/Generate.d	Sat Sep 08 20:23:02 2007 +0000
@@ -276,6 +276,7 @@
   {
     foreach (node; nodes)
     {
+      assert(node !is null);
       auto begin = node.begin;
       if (begin)
       {
--- a/trunk/src/dil/Parser.d	Sat Sep 08 18:53:02 2007 +0000
+++ b/trunk/src/dil/Parser.d	Sat Sep 08 20:23:02 2007 +0000
@@ -4014,8 +4014,16 @@
     auto targs = new TemplateArguments;
     while (1)
     {
+      Type parseType_()
+      {
+        auto type = parseType();
+        if (token.type == T.Comma || token.type == T.RParen)
+          return type;
+        ++errorCount; // Cause try_() to fail.
+        return null;
+      }
       bool success;
-      auto typeArgument = try_(parseType(), success);
+      auto typeArgument = try_(parseType_(), success);
       if (success)
         // TemplateArgument:
         //         Type