oxc-parser 0.78.0 → 0.79.1

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.
@@ -3,16 +3,16 @@
3
3
 
4
4
  const BUFFER_SIZE = 2147483616,
5
5
  BUFFER_ALIGN = 4294967296,
6
- DATA_POINTER_POS_32 = 536870900,
6
+ DATA_POINTER_POS_32 = 536870902,
7
7
  IS_TS_FLAG_POS = 2147483612,
8
- SOURCE_LEN_POS_32 = 536870901,
9
- PROGRAM_OFFSET = 0;
8
+ PROGRAM_OFFSET = 0,
9
+ SOURCE_LEN_OFFSET = 16;
10
10
 
11
11
  module.exports = {
12
12
  BUFFER_SIZE,
13
13
  BUFFER_ALIGN,
14
14
  DATA_POINTER_POS_32,
15
15
  IS_TS_FLAG_POS,
16
- SOURCE_LEN_POS_32,
17
16
  PROGRAM_OFFSET,
17
+ SOURCE_LEN_OFFSET,
18
18
  };
@@ -20,7 +20,7 @@ function deserialize(buffer, sourceTextInput, sourceByteLenInput) {
20
20
  sourceByteLen = sourceByteLenInput;
21
21
  sourceIsAscii = sourceText.length === sourceByteLen;
22
22
 
23
- const data = deserializeRawTransferData(uint32[536870900]);
23
+ const data = deserializeRawTransferData(uint32[536870902]);
24
24
 
25
25
  uint8 =
26
26
  uint32 =
@@ -5238,16 +5238,16 @@ function deserializeBoxTSExternalModuleReference(pos) {
5238
5238
  return deserializeTSExternalModuleReference(uint32[pos >> 2]);
5239
5239
  }
5240
5240
 
5241
- function deserializeOptionNameSpan(pos) {
5242
- if (uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0) return null;
5243
- return deserializeNameSpan(pos);
5244
- }
5245
-
5246
5241
  function deserializeU64(pos) {
5247
5242
  const pos32 = pos >> 2;
5248
5243
  return uint32[pos32] + uint32[pos32 + 1] * 4294967296;
5249
5244
  }
5250
5245
 
5246
+ function deserializeOptionNameSpan(pos) {
5247
+ if (uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0) return null;
5248
+ return deserializeNameSpan(pos);
5249
+ }
5250
+
5251
5251
  function deserializeOptionU64(pos) {
5252
5252
  if (uint8[pos] === 0) return null;
5253
5253
  return deserializeU64(pos + 8);
@@ -20,7 +20,7 @@ function deserialize(buffer, sourceTextInput, sourceByteLenInput) {
20
20
  sourceByteLen = sourceByteLenInput;
21
21
  sourceIsAscii = sourceText.length === sourceByteLen;
22
22
 
23
- const data = deserializeRawTransferData(uint32[536870900]);
23
+ const data = deserializeRawTransferData(uint32[536870902]);
24
24
 
25
25
  uint8 =
26
26
  uint32 =
@@ -5369,16 +5369,16 @@ function deserializeBoxTSExternalModuleReference(pos) {
5369
5369
  return deserializeTSExternalModuleReference(uint32[pos >> 2]);
5370
5370
  }
5371
5371
 
5372
- function deserializeOptionNameSpan(pos) {
5373
- if (uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0) return null;
5374
- return deserializeNameSpan(pos);
5375
- }
5376
-
5377
5372
  function deserializeU64(pos) {
5378
5373
  const pos32 = pos >> 2;
5379
5374
  return uint32[pos32] + uint32[pos32 + 1] * 4294967296;
5380
5375
  }
5381
5376
 
5377
+ function deserializeOptionNameSpan(pos) {
5378
+ if (uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0) return null;
5379
+ return deserializeNameSpan(pos);
5380
+ }
5381
+
5382
5382
  function deserializeOptionU64(pos) {
5383
5383
  if (uint8[pos] === 0) return null;
5384
5384
  return deserializeU64(pos + 8);
@@ -13752,17 +13752,17 @@ function constructBoxTSExternalModuleReference(pos, ast) {
13752
13752
  return new TSExternalModuleReference(ast.buffer.uint32[pos >> 2], ast);
13753
13753
  }
13754
13754
 
13755
- function constructOptionNameSpan(pos, ast) {
13756
- if (ast.buffer.uint32[(pos + 8) >> 2] === 0 && ast.buffer.uint32[(pos + 12) >> 2] === 0) return null;
13757
- return new NameSpan(pos, ast);
13758
- }
13759
-
13760
13755
  function constructU64(pos, ast) {
13761
13756
  const { uint32 } = ast.buffer,
13762
13757
  pos32 = pos >> 2;
13763
13758
  return uint32[pos32] + uint32[pos32 + 1] * 4294967296;
13764
13759
  }
13765
13760
 
13761
+ function constructOptionNameSpan(pos, ast) {
13762
+ if (ast.buffer.uint32[(pos + 8) >> 2] === 0 && ast.buffer.uint32[(pos + 12) >> 2] === 0) return null;
13763
+ return new NameSpan(pos, ast);
13764
+ }
13765
+
13766
13766
  function constructOptionU64(pos, ast) {
13767
13767
  if (ast.buffer[pos] === 0) return null;
13768
13768
  return constructU64(pos + 8, ast);
@@ -187,8 +187,11 @@ const NODE_TYPE_IDS_MAP = new Map([
187
187
  ['JSDocNonNullableType', 177],
188
188
  ]);
189
189
 
190
+ const NODE_TYPES_COUNT = 178,
191
+ LEAF_NODE_TYPES_COUNT = 38;
192
+
190
193
  module.exports = {
191
194
  NODE_TYPE_IDS_MAP,
192
- NODE_TYPES_COUNT: 178,
193
- LEAF_NODE_TYPES_COUNT: 38,
195
+ NODE_TYPES_COUNT,
196
+ LEAF_NODE_TYPES_COUNT,
194
197
  };