exitScope creates a new Env instance with the nearest outer declaration scope.
()
| 333 | |
| 334 | // exitScope creates a new Env instance with the nearest outer declaration scope. |
| 335 | func (e *Env) exitScope() *Env { |
| 336 | parentDecls := e.declarations.Pop() |
| 337 | return &Env{ |
| 338 | declarations: parentDecls, |
| 339 | container: e.container, |
| 340 | provider: e.provider, |
| 341 | aggLitElemType: e.aggLitElemType, |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | // errorMsg is a type alias meant to represent error-based return values which |
| 346 | // may be accumulated into an error at a later point in execution. |