Sha256: 28cc4dd7657569811d32d53b57c12122a8d3f2500aea6130eaea9acd081f3a97
Contents?: true
Size: 673 Bytes
Versions: 3
Compression:
Stored size: 673 Bytes
Contents
use :node; var Node = module.require('../Node').Node; fn NewExpression(callee, args) extends Node { this.type = 'NewExpression'; this.callee = callee; this.callee.parent = this; ::Object.defineProperty(this, 'arguments', { value: args, enumerable: true }); for arg in args { arg.parent = this; } } NewExpression.prototype.codegen = () -> { if !super.codegen() { return; } this.callee = this.callee.codegen(); var args = this.arguments; for arg, i in args { args[i] = arg.codegen(); } return this; }; NewExpression.prototype.hasCallExpression = () -> true; exports.NewExpression = NewExpression;
Version data entries
3 entries across 3 versions & 1 rubygems