Sha256: 044796dd9f74220bb93987b54e17c984c210c5be509d9d5b38a17b8a3aee4788

Contents?: true

Size: 1.19 KB

Versions: 3

Compression:

Stored size: 1.19 KB

Contents

$traceurRuntime.ModuleStore.getAnonymousModule(function() {
  "use strict";
  var Node = module.require("./Node").Node;
  function ImportSpecifier(id, alias) {
    Node.call(this);
    this.type = "ImportSpecifier";
    if (typeof id !== "undefined" && id !== null) {
      this.id = id;
      this.id.parent = this;
    }
    if (typeof alias !== "undefined" && alias !== null) {
      this.alias = alias;
      this.alias.parent = this;
    }
  }
  ImportSpecifier.prototype = Object.create(Node);
  ImportSpecifier.prototype.codegen = function() {
    if (!Node.prototype.codegen.call(this)) {
      return;
    }
    if (typeof this.id !== "undefined" && this.id !== null) {
      this.id = this.id.codegen(false);
    } else {
      this.type = "ImportNamespaceSpecifier";
    }
    Object.defineProperty(this, "name", {
      value: typeof this.alias !== "undefined" && this.alias !== null ? {
        "type": "Identifier",
        "name": this.alias.name
      } : null,
      enumerable: true
    });
    this.getContext().node.defineIdentifier(this.alias == null ? this.id : this.alias);
    return this;
  };
  exports.ImportSpecifier = ImportSpecifier;
  return {};
});

//# sourceMappingURL=ImportSpecifier.map

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spider-src-0.1.7 lib/spider-src/support/spider/lib/ast/ImportSpecifier.js
spider-src-0.1.6 lib/spider-src/support/spider/lib/ast/ImportSpecifier.js
spider-src-0.1.5 lib/spider-src/support/spider/lib/ast/ImportSpecifier.js