System.register(["./attachComments.js", "./convertComments.js", "./toTokens.js", "./toAST.js"], function (_export, _context) {
  "use strict";

  var attachComments, convertComments, toTokens, toAST;
  /*  depends on babel-eslint plugin, version 10.1.0
      https://github.com/babel/babel-eslint 
  */

  function babylonToEspree(ast, traverse, tt, t, code) {
    // debugger
    // convert tokens
    ast.tokens = toTokens(ast.tokens, tt, code);

    // add comments
    convertComments(ast.comments);

    // transform esprima and acorn divergent nodes
    toAST(ast, traverse, t, code);

    // remove File
    ast.type = "Program";
    ast.sourceType = ast.program.sourceType;
    ast.directives = ast.program.directives;
    ast.body = ast.program.body;
    delete ast.program;
    attachComments(ast, ast.comments, ast.tokens);
    return ast;
  }
  _export("babylonToEspree", babylonToEspree);
  return {
    setters: [function (_attachCommentsJs) {
      attachComments = _attachCommentsJs.attachComments;
    }, function (_convertCommentsJs) {
      convertComments = _convertCommentsJs.convertComments;
    }, function (_toTokensJs) {
      toTokens = _toTokensJs.toTokens;
    }, function (_toASTJs) {
      toAST = _toASTJs.toAST;
    }],
    execute: function () {}
  };
});