Mercurial > projects > dil
diff trunk/src/dil/semantic/Symbols.d @ 614:8c5b1558244b
Added symbol Enum.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Tue, 08 Jan 2008 21:28:53 +0100 |
parents | 041eae272362 |
children | a05457530ac2 |
line wrap: on
line diff
--- a/trunk/src/dil/semantic/Symbols.d Mon Jan 07 20:43:39 2008 +0100 +++ b/trunk/src/dil/semantic/Symbols.d Tue Jan 08 21:28:53 2008 +0100 @@ -15,7 +15,8 @@ /// A symbol that has its own scope with a symbol table. class ScopeSymbol : Symbol { - protected SymbolTable symbolTable; /// The symbol table. + SymbolTable symbolTable; /// The symbol table. + Symbol[] members; /// The member symbols (in lexical order.) this() { @@ -31,6 +32,7 @@ void insert(Symbol s, Identifier* ident) { symbolTable.insert(s, ident); + members ~= s; } } @@ -93,6 +95,17 @@ } } +class Enum : ScopeSymbol +{ + Identifier* ident; + this(Identifier* ident, Node enumNode) + { + this.sid = SYM.Enum; + this.ident = ident; + this.node = enumNode; + } +} + class Function : ScopeSymbol { StorageClass stc;