diff trunk/src/Parser.d @ 126:0f0e7352e91d

- Renamed member hasDefinition of class Declaration to hasBody. - Renamed all instances of this variable name.
author aziz
date Mon, 09 Jul 2007 21:54:05 +0000
parents 240a8b053803
children cb9a97ebb570
line wrap: on
line diff
--- a/trunk/src/Parser.d	Mon Jul 09 21:52:01 2007 +0000
+++ b/trunk/src/Parser.d	Mon Jul 09 21:54:05 2007 +0000
@@ -304,7 +304,7 @@
     Type baseType;
     string[] members;
     Expression[] values;
-    bool hasDefinition;
+    bool hasBody;
 
     nT(); // Skip enum keyword.
     enumName = requireIdentifier();
@@ -323,7 +323,7 @@
     }
     else if (token.type == T.LBrace)
     {
-      hasDefinition = true;
+      hasBody = true;
       nT();
       do
       {
@@ -348,7 +348,7 @@
       nT();
     }
 
-    return new EnumDeclaration(enumName, baseType, members, values, hasDefinition);
+    return new EnumDeclaration(enumName, baseType, members, values, hasBody);
   }
 
   Declaration parseClassDeclaration()
@@ -358,7 +358,7 @@
     string className;
     BaseClass[] bases;
     Declaration[] decls;
-    bool hasDefinition;
+    bool hasBody;
 
     nT(); // Skip class keyword.
     className = requireIdentifier();
@@ -379,7 +379,7 @@
     }
     else if (token.type == T.LBrace)
     {
-      hasDefinition = true;
+      hasBody = true;
       nT();
       // TODO: think about setting a member status variable to a flag InClassBody... this way we can check for DeclDefs that are illegal in class bodies in the parsing phase.
       decls = parseDeclarationDefinitions();
@@ -390,7 +390,7 @@
 
     // TODO: error if decls.length == 0
 
-    return new ClassDeclaration(className, bases, decls, hasDefinition);
+    return new ClassDeclaration(className, bases, decls, hasBody);
   }
 
   BaseClass[] parseBaseClasses()
@@ -441,7 +441,7 @@
     string name;
     BaseClass[] bases;
     Declaration[] decls;
-    bool hasDefinition;
+    bool hasBody;
 
     nT(); // Skip interface keyword.
     name = requireIdentifier();
@@ -462,7 +462,7 @@
     }
     else if (token.type == T.LBrace)
     {
-      hasDefinition = true;
+      hasBody = true;
       nT();
       decls = parseDeclarationDefinitions();
       require(T.RBrace);
@@ -472,7 +472,7 @@
 
     // TODO: error if decls.length == 0
 
-    return new InterfaceDeclaration(name, bases, decls, hasDefinition);
+    return new InterfaceDeclaration(name, bases, decls, hasBody);
   }
 
   Declaration parseAggregateDeclaration()
@@ -483,7 +483,7 @@
 
     string name;
     Declaration[] decls;
-    bool hasDefinition;
+    bool hasBody;
 
     nT(); // Skip struct or union keyword.
     // name is optional.
@@ -505,7 +505,7 @@
     }
     else if (token.type == T.LBrace)
     {
-      hasDefinition = true;
+      hasBody = true;
       nT();
       decls = parseDeclarationDefinitions();
       require(T.RBrace);
@@ -516,9 +516,9 @@
     // TODO: error if decls.length == 0
 
     if (tok == T.Struct)
-      return new StructDeclaration(name, decls, hasDefinition);
+      return new StructDeclaration(name, decls, hasBody);
     else
-      return new UnionDeclaration(name, decls, hasDefinition);
+      return new UnionDeclaration(name, decls, hasBody);
   }
 
   Declaration parseConstructorDeclaration()