oxc-parser 0.104.0 → 0.106.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.
@@ -1340,19 +1340,17 @@ function deserializeVariableDeclarationKind(pos) {
1340
1340
  }
1341
1341
 
1342
1342
  function deserializeVariableDeclarator(pos) {
1343
- let start = deserializeU32(pos),
1344
- end = deserializeU32(pos + 4),
1345
- node = {
1346
- type: "VariableDeclarator",
1347
- id: null,
1348
- init: null,
1349
- start,
1350
- end,
1351
- range: [start, end],
1352
- };
1353
- node.id = deserializeBindingPattern(pos + 8);
1354
- node.init = deserializeOptionExpression(pos + 40);
1355
- return node;
1343
+ let variableDeclarator = {
1344
+ type: "VariableDeclarator",
1345
+ id: null,
1346
+ init: null,
1347
+ start: deserializeU32(pos),
1348
+ end: deserializeU32(pos + 4),
1349
+ range: [deserializeU32(pos), deserializeU32(pos + 4)],
1350
+ };
1351
+ variableDeclarator.id = deserializeBindingPattern(pos + 8);
1352
+ variableDeclarator.init = deserializeOptionExpression(pos + 32);
1353
+ return variableDeclarator;
1356
1354
  }
1357
1355
 
1358
1356
  function deserializeEmptyStatement(pos) {
@@ -1761,7 +1759,7 @@ function deserializeCatchClause(pos) {
1761
1759
  range: [start, end],
1762
1760
  };
1763
1761
  node.param = deserializeOptionCatchParameter(pos + 8);
1764
- node.body = deserializeBoxBlockStatement(pos + 48);
1762
+ node.body = deserializeBoxBlockStatement(pos + 40);
1765
1763
  return node;
1766
1764
  }
1767
1765
 
@@ -1781,10 +1779,6 @@ function deserializeDebuggerStatement(pos) {
1781
1779
  }
1782
1780
 
1783
1781
  function deserializeBindingPattern(pos) {
1784
- return deserializeBindingPatternKind(pos);
1785
- }
1786
-
1787
- function deserializeBindingPatternKind(pos) {
1788
1782
  switch (uint8[pos]) {
1789
1783
  case 0:
1790
1784
  return deserializeBoxBindingIdentifier(pos + 8);
@@ -1795,7 +1789,7 @@ function deserializeBindingPatternKind(pos) {
1795
1789
  case 3:
1796
1790
  return deserializeBoxAssignmentPattern(pos + 8);
1797
1791
  default:
1798
- throw Error(`Unexpected discriminant ${uint8[pos]} for BindingPatternKind`);
1792
+ throw Error(`Unexpected discriminant ${uint8[pos]} for BindingPattern`);
1799
1793
  }
1800
1794
  }
1801
1795
 
@@ -1811,7 +1805,7 @@ function deserializeAssignmentPattern(pos) {
1811
1805
  range: [start, end],
1812
1806
  };
1813
1807
  node.left = deserializeBindingPattern(pos + 8);
1814
- node.right = deserializeExpression(pos + 40);
1808
+ node.right = deserializeExpression(pos + 24);
1815
1809
  return node;
1816
1810
  }
1817
1811
 
