diff trunk/src/dil/parser/Parser.d @ 682:7541c64fc423

Renamed FunctionBody, CatchBody and FinallyBody. FunctionBody -> FuncBodyStatement, CatchBody -> CatchStatement, FinallyBody -> FinallyStatement.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sat, 19 Jan 2008 20:35:45 +0100
parents 95a3c28c0f64
children 1ae72234db26
line wrap: on
line diff
--- a/trunk/src/dil/parser/Parser.d	Sat Jan 19 00:10:57 2008 +0100
+++ b/trunk/src/dil/parser/Parser.d	Sat Jan 19 20:35:45 2008 +0100
@@ -644,10 +644,10 @@
     return init;
   }
 
-  FunctionBody parseFunctionBody()
+  FuncBodyStatement parseFunctionBody()
   {
     auto begin = token;
-    auto func = new FunctionBody;
+    auto func = new FuncBodyStatement;
     while (1)
     {
       switch (token.kind)
@@ -1984,6 +1984,7 @@
            token.kind != T.RBrace &&
            token.kind != T.EOF)
       s ~= parseStatement();
+    set(s, begin);
     return set(new ScopeStatement(s), begin);
   }
 
@@ -2089,8 +2090,8 @@
     nT();
 
     auto tryBody = parseScopeStatement();
-    CatchBody[] catchBodies;
-    FinallyBody finBody;
+    CatchStatement[] catchBodies;
+    FinallyStatement finBody;
 
     while (skipped(T.Catch))
     {
@@ -2104,14 +2105,14 @@
         set(param, begin2);
         require(T.RParen);
       }
-      catchBodies ~= set(new CatchBody(param, parseNoScopeStatement()), begin);
+      catchBodies ~= set(new CatchStatement(param, parseNoScopeStatement()), begin);
       if (param is null)
         break; // This is a LastCatch
       begin = token;
     }
 
     if (skipped(T.Finally))
-      finBody = set(new FinallyBody(parseNoScopeStatement()), prevToken);
+      finBody = set(new FinallyStatement(parseNoScopeStatement()), prevToken);
 
     if (catchBodies.length == 0 && finBody is null)
       assert(begin.kind == T.Try), error(begin, MSG.MissingCatchOrFinally);