function _checkForUnused() {
    if (_current["(type)"] !== "functionparams") {
      var currentBindings = _current["(bindings)"];
      for (var bindingName in currentBindings) {
        if (currentBindings[bindingName]["(type)"] !== "exception" &&
          currentBindings[bindingName]["(unused)"]) {
          _warnUnused(bindingName, currentBindings[bindingName]["(token)"], "var");
        }
      }
      return;
    }

    // Check the current scope for unused parameters and issue warnings as
    // necessary.
    var params = _current["(params)"];

    var param = params.pop();
    var unused_opt;

    while (param) {
      var binding = _current["(bindings)"][param];

      unused_opt = _getUnusedOption(state.funct["(unusedOption)"]);

      // 'undefined' is a special case for the common pattern where `undefined`
      // is used as a formal parameter name to defend against global
      // re-assignment, e.g.
      //
      //     (function(window, undefined) {
      //     })();
      if (param === "undefined")
        return;

      if (binding["(unused)"]) {
        _warnUnused(param, binding["(token)"], "param", state.funct["(unusedOption)"]);
      } else if (unused_opt === "last-param") {
        return;
      }

      param = params.pop();
    }
  }
Check the current scope for unused identifiers