js语法树节点类型


//js语法树节点类型-babylon@6.18
const typeMap= {
'CommentBlock':function (node) {},
'CommentLine':function (node) {},

'Literal':function (node) {},
'ExpressionStatement':function (node) {},
'Property':function (node) {},
'DirectiveLiteral':function (node) {},
'Directive':function (node) {},
'Program':function (node) {},
'File':function (node) {},
'Decorator':function (node) {},
'BreakStatement':function (node) {},
'ContinueStatement':function (node) {},
'DebuggerStatement':function (node) {},
'DoWhileStatement':function (node) {},
'VariableDeclaration':function (node) {},
'IfStatement':function (node) {},
'ReturnStatement':function (node) {},
'SwitchCase':function (node) {},
'SwitchStatement':function (node) {},
'ThrowStatement':function (node) {},
'CatchClause':function (node) {},
'TryStatement':function (node) {},
'WhileStatement':function (node) {},
'WithStatement':function (node) {},
'EmptyStatement':function (node) {},
'LabeledStatement':function (node) {},
'BlockStatement':function (node) {},
'ForStatement':function (node) {},
'ForInStatement':function (node) {},
'VariableDeclarator':function (node) {},
'FunctionDeclaration':function (node) {},
'FunctionExpression':function (node) {},
'ClassDeclaration':function (node) {},
'ClassExpression':function (node) {},
'ClassBody':function (node) {},
'ClassProperty':function (node) {},
'ClassMethod':function (node) {},
'ExportNamespaceSpecifier':function (node) {},
'ExportAllDeclaration':function (node) {},
'ExportDefaultSpecifier':function (node) {},
'ExportDefaultDeclaration':function (node) {},
'ExportNamedDeclaration':function (node) {},
'ExportSpecifier':function (node) {},
'ImportDeclaration':function (node) {},
'ImportNamespaceSpecifier':function (node) {},
'ImportSpecifier':function (node) {},
'ImportDefaultSpecifier':function (node) {},
'SpreadElement':function (node) {},
'RestElement':function (node) {},
'ArrayPattern':function (node) {},
'AssignmentPattern':function (node) {},
'SequenceExpression':function (node) {},
'AssignmentExpression':function (node) {},
'ConditionalExpression':function (node) {},
'LogicalExpression':function (node) {},
'BinaryExpression':function (node) {},
'UpdateExpression':function (node) {},
'UnaryExpression':function (node) {},
'BindExpression':function (node) {},
'MemberExpression':function (node) {},
'Identifier':function (node) {},
'CallExpression':function (node) {},
'TaggedTemplateExpression':function (node) {},
'Super':function (node) {},
'Import':function (node) {},
'ThisExpression':function (node) {},
'DoExpression':function (node) {},
'NullLiteral':function (node) {},
'BooleanLiteral':function (node) {},
'ArrayExpression':function (node) {},
'StringLiteral':function (node) {},
'NumericLiteral':function (node) {},
'RegExpLiteral':function (node) {},
'MetaProperty':function (node) {},
'NewExpression':function (node) {},
'TemplateElement':function (node) {},
'TemplateLiteral':function (node) {},
'ObjectPattern':function (node) {},
'ObjectExpression':function (node) {},
'ObjectMethod':function (node) {},
'ObjectProperty':function (node) {},
'ArrowFunctionExpression':function (node) {},
'AwaitExpression':function (node) {},
'YieldExpression':function (node) {},
'MethodDefinition':function (node) {},
'DeclaredPredicate':function (node) {},
'InferredPredicate':function (node) {},
'DeclareClass':function (node) {},
'TypeAnnotation':function (node) {},
'DeclareFunction':function (node) {},
'DeclareExportDeclaration':function (node) {},
'DeclareVariable':function (node) {},
'DeclareModule':function (node) {},
'DeclareModuleExports':function (node) {},
'DeclareTypeAlias':function (node) {},
'DeclareOpaqueType':function (node) {},
'DeclareInterface':function (node) {},
'InterfaceExtends':function (node) {},
'InterfaceDeclaration':function (node) {},
'TypeAlias':function (node) {},
'OpaqueType':function (node) {},
'TypeParameterDeclaration':function (node) {},
'TypeParameterInstantiation':function (node) {},
'ObjectTypeIndexer':function (node) {},
'ObjectTypeProperty':function (node) {},
'ObjectTypeCallProperty':function (node) {},
'ObjectTypeSpreadProperty':function (node) {},
'ObjectTypeAnnotation':function (node) {},
'QualifiedTypeIdentifier':function (node) {},
'GenericTypeAnnotation':function (node) {},
'TypeofTypeAnnotation':function (node) {},
'TupleTypeAnnotation':function (node) {},
'FunctionTypeParam':function (node) {},
'AnyTypeAnnotation':function (node) {},
'VoidTypeAnnotation':function (node) {},
'BooleanTypeAnnotation':function (node) {},
'MixedTypeAnnotation':function (node) {},
'EmptyTypeAnnotation':function (node) {},
'NumberTypeAnnotation':function (node) {},
'StringTypeAnnotation':function (node) {},
'FunctionTypeAnnotation':function (node) {},
'StringLiteralTypeAnnotation':function (node) {},
'BooleanLiteralTypeAnnotation':function (node) {},
'NullLiteralTypeAnnotation':function (node) {},
'NumericLiteralTypeAnnotation':function (node) {},
'ThisTypeAnnotation':function (node) {},
'ExistentialTypeParam':function (node) {},
'ArrayTypeAnnotation':function (node) {},
'NullableTypeAnnotation':function (node) {},
'IntersectionTypeAnnotation':function (node) {},
'UnionTypeAnnotation':function (node) {},
'TypeCastExpression':function (node) {},
'ClassImplements':function (node) {},


'JSXEmptyExpression':function (node) {},
'JSXSpreadChild':function (node) {},
'JSXExpressionContainer':function (node) {},
'JSXSpreadAttribute':function (node) {},
'JSXAttribute':function (node) {},
'JSXIdentifier':function (node) {},
'JSXNamespacedName':function (node) {},
'JSXMemberExpression':function (node) {},
'JSXOpeningElement':function (node) {},
'JSXClosingElement':function (node) {},
'JSXElement':function (node) {},
}
module.exports=typeMap;
原文地址:https://www.cnblogs.com/caoke/p/11143747.html