diff trunk/src/dil/Parser.d @ 342:f13d551d7c4f

- Added error messages MID.InContract and MID.OutContract.
author aziz
date Thu, 23 Aug 2007 12:14:02 +0000
parents 3ac651ea83fb
children 95f1b6e43214
line wrap: on
line diff
--- a/trunk/src/dil/Parser.d	Wed Aug 22 20:13:00 2007 +0000
+++ b/trunk/src/dil/Parser.d	Thu Aug 23 12:14:02 2007 +0000
@@ -505,14 +505,14 @@
         nT();
         break;
       case T.In:
-        //if (func.inBody)
-          // TODO: issue error msg.
+        if (func.inBody)
+          error(MID.InContract);
         nT();
         func.inBody = parseStatements();
         continue;
       case T.Out:
-        //if (func.outBody)
-          // TODO: issue error msg.
+        if (func.outBody)
+          error(MID.OutContract);
         nT();
         if (token.type == T.LParen)
         {
@@ -528,7 +528,7 @@
       default:
         error(MID.ExpectedButFound, "FunctionBody", token.srcText);
       }
-      break; // exit while loop
+      break; // Exit loop.
     }
     set(func, begin);
     func.finishConstruction();
@@ -4015,7 +4015,7 @@
           nT(); // Skip Identifier.
           nT(); // Skip Ellipses.
           if (token.type == T.Comma)
-            error(MID.TemplateTupleParameter); // TODO: issue error msg for variadic param not being last.
+            error(MID.TemplateTupleParameter);
           tp = new TemplateTupleParameter(ident);
           break;
         case T.Comma, T.RParen, T.Colon, T.Assign: