aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/robertkrimen/otto/scope.go
blob: b80808434f1e01f0c8d11c34447275e68a53e343 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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,
    }
}