* Call a function handler with a suitable context and arguments.
(name, args, optArgs, token, breakOnTokenText)
| 15286 | |
| 15287 | |
| 15288 | callFunction(name, args, optArgs, token, breakOnTokenText) { |
| 15289 | const context = { |
| 15290 | funcName: name, |
| 15291 | parser: this, |
| 15292 | token, |
| 15293 | breakOnTokenText |
| 15294 | }; |
| 15295 | const func = functions[name]; |
| 15296 | |
| 15297 | if (func && func.handler) { |
| 15298 | return func.handler(context, args, optArgs); |
| 15299 | } else { |
| 15300 | throw new ParseError(`No function handler for ${name}`); |
| 15301 | } |
| 15302 | } |
| 15303 | /** |
| 15304 | * Parses the arguments of a function or environment |
| 15305 | */ |
no outgoing calls
no test coverage detected