oxc-parser 0.99.0 → 0.102.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,172 +4,172 @@
4
4
  // Mapping from node type name to node type ID
5
5
  export const NODE_TYPE_IDS_MAP = new Map([
6
6
  // Leaf nodes
7
- ['DebuggerStatement', 0],
8
- ['EmptyStatement', 1],
9
- ['Literal', 2],
10
- ['PrivateIdentifier', 3],
11
- ['Super', 4],
12
- ['TemplateElement', 5],
13
- ['ThisExpression', 6],
14
- ['JSXClosingFragment', 7],
15
- ['JSXEmptyExpression', 8],
16
- ['JSXIdentifier', 9],
17
- ['JSXOpeningFragment', 10],
18
- ['JSXText', 11],
19
- ['TSAnyKeyword', 12],
20
- ['TSBigIntKeyword', 13],
21
- ['TSBooleanKeyword', 14],
22
- ['TSIntrinsicKeyword', 15],
23
- ['TSJSDocUnknownType', 16],
24
- ['TSNeverKeyword', 17],
25
- ['TSNullKeyword', 18],
26
- ['TSNumberKeyword', 19],
27
- ['TSObjectKeyword', 20],
28
- ['TSStringKeyword', 21],
29
- ['TSSymbolKeyword', 22],
30
- ['TSThisType', 23],
31
- ['TSUndefinedKeyword', 24],
32
- ['TSUnknownKeyword', 25],
33
- ['TSVoidKeyword', 26],
7
+ ["DebuggerStatement", 0],
8
+ ["EmptyStatement", 1],
9
+ ["Literal", 2],
10
+ ["PrivateIdentifier", 3],
11
+ ["Super", 4],
12
+ ["TemplateElement", 5],
13
+ ["ThisExpression", 6],
14
+ ["JSXClosingFragment", 7],
15
+ ["JSXEmptyExpression", 8],
16
+ ["JSXIdentifier", 9],
17
+ ["JSXOpeningFragment", 10],
18
+ ["JSXText", 11],
19
+ ["TSAnyKeyword", 12],
20
+ ["TSBigIntKeyword", 13],
21
+ ["TSBooleanKeyword", 14],
22
+ ["TSIntrinsicKeyword", 15],
23
+ ["TSJSDocUnknownType", 16],
24
+ ["TSNeverKeyword", 17],
25
+ ["TSNullKeyword", 18],
26
+ ["TSNumberKeyword", 19],
27
+ ["TSObjectKeyword", 20],
28
+ ["TSStringKeyword", 21],
29
+ ["TSSymbolKeyword", 22],
30
+ ["TSThisType", 23],
31
+ ["TSUndefinedKeyword", 24],
32
+ ["TSUnknownKeyword", 25],
33
+ ["TSVoidKeyword", 26],
34
34
  // Non-leaf nodes
35
- ['AccessorProperty', 27],
36
- ['ArrayExpression', 28],
37
- ['ArrayPattern', 29],
38
- ['ArrowFunctionExpression', 30],
39
- ['AssignmentExpression', 31],
40
- ['AssignmentPattern', 32],
41
- ['AwaitExpression', 33],
42
- ['BinaryExpression', 34],
43
- ['BlockStatement', 35],
44
- ['BreakStatement', 36],
45
- ['CallExpression', 37],
46
- ['CatchClause', 38],
47
- ['ChainExpression', 39],
48
- ['ClassBody', 40],
49
- ['ClassDeclaration', 41],
50
- ['ClassExpression', 42],
51
- ['ConditionalExpression', 43],
52
- ['ContinueStatement', 44],
53
- ['Decorator', 45],
54
- ['DoWhileStatement', 46],
55
- ['ExportAllDeclaration', 47],
56
- ['ExportDefaultDeclaration', 48],
57
- ['ExportNamedDeclaration', 49],
58
- ['ExportSpecifier', 50],
59
- ['ExpressionStatement', 51],
60
- ['ForInStatement', 52],
61
- ['ForOfStatement', 53],
62
- ['ForStatement', 54],
63
- ['FunctionDeclaration', 55],
64
- ['FunctionExpression', 56],
65
- ['Identifier', 57],
66
- ['IfStatement', 58],
67
- ['ImportAttribute', 59],
68
- ['ImportDeclaration', 60],
69
- ['ImportDefaultSpecifier', 61],
70
- ['ImportExpression', 62],
71
- ['ImportNamespaceSpecifier', 63],
72
- ['ImportSpecifier', 64],
73
- ['LabeledStatement', 65],
74
- ['LogicalExpression', 66],
75
- ['MemberExpression', 67],
76
- ['MetaProperty', 68],
77
- ['MethodDefinition', 69],
78
- ['NewExpression', 70],
79
- ['ObjectExpression', 71],
80
- ['ObjectPattern', 72],
81
- ['ParenthesizedExpression', 73],
82
- ['Program', 74],
83
- ['Property', 75],
84
- ['PropertyDefinition', 76],
85
- ['RestElement', 77],
86
- ['ReturnStatement', 78],
87
- ['SequenceExpression', 79],
88
- ['SpreadElement', 80],
89
- ['StaticBlock', 81],
90
- ['SwitchCase', 82],
91
- ['SwitchStatement', 83],
92
- ['TaggedTemplateExpression', 84],
93
- ['TemplateLiteral', 85],
94
- ['ThrowStatement', 86],
95
- ['TryStatement', 87],
96
- ['UnaryExpression', 88],
97
- ['UpdateExpression', 89],
98
- ['V8IntrinsicExpression', 90],
99
- ['VariableDeclaration', 91],
100
- ['VariableDeclarator', 92],
101
- ['WhileStatement', 93],
102
- ['WithStatement', 94],
103
- ['YieldExpression', 95],
104
- ['JSXAttribute', 96],
105
- ['JSXClosingElement', 97],
106
- ['JSXElement', 98],
107
- ['JSXExpressionContainer', 99],
108
- ['JSXFragment', 100],
109
- ['JSXMemberExpression', 101],
110
- ['JSXNamespacedName', 102],
111
- ['JSXOpeningElement', 103],
112
- ['JSXSpreadAttribute', 104],
113
- ['JSXSpreadChild', 105],
114
- ['TSAbstractAccessorProperty', 106],
115
- ['TSAbstractMethodDefinition', 107],
116
- ['TSAbstractPropertyDefinition', 108],
117
- ['TSArrayType', 109],
118
- ['TSAsExpression', 110],
119
- ['TSCallSignatureDeclaration', 111],
120
- ['TSClassImplements', 112],
121
- ['TSConditionalType', 113],
122
- ['TSConstructSignatureDeclaration', 114],
123
- ['TSConstructorType', 115],
124
- ['TSDeclareFunction', 116],
125
- ['TSEmptyBodyFunctionExpression', 117],
126
- ['TSEnumBody', 118],
127
- ['TSEnumDeclaration', 119],
128
- ['TSEnumMember', 120],
129
- ['TSExportAssignment', 121],
130
- ['TSExternalModuleReference', 122],
131
- ['TSFunctionType', 123],
132
- ['TSImportEqualsDeclaration', 124],
133
- ['TSImportType', 125],
134
- ['TSIndexSignature', 126],
135
- ['TSIndexedAccessType', 127],
136
- ['TSInferType', 128],
137
- ['TSInstantiationExpression', 129],
138
- ['TSInterfaceBody', 130],
139
- ['TSInterfaceDeclaration', 131],
140
- ['TSInterfaceHeritage', 132],
141
- ['TSIntersectionType', 133],
142
- ['TSJSDocNonNullableType', 134],
143
- ['TSJSDocNullableType', 135],
144
- ['TSLiteralType', 136],
145
- ['TSMappedType', 137],
146
- ['TSMethodSignature', 138],
147
- ['TSModuleBlock', 139],
148
- ['TSModuleDeclaration', 140],
149
- ['TSNamedTupleMember', 141],
150
- ['TSNamespaceExportDeclaration', 142],
151
- ['TSNonNullExpression', 143],
152
- ['TSOptionalType', 144],
153
- ['TSParameterProperty', 145],
154
- ['TSParenthesizedType', 146],
155
- ['TSPropertySignature', 147],
156
- ['TSQualifiedName', 148],
157
- ['TSRestType', 149],
158
- ['TSSatisfiesExpression', 150],
159
- ['TSTemplateLiteralType', 151],
160
- ['TSTupleType', 152],
161
- ['TSTypeAliasDeclaration', 153],
162
- ['TSTypeAnnotation', 154],
163
- ['TSTypeAssertion', 155],
164
- ['TSTypeLiteral', 156],
165
- ['TSTypeOperator', 157],
166
- ['TSTypeParameter', 158],
167
- ['TSTypeParameterDeclaration', 159],
168
- ['TSTypeParameterInstantiation', 160],
169
- ['TSTypePredicate', 161],
170
- ['TSTypeQuery', 162],
171
- ['TSTypeReference', 163],
172
- ['TSUnionType', 164],
35
+ ["AccessorProperty", 27],
36
+ ["ArrayExpression", 28],
37
+ ["ArrayPattern", 29],
38
+ ["ArrowFunctionExpression", 30],
39
+ ["AssignmentExpression", 31],
40
+ ["AssignmentPattern", 32],
41
+ ["AwaitExpression", 33],
42
+ ["BinaryExpression", 34],
43
+ ["BlockStatement", 35],
44
+ ["BreakStatement", 36],
45
+ ["CallExpression", 37],
46
+ ["CatchClause", 38],
47
+ ["ChainExpression", 39],
48
+ ["ClassBody", 40],
49
+ ["ClassDeclaration", 41],
50
+ ["ClassExpression", 42],
51
+ ["ConditionalExpression", 43],
52
+ ["ContinueStatement", 44],
53
+ ["Decorator", 45],
54
+ ["DoWhileStatement", 46],
55
+ ["ExportAllDeclaration", 47],
56
+ ["ExportDefaultDeclaration", 48],
57
+ ["ExportNamedDeclaration", 49],
58
+ ["ExportSpecifier", 50],
59
+ ["ExpressionStatement", 51],
60
+ ["ForInStatement", 52],
61
+ ["ForOfStatement", 53],
62
+ ["ForStatement", 54],
63
+ ["FunctionDeclaration", 55],
64
+ ["FunctionExpression", 56],
65
+ ["Identifier", 57],
66
+ ["IfStatement", 58],
67
+ ["ImportAttribute", 59],
68
+ ["ImportDeclaration", 60],
69
+ ["ImportDefaultSpecifier", 61],
70
+ ["ImportExpression", 62],
71
+ ["ImportNamespaceSpecifier", 63],
72
+ ["ImportSpecifier", 64],
73
+ ["LabeledStatement", 65],
74
+ ["LogicalExpression", 66],
75
+ ["MemberExpression", 67],
76
+ ["MetaProperty", 68],
77
+ ["MethodDefinition", 69],
78
+ ["NewExpression", 70],
79
+ ["ObjectExpression", 71],
80
+ ["ObjectPattern", 72],
81
+ ["ParenthesizedExpression", 73],
82
+ ["Program", 74],
83
+ ["Property", 75],
84
+ ["PropertyDefinition", 76],
85
+ ["RestElement", 77],
86
+ ["ReturnStatement", 78],
87
+ ["SequenceExpression", 79],
88
+ ["SpreadElement", 80],
89
+ ["StaticBlock", 81],
90
+ ["SwitchCase", 82],
91
+ ["SwitchStatement", 83],
92
+ ["TaggedTemplateExpression", 84],
93
+ ["TemplateLiteral", 85],
94
+ ["ThrowStatement", 86],
95
+ ["TryStatement", 87],
96
+ ["UnaryExpression", 88],
97
+ ["UpdateExpression", 89],
98
+ ["V8IntrinsicExpression", 90],
99
+ ["VariableDeclaration", 91],
100
+ ["VariableDeclarator", 92],
101
+ ["WhileStatement", 93],
102
+ ["WithStatement", 94],
103
+ ["YieldExpression", 95],
104
+ ["JSXAttribute", 96],
105
+ ["JSXClosingElement", 97],
106
+ ["JSXElement", 98],
107
+ ["JSXExpressionContainer", 99],
108
+ ["JSXFragment", 100],
109
+ ["JSXMemberExpression", 101],
110
+ ["JSXNamespacedName", 102],
111
+ ["JSXOpeningElement", 103],
112
+ ["JSXSpreadAttribute", 104],
113
+ ["JSXSpreadChild", 105],
114
+ ["TSAbstractAccessorProperty", 106],
115
+ ["TSAbstractMethodDefinition", 107],
116
+ ["TSAbstractPropertyDefinition", 108],
117
+ ["TSArrayType", 109],
118
+ ["TSAsExpression", 110],
119
+ ["TSCallSignatureDeclaration", 111],
120
+ ["TSClassImplements", 112],
121
+ ["TSConditionalType", 113],
122
+ ["TSConstructSignatureDeclaration", 114],
123
+ ["TSConstructorType", 115],
124
+ ["TSDeclareFunction", 116],
125
+ ["TSEmptyBodyFunctionExpression", 117],
126
+ ["TSEnumBody", 118],
127
+ ["TSEnumDeclaration", 119],
128
+ ["TSEnumMember", 120],
129
+ ["TSExportAssignment", 121],
130
+ ["TSExternalModuleReference", 122],
131
+ ["TSFunctionType", 123],
132
+ ["TSImportEqualsDeclaration", 124],
133
+ ["TSImportType", 125],
134
+ ["TSIndexSignature", 126],
135
+ ["TSIndexedAccessType", 127],
136
+ ["TSInferType", 128],
137
+ ["TSInstantiationExpression", 129],
138
+ ["TSInterfaceBody", 130],
139
+ ["TSInterfaceDeclaration", 131],
140
+ ["TSInterfaceHeritage", 132],
141
+ ["TSIntersectionType", 133],
142
+ ["TSJSDocNonNullableType", 134],
143
+ ["TSJSDocNullableType", 135],
144
+ ["TSLiteralType", 136],
145
+ ["TSMappedType", 137],
146
+ ["TSMethodSignature", 138],
147
+ ["TSModuleBlock", 139],
148
+ ["TSModuleDeclaration", 140],
149
+ ["TSNamedTupleMember", 141],
150
+ ["TSNamespaceExportDeclaration", 142],
151
+ ["TSNonNullExpression", 143],
152
+ ["TSOptionalType", 144],
153
+ ["TSParameterProperty", 145],
154
+ ["TSParenthesizedType", 146],
155
+ ["TSPropertySignature", 147],
156
+ ["TSQualifiedName", 148],
157
+ ["TSRestType", 149],
158
+ ["TSSatisfiesExpression", 150],
159
+ ["TSTemplateLiteralType", 151],
160
+ ["TSTupleType", 152],
161
+ ["TSTypeAliasDeclaration", 153],
162
+ ["TSTypeAnnotation", 154],
163
+ ["TSTypeAssertion", 155],
164
+ ["TSTypeLiteral", 156],
165
+ ["TSTypeOperator", 157],
166
+ ["TSTypeParameter", 158],
167
+ ["TSTypeParameterDeclaration", 159],
168
+ ["TSTypeParameterInstantiation", 160],
169
+ ["TSTypePredicate", 161],
170
+ ["TSTypeQuery", 162],
171
+ ["TSTypeReference", 163],
172
+ ["TSUnionType", 164],
173
173
  ]);
174
174
 
175
175
  export const NODE_TYPES_COUNT = 165;