Mercurial > projects > dil
changeset 620:f15b054bb27e
Renamed Scope.push/pop to Scope.enter/exit.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Fri, 11 Jan 2008 00:54:53 +0100 |
parents | 933cd8d24467 |
children | 2ac14bb6b84e |
files | trunk/src/dil/ast/Declarations.d trunk/src/dil/semantic/Scope.d |
diffstat | 2 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/dil/ast/Declarations.d Fri Jan 11 00:49:05 2008 +0100 +++ b/trunk/src/dil/ast/Declarations.d Fri Jan 11 00:54:53 2008 +0100 @@ -356,10 +356,10 @@ // Insert into current scope. scop.insert(symbol, name); // Create a new scope. - scop = scop.push(symbol); + scop = scop.enter(symbol); // Continue semantic analysis. decls && decls.semantic(scop); - scop.pop(); + scop.exit(); } } @@ -389,10 +389,10 @@ // Insert into current scope. scop.insert(symbol, name); // Create a new scope. - scop = scop.push(symbol); + scop = scop.enter(symbol); // Continue semantic analysis. decls && decls.semantic(scop); - scop.pop(); + scop.exit(); } } @@ -422,10 +422,10 @@ // Insert into current scope. scop.insert(symbol, name); // Create a new scope. - scop = scop.push(symbol); + scop = scop.enter(symbol); // Continue semantic analysis. decls && decls.semantic(scop); - scop.pop(); + scop.exit(); } } @@ -449,10 +449,10 @@ // Insert into current scope. scop.insert(symbol, name); // Create a new scope. - scop = scop.push(symbol); + scop = scop.enter(symbol); // Continue semantic analysis. decls && decls.semantic(scop); - scop.pop(); + scop.exit(); } }
--- a/trunk/src/dil/semantic/Scope.d Fri Jan 11 00:49:05 2008 +0100 +++ b/trunk/src/dil/semantic/Scope.d Fri Jan 11 00:54:53 2008 +0100 @@ -64,9 +64,9 @@ } /++ - Create a new inner scope. + Create and enter a new inner scope. +/ - Scope push(ScopeSymbol symbol) + Scope enter(ScopeSymbol symbol) { auto sc = new Scope(); sc.parent = this; @@ -78,7 +78,7 @@ /++ Destroy this scope and return the outer scope. +/ - Scope pop() + Scope exit() { auto sc = parent; // delete this;