# HG changeset patch # User Aziz K?ksal # Date 1198959034 -3600 # Node ID c8861b452eb3992f09014b6a3087b9e4fd68911a # Parent ab9f5020cd023c4e6aa6198b6d2e5139516d1401 Added members 'node' and 'parent' to class Symbol. diff -r ab9f5020cd02 -r c8861b452eb3 trunk/src/dil/Symbol.d --- a/trunk/src/dil/Symbol.d Sat Dec 29 14:44:09 2007 +0100 +++ b/trunk/src/dil/Symbol.d Sat Dec 29 21:10:34 2007 +0100 @@ -4,6 +4,7 @@ +/ module dil.Symbol; +import dil.SyntaxTree; import common; /// Symbol IDs. @@ -25,6 +26,10 @@ class Symbol { SYM sid; + Symbol parent; /// The parent this symbol belongs to. + /// The AST node that produced this symbol. + /// Useful for source code location info and retrieval of doc comments. + Node node; // A template macro for building isXYZ() methods. private template is_(char[] kind) diff -r ab9f5020cd02 -r c8861b452eb3 trunk/src/dil/Symbols.d --- a/trunk/src/dil/Symbols.d Sat Dec 29 14:44:09 2007 +0100 +++ b/trunk/src/dil/Symbols.d Sat Dec 29 21:10:34 2007 +0100 @@ -107,7 +107,6 @@ Type type; Identifier* ident; - Node varDecl; /// The VariableDeclaration or Parameter node - for source code location. this(StorageClass stc, LinkageType linkType, Type type, Identifier* ident, Node varDecl) @@ -118,6 +117,6 @@ this.linkType = linkType; this.type = type; this.ident = ident; - this.varDecl = varDecl; + this.node = varDecl; } }