Skip to content

Commit

Permalink
removed children from semantic.Scope as not used
Browse files Browse the repository at this point in the history
  • Loading branch information
mccanne committed Nov 22, 2024
1 parent c06e81a commit e82a145
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions compiler/semantic/scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e82a145

Please sign in to comment.