changeset 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
files trunk/src/Declarations.d trunk/src/Parser.d
diffstat 2 files changed, 26 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/trunk/src/Declarations.d	Mon Jul 09 21:52:01 2007 +0000
+++ b/trunk/src/Declarations.d	Mon Jul 09 21:54:05 2007 +0000
@@ -9,10 +9,10 @@
 
 class Declaration
 {
-  bool hasDefinition;
-  this(bool hasDefinition)
+  bool hasBody;
+  this(bool hasBody)
   {
-    this.hasDefinition = hasDefinition;
+    this.hasBody = hasBody;
   }
 }
 
@@ -50,9 +50,9 @@
   Type baseType;
   string[] members;
   Expression[] values;
-  this(string name, Type baseType, string[] members, Expression[] values, bool hasDefinition)
+  this(string name, Type baseType, string[] members, Expression[] values, bool hasBody)
   {
-    super(hasDefinition);
+    super(hasBody);
     this.name = name;
     this.baseType = baseType;
     this.members = members;
@@ -85,9 +85,9 @@
   string name;
   BaseClass[] bases;
   Declaration[] decls;
-  this(string name, BaseClass[] bases, Declaration[] decls, bool hasDefinition)
+  this(string name, BaseClass[] bases, Declaration[] decls, bool hasBody)
   {
-    super(hasDefinition);
+    super(hasBody);
     this.name = name;
     this.bases = bases;
     this.decls = decls;
@@ -99,9 +99,9 @@
   string name;
   BaseClass[] bases;
   Declaration[] decls;
-  this(string name, BaseClass[] bases, Declaration[] decls, bool hasDefinition)
+  this(string name, BaseClass[] bases, Declaration[] decls, bool hasBody)
   {
-    super(hasDefinition);
+    super(hasBody);
     this.name = name;
     this.bases = bases;
     this.decls = decls;
@@ -112,9 +112,9 @@
 {
   string name;
   Declaration[] decls;
-  this(string name, Declaration[] decls, bool hasDefinition)
+  this(string name, Declaration[] decls, bool hasBody)
   {
-    super(hasDefinition);
+    super(hasBody);
     this.name = name;
     this.decls = decls;
   }
@@ -124,9 +124,9 @@
 {
   string name;
   Declaration[] decls;
-  this(string name, Declaration[] decls, bool hasDefinition)
+  this(string name, Declaration[] decls, bool hasBody)
   {
-    super(hasDefinition);
+    super(hasBody);
     this.name = name;
     this.decls = decls;
   }
--- 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()