Mercurial > projects > dil
diff trunk/src/dil/semantic/Scope.d @ 798:c24be8d4f6ab
Added documentation comments.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Sat, 01 Mar 2008 02:53:06 +0100 |
parents | d33895f679eb |
children |
line wrap: on
line diff
--- a/trunk/src/dil/semantic/Scope.d Fri Feb 29 22:51:24 2008 +0100 +++ b/trunk/src/dil/semantic/Scope.d Sat Mar 01 02:53:06 2008 +0100 @@ -9,6 +9,7 @@ import dil.lexer.Identifier; import common; +/// Builds a hierarchy of environments. class Scope { Scope parent; /// The surrounding scope, or null if this is the root scope. @@ -21,27 +22,21 @@ this.symbol = symbol; } - /++ - Find a symbol in this scope. - Params: - name = the name of the symbol. - +/ + /// Find a symbol in this scope. + /// Params: + /// name = the name of the symbol. Symbol lookup(Identifier* name) { return symbol.lookup(name); } - /++ - Create a new inner scope and return that. - +/ + /// Create a new inner scope and return that. Scope enter(ScopeSymbol symbol) { return new Scope(this, symbol); } - /++ - Destroy this scope and return the outer scope. - +/ + /// Destroy this scope and return the outer scope. Scope exit() { auto sc = parent;