* Parse an expression given the argument signature and body code.
(args, code, ctx)
| 131346 | * Parse an expression given the argument signature and body code. |
| 131347 | */ |
| 131348 | function expression(args, code, ctx) { |
| 131349 | // wrap code in return statement if expression does not terminate |
| 131350 | if (code[code.length - 1] !== ';') { |
| 131351 | code = 'return(' + code + ');'; |
| 131352 | } |
| 131353 | |
| 131354 | var fn = Function.apply(null, args.concat(code)); |
| 131355 | return ctx && ctx.functions ? fn.bind(ctx.functions) : fn; |
| 131356 | } |
| 131357 | /** |
| 131358 | * Parse an expression used to update an operator value. |
| 131359 | */ |
no outgoing calls
no test coverage detected