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.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/lang/compiler/scope/scopes.go b/pkg/lang/compiler/scope/scopes.go
index e1a7a9f..f62ab56 100644
--- a/pkg/lang/compiler/scope/scopes.go
+++ b/pkg/lang/compiler/scope/scopes.go
@@ -13,12 +13,16 @@ const (
 )
 
 type SymbolScope struct {
+	nameToSymbol map[string]SymbolID
+
 	variableSymbols []Symbol[SymbolVariable]
-	globalSymbols []Symbol[SymbolGlobal]
+	globalSymbols   []Symbol[SymbolGlobal]
 }
 
 func NewSymbolScope() SymbolScope {
 	return SymbolScope{
+		nameToSymbol: make(map[string]SymbolID),
+
 		variableSymbols: make([]Symbol[SymbolVariable], 0),
 		globalSymbols:   make([]Symbol[SymbolGlobal], 0),
 	}