Mercurial > projects > dil
changeset 568:c8861b452eb3
Added members 'node' and 'parent' to class Symbol.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Sat, 29 Dec 2007 21:10:34 +0100 |
parents | ab9f5020cd02 |
children | 86fa0d36da51 |
files | trunk/src/dil/Symbol.d trunk/src/dil/Symbols.d |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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; } }