1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-12 20:27:30 +08:00
otto/scope.go
Robert Krimen e6768252c2 Improve error reporting
* Delay entering global scope on code evaluation, not runtime creation

This fixes #66
2014-06-12 21:27:32 -07:00

35 lines
511 B
Go

package otto
// _scope:
// entryFile
// entryIdx
// top?
// outer => nil
// _stash:
// lexical
// variable
//
// _thisStash (ObjectEnvironment)
// _fnStash
// _dclStash
// An ECMA-262 ExecutionContext
type _scope struct {
lexical _stash
variable _stash
this *_object
eval bool // Replace this with kind?
outer *_scope
frame _frame
}
func newScope(lexical _stash, variable _stash, this *_object) *_scope {
return &_scope{
lexical: lexical,
variable: variable,
this: this,
}
}