lib/js/scope.js
function Scope(type, parentScope, thisObject){
  this.type = type || 'unknown';
  this.thisObject = thisObject || utils.createIdentifier('undefined');
  this.subscopes = [];
  this.names = {};
  this.declarations = [];

  if (parentScope)
  {
    this.parent = parentScope;
    this.root = parentScope.root;
    this.strict = parentScope.strict;
    parentScope.subscopes.push(this);
  }
  else
  {
    this.root = this;
  }

  this.put('this', {
    type: 'readonly',
    token: this.thisObject
  });
}
function Scope(type, parentScope, thisObject){
  this.type = type || 'unknown';
  this.thisObject = thisObject || utils.createIdentifier('undefined');
  this.subscopes = [];
  this.names = {};
  this.declarations = [];

  if (parentScope)
  {
    this.parent = parentScope;
    this.root = parentScope.root;
    this.strict = parentScope.strict;
    parentScope.subscopes.push(this);
  }
  else
  {
    this.root = this;
  }

  this.put('this', {
    type: 'readonly',
    token: this.thisObject
  });
}
Scope class