From e82a145656c1dc74f8ae60371263dfa561b7c90e Mon Sep 17 00:00:00 2001 From: Steven McCanne Date: Fri, 22 Nov 2024 12:05:28 -0800 Subject: [PATCH] removed children from semantic.Scope as not used --- compiler/semantic/scope.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/compiler/semantic/scope.go b/compiler/semantic/scope.go index 1f6e873d94..4646429e69 100644 --- a/compiler/semantic/scope.go +++ b/compiler/semantic/scope.go @@ -11,18 +11,13 @@ import ( ) type Scope struct { - parent *Scope - children []*Scope - nvar int - symbols map[string]*entry + parent *Scope + nvar int + symbols map[string]*entry } func NewScope(parent *Scope) *Scope { - s := &Scope{parent: parent, symbols: make(map[string]*entry)} - if parent != nil { - parent.children = append(parent.children, s) - } - return s + return &Scope{parent: parent, symbols: make(map[string]*entry)} } type entry struct {