Checks whether the given variable is after the last used parameter.

@param {eslint-scope.Variable} variable - The variable to check.
@returns {boolean} `true` if the variable is defined after the last
used parameter.
559487
function isAfterLastUsedArg(variable) {
            const def = variable.defs[0];
            const params = context.getDeclaredVariables(def.node);
            const posteriorParams = params.slice(params.indexOf(variable) + 1);

            // If any used parameters occur after this parameter, do not report.
            return !posteriorParams.some(v => v.references.length > 0 || v.eslintUsed);
        }
340691
function (variable, isRecursive) {

            var property, result = 0;

            isRecursive = (typeof isRecursive !== "undefined" && isRecursive) ? true : false;

            if (variable === false ||
                variable === null ||
                typeof variable === "undefined"
            ) {
                return 0;

            } else if (variable.constructor !== Array && variable.constructor !== Object) {
                return 1;
            }

            for (property in variable) {

                if (variable.hasOwnProperty(property) && !$this.isFunc(variable[property])) {
                    result++;

                    if (isRecursive && variable[property] &&
                        (
                            variable[property].constructor === Array ||
                            variable[property].constructor === Object
                        )
                    ) {
                        result += this.count(variable[property], true);
                    }
                }
            }

            return result;
        }
47297
function (variable) {
            return typeof variable === "object" &&
                /^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(variable)) &&
                variable.length !== undefined &&
                (variable.length === 0 || (typeof variable[0] === "object" && variable[0].nodeType > 0));
        }
1244419
function isSatisfiable (comparators, options) {
  var result = true
  var remainingComparators = comparators.slice()
  var testComparator = remainingComparators.pop()

  while (result && remainingComparators.length) {
    result = remainingComparators.every(function (otherComparator) {
      return testComparator.intersects(otherComparator, options)
    })

    testComparator = remainingComparators.pop()
  }

  return result
}
1165614
@Override
	public String onVariable(String variable) {
		String value = null;
		if(variables != null && variables.containsKey(variable)) {
			Object val = variables.get(variable);
			value = (val != null) ? val.toString() : null;
		}
		return value;
	}
435477
public static boolean hasVariable( final String string,
                                       final String variableName )
    {
        return ( string.indexOf( VARIABLE_START_DELIM + variableName
                + VARIABLE_END_DELIM ) >= 0 );
    }
707966
function checkVariable(variable) {
			getModifyingReferences(variable.references).forEach(function(reference) {
				context.report(
					reference.identifier,
					ProblemMessages.noConstantAssign,
					{
						name: reference.identifier.name
					});
			});
		}
1266855
function watchVariable(variable, alias) {
        newScope[alias] = scope[variable];

        scope.$watch(variable, function(value) {
          $mdUtil.nextTick(function() {
            newScope[alias] = value;
          });
        });
      }
522416
function isEmpty(variable) {
        var emptyVariables = {
            'undefined': true,
            'null': true,
            'number': false,
            'boolean': false,
            'function': false,
            'regexp': false,
            'date': false,
            'error': false
        };

        var strType = globalHelpers.getType(variable);
        var boolReturn = void 0;

        if (emptyVariables.hasOwnProperty(strType)) {
            boolReturn = emptyVariables[strType];
        } else {
            switch (strType) {
                case 'object':
                    boolReturn = this.isObjectEmpty(variable);
                    break;

                case 'string':
                    boolReturn = variable ? false : true;
                    break;

                case 'array':
                    boolReturn = variable.length ? false : true;
                    break;
            }
        }

        return boolReturn;
    }
620821
function checkVariable(i) {
  let l;

  if (i >= tokensLength || tokens[i].type !== TokenType.CommercialAt) return 0;

  if (tokens[i - 1] &&
      tokens[i - 1].type === TokenType.CommercialAt &&
      tokens[i - 2] &&
      tokens[i - 2].type === TokenType.CommercialAt) return 0;

  return (l = checkVariable(i + 1) || checkIdent(i + 1)) ? l + 1 : 0;
}
760609
private void checkForFinal(final Expression expression, VariableExpression ve) {
        Variable v = ve.getAccessedVariable();
        boolean isFinal = isFinal(v.getModifiers());
        boolean isParameter = v instanceof Parameter;
        if (isFinal && isParameter) {
            addError("Cannot assign a value to final variable '" + v.getName() + "'", expression);
        }
    }
