(fn, contextGetter)
| 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 () { |
nothing calls this directly
no test coverage detected