How to use the esprima-fb.Syntax.ClassDeclaration function in esprima-fb

To help you get started, we’ve selected a few esprima-fb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github andreypopp / es6-module-jstransform / visitors.js View on Github external
// export var name = value
        case Syntax.VariableDeclaration:
          utils.move(node.declaration.range[0], state);
          node.declaration.declarations.forEach(function(declaration) {
            utils.catchup(declaration.id.range[1], state);
            utils.append(' = module.exports.' + declaration.id.name, state);
            traverse(declaration.init, path, state);
          });
          break;
        case Syntax.FunctionDeclaration:
          name = node.declaration.id.name;
          utils.move(node.declaration.range[0], state);
          traverse(node.declaration, path, state);
          utils.append(' module.exports.' + name + ' = ' + name + ';', state);
          break;
        case Syntax.ClassDeclaration:
          name = node.declaration.id.name;
          utils.move(node.declaration.range[0], state);
          traverse(node.declaration, path, state);
          utils.append('module.exports.' + name + ' = ' + name + ';', state);
          break;
        default:
          assert(false, "unknown declaration: " + node.declaration.type);
      }
    }

  } else if (node.source) {

    var modID;

    // export * from "module"
    if (node.specifiers.length === 1 &&
github facebook / emitter / vendor / fbtransform / transforms / classes.js View on Github external
visitClassDeclaration.test = function(object, path, state) {
  return object.type === Syntax.ClassDeclaration;
};
github joshuaslate / saas-tutorial / node_modules / jstransform / visitors / es6-class-visitors.js View on Github external
visitClassDeclaration.test = function(node, path, state) {
  return node.type === Syntax.ClassDeclaration;
};
github facebookarchive / jstransform / visitors / es6-class-visitors.js View on Github external
visitClassDeclaration.test = function(node, path, state) {
  return node.type === Syntax.ClassDeclaration;
};
github guptag / FinCharts / app / node_modules / react / node_modules / envify / node_modules / jstransform / visitors / es6-class-visitors.js View on Github external
visitClassDeclaration.test = function(node, path, state) {
  return node.type === Syntax.ClassDeclaration;
};
github Lapple / ErrorBoard / node_modules / react-tools / node_modules / jstransform / visitors / es6-class-visitors.js View on Github external
visitClassDeclaration.test = function(node, path, state) {
  return node.type === Syntax.ClassDeclaration;
};
github andrewshawcare / thoughtworks-email-signature-generator / node_modules / jsxhint / node_modules / jstransform / visitors / es6-class-visitors.js View on Github external
visitClassDeclaration.test = function(node, path, state) {
  return node.type === Syntax.ClassDeclaration;
};