(scope, lookupFunctions, mustEvaluate)
| 397 | } |
| 398 | |
| 399 | evaluate(scope, lookupFunctions, mustEvaluate) { |
| 400 | let func = this.func.evaluate(scope, lookupFunctions); |
| 401 | if (typeof func === 'function') { |
| 402 | return func.apply(null, evalList(scope, this.args, lookupFunctions)); |
| 403 | } |
| 404 | if (!mustEvaluate && (func === null || func === undefined)) { |
| 405 | return undefined; |
| 406 | } |
| 407 | throw new Error(`${this.func} is not a function`); |
| 408 | } |
| 409 | |
| 410 | accept(visitor) { |
| 411 | return visitor.visitCallFunction(this); |