changeset 275:e8de572e4d01

- Changed enum NodeType to NodeCategory. - Fix in ctor of class Declaration: category is Declaration, not Expression.
author aziz
date Mon, 06 Aug 2007 14:00:03 +0000
parents dcce141c97f5
children d6b2f7616ca5
files trunk/src/Declarations.d trunk/src/Expressions.d trunk/src/Statements.d trunk/src/SyntaxTree.d trunk/src/Types.d
diffstat 5 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/trunk/src/Declarations.d	Mon Aug 06 06:55:03 2007 +0000
+++ b/trunk/src/Declarations.d	Mon Aug 06 14:00:03 2007 +0000
@@ -14,7 +14,7 @@
   bool hasBody;
   this(bool hasBody)
   {
-    super(NodeType.Declaration);
+    super(NodeCategory.Declaration);
     this.hasBody = hasBody;
   }
 }
--- a/trunk/src/Expressions.d	Mon Aug 06 06:55:03 2007 +0000
+++ b/trunk/src/Expressions.d	Mon Aug 06 14:00:03 2007 +0000
@@ -13,7 +13,7 @@
 {
   this()
   {
-    super(NodeType.Expression);
+    super(NodeCategory.Expression);
   }
 }
 
--- a/trunk/src/Statements.d	Mon Aug 06 06:55:03 2007 +0000
+++ b/trunk/src/Statements.d	Mon Aug 06 14:00:03 2007 +0000
@@ -13,7 +13,7 @@
 {
   this()
   {
-    super(NodeType.Expression);
+    super(NodeCategory.Statement);
   }
 }
 
@@ -48,7 +48,7 @@
   Token* outIdent;
   this()
   {
-    super(NodeType.Other);
+    super(NodeCategory.Other);
   }
 }
 
--- a/trunk/src/SyntaxTree.d	Mon Aug 06 06:55:03 2007 +0000
+++ b/trunk/src/SyntaxTree.d	Mon Aug 06 14:00:03 2007 +0000
@@ -5,7 +5,7 @@
 module SyntaxTree;
 import Token;
 
-enum NodeType
+enum NodeCategory
 {
   Declaration,
   Statement,
@@ -16,12 +16,12 @@
 
 class Node
 {
-  NodeType nodeType;
+  NodeCategory category;
   Token* begin, end;
 
-  this(NodeType nodeType)
+  this(NodeCategory category)
   {
-    this.nodeType = nodeType;
+    this.category = category;
   }
 
   void setTokens(Token* begin, Token* end)
--- a/trunk/src/Types.d	Mon Aug 06 06:55:03 2007 +0000
+++ b/trunk/src/Types.d	Mon Aug 06 14:00:03 2007 +0000
@@ -49,7 +49,7 @@
 
   this(Token* stcTok, Type type, Token* ident, Expression assignExpr)
   {
-    super(NodeType.Other);
+    super(NodeCategory.Other);
 
     StorageClass stc;
     if (stcTok !is null)
@@ -93,7 +93,7 @@
 
   this()
   {
-    super(NodeType.Other);
+    super(NodeCategory.Other);
   }
 
   bool hasVariadic()
@@ -149,7 +149,7 @@
   Expression specValue, defValue;
   this(TP tp, Type valueType, Token* ident, Type specType, Type defType, Expression specValue, Expression defValue)
   {
-    super(NodeType.Other);
+    super(NodeCategory.Other);
     this.tp = tp;
     this.valueType = valueType;
     this.ident = ident;
@@ -166,7 +166,7 @@
 
   this()
   {
-    super(NodeType.Other);
+    super(NodeCategory.Other);
   }
 
   void opCatAssign(TemplateParameter parameter)
@@ -181,7 +181,7 @@
 
   this()
   {
-    super(NodeType.Other);
+    super(NodeCategory.Other);
   }
 
   void opCatAssign(Node argument)
@@ -245,7 +245,7 @@
 
   this(TID tid, Type next)
   {
-    super(NodeType.Type);
+    super(NodeCategory.Type);
     this.tid = tid;
     this.next = next;
   }