@@ -1841,8 +1835,8 @@ function deserializeBindingProperty(pos) {
1841
1835
  key: null,
1842
1836
  value: null,
1843
1837
  method: null,
1844
- shorthand: deserializeBool(pos + 56),
1845
- computed: deserializeBool(pos + 57),
1838
+ shorthand: deserializeBool(pos + 40),
1839
+ computed: deserializeBool(pos + 41),
1846
1840
  start,
1847
1841
  end,
1848
1842
  range: [start, end],
@@ -1932,11 +1926,11 @@ function deserializeFormalParameters(pos) {
1932
1926
  rest = {
1933
1927
  type: "RestElement",
1934
1928
  argument: null,
1935
- start: (start = deserializeU32(pos)),
1936
- end: (end = deserializeU32(pos + 4)),
1929
+ start: (start = deserializeU32(pos + 8)),
1930
+ end: (end = deserializeU32(pos + 12)),
1937
1931
  range: [start, end],
1938
1932
  };
1939
- rest.argument = deserializeBindingPatternKind(pos + 8);
1933
+ rest.argument = deserializeBindingPattern(pos + 16);
1940
1934
  params.push(rest);
1941
1935
  }
1942
1936
  return params;
@@ -1944,7 +1938,19 @@ function deserializeFormalParameters(pos) {
1944
1938
 
1945
1939
  function deserializeFormalParameter(pos) {
1946
1940
  let param;
1947
- param = deserializeBindingPatternKind(pos + 32);
1941
+ if (uint32[(pos + 56) >> 2] !== 0 && uint32[(pos + 60) >> 2] !== 0) {
1942
+ let start, end;
1943
+ param = {
1944
+ type: "AssignmentPattern",
1945
+ left: null,
1946
+ right: null,
1947
+ start: (start = deserializeU32(pos)),
1948
+ end: (end = deserializeU32(pos + 4)),
1949
+ range: [start, end],
1950
+ };
1951
+ param.left = deserializeBindingPattern(pos + 32);
1952
+ param.right = deserializeOptionBoxExpression(pos + 56);
1953
+ } else param = deserializeBindingPattern(pos + 32);
1948
1954
  return param;
1949
1955
  }
1950
1956
 
@@ -5595,14 +5601,23 @@ function deserializeVecVariableDeclarator(pos) {
5595
5601
  let arr = [],
5596
5602
  pos32 = pos >> 2;
5597
5603
  pos = uint32[pos32];
5598
- let endPos = pos + uint32[pos32 + 2] * 64;
5604
+ let endPos = pos + uint32[pos32 + 2] * 56;
5599
5605
  for (; pos !== endPos; ) {
5600
5606
  arr.push(deserializeVariableDeclarator(pos));
5601
- pos += 64;
5607
+ pos += 56;
5602
5608
  }
5603
5609
  return arr;
5604
5610
  }
5605
5611
 
5612
+ function deserializeBoxTSTypeAnnotation(pos) {
5613
+ return deserializeTSTypeAnnotation(uint32[pos >> 2]);
5614
+ }
5615
+
5616
+ function deserializeOptionBoxTSTypeAnnotation(pos) {
5617
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5618
+ return deserializeBoxTSTypeAnnotation(pos);
5619
+ }
5620
+
5606
5621
  function deserializeOptionStatement(pos) {
5607
5622
  if (uint8[pos] === 70) return null;
5608
5623
  return deserializeStatement(pos);
@@ -5645,19 +5660,10 @@ function deserializeOptionBoxBlockStatement(pos) {
5645
5660
  }
5646
5661
 
5647
5662
  function deserializeOptionCatchParameter(pos) {
5648
- if (uint8[pos + 32] === 2) return null;
5663
+ if (uint8[pos + 8] === 4) return null;
5649
5664
  return deserializeCatchParameter(pos);
5650
5665
  }
5651
5666
 
5652
- function deserializeBoxTSTypeAnnotation(pos) {
5653
- return deserializeTSTypeAnnotation(uint32[pos >> 2]);
5654
- }
5655
-
5656
- function deserializeOptionBoxTSTypeAnnotation(pos) {
5657
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5658
- return deserializeBoxTSTypeAnnotation(pos);
5659
- }
5660
-
5661
5667
  function deserializeBoxBindingIdentifier(pos) {
5662
5668
  return deserializeBindingIdentifier(uint32[pos >> 2]);
5663
5669
  }
@@ -5678,10 +5684,10 @@ function deserializeVecBindingProperty(pos) {
5678
5684
  let arr = [],
5679
5685
  pos32 = pos >> 2;
5680
5686
  pos = uint32[pos32];
5681
- let endPos = pos + uint32[pos32 + 2] * 64;
5687
+ let endPos = pos + uint32[pos32 + 2] * 48;
5682
5688
  for (; pos !== endPos; ) {
5683
5689
  arr.push(deserializeBindingProperty(pos));
5684
- pos += 64;
5690
+ pos += 48;
5685
5691
  }
5686
5692
  return arr;
5687
5693
  }
@@ -5696,7 +5702,7 @@ function deserializeOptionBoxBindingRestElement(pos) {
5696
5702
  }
5697
5703
 
5698
5704
  function deserializeOptionBindingPattern(pos) {
5699
- if (uint8[pos + 24] === 2) return null;
5705
+ if (uint8[pos] === 4) return null;
5700
5706
  return deserializeBindingPattern(pos);
5701
5707
  }
5702
5708
 
@@ -5704,10 +5710,10 @@ function deserializeVecOptionBindingPattern(pos) {
5704
5710
  let arr = [],
5705
5711
  pos32 = pos >> 2;
5706
5712
  pos = uint32[pos32];
5707
- let endPos = pos + uint32[pos32 + 2] * 32;
5713
+ let endPos = pos + uint32[pos32 + 2] * 16;
5708
5714
  for (; pos !== endPos; ) {
5709
5715
  arr.push(deserializeOptionBindingPattern(pos));
5710
- pos += 32;
5716
+ pos += 16;
5711
5717
  }
5712
5718
  return arr;
5713
5719
  }
@@ -5772,6 +5778,15 @@ function deserializeVecDecorator(pos) {
5772
5778
  return arr;
5773
5779
  }
5774
5780
 
5781
+ function deserializeBoxExpression(pos) {
5782
+ return deserializeExpression(uint32[pos >> 2]);
5783
+ }
5784
+
5785
+ function deserializeOptionBoxExpression(pos) {
5786
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5787
+ return deserializeBoxExpression(pos);
5788
+ }
5789
+
5775
5790
  function deserializeBoxClassBody(pos) {
5776
5791
  return deserializeClassBody(uint32[pos >> 2]);
5777
5792
  }
@@ -1337,19 +1337,23 @@ function deserializeVariableDeclarationKind(pos) {
1337
1337
  }
1338
1338
 
1339
1339
  function deserializeVariableDeclarator(pos) {
1340
- let start = deserializeU32(pos),
1341
- end = deserializeU32(pos + 4),
1342
- node = {
1343
- type: "VariableDeclarator",
1344
- id: null,
1345
- init: null,
1346
- definite: deserializeBool(pos + 57),
1347
- start,
1348
- end,
1349
- };
1350
- node.id = deserializeBindingPattern(pos + 8);
1351
- node.init = deserializeOptionExpression(pos + 40);
1352
- return node;
1340
+ let variableDeclarator = {
1341
+ type: "VariableDeclarator",
1342
+ id: null,
1343
+ init: null,
1344
+ definite: false,
1345
+ start: deserializeU32(pos),
1346
+ end: deserializeU32(pos + 4),
1347
+ };
1348
+ variableDeclarator.id = deserializeBindingPattern(pos + 8);
1349
+ {
1350
+ let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 24);
1351
+ variableDeclarator.id.typeAnnotation = typeAnnotation;
1352
+ typeAnnotation !== null && (variableDeclarator.id.end = typeAnnotation.end);
1353
+ variableDeclarator.definite = deserializeBool(pos + 49);
1354
+ }
1355
+ variableDeclarator.init = deserializeOptionExpression(pos + 32);
1356
+ return variableDeclarator;
1353
1357
  }
1354
1358
 
1355
1359
  function deserializeEmptyStatement(pos) {
@@ -1707,12 +1711,18 @@ function deserializeCatchClause(pos) {
1707
1711
  end: deserializeU32(pos + 4),
1708
1712
  };
1709
1713
  node.param = deserializeOptionCatchParameter(pos + 8);
1710
- node.body = deserializeBoxBlockStatement(pos + 48);
1714
+ node.body = deserializeBoxBlockStatement(pos + 40);
1711
1715
  return node;
1712
1716
  }
1713
1717
 
1714
1718
  function deserializeCatchParameter(pos) {
1715
- return deserializeBindingPattern(pos + 8);
1719
+ let pattern = deserializeBindingPattern(pos + 8);
1720
+ {
1721
+ let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 24);
1722
+ pattern.typeAnnotation = typeAnnotation;
1723
+ typeAnnotation !== null && (pattern.end = typeAnnotation.end);
1724
+ }
1725
+ return pattern;
1716
1726
  }
1717
1727
 
1718
1728
  function deserializeDebuggerStatement(pos) {
@@ -1724,13 +1734,6 @@ function deserializeDebuggerStatement(pos) {
1724
1734
  }
1725
1735
 
1726
1736
  function deserializeBindingPattern(pos) {
1727
- let pattern = deserializeBindingPatternKind(pos);
1728
- pattern.optional = deserializeBool(pos + 24);
1729
- pattern.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 16);
1730
- return pattern;
1731
- }
1732
-
1733
- function deserializeBindingPatternKind(pos) {
1734
1737
  switch (uint8[pos]) {
1735
1738
  case 0:
1736
1739
  return deserializeBoxBindingIdentifier(pos + 8);
@@ -1741,7 +1744,7 @@ function deserializeBindingPatternKind(pos) {
1741
1744
  case 3:
1742
1745
  return deserializeBoxAssignmentPattern(pos + 8);
1743
1746
  default:
1744
- throw Error(`Unexpected discriminant ${uint8[pos]} for BindingPatternKind`);
1747
+ throw Error(`Unexpected discriminant ${uint8[pos]} for BindingPattern`);
1745
1748
  }
1746
1749
  }
1747
1750
 
@@ -1758,7 +1761,7 @@ function deserializeAssignmentPattern(pos) {
1758
1761
  };
1759
1762
  node.decorators = [];
1760
1763
  node.left = deserializeBindingPattern(pos + 8);
1761
- node.right = deserializeExpression(pos + 40);
1764
+ node.right = deserializeExpression(pos + 24);
1762
1765
  node.optional = false;
1763
1766
  return node;
1764
1767
  }
@@ -1791,8 +1794,8 @@ function deserializeBindingProperty(pos) {
1791
1794
  key: null,
1792
1795
  value: null,
1793
1796
  method: null,
1794
- shorthand: deserializeBool(pos + 56),
1795
- computed: deserializeBool(pos + 57),
1797
+ shorthand: deserializeBool(pos + 40),
1798
+ computed: deserializeBool(pos + 41),
1796
1799
  optional: null,
1797
1800
  start,
1798
1801
  end,
@@ -1891,34 +1894,66 @@ function deserializeFormalParameters(pos) {
1891
1894
  let params = deserializeVecFormalParameter(pos + 8);
1892
1895
  if (uint32[(pos + 32) >> 2] !== 0 && uint32[(pos + 36) >> 2] !== 0) {
1893
1896
  pos = uint32[(pos + 32) >> 2];
1894
- let rest = {
1895
- type: "RestElement",
1896
- decorators: [],
1897
- argument: null,
1898
- optional: deserializeBool(pos + 32),
1899
- typeAnnotation: null,
1900
- value: null,
1901
- start: deserializeU32(pos),
1902
- end: deserializeU32(pos + 4),
1903
- };
1904
- rest.argument = deserializeBindingPatternKind(pos + 8);
1905
- rest.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 24);
1897
+ let end,
1898
+ rest = {
1899
+ type: "RestElement",
1900
+ decorators: [],
1901
+ argument: null,
1902
+ optional: false,
1903
+ typeAnnotation: null,
1904
+ value: null,
1905
+ start: deserializeU32(pos + 8),
1906
+ end: (end = deserializeU32(pos + 12)),
1907
+ };
1908
+ rest.argument = deserializeBindingPattern(pos + 16);
1909
+ rest.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 32);
1910
+ if (rest.typeAnnotation !== null) {
1911
+ end = rest.typeAnnotation.end;
1912
+ rest.end = end;
1913
+ }
1906
1914
  params.push(rest);
1907
1915
  }
1908
1916
  return params;
1909
1917
  }
