addExportStatement(statements) {
    let declarationExtractionTransformer = new DeclarationExtractionTransformer();

    // convert __moduleName identifiers into $__moduleContext.id
    let moduleNameIdentifierTransformer = new ModuleNameIdentifierTransformer();
    statements = moduleNameIdentifierTransformer.transformList(statements);
    if (moduleNameIdentifierTransformer.usesModuleName)
      this.usesModuleName = true;

    // replace local export assignments with binding functions
    // using InsertBindingAssignmentTransformer
    this.localExportBindings.forEach((binding) => {
      statements = new InsertBindingAssignmentTransformer(
          binding.exportName, binding.localName).transformList(statements);
    });

    // Transform statements into execution statements only, with declarations
    // removed.
    let executionStatements =
        declarationExtractionTransformer.transformList(statements);

    let executionFunction = createFunctionExpression(
        createEmptyParameterList(),
        createFunctionBody(executionStatements));

    // Extract the declaration statements for hoisting from the previous
    // transform.
    let declarationStatements =
        declarationExtractionTransformer.getDeclarationStatements();

    // create the setter bindings
    let setterFunctions = this.dependencies.map((dep, index) => {
      let importBindings = this.importBindings[index];
      let externalExportBindings = this.externalExportBindings[index];
      let exportStarBinding = this.exportStarBindings[index];
      let moduleBinding = this.moduleBindings[index];

      let setterStatements = [];

      // first set local import bindings for the current dependency
      if (importBindings) {
        importBindings.forEach((binding) => {
          setterStatements.push(parseStatement
              `${id(binding.variableName)} = $__m.${binding.exportName};`);
        });
      }

      // then do export bindings of re-exported dependencies
      if (externalExportBindings) {
        let reexports = Object.create(null);
        externalExportBindings.forEach(({exportName, importName}) => {
          reexports[exportName] = importName === null ?
              parseExpression `$__m` : parseExpression `$__m.${importName}`;
        });
        setterStatements.push(
            parseStatement `$__export(${createObjectLiteralForDescriptor(reexports)})`);
      }

      // create local module bindings
      if (moduleBinding) {
        setterStatements.push(
            parseStatement `${id(moduleBinding)} = $__m;`);
      }

      // finally run export * if applying to this dependency, for not-already
      // exported dependencies
      if (exportStarBinding) {
        setterStatements = setterStatements.concat(parseStatements `
          var exportObj = Object.create(null);
          Object.keys($__m).forEach(function(p) {
            if (p !== 'default' && !$__exportNames[p])
              exportObj[p] = $__m[p];
          });
          $__export(exportObj);
        `);

        let exportNames = {};
        this.localExportBindings.concat(this.externalExportBindings).
            forEach(function(binding) {
              exportNames[binding.exportName] = true;
            });

        declarationStatements.push(parseStatement `
          var $__exportNames = ${createObjectLiteralForDescriptor(exportNames)};
        `);
      }

      if (setterStatements.length) {
        return parseExpression `function($__m) {
          ${setterStatements}
        }`;
      }

      return parseExpression `function($__m) {}`;
    });

    // add function declaration assignments for hoisted function exports
    declarationStatements = declarationStatements.concat(
        this.functionDeclarations.map((binding) => {
          return parseStatement
              `$__export(${binding.exportName}, ${id(binding.functionName)})`;
        }));

    declarationStatements.push(parseStatement `return {
      setters: ${new ArrayLiteral(null, setterFunctions)},
      execute: ${executionFunction}
    }`);

    return declarationStatements;
  }
Create the primary System.register structure, separating
declaration bindings from execution for ES6 binding support.

Converts:
  import {s} from 's';
  export {p as t, s} from 'q';
  export * from 'r';
  q(s);
  function q() {
    s();
  }

Hoisting the declarations and writing the exports into:

System.register("name", ["s", "q", "r"], function($__export) {
  var s;
  function q() {
    s();
  }
  return {
    setters: [
      function(m) {
        $__export('t', m['p']);
        $__export('s', m['s']);
      },
      function(m) {
        s = m['s'];
      },
      function(m) {
        for (var p in m)
          $__export(p, m[p]);
      }
    ],
    execute: function() {
      q(s);
    }
  };
});