changeset 615:a05457530ac2

Added member ident to class Symbol. Commented out inheritance of dil.semantic.Symbol by class dil.semantic.Type.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Tue, 08 Jan 2008 22:15:59 +0100
parents 8c5b1558244b
children 506ce60760d8
files trunk/src/dil/semantic/Symbol.d trunk/src/dil/semantic/Symbols.d trunk/src/dil/semantic/Types.d
diffstat 3 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/trunk/src/dil/semantic/Symbol.d	Tue Jan 08 21:28:53 2008 +0100
+++ b/trunk/src/dil/semantic/Symbol.d	Tue Jan 08 22:15:59 2008 +0100
@@ -5,6 +5,7 @@
 module dil.semantic.Symbol;
 
 import dil.ast.Node;
+import dil.lexer.Identifier;
 import common;
 
 /// Symbol IDs.
@@ -18,7 +19,7 @@
   Enum,
   Variable,
   Function,
-  Type,
+//   Type,
 }
 
 /++
@@ -28,6 +29,7 @@
 {
   SYM sid;
   Symbol parent; /// The parent this symbol belongs to.
+  Identifier* ident; /// The name of this symbol.
   /// The AST node that produced this symbol.
   /// Useful for source code location info and retrieval of doc comments.
   Node node;
@@ -45,5 +47,5 @@
   mixin(is_!("Enum"));
   mixin(is_!("Variable"));
   mixin(is_!("Function"));
-  mixin(is_!("Type"));
+//   mixin(is_!("Type"));
 }
--- a/trunk/src/dil/semantic/Symbols.d	Tue Jan 08 21:28:53 2008 +0100
+++ b/trunk/src/dil/semantic/Symbols.d	Tue Jan 08 22:15:59 2008 +0100
@@ -37,9 +37,8 @@
 }
 
 /// Aggregates have function and field members.
-class Aggregate : ScopeSymbol
+abstract class Aggregate : ScopeSymbol
 {
-  Identifier* ident; /// The name of this aggregate.
   Function[] funcs;
   Variable[] fields;
 
@@ -123,11 +122,10 @@
 
 class Variable : Symbol
 {
-  StorageClass stc;
-  LinkageType linkType;
+  StorageClass stc; /// The storage classes.
+  LinkageType linkType; /// The linkage type.
 
-  Type type;
-  Identifier* ident;
+  Type type; /// The type of this variable.
 
   this(StorageClass stc, LinkageType linkType,
        Type type, Identifier* ident, Node varDecl)
--- a/trunk/src/dil/semantic/Types.d	Tue Jan 08 21:28:53 2008 +0100
+++ b/trunk/src/dil/semantic/Types.d	Tue Jan 08 22:15:59 2008 +0100
@@ -9,7 +9,7 @@
 import dil.lexer.Identifier;
 import dil.CompilerInfo;
 
-abstract class Type : Symbol
+abstract class Type/* : Symbol*/
 {
   Type next;
   TYP tid; /// The ID of the type.
@@ -18,7 +18,7 @@
 
   this(Type next, TYP tid)
   {
-    this.sid = SYM.Type;
+//     this.sid = SYM.Type;
 
     this.next = next;
     this.tid = tid;