diff trunk/src/Parser.d @ 268:c19b68a4e3db

- FunctionBody inherits from Node now. - Added begin variable and call to set().
author aziz
date Sat, 04 Aug 2007 13:23:01 +0000
parents f3dfa6208ed3
children a416e09c08ea
line wrap: on
line diff
--- a/trunk/src/Parser.d	Sat Aug 04 10:55:05 2007 +0000
+++ b/trunk/src/Parser.d	Sat Aug 04 13:23:01 2007 +0000
@@ -476,6 +476,7 @@
 
   FunctionBody parseFunctionBody()
   {
+    auto begin = token;
     auto func = new FunctionBody;
     while (1)
     {
@@ -515,11 +516,11 @@
         nT();
         goto case T.LBrace;
       default:
-        // TODO: issue error msg.
         error(MID.ExpectedButFound, "FunctionBody", token.srcText);
       }
       break; // exit while loop
     }
+    set(func, begin);
     return func;
   }