File: scope.go

package info (click to toggle)
golang-github-robertkrimen-otto 0.0~git20200922.ef014fd-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,796 kB
  • sloc: perl: 1,227; makefile: 79
file content (35 lines) | stat: -rw-r--r-- 525 bytes parent folder | download | duplicates (2)
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
35
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
	depth    int

	frame _frame
}

func newScope(lexical _stash, variable _stash, this *_object) *_scope {
	return &_scope{
		lexical:  lexical,
		variable: variable,
		this:     this,
	}
}