Mercurial > projects > dil
comparison trunk/src/dil/semantic/Scope.d @ 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 | 6d449e777f5d |
children | e7811328e6c7 |
comparison
equal
deleted
inserted
replaced
619:933cd8d24467 | 620:f15b054bb27e |
---|---|
62 // Set the current scope symbol as the parent. | 62 // Set the current scope symbol as the parent. |
63 var.parent = symbol; | 63 var.parent = symbol; |
64 } | 64 } |
65 | 65 |
66 /++ | 66 /++ |
67 Create a new inner scope. | 67 Create and enter a new inner scope. |
68 +/ | 68 +/ |
69 Scope push(ScopeSymbol symbol) | 69 Scope enter(ScopeSymbol symbol) |
70 { | 70 { |
71 auto sc = new Scope(); | 71 auto sc = new Scope(); |
72 sc.parent = this; | 72 sc.parent = this; |
73 sc.infoMan = this.infoMan; | 73 sc.infoMan = this.infoMan; |
74 sc.symbol = symbol; | 74 sc.symbol = symbol; |
76 } | 76 } |
77 | 77 |
78 /++ | 78 /++ |
79 Destroy this scope and return the outer scope. | 79 Destroy this scope and return the outer scope. |
80 +/ | 80 +/ |
81 Scope pop() | 81 Scope exit() |
82 { | 82 { |
83 auto sc = parent; | 83 auto sc = parent; |
84 // delete this; | 84 // delete this; |
85 return sc; | 85 return sc; |
86 } | 86 } |