1910
1918
 
1911
1919
  function deserializeFormalParameter(pos) {
1912
- let param;
1920
+ let param,
1921
+ hasInitializer = uint32[(pos + 56) >> 2] !== 0 && uint32[(pos + 60) >> 2] !== 0;
1913
1922
  {
1914
- let accessibility = deserializeOptionTSAccessibility(pos + 64),
1915
- readonly = deserializeBool(pos + 65),
1916
- override = deserializeBool(pos + 66);
1923
+ let accessibility = deserializeOptionTSAccessibility(pos + 65),
1924
+ readonly = deserializeBool(pos + 66),
1925
+ override = deserializeBool(pos + 67);
1917
1926
  if (accessibility === null && !readonly && !override) {
1918
- param = deserializeBindingPatternKind(pos + 32);
1919
- param.decorators = deserializeVecDecorator(pos + 8);
1920
- param.optional = deserializeBool(pos + 56);
1921
- param.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 48);
1927
+ let optional = deserializeBool(pos + 64);
1928
+ if (hasInitializer) {
1929
+ param = {
1930
+ type: "AssignmentPattern",
1931
+ decorators: null,
1932
+ left: null,
1933
+ right: null,
1934
+ optional,
1935
+ typeAnnotation: null,
1936
+ start: deserializeU32(pos),
1937
+ end: deserializeU32(pos + 4),
1938
+ };
1939
+ param.decorators = deserializeVecDecorator(pos + 8);
1940
+ param.left = deserializeBindingPattern(pos + 32);
1941
+ param.left.decorators = [];
1942
+ param.left.optional = false;
1943
+ let leftTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 48);
1944
+ param.left.typeAnnotation = leftTypeAnnotation;
1945
+ leftTypeAnnotation !== null && (param.left.end = leftTypeAnnotation.end);
1946
+ param.right = deserializeOptionBoxExpression(pos + 56);
1947
+ } else {
1948
+ param = deserializeBindingPattern(pos + 32);
1949
+ param.decorators = deserializeVecDecorator(pos + 8);
1950
+ param.optional = optional;
1951
+ let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 48);
1952
+ param.typeAnnotation = typeAnnotation;
1953
+ typeAnnotation === null
1954
+ ? optional && (param.end = deserializeU32(pos + 4))
1955
+ : (param.end = typeAnnotation.end);
1956
+ }
1922
1957
  } else {
1923
1958
  param = {
1924
1959
  type: "TSParameterProperty",
@@ -1932,7 +1967,40 @@ function deserializeFormalParameter(pos) {
1932
1967
  end: deserializeU32(pos + 4),
1933
1968
  };
1934
1969
  param.decorators = deserializeVecDecorator(pos + 8);
1935
- param.parameter = deserializeBindingPattern(pos + 32);
1970
+ if (hasInitializer) {
1971
+ let pattern = deserializeBindingPattern(pos + 32),
1972
+ initializer = deserializeOptionBoxExpression(pos + 56),
1973
+ assignParam = {
1974
+ type: "AssignmentPattern",
1975
+ decorators: [],
1976
+ left: null,
1977
+ right: null,
1978
+ optional: false,
1979
+ typeAnnotation: null,
1980
+ start: pattern.start,
1981
+ end: initializer.end,
1982
+ };
1983
+ assignParam.left = pattern;
1984
+ pattern.decorators = [];
1985
+ pattern.optional = false;
1986
+ let patternTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 48);
1987
+ pattern.typeAnnotation = patternTypeAnnotation;
1988
+ patternTypeAnnotation !== null && (pattern.end = patternTypeAnnotation.end);
1989
+ assignParam.right = initializer;
1990
+ param.parameter = assignParam;
1991
+ } else {
1992
+ param.parameter = deserializeBindingPattern(pos + 32);
1993
+ param.parameter.decorators = [];
1994
+ let paramOptional = deserializeBool(pos + 64);
1995
+ param.parameter.optional = paramOptional;
1996
+ let paramTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 48);
1997
+ param.parameter.typeAnnotation = paramTypeAnnotation;
1998
+ if (paramTypeAnnotation !== null) param.parameter.end = paramTypeAnnotation.end;
1999
+ else if (paramOptional) {
2000
+ let paramEnd = deserializeU32(pos + 4);
2001
+ param.parameter.end = paramEnd;
2002
+ }
2003
+ }
1936
2004
  }
