Initialize the binder's scope
This commit is contained in:
parent
0e82b3ea06
commit
34e9eec4fb
1 changed files with 3 additions and 1 deletions
|
@ -34,12 +34,14 @@ type SymbolMap map[ast.Definition]symbols.Symbol
|
|||
|
||||
// NewContextFrom allocates a fresh binding context linked to the shared context object.
|
||||
func NewContextFrom(ctx *core.Context) *Context {
|
||||
return &Context{
|
||||
bctx := &Context{
|
||||
Context: ctx,
|
||||
Types: make(TypeMap),
|
||||
Tokens: make(TokenMap),
|
||||
Symbols: make(SymbolMap),
|
||||
}
|
||||
NewScope(bctx, true)
|
||||
return bctx
|
||||
}
|
||||
|
||||
// RequireType requires that a type exists for the given AST expression node.
|
||||
|
|
Loading…
Reference in a new issue