code: function resolveVariableInScope(identifier, scope) {
              return scope.variables.find(variable => variable.name === identifier.name) ||
                  (scope.upper ? resolveVariableInScope(identifier, scope.upper) : null);
          }
docs: Resolves a given identifier to a given scope
  @param {ASTNode} identifier An `Identifier` AST node
  @param {Scope} scope An escope Scope
  @returns {Variable|null} An escope Variable corresponding to the given identifier