oxc-parser 0.80.0 → 0.82.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 +30 -5
- package/generated/deserialize/ts.js +30 -5
- package/generated/lazy/constructors.js +73 -5
- package/generated/lazy/types.js +18 -17
- package/generated/lazy/walk.js +53 -20
- package/package.json +19 -19
|
@@ -987,7 +987,7 @@ function deserializeExportNamedDeclaration(pos) {
|
|
|
987
987
|
function deserializeExportDefaultDeclaration(pos) {
|
|
988
988
|
return {
|
|
989
989
|
type: 'ExportDefaultDeclaration',
|
|
990
|
-
declaration: deserializeExportDefaultDeclarationKind(pos +
|
|
990
|
+
declaration: deserializeExportDefaultDeclarationKind(pos + 8),
|
|
991
991
|
start: deserializeU32(pos),
|
|
992
992
|
end: deserializeU32(pos + 4),
|
|
993
993
|
};
|
|
@@ -1878,13 +1878,23 @@ function deserializeTSImportType(pos) {
|
|
|
1878
1878
|
type: 'TSImportType',
|
|
1879
1879
|
argument: deserializeTSType(pos + 8),
|
|
1880
1880
|
options: deserializeOptionBoxObjectExpression(pos + 24),
|
|
1881
|
-
qualifier:
|
|
1881
|
+
qualifier: deserializeOptionTSImportTypeQualifier(pos + 32),
|
|
1882
1882
|
typeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 48),
|
|
1883
1883
|
start: deserializeU32(pos),
|
|
1884
1884
|
end: deserializeU32(pos + 4),
|
|
1885
1885
|
};
|
|
1886
1886
|
}
|
|
1887
1887
|
|
|
1888
|
+
function deserializeTSImportTypeQualifiedName(pos) {
|
|
1889
|
+
return {
|
|
1890
|
+
type: 'TSQualifiedName',
|
|
1891
|
+
left: deserializeTSImportTypeQualifier(pos + 8),
|
|
1892
|
+
right: deserializeIdentifierName(pos + 24),
|
|
1893
|
+
start: deserializeU32(pos),
|
|
1894
|
+
end: deserializeU32(pos + 4),
|
|
1895
|
+
};
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1888
1898
|
function deserializeTSFunctionType(pos) {
|
|
1889
1899
|
const params = deserializeBoxFormalParameters(pos + 24);
|
|
1890
1900
|
const thisParam = deserializeOptionBoxTSThisParameter(pos + 16);
|
|
@@ -3750,6 +3760,17 @@ function deserializeTSTypeQueryExprName(pos) {
|
|
|
3750
3760
|
}
|
|
3751
3761
|
}
|
|
3752
3762
|
|
|
3763
|
+
function deserializeTSImportTypeQualifier(pos) {
|
|
3764
|
+
switch (uint8[pos]) {
|
|
3765
|
+
case 0:
|
|
3766
|
+
return deserializeBoxIdentifierName(pos + 8);
|
|
3767
|
+
case 1:
|
|
3768
|
+
return deserializeBoxTSImportTypeQualifiedName(pos + 8);
|
|
3769
|
+
default:
|
|
3770
|
+
throw new Error(`Unexpected discriminant ${uint8[pos]} for TSImportTypeQualifier`);
|
|
3771
|
+
}
|
|
3772
|
+
}
|
|
3773
|
+
|
|
3753
3774
|
function deserializeTSMappedTypeModifierOperator(pos) {
|
|
3754
3775
|
switch (uint8[pos]) {
|
|
3755
3776
|
case 0:
|
|
@@ -5228,9 +5249,13 @@ function deserializeOptionBoxObjectExpression(pos) {
|
|
|
5228
5249
|
return deserializeBoxObjectExpression(pos);
|
|
5229
5250
|
}
|
|
5230
5251
|
|
|
5231
|
-
function
|
|
5232
|
-
if (uint8[pos] ===
|
|
5233
|
-
return
|
|
5252
|
+
function deserializeOptionTSImportTypeQualifier(pos) {
|
|
5253
|
+
if (uint8[pos] === 2) return null;
|
|
5254
|
+
return deserializeTSImportTypeQualifier(pos);
|
|
5255
|
+
}
|
|
5256
|
+
|
|
5257
|
+
function deserializeBoxTSImportTypeQualifiedName(pos) {
|
|
5258
|
+
return deserializeTSImportTypeQualifiedName(uint32[pos >> 2]);
|
|
5234
5259
|
}
|
|
5235
5260
|
|
|
5236
5261
|
function deserializeOptionTSMappedTypeModifierOperator(pos) {
|
|
@@ -1116,7 +1116,7 @@ function deserializeExportNamedDeclaration(pos) {
|
|
|
1116
1116
|
function deserializeExportDefaultDeclaration(pos) {
|
|
1117
1117
|
return {
|
|
1118
1118
|
type: 'ExportDefaultDeclaration',
|
|
1119
|
-
declaration: deserializeExportDefaultDeclarationKind(pos +
|
|
1119
|
+
declaration: deserializeExportDefaultDeclarationKind(pos + 8),
|
|
1120
1120
|
exportKind: 'value',
|
|
1121
1121
|
start: deserializeU32(pos),
|
|
1122
1122
|
end: deserializeU32(pos + 4),
|
|
@@ -2009,13 +2009,23 @@ function deserializeTSImportType(pos) {
|
|
|
2009
2009
|
type: 'TSImportType',
|
|
2010
2010
|
argument: deserializeTSType(pos + 8),
|
|
2011
2011
|
options: deserializeOptionBoxObjectExpression(pos + 24),
|
|
2012
|
-
qualifier:
|
|
2012
|
+
qualifier: deserializeOptionTSImportTypeQualifier(pos + 32),
|
|
2013
2013
|
typeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 48),
|
|
2014
2014
|
start: deserializeU32(pos),
|
|
2015
2015
|
end: deserializeU32(pos + 4),
|
|
2016
2016
|
};
|
|
2017
2017
|
}
|
|
2018
2018
|
|
|
2019
|
+
function deserializeTSImportTypeQualifiedName(pos) {
|
|
2020
|
+
return {
|
|
2021
|
+
type: 'TSQualifiedName',
|
|
2022
|
+
left: deserializeTSImportTypeQualifier(pos + 8),
|
|
2023
|
+
right: deserializeIdentifierName(pos + 24),
|
|
2024
|
+
start: deserializeU32(pos),
|
|
2025
|
+
end: deserializeU32(pos + 4),
|
|
2026
|
+
};
|
|
2027
|
+
}
|
|
2028
|
+
|
|
2019
2029
|
function deserializeTSFunctionType(pos) {
|
|
2020
2030
|
const params = deserializeBoxFormalParameters(pos + 24);
|
|
2021
2031
|
const thisParam = deserializeOptionBoxTSThisParameter(pos + 16);
|
|
@@ -3881,6 +3891,17 @@ function deserializeTSTypeQueryExprName(pos) {
|
|
|
3881
3891
|
}
|
|
3882
3892
|
}
|
|
3883
3893
|
|
|
3894
|
+
function deserializeTSImportTypeQualifier(pos) {
|
|
3895
|
+
switch (uint8[pos]) {
|
|
3896
|
+
case 0:
|
|
3897
|
+
return deserializeBoxIdentifierName(pos + 8);
|
|
3898
|
+
case 1:
|
|
3899
|
+
return deserializeBoxTSImportTypeQualifiedName(pos + 8);
|
|
3900
|
+
default:
|
|
3901
|
+
throw new Error(`Unexpected discriminant ${uint8[pos]} for TSImportTypeQualifier`);
|
|
3902
|
+
}
|
|
3903
|
+
}
|
|
3904
|
+
|
|
3884
3905
|
function deserializeTSMappedTypeModifierOperator(pos) {
|
|
3885
3906
|
switch (uint8[pos]) {
|
|
3886
3907
|
case 0:
|
|
@@ -5359,9 +5380,13 @@ function deserializeOptionBoxObjectExpression(pos) {
|
|
|
5359
5380
|
return deserializeBoxObjectExpression(pos);
|
|
5360
5381
|
}
|
|
5361
5382
|
|
|
5362
|
-
function
|
|
5363
|
-
if (uint8[pos] ===
|
|
5364
|
-
return
|
|
5383
|
+
function deserializeOptionTSImportTypeQualifier(pos) {
|
|
5384
|
+
if (uint8[pos] === 2) return null;
|
|
5385
|
+
return deserializeTSImportTypeQualifier(pos);
|
|
5386
|
+
}
|
|
5387
|
+
|
|
5388
|
+
function deserializeBoxTSImportTypeQualifiedName(pos) {
|
|
5389
|
+
return deserializeTSImportTypeQualifiedName(uint32[pos >> 2]);
|
|
5365
5390
|
}
|
|
5366
5391
|
|
|
5367
5392
|
function deserializeOptionTSMappedTypeModifierOperator(pos) {
|
|
@@ -5965,7 +5965,7 @@ class ExportDefaultDeclaration {
|
|
|
5965
5965
|
|
|
5966
5966
|
get declaration() {
|
|
5967
5967
|
const internal = this.#internal;
|
|
5968
|
-
return constructExportDefaultDeclarationKind(internal.pos +
|
|
5968
|
+
return constructExportDefaultDeclarationKind(internal.pos + 8, internal.ast);
|
|
5969
5969
|
}
|
|
5970
5970
|
|
|
5971
5971
|
toJSON() {
|
|
@@ -10650,7 +10650,7 @@ class TSImportType {
|
|
|
10650
10650
|
|
|
10651
10651
|
get qualifier() {
|
|
10652
10652
|
const internal = this.#internal;
|
|
10653
|
-
return
|
|
10653
|
+
return constructOptionTSImportTypeQualifier(internal.pos + 32, internal.ast);
|
|
10654
10654
|
}
|
|
10655
10655
|
|
|
10656
10656
|
get typeArguments() {
|
|
@@ -10677,6 +10677,69 @@ class TSImportType {
|
|
|
10677
10677
|
|
|
10678
10678
|
const DebugTSImportType = class TSImportType {};
|
|
10679
10679
|
|
|
10680
|
+
function constructTSImportTypeQualifier(pos, ast) {
|
|
10681
|
+
switch (ast.buffer[pos]) {
|
|
10682
|
+
case 0:
|
|
10683
|
+
return constructBoxIdentifierName(pos + 8, ast);
|
|
10684
|
+
case 1:
|
|
10685
|
+
return constructBoxTSImportTypeQualifiedName(pos + 8, ast);
|
|
10686
|
+
default:
|
|
10687
|
+
throw new Error(`Unexpected discriminant ${ast.buffer[pos]} for TSImportTypeQualifier`);
|
|
10688
|
+
}
|
|
10689
|
+
}
|
|
10690
|
+
|
|
10691
|
+
class TSImportTypeQualifiedName {
|
|
10692
|
+
type = 'TSImportTypeQualifiedName';
|
|
10693
|
+
#internal;
|
|
10694
|
+
|
|
10695
|
+
constructor(pos, ast) {
|
|
10696
|
+
if (ast?.token !== TOKEN) constructorError();
|
|
10697
|
+
|
|
10698
|
+
const { nodes } = ast;
|
|
10699
|
+
const cached = nodes.get(pos);
|
|
10700
|
+
if (cached !== void 0) return cached;
|
|
10701
|
+
|
|
10702
|
+
this.#internal = { pos, ast };
|
|
10703
|
+
nodes.set(pos, this);
|
|
10704
|
+
}
|
|
10705
|
+
|
|
10706
|
+
get start() {
|
|
10707
|
+
const internal = this.#internal;
|
|
10708
|
+
return constructU32(internal.pos, internal.ast);
|
|
10709
|
+
}
|
|
10710
|
+
|
|
10711
|
+
get end() {
|
|
10712
|
+
const internal = this.#internal;
|
|
10713
|
+
return constructU32(internal.pos + 4, internal.ast);
|
|
10714
|
+
}
|
|
10715
|
+
|
|
10716
|
+
get left() {
|
|
10717
|
+
const internal = this.#internal;
|
|
10718
|
+
return constructTSImportTypeQualifier(internal.pos + 8, internal.ast);
|
|
10719
|
+
}
|
|
10720
|
+
|
|
10721
|
+
get right() {
|
|
10722
|
+
const internal = this.#internal;
|
|
10723
|
+
return new IdentifierName(internal.pos + 24, internal.ast);
|
|
10724
|
+
}
|
|
10725
|
+
|
|
10726
|
+
toJSON() {
|
|
10727
|
+
return {
|
|
10728
|
+
type: 'TSImportTypeQualifiedName',
|
|
10729
|
+
start: this.start,
|
|
10730
|
+
end: this.end,
|
|
10731
|
+
left: this.left,
|
|
10732
|
+
right: this.right,
|
|
10733
|
+
};
|
|
10734
|
+
}
|
|
10735
|
+
|
|
10736
|
+
[inspectSymbol]() {
|
|
10737
|
+
return Object.setPrototypeOf(this.toJSON(), DebugTSImportTypeQualifiedName.prototype);
|
|
10738
|
+
}
|
|
10739
|
+
}
|
|
10740
|
+
|
|
10741
|
+
const DebugTSImportTypeQualifiedName = class TSImportTypeQualifiedName {};
|
|
10742
|
+
|
|
10680
10743
|
class TSFunctionType {
|
|
10681
10744
|
type = 'TSFunctionType';
|
|
10682
10745
|
#internal;
|
|
@@ -13742,9 +13805,13 @@ function constructOptionBoxObjectExpression(pos, ast) {
|
|
|
13742
13805
|
return constructBoxObjectExpression(pos, ast);
|
|
13743
13806
|
}
|
|
13744
13807
|
|
|
13745
|
-
function
|
|
13746
|
-
if (ast.buffer[pos] ===
|
|
13747
|
-
return
|
|
13808
|
+
function constructOptionTSImportTypeQualifier(pos, ast) {
|
|
13809
|
+
if (ast.buffer[pos] === 2) return null;
|
|
13810
|
+
return constructTSImportTypeQualifier(pos, ast);
|
|
13811
|
+
}
|
|
13812
|
+
|
|
13813
|
+
function constructBoxTSImportTypeQualifiedName(pos, ast) {
|
|
13814
|
+
return new TSImportTypeQualifiedName(ast.buffer.uint32[pos >> 2], ast);
|
|
13748
13815
|
}
|
|
13749
13816
|
|
|
13750
13817
|
function constructOptionTSMappedTypeModifierOperator(pos, ast) {
|
|
@@ -14074,6 +14141,7 @@ module.exports = {
|
|
|
14074
14141
|
TSInferType,
|
|
14075
14142
|
TSTypeQuery,
|
|
14076
14143
|
TSImportType,
|
|
14144
|
+
TSImportTypeQualifiedName,
|
|
14077
14145
|
TSFunctionType,
|
|
14078
14146
|
TSConstructorType,
|
|
14079
14147
|
TSMappedType,
|
package/generated/lazy/types.js
CHANGED
|
@@ -169,25 +169,26 @@ const NODE_TYPE_IDS_MAP = new Map([
|
|
|
169
169
|
['TSInferType', 159],
|
|
170
170
|
['TSTypeQuery', 160],
|
|
171
171
|
['TSImportType', 161],
|
|
172
|
-
['
|
|
173
|
-
['
|
|
174
|
-
['
|
|
175
|
-
['
|
|
176
|
-
['
|
|
177
|
-
['
|
|
178
|
-
['
|
|
179
|
-
['
|
|
180
|
-
['
|
|
181
|
-
['
|
|
182
|
-
['
|
|
183
|
-
['
|
|
184
|
-
['
|
|
185
|
-
['
|
|
186
|
-
['
|
|
187
|
-
['
|
|
172
|
+
['TSImportTypeQualifiedName', 162],
|
|
173
|
+
['TSFunctionType', 163],
|
|
174
|
+
['TSConstructorType', 164],
|
|
175
|
+
['TSMappedType', 165],
|
|
176
|
+
['TSTemplateLiteralType', 166],
|
|
177
|
+
['TSAsExpression', 167],
|
|
178
|
+
['TSSatisfiesExpression', 168],
|
|
179
|
+
['TSTypeAssertion', 169],
|
|
180
|
+
['TSImportEqualsDeclaration', 170],
|
|
181
|
+
['TSExternalModuleReference', 171],
|
|
182
|
+
['TSNonNullExpression', 172],
|
|
183
|
+
['Decorator', 173],
|
|
184
|
+
['TSExportAssignment', 174],
|
|
185
|
+
['TSNamespaceExportDeclaration', 175],
|
|
186
|
+
['TSInstantiationExpression', 176],
|
|
187
|
+
['JSDocNullableType', 177],
|
|
188
|
+
['JSDocNonNullableType', 178],
|
|
188
189
|
]);
|
|
189
190
|
|
|
190
|
-
const NODE_TYPES_COUNT =
|
|
191
|
+
const NODE_TYPES_COUNT = 179,
|
|
191
192
|
LEAF_NODE_TYPES_COUNT = 38;
|
|
192
193
|
|
|
193
194
|
module.exports = {
|
package/generated/lazy/walk.js
CHANGED
|
@@ -165,6 +165,7 @@ const {
|
|
|
165
165
|
TSInferType,
|
|
166
166
|
TSTypeQuery,
|
|
167
167
|
TSImportType,
|
|
168
|
+
TSImportTypeQualifiedName,
|
|
168
169
|
TSFunctionType,
|
|
169
170
|
TSConstructorType,
|
|
170
171
|
TSMappedType,
|
|
@@ -2437,7 +2438,7 @@ function walkExportDefaultDeclaration(pos, ast, visitors) {
|
|
|
2437
2438
|
if (enter !== null) enter(node);
|
|
2438
2439
|
}
|
|
2439
2440
|
|
|
2440
|
-
walkExportDefaultDeclarationKind(pos +
|
|
2441
|
+
walkExportDefaultDeclarationKind(pos + 8, ast, visitors);
|
|
2441
2442
|
|
|
2442
2443
|
if (exit !== null) exit(node);
|
|
2443
2444
|
}
|
|
@@ -4122,15 +4123,43 @@ function walkTSImportType(pos, ast, visitors) {
|
|
|
4122
4123
|
|
|
4123
4124
|
walkTSType(pos + 8, ast, visitors);
|
|
4124
4125
|
walkOptionBoxObjectExpression(pos + 24, ast, visitors);
|
|
4125
|
-
|
|
4126
|
+
walkOptionTSImportTypeQualifier(pos + 32, ast, visitors);
|
|
4126
4127
|
walkOptionBoxTSTypeParameterInstantiation(pos + 48, ast, visitors);
|
|
4127
4128
|
|
|
4128
4129
|
if (exit !== null) exit(node);
|
|
4129
4130
|
}
|
|
4130
4131
|
|
|
4131
|
-
function
|
|
4132
|
+
function walkTSImportTypeQualifier(pos, ast, visitors) {
|
|
4133
|
+
switch (ast.buffer[pos]) {
|
|
4134
|
+
case 0:
|
|
4135
|
+
walkBoxIdentifierName(pos + 8, ast, visitors);
|
|
4136
|
+
return;
|
|
4137
|
+
case 1:
|
|
4138
|
+
walkBoxTSImportTypeQualifiedName(pos + 8, ast, visitors);
|
|
4139
|
+
return;
|
|
4140
|
+
default:
|
|
4141
|
+
throw new Error(`Unexpected discriminant ${ast.buffer[pos]} for TSImportTypeQualifier`);
|
|
4142
|
+
}
|
|
4143
|
+
}
|
|
4144
|
+
|
|
4145
|
+
function walkTSImportTypeQualifiedName(pos, ast, visitors) {
|
|
4132
4146
|
const enterExit = visitors[162];
|
|
4133
4147
|
let node, enter, exit = null;
|
|
4148
|
+
if (enterExit !== null) {
|
|
4149
|
+
({ enter, exit } = enterExit);
|
|
4150
|
+
node = new TSImportTypeQualifiedName(pos, ast);
|
|
4151
|
+
if (enter !== null) enter(node);
|
|
4152
|
+
}
|
|
4153
|
+
|
|
4154
|
+
walkTSImportTypeQualifier(pos + 8, ast, visitors);
|
|
4155
|
+
walkIdentifierName(pos + 24, ast, visitors);
|
|
4156
|
+
|
|
4157
|
+
if (exit !== null) exit(node);
|
|
4158
|
+
}
|
|
4159
|
+
|
|
4160
|
+
function walkTSFunctionType(pos, ast, visitors) {
|
|
4161
|
+
const enterExit = visitors[163];
|
|
4162
|
+
let node, enter, exit = null;
|
|
4134
4163
|
if (enterExit !== null) {
|
|
4135
4164
|
({ enter, exit } = enterExit);
|
|
4136
4165
|
node = new TSFunctionType(pos, ast);
|
|
@@ -4145,7 +4174,7 @@ function walkTSFunctionType(pos, ast, visitors) {
|
|
|
4145
4174
|
}
|
|
4146
4175
|
|
|
4147
4176
|
function walkTSConstructorType(pos, ast, visitors) {
|
|
4148
|
-
const enterExit = visitors[
|
|
4177
|
+
const enterExit = visitors[164];
|
|
4149
4178
|
let node, enter, exit = null;
|
|
4150
4179
|
if (enterExit !== null) {
|
|
4151
4180
|
({ enter, exit } = enterExit);
|
|
@@ -4161,7 +4190,7 @@ function walkTSConstructorType(pos, ast, visitors) {
|
|
|
4161
4190
|
}
|
|
4162
4191
|
|
|
4163
4192
|
function walkTSMappedType(pos, ast, visitors) {
|
|
4164
|
-
const enterExit = visitors[
|
|
4193
|
+
const enterExit = visitors[165];
|
|
4165
4194
|
let node, enter, exit = null;
|
|
4166
4195
|
if (enterExit !== null) {
|
|
4167
4196
|
({ enter, exit } = enterExit);
|
|
@@ -4176,7 +4205,7 @@ function walkTSMappedType(pos, ast, visitors) {
|
|
|
4176
4205
|
}
|
|
4177
4206
|
|
|
4178
4207
|
function walkTSTemplateLiteralType(pos, ast, visitors) {
|
|
4179
|
-
const enterExit = visitors[
|
|
4208
|
+
const enterExit = visitors[166];
|
|
4180
4209
|
let node, enter, exit = null;
|
|
4181
4210
|
if (enterExit !== null) {
|
|
4182
4211
|
({ enter, exit } = enterExit);
|
|
@@ -4191,7 +4220,7 @@ function walkTSTemplateLiteralType(pos, ast, visitors) {
|
|
|
4191
4220
|
}
|
|
4192
4221
|
|
|
4193
4222
|
function walkTSAsExpression(pos, ast, visitors) {
|
|
4194
|
-
const enterExit = visitors[
|
|
4223
|
+
const enterExit = visitors[167];
|
|
4195
4224
|
let node, enter, exit = null;
|
|
4196
4225
|
if (enterExit !== null) {
|
|
4197
4226
|
({ enter, exit } = enterExit);
|
|
@@ -4206,7 +4235,7 @@ function walkTSAsExpression(pos, ast, visitors) {
|
|
|
4206
4235
|
}
|
|
4207
4236
|
|
|
4208
4237
|
function walkTSSatisfiesExpression(pos, ast, visitors) {
|
|
4209
|
-
const enterExit = visitors[
|
|
4238
|
+
const enterExit = visitors[168];
|
|
4210
4239
|
let node, enter, exit = null;
|
|
4211
4240
|
if (enterExit !== null) {
|
|
4212
4241
|
({ enter, exit } = enterExit);
|
|
@@ -4221,7 +4250,7 @@ function walkTSSatisfiesExpression(pos, ast, visitors) {
|
|
|
4221
4250
|
}
|
|
4222
4251
|
|
|
4223
4252
|
function walkTSTypeAssertion(pos, ast, visitors) {
|
|
4224
|
-
const enterExit = visitors[
|
|
4253
|
+
const enterExit = visitors[169];
|
|
4225
4254
|
let node, enter, exit = null;
|
|
4226
4255
|
if (enterExit !== null) {
|
|
4227
4256
|
({ enter, exit } = enterExit);
|
|
@@ -4236,7 +4265,7 @@ function walkTSTypeAssertion(pos, ast, visitors) {
|
|
|
4236
4265
|
}
|
|
4237
4266
|
|
|
4238
4267
|
function walkTSImportEqualsDeclaration(pos, ast, visitors) {
|
|
4239
|
-
const enterExit = visitors[
|
|
4268
|
+
const enterExit = visitors[170];
|
|
4240
4269
|
let node, enter, exit = null;
|
|
4241
4270
|
if (enterExit !== null) {
|
|
4242
4271
|
({ enter, exit } = enterExit);
|
|
@@ -4270,7 +4299,7 @@ function walkTSModuleReference(pos, ast, visitors) {
|
|
|
4270
4299
|
}
|
|
4271
4300
|
|
|
4272
4301
|
function walkTSExternalModuleReference(pos, ast, visitors) {
|
|
4273
|
-
const enterExit = visitors[
|
|
4302
|
+
const enterExit = visitors[171];
|
|
4274
4303
|
let node, enter, exit = null;
|
|
4275
4304
|
if (enterExit !== null) {
|
|
4276
4305
|
({ enter, exit } = enterExit);
|
|
@@ -4284,7 +4313,7 @@ function walkTSExternalModuleReference(pos, ast, visitors) {
|
|
|
4284
4313
|
}
|
|
4285
4314
|
|
|
4286
4315
|
function walkTSNonNullExpression(pos, ast, visitors) {
|
|
4287
|
-
const enterExit = visitors[
|
|
4316
|
+
const enterExit = visitors[172];
|
|
4288
4317
|
let node, enter, exit = null;
|
|
4289
4318
|
if (enterExit !== null) {
|
|
4290
4319
|
({ enter, exit } = enterExit);
|
|
@@ -4298,7 +4327,7 @@ function walkTSNonNullExpression(pos, ast, visitors) {
|
|
|
4298
4327
|
}
|
|
4299
4328
|
|
|
4300
4329
|
function walkDecorator(pos, ast, visitors) {
|
|
4301
|
-
const enterExit = visitors[
|
|
4330
|
+
const enterExit = visitors[173];
|
|
4302
4331
|
let node, enter, exit = null;
|
|
4303
4332
|
if (enterExit !== null) {
|
|
4304
4333
|
({ enter, exit } = enterExit);
|
|
@@ -4312,7 +4341,7 @@ function walkDecorator(pos, ast, visitors) {
|
|
|
4312
4341
|
}
|
|
4313
4342
|
|
|
4314
4343
|
function walkTSExportAssignment(pos, ast, visitors) {
|
|
4315
|
-
const enterExit = visitors[
|
|
4344
|
+
const enterExit = visitors[174];
|
|
4316
4345
|
let node, enter, exit = null;
|
|
4317
4346
|
if (enterExit !== null) {
|
|
4318
4347
|
({ enter, exit } = enterExit);
|
|
@@ -4326,7 +4355,7 @@ function walkTSExportAssignment(pos, ast, visitors) {
|
|
|
4326
4355
|
}
|
|
4327
4356
|
|
|
4328
4357
|
function walkTSNamespaceExportDeclaration(pos, ast, visitors) {
|
|
4329
|
-
const enterExit = visitors[
|
|
4358
|
+
const enterExit = visitors[175];
|
|
4330
4359
|
let node, enter, exit = null;
|
|
4331
4360
|
if (enterExit !== null) {
|
|
4332
4361
|
({ enter, exit } = enterExit);
|
|
@@ -4340,7 +4369,7 @@ function walkTSNamespaceExportDeclaration(pos, ast, visitors) {
|
|
|
4340
4369
|
}
|
|
4341
4370
|
|
|
4342
4371
|
function walkTSInstantiationExpression(pos, ast, visitors) {
|
|
4343
|
-
const enterExit = visitors[
|
|
4372
|
+
const enterExit = visitors[176];
|
|
4344
4373
|
let node, enter, exit = null;
|
|
4345
4374
|
if (enterExit !== null) {
|
|
4346
4375
|
({ enter, exit } = enterExit);
|
|
@@ -4355,7 +4384,7 @@ function walkTSInstantiationExpression(pos, ast, visitors) {
|
|
|
4355
4384
|
}
|
|
4356
4385
|
|
|
4357
4386
|
function walkJSDocNullableType(pos, ast, visitors) {
|
|
4358
|
-
const enterExit = visitors[
|
|
4387
|
+
const enterExit = visitors[177];
|
|
4359
4388
|
let node, enter, exit = null;
|
|
4360
4389
|
if (enterExit !== null) {
|
|
4361
4390
|
({ enter, exit } = enterExit);
|
|
@@ -4369,7 +4398,7 @@ function walkJSDocNullableType(pos, ast, visitors) {
|
|
|
4369
4398
|
}
|
|
4370
4399
|
|
|
4371
4400
|
function walkJSDocNonNullableType(pos, ast, visitors) {
|
|
4372
|
-
const enterExit = visitors[
|
|
4401
|
+
const enterExit = visitors[178];
|
|
4373
4402
|
let node, enter, exit = null;
|
|
4374
4403
|
if (enterExit !== null) {
|
|
4375
4404
|
({ enter, exit } = enterExit);
|
|
@@ -5457,8 +5486,12 @@ function walkOptionBoxObjectExpression(pos, ast, visitors) {
|
|
|
5457
5486
|
}
|
|
5458
5487
|
}
|
|
5459
5488
|
|
|
5460
|
-
function
|
|
5461
|
-
if (!(ast.buffer[pos] ===
|
|
5489
|
+
function walkOptionTSImportTypeQualifier(pos, ast, visitors) {
|
|
5490
|
+
if (!(ast.buffer[pos] === 2)) walkTSImportTypeQualifier(pos, ast, visitors);
|
|
5491
|
+
}
|
|
5492
|
+
|
|
5493
|
+
function walkBoxTSImportTypeQualifiedName(pos, ast, visitors) {
|
|
5494
|
+
return walkTSImportTypeQualifiedName(ast.buffer.uint32[pos >> 2], ast, visitors);
|
|
5462
5495
|
}
|
|
5463
5496
|
|
|
5464
5497
|
function walkBoxTSExternalModuleReference(pos, ast, visitors) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxc-parser",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.82.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"browser": "wasm.mjs",
|
|
6
6
|
"engines": {
|
|
@@ -50,16 +50,16 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@oxc-project/types": "^0.
|
|
53
|
+
"@oxc-project/types": "^0.82.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@codspeed/vitest-plugin": "^4.0.0",
|
|
57
|
-
"@napi-rs/wasm-runtime": "
|
|
57
|
+
"@napi-rs/wasm-runtime": "1.0.0",
|
|
58
58
|
"@vitest/browser": "3.2.4",
|
|
59
59
|
"esbuild": "^0.25.0",
|
|
60
60
|
"playwright": "^1.51.0",
|
|
61
61
|
"tinypool": "^1.1.0",
|
|
62
|
-
"typescript": "5.
|
|
62
|
+
"typescript": "5.9.2",
|
|
63
63
|
"vitest": "3.2.4"
|
|
64
64
|
},
|
|
65
65
|
"napi": {
|
|
@@ -90,21 +90,21 @@
|
|
|
90
90
|
"dtsHeaderFile": "header.js"
|
|
91
91
|
},
|
|
92
92
|
"optionalDependencies": {
|
|
93
|
-
"@oxc-parser/binding-win32-x64-msvc": "0.
|
|
94
|
-
"@oxc-parser/binding-win32-arm64-msvc": "0.
|
|
95
|
-
"@oxc-parser/binding-linux-x64-gnu": "0.
|
|
96
|
-
"@oxc-parser/binding-linux-x64-musl": "0.
|
|
97
|
-
"@oxc-parser/binding-freebsd-x64": "0.
|
|
98
|
-
"@oxc-parser/binding-linux-arm64-gnu": "0.
|
|
99
|
-
"@oxc-parser/binding-linux-arm64-musl": "0.
|
|
100
|
-
"@oxc-parser/binding-linux-arm-gnueabihf": "0.
|
|
101
|
-
"@oxc-parser/binding-linux-arm-musleabihf": "0.
|
|
102
|
-
"@oxc-parser/binding-linux-s390x-gnu": "0.
|
|
103
|
-
"@oxc-parser/binding-linux-riscv64-gnu": "0.
|
|
104
|
-
"@oxc-parser/binding-darwin-x64": "0.
|
|
105
|
-
"@oxc-parser/binding-darwin-arm64": "0.
|
|
106
|
-
"@oxc-parser/binding-android-arm64": "0.
|
|
107
|
-
"@oxc-parser/binding-wasm32-wasi": "0.
|
|
93
|
+
"@oxc-parser/binding-win32-x64-msvc": "0.82.0",
|
|
94
|
+
"@oxc-parser/binding-win32-arm64-msvc": "0.82.0",
|
|
95
|
+
"@oxc-parser/binding-linux-x64-gnu": "0.82.0",
|
|
96
|
+
"@oxc-parser/binding-linux-x64-musl": "0.82.0",
|
|
97
|
+
"@oxc-parser/binding-freebsd-x64": "0.82.0",
|
|
98
|
+
"@oxc-parser/binding-linux-arm64-gnu": "0.82.0",
|
|
99
|
+
"@oxc-parser/binding-linux-arm64-musl": "0.82.0",
|
|
100
|
+
"@oxc-parser/binding-linux-arm-gnueabihf": "0.82.0",
|
|
101
|
+
"@oxc-parser/binding-linux-arm-musleabihf": "0.82.0",
|
|
102
|
+
"@oxc-parser/binding-linux-s390x-gnu": "0.82.0",
|
|
103
|
+
"@oxc-parser/binding-linux-riscv64-gnu": "0.82.0",
|
|
104
|
+
"@oxc-parser/binding-darwin-x64": "0.82.0",
|
|
105
|
+
"@oxc-parser/binding-darwin-arm64": "0.82.0",
|
|
106
|
+
"@oxc-parser/binding-android-arm64": "0.82.0",
|
|
107
|
+
"@oxc-parser/binding-wasm32-wasi": "0.82.0"
|
|
108
108
|
},
|
|
109
109
|
"scripts": {
|
|
110
110
|
"build-dev": "napi build --platform --js bindings.js",
|