Sha256: c62f1063d62910ae68d66ae43508858deb6cdf20edabbf5726301611c89a6ffe
Contents?: true
Size: 787 Bytes
Versions: 3
Compression:
Stored size: 787 Bytes
Contents
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;
Version data entries
3 entries across 3 versions & 1 rubygems