ast-properties.js 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. module.exports = {
  2. ArrayExpression: ['type', 'elements'],
  3. ArrayPattern: ['type', 'elements'],
  4. ArrowFunctionExpression: ['type', 'id', 'params', 'body', 'generator', 'expression', 'async'],
  5. AssignmentExpression: ['type', 'operator', 'left', 'right'],
  6. AssignmentPattern: ['type', 'left', 'right'],
  7. AwaitExpression: ['type', 'argument'],
  8. BinaryExpression: ['type', 'operator', 'left', 'right'],
  9. BlockStatement: ['type', 'body'],
  10. BreakStatement: ['type', 'label'],
  11. CallExpression: ['type', 'callee', 'arguments'],
  12. CatchClause: ['type', 'param', 'guard', 'body'],
  13. ClassBody: ['type', 'body'],
  14. ClassDeclaration: ['type', 'id', 'superClass', 'body'],
  15. ClassExpression: ['type', 'id', 'superClass', 'body'],
  16. ConditionalExpression: ['type', 'test', 'consequent', 'alternate'],
  17. ContinueStatement: ['type', 'label'],
  18. DebuggerStatement: ['type'],
  19. DoWhileStatement: ['type', 'body', 'test'],
  20. EmptyStatement: ['type'],
  21. ExportAllDeclaration: ['type', 'source'],
  22. ExportDefaultDeclaration: ['type', 'declaration'],
  23. ExportNamedDeclaration: ['type', 'declaration', 'specifiers', 'source'],
  24. ExportSpecifier: ['type', 'exported', 'local'],
  25. ExpressionStatement: ['type', 'expression'],
  26. ForInStatement: ['type', 'left', 'right', 'body'],
  27. ForOfStatement: ['type', 'left', 'right', 'body', 'await'],
  28. ForStatement: ['type', 'init', 'test', 'update', 'body'],
  29. FunctionDeclaration: ['type', 'id', 'params', 'body', 'generator', 'async'],
  30. FunctionExpression: ['type', 'id', 'params', 'body', 'generator', 'async'],
  31. Identifier: ['type', 'name'],
  32. IfStatement: ['type', 'test', 'consequent', 'alternate'],
  33. ImportDeclaration: ['type', 'specifiers', 'source'],
  34. ImportDefaultSpecifier: ['type', 'local'],
  35. ImportNamespaceSpecifier: ['type', 'local'],
  36. ImportSpecifier: ['type', 'imported', 'local'],
  37. LabeledStatement: ['type', 'label', 'body'],
  38. Literal: ['type', 'value', 'regex'],
  39. LogicalExpression: ['type', 'operator', 'left', 'right'],
  40. MemberExpression: ['type', 'object', 'property', 'computed'],
  41. MetaProperty: ['type', 'meta', 'property'],
  42. MethodDefinition: ['type', 'key', 'value', 'kind', 'computed', 'static'],
  43. NewExpression: ['type', 'callee', 'arguments'],
  44. ObjectExpression: ['type', 'properties'],
  45. ObjectPattern: ['type', 'properties'],
  46. Program: ['type', 'body', 'sourceType'],
  47. Property: ['type', 'key', 'value', 'kind', 'method', 'shorthand', 'computed'],
  48. RestElement: ['type', 'argument'],
  49. ReturnStatement: ['type', 'argument'],
  50. SequenceExpression: ['type', 'expressions'],
  51. SpreadElement: ['type', 'argument'],
  52. Super: ['type'],
  53. SwitchCase: ['type', 'test', 'consequent'],
  54. SwitchStatement: ['type', 'discriminant', 'cases', 'lexical'],
  55. TaggedTemplateExpression: ['type', 'tag', 'quasi'],
  56. TemplateElement: ['type', 'tail', 'value'],
  57. TemplateLiteral: ['type', 'quasis', 'expressions'],
  58. ThisExpression: ['type'],
  59. ThrowStatement: ['type', 'argument'],
  60. TryStatement: ['type', 'block', 'handler', 'finalizer'],
  61. UnaryExpression: ['type', 'operator', 'prefix', 'argument'],
  62. UpdateExpression: ['type', 'operator', 'argument', 'prefix'],
  63. VariableDeclaration: ['type', 'declarations', 'kind'],
  64. VariableDeclarator: ['type', 'id', 'init'],
  65. WhileStatement: ['type', 'test', 'body'],
  66. WithStatement: ['type', 'object', 'body'],
  67. YieldExpression: ['type', 'argument', 'delegate']
  68. };