MCPcopy Create free account
hub / github.com/apache/cloudstack / _functionCall

Function _functionCall

tools/ngui/static/js/lib/angular.js:6347–6368  ·  view source on GitHub ↗
(fn, contextGetter)

Source from the content-addressed store, hash-verified

6345 }
6346
6347 function _functionCall(fn, contextGetter) {
6348 var argsFn = [];
6349 if (peekToken().text != ')') {
6350 do {
6351 argsFn.push(expression());
6352 } while (expect(','));
6353 }
6354 consume(')');
6355 return function(scope, locals){
6356 var args = [],
6357 context = contextGetter ? contextGetter(scope, locals) : scope;
6358
6359 for ( var i = 0; i < argsFn.length; i++) {
6360 args.push(argsFn[i](scope, locals));
6361 }
6362 var fnPtr = fn(scope, locals, context) || noop;
6363 // IE stupidity!
6364 return fnPtr.apply
6365 ? fnPtr.apply(context, args)
6366 : fnPtr(args[0], args[1], args[2], args[3], args[4]);
6367 };
6368 }
6369
6370 // This is used with json array declaration
6371 function arrayDeclaration () {

Callers

nothing calls this directly

Calls 5

peekTokenFunction · 0.85
expressionFunction · 0.85
expectFunction · 0.85
consumeFunction · 0.85
applyMethod · 0.65

Tested by

no test coverage detected