Evaluates a function call if possible. Returns a Node.Status object.
195406
function functions(node) {
  if (!Node.Type.isFunction(node)) {
    return Node.Status.noChange(node);
  }

  for (let i = 0; i < FUNCTIONS.length; i++) {
    const nodeStatus = FUNCTIONS[i](node);
    if (nodeStatus.hasChanged()) {
      return nodeStatus;
    }
  }
  return Node.Status.noChange(node);
}
1189250
function() {

		var result = null;

		// in production - wrap evaluation into try/catch block
		if (Lava.schema.DEBUG) {

			result = this._evaluator();

		} else {

			try {

				result = this._evaluator();

			} catch (e) {

				Lava.logException(e);

			}

		}

		return result;

	}
484452
def call(self, params, _context, **kwargs):
        ''''''

        assert len(params) == self.paramCount
        # using setattr because '=' is not allowed inside of lambdas
        return evaluate_impl(self.body, params).then(lambda value: setattr(_context.results, 'value', value))
1209213
async def eval(self, text, opts=None, user=None):
        '''
        
        '''
        if user is None:
            user = self.auth.getUserByName('root')

        await self.boss.promote('storm', user=user, info={'query': text})
        async with await self.snap(user=user) as snap:
            async for node in snap.eval(text, opts=opts, user=user):
                yield node
375556
private void evaluateState()
    {
        synchronized (this.callList)
        {
            // Get the highest prioirty state from the set of calls.
            PeerState newState = PeerState.NOTSET;
            for (CallTracker call : this.callList)
            {
                if (call.getState().getPriority() > newState.getPriority())
                    newState = call.getState();
            }

            this._state = newState;
        }
    }
438540
function isLocalCall (node) {
  return nodeType(node, exactMatch(nodeTypes.FUNCTIONCALL)) &&
        minNrOfChildren(node, 1) &&
        nodeType(node.children[0], exactMatch(nodeTypes.IDENTIFIER)) &&
        expressionType(node.children[0], basicRegex.FUNCTIONTYPE) &&
        !expressionType(node.children[0], basicRegex.EXTERNALFUNCTIONTYPE) &&
        nrOfChildren(node.children[0], 0)
}
1302624
function status (res) {
  return err => {
    const code = err.statusCode
    error(res, code || 500)
    if (!code) console.log(err)
  }
}
1361240
def eval_context(context, node)
      node.context(&context[:block]) if context[:nodes].matches?(node.name)
    end
257004
function evalFunctionCall (string, functionIdentifier, callback, call, functionRE) {
  // allow recursivity
  return callback(reduceFunctionCall(string, functionRE, callback), functionIdentifier, call)
}
1113479
def evaluate(self, node: InstanceNode) -> XPathValue:
        
        return self._eval(XPathContext(node, node, 1, 1))
78419
def visit_Call(self, node):
        
        if self.depth == 0:
            return node

        if self.ignore_exceptions is None:
            ignore_exceptions = ast.Name("None", ast.Load())

        else:
            ignore_exceptions = ast.List(self.ignore_exceptions, ast.Load())

        catch_exception_type = self.catch_exception \
            if self.catch_exception else "None"

        catch_exception = ast.Name(catch_exception_type, ast.Load())
        depth = ast.Num(self.depth - 1 if self.depth > 0 else -1)

        debug_node_name = ast.Name("debug", ast.Load())
        call_extra_parameters = [] if IS_PYTHON_3 else [None, None]
        node.func = ast.Call(debug_node_name,
                             [node.func, ignore_exceptions,
                              catch_exception, depth],
                             [], *call_extra_parameters)

        return node
1319087
def visit_FunctionDef(self, node):
        """"""
        node = self.get_function_node(node)
        if node is not None:
            node._async = False
56776
function evaluatePromise() {
  var promise = kew.defer();
  var args = utils.toArray(arguments);
  args.push(promise.makeNodeResolver());
  /*jshint validthis:true */
  evaluate.apply(this, args);
  return promise;
}
1100095
def visit_call(self, node):
        """"""
        expr_str = self._precedence_parens(node, node.func)
        args = [arg.accept(self) for arg in node.args]
        if node.keywords:
            keywords = [kwarg.accept(self) for kwarg in node.keywords]
        else:
            keywords = []

        args.extend(keywords)
        return "%s(%s)" % (expr_str, ", ".join(args))
222907
def visit_Call(self, node):
        """"""
        self.generic_visit(node)

        # Setup() is a keywords-only function.
        if node.args:
            return

        keywords = set()
        for k in node.keywords:
            if k.arg is not None:
                keywords.add(k.arg)
            # Simple case for dictionary expansion for Python >= 3.5.
            if k.arg is None and isinstance(k.value, ast.Dict):
                keywords.update(x.s for x in k.value.keys)
        # Simple case for dictionary expansion for Python <= 3.4.
        if getattr(node, 'kwargs', ()) and isinstance(node.kwargs, ast.Dict):
            keywords.update(x.s for x in node.kwargs.keys)

        # The bare minimum number of arguments seems to be around five, which
        # includes author, name, version, module/package and something extra.
        if len(keywords) < 5:
            return

        score = sum(
            self.attributes.get(x, 0)
            for x in keywords
        ) / len(keywords)

        if score < 0.5:
            LOG.debug(
                "Scoring for setup%r below 0.5: %.2f",
                tuple(keywords),
                score)
            return

        # Redirect call to our setup() tap function.
        node.func = ast.Name(id='__f8r_setup', ctx=node.func.ctx)
        self.redirected = True
395057
function hasCallback(node) {
    return isObject(node) &&
           isArray(node.arguments) &&
           node.arguments.some(isFunctionExpr);
}
1088100
function CallExpression(node) {
    if (t.isFunction(node.callee) || isHelper(node)) {
      return {
        before: true,
        after: true
      };
    }
  }