traverse.js 530 B

12345678910111213141516
  1. export function ignore(path) {
  2. path.skip();
  3. }
  4. export const shallowIgnoreVisitors = {
  5. FunctionDeclaration: { enter: ignore },
  6. FunctionExpression: { enter: ignore },
  7. Class: { enter: ignore },
  8. IfStatement: { enter: ignore },
  9. WithStatement: { enter: ignore },
  10. SwitchStatement: { enter: ignore },
  11. CatchClause: { enter: ignore },
  12. Loop: { enter: ignore },
  13. ExportNamedDeclaration: { enter: ignore },
  14. ExportDefaultDeclaration: { enter: ignore },
  15. ConditionalExpression: { enter: ignore },
  16. };