refactor(Parser): cleanup

This commit is contained in:
vsavkin
2014-11-06 12:00:09 -08:00
parent cb276fe412
commit 90fd1a9227
4 changed files with 259 additions and 148 deletions

View File

@ -326,6 +326,9 @@ export class FunctionCall extends AST {
eval(context) {
var obj = this.target.eval(context);
if (! (obj instanceof Function)) {
throw new BaseException(`${obj} is not a function`);
}
return FunctionWrapper.apply(obj, evalList(context, this.args));
}