diff trunk/src/dil/semantic/Symbol.d @ 683:1ae72234db26

Implemented some methods in SemanticPass1. Renamed Symbol.ident to name. Added a constructor to Symbol. Adapted constructors of classes that inherit from Symbol. Added Alias and OverloadSet Symbol classes. Renamed idents and values to names and inits in VariablesDeclaration.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Mon, 21 Jan 2008 17:10:12 +0100
parents e2cd28cfc6ae
children efa5fcb9aa14
line wrap: on
line diff
--- a/trunk/src/dil/semantic/Symbol.d	Sat Jan 19 20:35:45 2008 +0100
+++ b/trunk/src/dil/semantic/Symbol.d	Mon Jan 21 17:10:12 2008 +0100
@@ -20,6 +20,8 @@
   Template,
   Variable,
   Function,
+  Alias,
+  OverloadSet,
 //   Type,
 }
 
@@ -30,11 +32,18 @@
 {
   SYM sid;
   Symbol parent; /// The parent this symbol belongs to.
-  Identifier* ident; /// The name of this symbol.
+  Identifier* name; /// 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;
 
+  this(SYM sid, Identifier* name, Node node)
+  {
+    this.sid = sid;
+    this.name = name;
+    this.node = node;
+  }
+
   // A template macro for building isXYZ() methods.
   private template is_(char[] kind)
   {
@@ -49,5 +58,7 @@
   mixin(is_!("Template"));
   mixin(is_!("Variable"));
   mixin(is_!("Function"));
+  mixin(is_!("Alias"));
+  mixin(is_!("OverloadSet"));
 //   mixin(is_!("Type"));
 }