use :node; var Node = module.require('./Node').Node; fn ImportSpecifier(id, alias) extends Node { this.type = "ImportSpecifier"; if id? { this.id = id; this.id.parent = this; } if alias? { this.alias = alias; this.alias.parent = this; } } ImportSpecifier.prototype.codegen = () -> { if !super.codegen() { return; } if this.id? { this.id = this.id.codegen(false); } else { this.type = "ImportNamespaceSpecifier"; } ::Object.defineProperty(this, 'name', { value: { "type": "Identifier", "name": this.alias.name } if this.alias? else null, enumerable: true }); this.getContext().node.defineIdentifier(this.alias ?? this.id); return this; }; exports.ImportSpecifier = ImportSpecifier;