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.
- package/generated/deserialize/js.js +331 -329
- package/generated/deserialize/js_range.js +331 -329
- package/generated/deserialize/ts.js +347 -341
- package/generated/deserialize/ts_range.js +347 -341
- package/generated/lazy/constructors.js +549 -496
- package/generated/lazy/type_ids.js +180 -180
- package/generated/lazy/walk.js +11 -7
- package/generated/visit/keys.js +214 -166
- package/generated/visit/type_ids.js +165 -165
- package/generated/visit/visitor.d.ts +171 -167
- package/generated/visit/walk.js +165 -165
- package/package.json +26 -26
- package/src-js/bindings.js +52 -52
- package/src-js/index.d.ts +19 -19
- package/src-js/index.js +9 -9
- package/src-js/raw-transfer/common.js +12 -8
- package/src-js/raw-transfer/eager.js +18 -16
- package/src-js/raw-transfer/lazy-common.js +1 -1
- package/src-js/raw-transfer/lazy.js +10 -12
- package/src-js/raw-transfer/node-array.js +16 -10
- package/src-js/raw-transfer/supported.js +2 -2
- package/src-js/raw-transfer/visitor.js +9 -5
- package/src-js/visit/index.js +7 -3
- package/src-js/visit/visitor.js +11 -6
- package/src-js/wasm.js +3 -3
- package/src-js/webcontainer-fallback.cjs +7 -7
|
@@ -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
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
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
|
-
[
|
|
36
|
-
[
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
42
|
-
[
|
|
43
|
-
[
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
47
|
-
[
|
|
48
|
-
[
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[
|
|
52
|
-
[
|
|
53
|
-
[
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
59
|
-
[
|
|
60
|
-
[
|
|
61
|
-
[
|
|
62
|
-
[
|
|
63
|
-
[
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
67
|
-
[
|
|
68
|
-
[
|
|
69
|
-
[
|
|
70
|
-
[
|
|
71
|
-
[
|
|
72
|
-
[
|
|
73
|
-
[
|
|
74
|
-
[
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
[
|
|
81
|
-
[
|
|
82
|
-
[
|
|
83
|
-
[
|
|
84
|
-
[
|
|
85
|
-
[
|
|
86
|
-
[
|
|
87
|
-
[
|
|
88
|
-
[
|
|
89
|
-
[
|
|
90
|
-
[
|
|
91
|
-
[
|
|
92
|
-
[
|
|
93
|
-
[
|
|
94
|
-
[
|
|
95
|
-
[
|
|
96
|
-
[
|
|
97
|
-
[
|
|
98
|
-
[
|
|
99
|
-
[
|
|
100
|
-
[
|
|
101
|
-
[
|
|
102
|
-
[
|
|
103
|
-
[
|
|
104
|
-
[
|
|
105
|
-
[
|
|
106
|
-
[
|
|
107
|
-
[
|
|
108
|
-
[
|
|
109
|
-
[
|
|
110
|
-
[
|
|
111
|
-
[
|
|
112
|
-
[
|
|
113
|
-
[
|
|
114
|
-
[
|
|
115
|
-
[
|
|
116
|
-
[
|
|
117
|
-
[
|
|
118
|
-
[
|
|
119
|
-
[
|
|
120
|
-
[
|
|
121
|
-
[
|
|
122
|
-
[
|
|
123
|
-
[
|
|
124
|
-
[
|
|
125
|
-
[
|
|
126
|
-
[
|
|
127
|
-
[
|
|
128
|
-
[
|
|
129
|
-
[
|
|
130
|
-
[
|
|
131
|
-
[
|
|
132
|
-
[
|
|
133
|
-
[
|
|
134
|
-
[
|
|
135
|
-
[
|
|
136
|
-
[
|
|
137
|
-
[
|
|
138
|
-
[
|
|
139
|
-
[
|
|
140
|
-
[
|
|
141
|
-
[
|
|
142
|
-
[
|
|
143
|
-
[
|
|
144
|
-
[
|
|
145
|
-
[
|
|
146
|
-
[
|
|
147
|
-
[
|
|
148
|
-
[
|
|
149
|
-
[
|
|
150
|
-
[
|
|
151
|
-
[
|
|
152
|
-
[
|
|
153
|
-
[
|
|
154
|
-
[
|
|
155
|
-
[
|
|
156
|
-
[
|
|
157
|
-
[
|
|
158
|
-
[
|
|
159
|
-
[
|
|
160
|
-
[
|
|
161
|
-
[
|
|
162
|
-
[
|
|
163
|
-
[
|
|
164
|
-
[
|
|
165
|
-
[
|
|
166
|
-
[
|
|
167
|
-
[
|
|
168
|
-
[
|
|
169
|
-
[
|
|
170
|
-
[
|
|
171
|
-
[
|
|
172
|
-
[
|
|
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;
|