1937
2005
  }
1938
2006
  return param;
@@ -5382,14 +5450,23 @@ function deserializeVecVariableDeclarator(pos) {
5382
5450
  let arr = [],
5383
5451
  pos32 = pos >> 2;
5384
5452
  pos = uint32[pos32];
5385
- let endPos = pos + uint32[pos32 + 2] * 64;
5453
+ let endPos = pos + uint32[pos32 + 2] * 56;
5386
5454
  for (; pos !== endPos; ) {
5387
5455
  arr.push(deserializeVariableDeclarator(pos));
5388
- pos += 64;
5456
+ pos += 56;
5389
5457
  }
5390
5458
  return arr;
5391
5459
  }
5392
5460
 
5461
+ function deserializeBoxTSTypeAnnotation(pos) {
5462
+ return deserializeTSTypeAnnotation(uint32[pos >> 2]);
5463
+ }
5464
+
5465
+ function deserializeOptionBoxTSTypeAnnotation(pos) {
5466
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5467
+ return deserializeBoxTSTypeAnnotation(pos);
5468
+ }
5469
+
5393
5470
  function deserializeOptionStatement(pos) {
5394
5471
  if (uint8[pos] === 70) return null;
5395
5472
  return deserializeStatement(pos);
@@ -5432,19 +5509,10 @@ function deserializeOptionBoxBlockStatement(pos) {
5432
5509
  }
5433
5510
 
5434
5511
  function deserializeOptionCatchParameter(pos) {
5435
- if (uint8[pos + 32] === 2) return null;
5512
+ if (uint8[pos + 8] === 4) return null;
5436
5513
  return deserializeCatchParameter(pos);
5437
5514
  }
5438
5515
 
5439
- function deserializeBoxTSTypeAnnotation(pos) {
5440
- return deserializeTSTypeAnnotation(uint32[pos >> 2]);
5441
- }
5442
-
5443
- function deserializeOptionBoxTSTypeAnnotation(pos) {
5444
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5445
- return deserializeBoxTSTypeAnnotation(pos);
5446
- }
5447
-
5448
5516
  function deserializeBoxBindingIdentifier(pos) {
5449
5517
  return deserializeBindingIdentifier(uint32[pos >> 2]);
5450
5518
  }
@@ -5465,10 +5533,10 @@ function deserializeVecBindingProperty(pos) {
5465
5533
  let arr = [],
5466
5534
  pos32 = pos >> 2;
5467
5535
  pos = uint32[pos32];
5468
- let endPos = pos + uint32[pos32 + 2] * 64;
5536
+ let endPos = pos + uint32[pos32 + 2] * 48;
5469
5537
  for (; pos !== endPos; ) {
5470
5538
  arr.push(deserializeBindingProperty(pos));
5471
- pos += 64;
5539
+ pos += 48;
5472
5540
  }
5473
5541
  return arr;
5474
5542
  }
@@ -5483,7 +5551,7 @@ function deserializeOptionBoxBindingRestElement(pos) {
5483
5551
  }
5484
5552
 
5485
5553
  function deserializeOptionBindingPattern(pos) {
5486
- if (uint8[pos + 24] === 2) return null;
5554
+ if (uint8[pos] === 4) return null;
5487
5555
  return deserializeBindingPattern(pos);
5488
5556
  }
5489
5557
 
@@ -5491,10 +5559,10 @@ function deserializeVecOptionBindingPattern(pos) {
5491
5559
  let arr = [],
5492
5560
  pos32 = pos >> 2;
5493
5561
  pos = uint32[pos32];
5494
- let endPos = pos + uint32[pos32 + 2] * 32;
5562
+ let endPos = pos + uint32[pos32 + 2] * 16;
5495
5563
  for (; pos !== endPos; ) {
5496
5564
  arr.push(deserializeOptionBindingPattern(pos));
5497
- pos += 32;
5565
+ pos += 16;
5498
5566
  }
5499
5567
  return arr;
5500
5568
  }
@@ -5559,6 +5627,15 @@ function deserializeVecDecorator(pos) {
5559
5627
  return arr;
5560
5628
  }
5561
5629
 
5630
+ function deserializeBoxExpression(pos) {
5631
+ return deserializeExpression(uint32[pos >> 2]);
5632
+ }
5633
+
5634
+ function deserializeOptionBoxExpression(pos) {
5635
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5636
+ return deserializeBoxExpression(pos);
5637
+ }
5638
+
5562
5639
  function deserializeOptionTSAccessibility(pos) {
5563
5640
  if (uint8[pos] === 3) return null;
5564
5641
  return deserializeTSAccessibility(pos);