Sha256: f464da585e5b0a650792d7b3357adc68518be48b59464e01b203118f9f5eb5a9

Contents?: true

Size: 664 Bytes

Versions: 3

Compression:

Stored size: 664 Bytes

Contents

use :node;

var Node = module.require('../Node').Node;

fn ImportDeclarationStatement(specifiers, source, kind)
  extends Node {
  
  this.type = "ImportDeclaration";
  this.kind = kind;
  
  this.specifiers = specifiers;
  for specifier in this.specifiers {
    specifier.parent = this;
  }
  
  this.source = source;
  this.source.parent = this;
}

ImportDeclarationStatement.prototype.codegen = () -> {
  if !super.codegen() {
    return;
  }
  
  for specifier, i in this.specifiers {
    this.specifiers[i] = specifier.codegen();
  }
  
  this.source = this.source.codegen();
  return this;
};

exports.ImportDeclarationStatement = ImportDeclarationStatement;

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spider-src-0.1.7 lib/spider-src/support/spider/src/ast/statements/ImportDeclarationStatement.spider
spider-src-0.1.6 lib/spider-src/support/spider/src/ast/statements/ImportDeclarationStatement.spider
spider-src-0.1.5 lib/spider-src/support/spider/src/ast/statements/ImportDeclarationStatement.spider