about summary refs log tree commit diff
path: root/pkg/lang/compiler/scope/scopes.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/lang/compiler/scope/scopes.go')
-rw-r--r--pkg/lang/compiler/scope/scopes.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/lang/compiler/scope/scopes.go b/pkg/lang/compiler/scope/scopes.go
index e34b45a..7a1b20c 100644
--- a/pkg/lang/compiler/scope/scopes.go
+++ b/pkg/lang/compiler/scope/scopes.go
@@ -26,6 +26,8 @@ type FunctionScope struct {
 	id           ScopeID
 	unit         code.Marker
 	subUnitCount int
+
+	outsideSymbolsInEnv []SymbolID
 }
 
 func NewFunctionScope(id ScopeID, unit code.Marker) FunctionScope {
@@ -33,6 +35,8 @@ func NewFunctionScope(id ScopeID, unit code.Marker) FunctionScope {
 		id:           id,
 		unit:         unit,
 		subUnitCount: 0,
+
+		outsideSymbolsInEnv: make([]SymbolID, 0),
 	}
 }
 
@@ -44,6 +48,10 @@ func (sf FunctionScope) Unit() code.Marker {
 	return sf.unit
 }
 
+func (sf FunctionScope) OutsideSymbolsInEnv() []SymbolID {
+	return sf.outsideSymbolsInEnv
+}
+
 func (sf FunctionScope) IsRootScope() bool {
 	return sf.ID() == ScopeID(0)
 }