reluxscript 0.1.4

Write AST transformations once. Compile to Babel, SWC, and beyond.
Documentation
// Generated by ReluxScript compiler
// Do not edit manually

module.exports = function({ types: t }) {
  
  class RenameMap {
  constructor(old_name, new_name) {
      this.old_name = old_name;
      this.new_name = new_name;
    }
  }
  
  let state = {};
  
  return {
    visitor: {
      Identifier(path) {
        const node = path.node;
        if ((node.name === "oldVar")) {
          path.replaceWith(t.identifier("newVar".toString()));
        }
      },
      VariableDeclarator(path) {
        const node = path.node;
        const __iflet_0 = node.id;
        if (__iflet_0 !== null) {
          const id = __iflet_0;
          if ((id.name === "temp")) {
            path.replaceWith(t.identifier("renamed".toString()));
          }
        }
      }
    }
  };
};