'use strict'; var ok = require('assert').ok; var Node = require('./Node'); class FunctionCall extends Node { constructor(def) { super('FunctionCall'); this.callee = def.callee; ok(this.callee, '"callee" is required'); this.args = def.args; if (this.args && !Array.isArray(this.args)) { throw new Error('Invalid args'); } } generateCode(codegen) { var callee = this.callee; var args = this.args; codegen.generateCode(callee); codegen.write('('); if (args && args.length) { for (let i=0, argsLen = args.length; i