scope.go 525 B

1234567891011121314151617181920212223242526272829303132333435
  1. package otto
  2. // _scope:
  3. // entryFile
  4. // entryIdx
  5. // top?
  6. // outer => nil
  7. // _stash:
  8. // lexical
  9. // variable
  10. //
  11. // _thisStash (ObjectEnvironment)
  12. // _fnStash
  13. // _dclStash
  14. // An ECMA-262 ExecutionContext
  15. type _scope struct {
  16. lexical _stash
  17. variable _stash
  18. this *_object
  19. eval bool // Replace this with kind?
  20. outer *_scope
  21. depth int
  22. frame _frame
  23. }
  24. func newScope(lexical _stash, variable _stash, this *_object) *_scope {
  25. return &_scope{
  26. lexical: lexical,
  27. variable: variable,
  28. this: this,
  29. }
  30. }