docs: function analyze(tree, providedOptions) {
      var scopeManager, referencer, options;
  
      options = updateDeeply(defaultOptions(), providedOptions);
  
      scopeManager = new ScopeManager(options);
  
      referencer = new Referencer(options, scopeManager);
      referencer.visit(tree);
  
      if(scopeManager.__currentScope !== null) {
      	throw new Error('currentScope should be null.');
  	}
      return scopeManager;
  }