491949
private void checkUnique(Variable var) {
		if (inputs.containsKey(var.getName())) {
			throw new FuzzerException(var.getName() + ": already defined");
		}
		if (outputs.containsKey(var.getName())) {
			throw new FuzzerException(var.getName() + ": already defined");
		}
	}
152554
public ValueExpression resolveVariable(String variable)
    {
        ValueExpression ve = null;
        try
        {
            if (_vars != null)
            {
                ve = (ValueExpression) _vars.get(variable);

                // Is this code in a block that wants to cache 
                // the resulting expression(s) and variable has been resolved?
                if (_trackResolveVariables && ve != null)
                {
                    _variableResolved = true;
                }
            }
            
            if (ve == null)
            {
                return _target.resolveVariable(variable);
            }
            
            return ve;
        }
        catch (StackOverflowError e)
        {
            throw new ELException("Could not Resolve Variable [Overflow]: " + variable, e);
        }
    }
606539
private function isResultVariable($variable, $variableClassUri)
    {
        $responseVariableClass = \taoResultServer_models_classes_ResponseVariable::class;
        $outcomeVariableClass = \taoResultServer_models_classes_OutcomeVariable::class;
        $class = isset($variable->class) ? $variable->class : get_class($variable->variable);

        return (null != $variable->item ||  null != $variable->test)
            && (
                $class == $outcomeVariableClass
                && $variableClassUri == $outcomeVariableClass
            ) || (
                $class == $responseVariableClass
                && $variableClassUri == $responseVariableClass
            );
    }
918524
function Scope(parent) {
  var map = Object.create(null);
  var api = {};
  api.markAsUsed = function(k) {
    if (typeof k !== "string") {
      throw new Error("Scope keys must be strings: " + k);
    }
    if (api.hasOwnVar(k)) {
      map[k].used = true;
      return api;
    }
    if (parent) {
      return parent.markAsUsed(k);
    }
    throw new Error("tried to use a variable before declaration: " + k);
  };
  api.ownUnusedVars = function() {
    return Object
      .keys(map)
      .filter(function(k) { return !map[k].used; })
      .map(function(k) { return map[k]; });
  };
  api.get = function(k) {
    if (api.hasOwnVar(k)) {
      return map[k];
    }
    if (parent) {
      return parent.get(k);
    }
    throw new Error("no such variable " + k);
  };
  api.declare = function(k, v) {
    // v.line :: number
    // v.column :: number
    // v.used :: boolean

    // Underscore is not a valid variable, so don't put it in the scope.
    if (k === "_") {
      return api;
    }
    v.name = k;
    // TODO: Unbreak the linter so I can use this check. Redeclaring a variable is not ok, but it's currently happening due to hoisting.
    // if (api.hasOwnVar(k)) {
    //     throw new Error("cannot redeclare variable " + k);
    // }
    if (api.hasOwnVar(k)) {
      v.used = api.get(k).used;
    }
    map[k] = v;
    return api;
  };
  api.hasVar = function(k) {
    if (api.hasOwnVar(k)) {
      return true;
    }
    if (parent) {
      return parent.hasVar(k);
    }
    return false;
  };
  api.hasOwnVar = function(k) {
    return {}.hasOwnProperty.call(map, k);
  };
  api.ownVars = function() {
    return Object.keys(map);
  };
  api.bareToString = function() {
    var innards = Object
      .keys(map)
      .map(function(k) {
        return k + ":" + (map[k].used ? "T" : "F");
      })
      .join(" ");
    var s = "{" + innards + "}";
    if (parent) {
      return parent.bareToString() + " > " + s;
    }
    return s;
  };
  api.toString = function() {
    return "#Scope[" + api.bareToString() + "]";
  };
  api.parent = parent;
  return Object.freeze(api);
}
1173025
def after_and_asgn
      variable = variable_stack.pop.first
      value    = value_stack.pop.first

      conditional_assignment(variable, value)
    end
598687
function isRelayVariables(variables: mixed): boolean {
  return (
    typeof variables === 'object' &&
    variables !== null &&
    !Array.isArray(variables)
  );
}