meriyah 4.1.5 → 4.3.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.
@@ -98,7 +98,6 @@ const errorMessages = {
98
98
  [89]: 'Illegal return statement',
99
99
  [90]: 'The left hand side of the for-header binding declaration is not destructible',
100
100
  [91]: 'new.target only allowed within functions',
101
- [92]: "'Unexpected token: 'escaped keyword'",
102
101
  [93]: "'#' not followed by identifier",
103
102
  [99]: 'Invalid keyword',
104
103
  [98]: "Can not use 'let' as a class name",
@@ -113,7 +112,6 @@ const errorMessages = {
113
112
  [104]: "Only '*' or '{...}' can be imported after default",
114
113
  [105]: 'Trailing decorator may be followed by method',
115
114
  [106]: "Decorators can't be used with a constructor",
116
- [107]: "'%0' may not be used as an identifier in this context",
117
115
  [108]: 'HTML comments are only allowed with web compatibility (Annex B)',
118
116
  [109]: "The identifier 'let' must not be in expression position in strict mode",
119
117
  [110]: 'Cannot assign to `eval` and `arguments` in strict mode',
@@ -869,7 +867,7 @@ function scanRegularExpression(parser, context) {
869
867
  break;
870
868
  case 117:
871
869
  if (mask & 16)
872
- report(parser, 34, 'g');
870
+ report(parser, 34, 'u');
873
871
  mask |= 16;
874
872
  break;
875
873
  case 121:
@@ -878,9 +876,14 @@ function scanRegularExpression(parser, context) {
878
876
  mask |= 8;
879
877
  break;
880
878
  case 115:
881
- if (mask & 12)
879
+ if (mask & 32)
882
880
  report(parser, 34, 's');
883
- mask |= 12;
881
+ mask |= 32;
882
+ break;
883
+ case 100:
884
+ if (mask & 64)
885
+ report(parser, 34, 'd');
886
+ mask |= 64;
884
887
  break;
885
888
  default:
886
889
  report(parser, 33);
@@ -900,7 +903,13 @@ function validate(parser, pattern, flags) {
900
903
  return new RegExp(pattern, flags);
901
904
  }
902
905
  catch (e) {
903
- report(parser, 32);
906
+ try {
907
+ new RegExp(pattern, flags.replace('d', ''));
908
+ return null;
909
+ }
910
+ catch (e) {
911
+ report(parser, 32);
912
+ }
904
913
  }
905
914
  }
906
915
 
@@ -1211,8 +1220,8 @@ function scanNumber(parser, context, kind) {
1211
1220
  digits++;
1212
1221
  char = advanceChar(parser);
1213
1222
  }
1214
- if (digits < 1 || !allowSeparator) {
1215
- report(parser, digits < 1 ? 19 : 147);
1223
+ if (digits === 0 || !allowSeparator) {
1224
+ report(parser, digits === 0 ? 19 : 147);
1216
1225
  }
1217
1226
  }
1218
1227
  else if ((char | 32) === 111) {
@@ -1232,8 +1241,8 @@ function scanNumber(parser, context, kind) {
1232
1241
  digits++;
1233
1242
  char = advanceChar(parser);
1234
1243
  }
1235
- if (digits < 1 || !allowSeparator) {
1236
- report(parser, digits < 1 ? 0 : 147);
1244
+ if (digits === 0 || !allowSeparator) {
1245
+ report(parser, digits === 0 ? 0 : 147);
1237
1246
  }
1238
1247
  }
1239
1248
  else if ((char | 32) === 98) {
@@ -1253,8 +1262,8 @@ function scanNumber(parser, context, kind) {
1253
1262
  digits++;
1254
1263
  char = advanceChar(parser);
1255
1264
  }
1256
- if (digits < 1 || !allowSeparator) {
1257
- report(parser, digits < 1 ? 0 : 147);
1265
+ if (digits === 0 || !allowSeparator) {
1266
+ report(parser, digits === 0 ? 0 : 147);
1258
1267
  }
1259
1268
  }
1260
1269
  else if (CharTypes[char] & 32) {
@@ -1330,7 +1339,7 @@ function scanNumber(parser, context, kind) {
1330
1339
  if (CharTypes[char] & 256)
1331
1340
  char = advanceChar(parser);
1332
1341
  const { index } = parser;
1333
- if ((CharTypes[char] & 16) < 1)
1342
+ if ((CharTypes[char] & 16) === 0)
1334
1343
  report(parser, 10);
1335
1344
  value += parser.source.substring(end, index) + scanDecimalDigitsOrSeparator(parser, char);
1336
1345
  char = parser.currentChar;
@@ -1793,7 +1802,7 @@ function scanSingleToken(parser, context, state) {
1793
1802
  }
1794
1803
  else if (ch === 61) {
1795
1804
  advanceChar(parser);
1796
- return 8456000;
1805
+ return 8456256;
1797
1806
  }
1798
1807
  if (ch === 33) {
1799
1808
  const index = parser.index + 1;
@@ -1811,7 +1820,7 @@ function scanSingleToken(parser, context, state) {
1811
1820
  return 8456258;
1812
1821
  }
1813
1822
  if (ch === 47) {
1814
- if ((context & 16) < 1)
1823
+ if ((context & 16) === 0)
1815
1824
  return 8456258;
1816
1825
  const index = parser.index + 1;
1817
1826
  if (index < parser.end) {
@@ -1976,7 +1985,7 @@ function scanSingleToken(parser, context, state) {
1976
1985
  const ch = parser.currentChar;
1977
1986
  if (ch === 61) {
1978
1987
  advanceChar(parser);
1979
- return 8456001;
1988
+ return 8456257;
1980
1989
  }
1981
1990
  if (ch !== 62)
1982
1991
  return 8456259;
@@ -4917,7 +4926,7 @@ function parseStatement(parser, context, scope, origin, labels, allowFuncDecl, s
4917
4926
  case 86106:
4918
4927
  report(parser, context & 1024
4919
4928
  ? 73
4920
- : (context & 256) < 1
4929
+ : (context & 256) === 0
4921
4930
  ? 75
4922
4931
  : 74);
4923
4932
  case 86096:
@@ -4963,12 +4972,12 @@ function parseBlock(parser, context, scope, labels, start, line, column) {
4963
4972
  });
4964
4973
  }
4965
4974
  function parseReturnStatement(parser, context, start, line, column) {
4966
- if ((context & 32) < 1 && context & 8192)
4975
+ if ((context & 32) === 0 && context & 8192)
4967
4976
  report(parser, 89);
4968
4977
  nextToken(parser, context | 32768);
4969
4978
  const argument = parser.flags & 1 || parser.token & 1048576
4970
4979
  ? null
4971
- : parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.line, parser.column);
4980
+ : parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
4972
4981
  matchOrInsertSemicolon(parser, context | 32768);
4973
4982
  return finishNode(parser, context, start, line, column, {
4974
4983
  type: 'ReturnStatement',
@@ -4987,7 +4996,7 @@ function parseLabelledStatement(parser, context, scope, origin, labels, value, e
4987
4996
  validateAndDeclareLabel(parser, labels, value);
4988
4997
  nextToken(parser, context | 32768);
4989
4998
  const body = allowFuncDecl &&
4990
- (context & 1024) < 1 &&
4999
+ (context & 1024) === 0 &&
4991
5000
  context & 256 &&
4992
5001
  parser.token === 86106
4993
5002
  ? parseFunctionDeclaration(parser, context, addChildScope(scope, 2), origin, 0, 0, 0, parser.tokenPos, parser.linePos, parser.colPos)
@@ -5096,7 +5105,7 @@ function parseIfStatement(parser, context, scope, labels, start, line, column) {
5096
5105
  }
5097
5106
  function parseConsequentOrAlternative(parser, context, scope, labels, start, line, column) {
5098
5107
  return context & 1024 ||
5099
- (context & 256) < 1 ||
5108
+ (context & 256) === 0 ||
5100
5109
  parser.token !== 86106
5101
5110
  ? parseStatement(parser, context, scope, 0, { $: labels }, 0, parser.tokenPos, parser.linePos, parser.colPos)
5102
5111
  : parseFunctionDeclaration(parser, context, addChildScope(scope, 2), 0, 0, 0, 0, start, line, column);
@@ -5161,11 +5170,11 @@ function parseIterationStatementBody(parser, context, scope, labels) {
5161
5170
  return parseStatement(parser, ((context | 134217728) ^ 134217728) | 131072, scope, 0, { loop: 1, $: labels }, 0, parser.tokenPos, parser.linePos, parser.colPos);
5162
5171
  }
5163
5172
  function parseContinueStatement(parser, context, labels, start, line, column) {
5164
- if ((context & 131072) < 1)
5173
+ if ((context & 131072) === 0)
5165
5174
  report(parser, 65);
5166
5175
  nextToken(parser, context);
5167
5176
  let label = null;
5168
- if ((parser.flags & 1) < 1 && parser.token & 143360) {
5177
+ if ((parser.flags & 1) === 0 && parser.token & 143360) {
5169
5178
  const { tokenValue } = parser;
5170
5179
  label = parseIdentifier(parser, context | 32768, 0);
5171
5180
  if (!isValidLabel(parser, labels, tokenValue, 1))
@@ -5180,13 +5189,13 @@ function parseContinueStatement(parser, context, labels, start, line, column) {
5180
5189
  function parseBreakStatement(parser, context, labels, start, line, column) {
5181
5190
  nextToken(parser, context | 32768);
5182
5191
  let label = null;
5183
- if ((parser.flags & 1) < 1 && parser.token & 143360) {
5192
+ if ((parser.flags & 1) === 0 && parser.token & 143360) {
5184
5193
  const { tokenValue } = parser;
5185
5194
  label = parseIdentifier(parser, context | 32768, 0);
5186
5195
  if (!isValidLabel(parser, labels, tokenValue, 0))
5187
5196
  report(parser, 134, tokenValue);
5188
5197
  }
5189
- else if ((context & (4096 | 131072)) < 1) {
5198
+ else if ((context & (4096 | 131072)) === 0) {
5190
5199
  report(parser, 66);
5191
5200
  }
5192
5201
  matchOrInsertSemicolon(parser, context | 32768);
@@ -5266,6 +5275,17 @@ function parseCatchBlock(parser, context, scope, labels, start, line, column) {
5266
5275
  body
5267
5276
  });
5268
5277
  }
5278
+ function parseStaticBlock(parser, context, scope, start, line, column) {
5279
+ if (scope)
5280
+ scope = addChildScope(scope, 2);
5281
+ const ctorContext = 16384 | 524288;
5282
+ context = ((context | ctorContext) ^ ctorContext) | 262144;
5283
+ const { body } = parseBlock(parser, context, scope, {}, start, line, column);
5284
+ return finishNode(parser, context, start, line, column, {
5285
+ type: 'StaticBlock',
5286
+ body
5287
+ });
5288
+ }
5269
5289
  function parseDoWhileStatement(parser, context, scope, labels, start, line, column) {
5270
5290
  nextToken(parser, context | 32768);
5271
5291
  const body = parseIterationStatementBody(parser, context, scope, labels);
@@ -5353,10 +5373,10 @@ function parseVariableDeclaration(parser, context, scope, kind, origin) {
5353
5373
  if (parser.token === 1077936157) {
5354
5374
  nextToken(parser, context | 32768);
5355
5375
  init = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
5356
- if (origin & 32 || (token & 2097152) < 1) {
5376
+ if (origin & 32 || (token & 2097152) === 0) {
5357
5377
  if (parser.token === 274549 ||
5358
5378
  (parser.token === 8738868 &&
5359
- (token & 2097152 || (kind & 4) < 1 || context & 1024))) {
5379
+ (token & 2097152 || (kind & 4) === 0 || context & 1024))) {
5360
5380
  reportMessageAt(tokenPos, parser.line, parser.index - 3, 57, parser.token === 274549 ? 'of' : 'in');
5361
5381
  }
5362
5382
  }
@@ -5373,7 +5393,8 @@ function parseVariableDeclaration(parser, context, scope, kind, origin) {
5373
5393
  }
5374
5394
  function parseForStatement(parser, context, scope, labels, start, line, column) {
5375
5395
  nextToken(parser, context);
5376
- const forAwait = (context & 4194304) > 0 && consumeOpt(parser, context, 209008);
5396
+ const forAwait = ((context & 4194304) > 0 || ((context & 2048) > 0 && (context & 8192) > 0)) &&
5397
+ consumeOpt(parser, context, 209008);
5377
5398
  consume(parser, context | 32768, 67174411);
5378
5399
  if (scope)
5379
5400
  scope = addChildScope(scope, 1);
@@ -5662,7 +5683,7 @@ function parseExportDeclaration(parser, context, scope) {
5662
5683
  const { tokenPos, linePos, colPos } = parser;
5663
5684
  declaration = parseIdentifier(parser, context, 0);
5664
5685
  const { flags } = parser;
5665
- if ((flags & 1) < 1) {
5686
+ if ((flags & 1) === 0) {
5666
5687
  if (parser.token === 86106) {
5667
5688
  declaration = parseFunctionDeclaration(parser, context, scope, 4, 1, 1, 1, tokenPos, linePos, colPos);
5668
5689
  }
@@ -5786,7 +5807,7 @@ function parseExportDeclaration(parser, context, scope) {
5786
5807
  case 209007:
5787
5808
  const { tokenPos, linePos, colPos } = parser;
5788
5809
  nextToken(parser, context);
5789
- if ((parser.flags & 1) < 1 && parser.token === 86106) {
5810
+ if ((parser.flags & 1) === 0 && parser.token === 86106) {
5790
5811
  declaration = parseFunctionDeclaration(parser, context, scope, 4, 1, 2, 1, tokenPos, linePos, colPos);
5791
5812
  if (scope) {
5792
5813
  key = declaration.id ? declaration.id.name : '';
@@ -5943,7 +5964,7 @@ function parseAsyncExpression(parser, context, inGroup, isLHS, canAssign, isPatt
5943
5964
  const { token } = parser;
5944
5965
  const expr = parseIdentifier(parser, context, isPattern);
5945
5966
  const { flags } = parser;
5946
- if ((flags & 1) < 1) {
5967
+ if ((flags & 1) === 0) {
5947
5968
  if (parser.token === 86106) {
5948
5969
  return parseFunctionExpression(parser, context, 1, inGroup, start, line, column);
5949
5970
  }
@@ -5977,7 +5998,7 @@ function parseYieldExpression(parser, context, inGroup, canAssign, start, line,
5977
5998
  report(parser, 120);
5978
5999
  let argument = null;
5979
6000
  let delegate = false;
5980
- if ((parser.flags & 1) < 1) {
6001
+ if ((parser.flags & 1) === 0) {
5981
6002
  delegate = consumeOpt(parser, context | 32768, 8457014);
5982
6003
  if (parser.token & (12288 | 65536) || delegate) {
5983
6004
  argument = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
@@ -5997,7 +6018,7 @@ function parseYieldExpression(parser, context, inGroup, canAssign, start, line,
5997
6018
  function parseAwaitExpression(parser, context, inNew, inGroup, start, line, column) {
5998
6019
  if (inGroup)
5999
6020
  parser.destructible |= 128;
6000
- if (context & 4194304) {
6021
+ if (context & 4194304 || (context & 2048 && context & 8192)) {
6001
6022
  if (inNew)
6002
6023
  report(parser, 0);
6003
6024
  if (context & 8388608) {
@@ -6005,6 +6026,8 @@ function parseAwaitExpression(parser, context, inNew, inGroup, start, line, colu
6005
6026
  }
6006
6027
  nextToken(parser, context | 32768);
6007
6028
  const argument = parseLeftHandSideExpression(parser, context, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
6029
+ if (parser.token === 8457273)
6030
+ report(parser, 31);
6008
6031
  parser.assignable = 2;
6009
6032
  return finishNode(parser, context, start, line, column, {
6010
6033
  type: 'AwaitExpression',
@@ -6012,7 +6035,7 @@ function parseAwaitExpression(parser, context, inNew, inGroup, start, line, colu
6012
6035
  });
6013
6036
  }
6014
6037
  if (context & 2048)
6015
- report(parser, 107, 'Await');
6038
+ report(parser, 95);
6016
6039
  return parseIdentifierOrArrow(parser, context, start, line, column);
6017
6040
  }
6018
6041
  function parseFunctionBody(parser, context, scope, origin, firstRestricted, scopeError) {
@@ -6052,8 +6075,8 @@ function parseFunctionBody(parser, context, scope, origin, firstRestricted, scop
6052
6075
  if (context & 64 &&
6053
6076
  scope &&
6054
6077
  scopeError !== void 0 &&
6055
- (prevContext & 1024) < 1 &&
6056
- (context & 8192) < 1) {
6078
+ (prevContext & 1024) === 0 &&
6079
+ (context & 8192) === 0) {
6057
6080
  reportScopeError(scopeError);
6058
6081
  }
6059
6082
  }
@@ -6079,19 +6102,19 @@ function parseSuperExpression(parser, context, start, line, column) {
6079
6102
  case 67108991:
6080
6103
  report(parser, 161);
6081
6104
  case 67174411: {
6082
- if ((context & 524288) < 1)
6105
+ if ((context & 524288) === 0)
6083
6106
  report(parser, 26);
6084
6107
  if (context & 16384)
6085
- report(parser, 143);
6108
+ report(parser, 27);
6086
6109
  parser.assignable = 2;
6087
6110
  break;
6088
6111
  }
6089
6112
  case 69271571:
6090
6113
  case 67108877: {
6091
- if ((context & 262144) < 1)
6114
+ if ((context & 262144) === 0)
6092
6115
  report(parser, 27);
6093
6116
  if (context & 16384)
6094
- report(parser, 143);
6117
+ report(parser, 27);
6095
6118
  parser.assignable = 1;
6096
6119
  break;
6097
6120
  }
@@ -6118,14 +6141,14 @@ function parseUpdateExpression(parser, context, expr, start, line, column) {
6118
6141
  });
6119
6142
  }
6120
6143
  function parseMemberOrUpdateExpression(parser, context, expr, inGroup, inChain, start, line, column) {
6121
- if ((parser.token & 33619968) === 33619968 && (parser.flags & 1) < 1) {
6144
+ if ((parser.token & 33619968) === 33619968 && (parser.flags & 1) === 0) {
6122
6145
  expr = parseUpdateExpression(parser, context, expr, start, line, column);
6123
6146
  }
6124
6147
  else if ((parser.token & 67108864) === 67108864) {
6125
- context = (context | 134217728 | 8192) ^ (134217728 | 8192);
6148
+ context = (context | 134217728) ^ 134217728;
6126
6149
  switch (parser.token) {
6127
6150
  case 67108877: {
6128
- nextToken(parser, context | 1073741824);
6151
+ nextToken(parser, (context | 1073741824 | 8192) ^ 8192);
6129
6152
  parser.assignable = 1;
6130
6153
  const property = parsePropertyOrPrivatePropertyName(parser, context);
6131
6154
  expr = finishNode(parser, context, start, line, column, {
@@ -6181,7 +6204,7 @@ function parseMemberOrUpdateExpression(parser, context, expr, inGroup, inChain,
6181
6204
  break;
6182
6205
  }
6183
6206
  case 67108991: {
6184
- nextToken(parser, context);
6207
+ nextToken(parser, (context | 1073741824 | 8192) ^ 8192);
6185
6208
  parser.flags |= 2048;
6186
6209
  parser.assignable = 2;
6187
6210
  expr = parseOptionalChain(parser, context, expr, start, line, column);
@@ -6245,7 +6268,7 @@ function parseOptionalChain(parser, context, expr, start, line, column) {
6245
6268
  });
6246
6269
  }
6247
6270
  else {
6248
- if ((parser.token & (143360 | 4096)) < 1)
6271
+ if ((parser.token & (143360 | 4096)) === 0)
6249
6272
  report(parser, 154);
6250
6273
  const property = parseIdentifier(parser, context, 0);
6251
6274
  parser.assignable = 2;
@@ -6263,7 +6286,7 @@ function parseOptionalChain(parser, context, expr, start, line, column) {
6263
6286
  return node;
6264
6287
  }
6265
6288
  function parsePropertyOrPrivatePropertyName(parser, context) {
6266
- if ((parser.token & (143360 | 4096)) < 1 && parser.token !== 131) {
6289
+ if ((parser.token & (143360 | 4096)) === 0 && parser.token !== 131) {
6267
6290
  report(parser, 154);
6268
6291
  }
6269
6292
  return context & 1 && parser.token === 131
@@ -6588,11 +6611,11 @@ function parseFunctionDeclaration(parser, context, scope, origin, allowGen, flag
6588
6611
  let firstRestricted;
6589
6612
  let functionScope = scope ? createScope() : void 0;
6590
6613
  if (parser.token === 67174411) {
6591
- if ((flags & 1) < 1)
6614
+ if ((flags & 1) === 0)
6592
6615
  report(parser, 37, 'Function');
6593
6616
  }
6594
6617
  else {
6595
- const kind = origin & 4 && ((context & 8192) < 1 || (context & 2048) < 1)
6618
+ const kind = origin & 4 && ((context & 8192) === 0 || (context & 2048) === 0)
6596
6619
  ? 4
6597
6620
  : 64;
6598
6621
  validateFunctionName(parser, context | ((context & 3072) << 11), parser.token);
@@ -6738,7 +6761,7 @@ function parseArrayExpressionOrPattern(parser, context, scope, skipInitializer,
6738
6761
  destructible |=
6739
6762
  kind & 1
6740
6763
  ? 32
6741
- : (kind & 2) < 1
6764
+ : (kind & 2) === 0
6742
6765
  ? 16
6743
6766
  : 0;
6744
6767
  left = parseMemberOrUpdateExpression(parser, context, left, inGroup, 0, tokenPos, linePos, colPos);
@@ -6797,7 +6820,7 @@ function parseArrayExpressionOrPattern(parser, context, scope, skipInitializer,
6797
6820
  left = parseLeftHandSideExpression(parser, context, 1, 0, 1, tokenPos, linePos, colPos);
6798
6821
  if (parser.token !== 18 && parser.token !== 20) {
6799
6822
  left = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, left);
6800
- if ((kind & (2 | 1)) < 1 && token === 67174411)
6823
+ if ((kind & (2 | 1)) === 0 && token === 67174411)
6801
6824
  destructible |= 16;
6802
6825
  }
6803
6826
  else if (parser.assignable & 2) {
@@ -6986,7 +7009,7 @@ function parseSpreadOrRestElement(parser, context, scope, closingToken, kind, or
6986
7009
  });
6987
7010
  }
6988
7011
  function parseMethodDefinition(parser, context, kind, inGroup, start, line, column) {
6989
- const modifierFlags = (kind & 64) < 1 ? 31981568 : 14680064;
7012
+ const modifierFlags = (kind & 64) === 0 ? 31981568 : 14680064;
6990
7013
  context =
6991
7014
  ((context | modifierFlags) ^ modifierFlags) |
6992
7015
  ((kind & 88) << 18) |
@@ -7554,7 +7577,7 @@ function parseMethodFormals(parser, context, scope, kind, type, inGroup) {
7554
7577
  let left = null;
7555
7578
  const { tokenPos, linePos, colPos } = parser;
7556
7579
  if (parser.token & 143360) {
7557
- if ((context & 1024) < 1) {
7580
+ if ((context & 1024) === 0) {
7558
7581
  if ((parser.token & 36864) === 36864) {
7559
7582
  parser.flags |= 256;
7560
7583
  }
@@ -7617,7 +7640,7 @@ function parseParenthesizedExpression(parser, context, canAssign, kind, origin,
7617
7640
  const { tokenPos: piStart, linePos: plStart, colPos: pcStart } = parser;
7618
7641
  nextToken(parser, context | 32768 | 1073741824);
7619
7642
  const scope = context & 64 ? addChildScope(createScope(), 1024) : void 0;
7620
- context = (context | 134217728 | 8192) ^ (8192 | 134217728);
7643
+ context = (context | 134217728) ^ 134217728;
7621
7644
  if (consumeOpt(parser, context, 16)) {
7622
7645
  return parseParenthesizedArrow(parser, context, scope, [], canAssign, 0, start, line, column);
7623
7646
  }
@@ -7815,7 +7838,7 @@ function parseArrowFunctionExpression(parser, context, scope, params, isAsync, s
7815
7838
  (134221824 | 8192 | 16384), scope, 16, void 0, void 0);
7816
7839
  switch (parser.token) {
7817
7840
  case 69271571:
7818
- if ((parser.flags & 1) < 1) {
7841
+ if ((parser.flags & 1) === 0) {
7819
7842
  report(parser, 112);
7820
7843
  }
7821
7844
  break;
@@ -7824,13 +7847,13 @@ function parseArrowFunctionExpression(parser, context, scope, params, isAsync, s
7824
7847
  case 22:
7825
7848
  report(parser, 113);
7826
7849
  case 67174411:
7827
- if ((parser.flags & 1) < 1) {
7850
+ if ((parser.flags & 1) === 0) {
7828
7851
  report(parser, 112);
7829
7852
  }
7830
7853
  parser.flags |= 1024;
7831
7854
  break;
7832
7855
  }
7833
- if ((parser.token & 8454144) === 8454144 && (parser.flags & 1) < 1)
7856
+ if ((parser.token & 8454144) === 8454144 && (parser.flags & 1) === 0)
7834
7857
  report(parser, 28, KeywordDescTable[parser.token & 255]);
7835
7858
  if ((parser.token & 33619968) === 33619968)
7836
7859
  report(parser, 121);
@@ -7856,7 +7879,7 @@ function parseFormalParametersOrFormalList(parser, context, scope, inGroup, kind
7856
7879
  let left;
7857
7880
  const { tokenPos, linePos, colPos } = parser;
7858
7881
  if (parser.token & 143360) {
7859
- if ((context & 1024) < 1) {
7882
+ if ((context & 1024) === 0) {
7860
7883
  if ((parser.token & 36864) === 36864) {
7861
7884
  parser.flags |= 256;
7862
7885
  }
@@ -8176,7 +8199,7 @@ function parseClassDeclaration(parser, context, scope, flags, start, line, colum
8176
8199
  id = parseIdentifier(parser, context, 0);
8177
8200
  }
8178
8201
  else {
8179
- if ((flags & 1) < 1)
8202
+ if ((flags & 1) === 0)
8180
8203
  report(parser, 37, 'Class');
8181
8204
  }
8182
8205
  let inheritedContext = context;
@@ -8307,7 +8330,7 @@ function parseClassElementList(parser, context, scope, inheritedContext, type, d
8307
8330
  }
8308
8331
  break;
8309
8332
  case 209007:
8310
- if (parser.token !== 67174411 && (parser.flags & 1) < 1) {
8333
+ if (parser.token !== 67174411 && (parser.flags & 1) === 0) {
8311
8334
  if (context & 1 && (parser.token & 1073741824) === 1073741824) {
8312
8335
  return parsePropertyDefinition(parser, context, key, kind, decorators, tokenPos, linePos, colPos);
8313
8336
  }
@@ -8345,12 +8368,13 @@ function parseClassElementList(parser, context, scope, inheritedContext, type, d
8345
8368
  }
8346
8369
  else if (context & 1 && parser.token === 131) {
8347
8370
  kind |= 4096;
8348
- key = parsePrivateIdentifier(parser, context, tokenPos, linePos, colPos);
8349
- context = context | 16384;
8371
+ key = parsePrivateIdentifier(parser, context | 16384, tokenPos, linePos, colPos);
8350
8372
  }
8351
8373
  else if (context & 1 && (parser.token & 1073741824) === 1073741824) {
8352
8374
  kind |= 128;
8353
- context = context | 16384;
8375
+ }
8376
+ else if (isStatic && token === 2162700) {
8377
+ return parseStaticBlock(parser, context, scope, tokenPos, linePos, colPos);
8354
8378
  }
8355
8379
  else if (token === 122) {
8356
8380
  key = parseIdentifier(parser, context, 0);
@@ -8381,16 +8405,16 @@ function parseClassElementList(parser, context, scope, inheritedContext, type, d
8381
8405
  else
8382
8406
  report(parser, 131);
8383
8407
  }
8384
- if ((kind & 2) < 1) {
8408
+ if ((kind & 2) === 0) {
8385
8409
  if (parser.tokenValue === 'constructor') {
8386
8410
  if ((parser.token & 1073741824) === 1073741824) {
8387
8411
  report(parser, 125);
8388
8412
  }
8389
- else if ((kind & 32) < 1 && parser.token === 67174411) {
8413
+ else if ((kind & 32) === 0 && parser.token === 67174411) {
8390
8414
  if (kind & (768 | 16 | 128 | 8)) {
8391
8415
  report(parser, 50, 'accessor');
8392
8416
  }
8393
- else if ((context & 524288) < 1) {
8417
+ else if ((context & 524288) === 0) {
8394
8418
  if (parser.flags & 32)
8395
8419
  report(parser, 51);
8396
8420
  else
@@ -8399,7 +8423,7 @@ function parseClassElementList(parser, context, scope, inheritedContext, type, d
8399
8423
  }
8400
8424
  kind |= 64;
8401
8425
  }
8402
- else if ((kind & 4096) < 1 &&
8426
+ else if ((kind & 4096) === 0 &&
8403
8427
  kind & (32 | 768 | 8 | 16) &&
8404
8428
  parser.tokenValue === 'prototype') {
8405
8429
  report(parser, 49);
@@ -8412,7 +8436,7 @@ function parseClassElementList(parser, context, scope, inheritedContext, type, d
8412
8436
  return finishNode(parser, context, start, line, column, context & 1
8413
8437
  ? {
8414
8438
  type: 'MethodDefinition',
8415
- kind: (kind & 32) < 1 && kind & 64
8439
+ kind: (kind & 32) === 0 && kind & 64
8416
8440
  ? 'constructor'
8417
8441
  : kind & 256
8418
8442
  ? 'get'
@@ -8427,7 +8451,7 @@ function parseClassElementList(parser, context, scope, inheritedContext, type, d
8427
8451
  }
8428
8452
  : {
8429
8453
  type: 'MethodDefinition',
8430
- kind: (kind & 32) < 1 && kind & 64
8454
+ kind: (kind & 32) === 0 && kind & 64
8431
8455
  ? 'constructor'
8432
8456
  : kind & 256
8433
8457
  ? 'get'
@@ -8716,7 +8740,7 @@ function parseJSXNamespacedName(parser, context, namespace, start, line, column)
8716
8740
  });
8717
8741
  }
8718
8742
  function parseJSXExpressionContainer(parser, context, inJSXChild, isAttr, start, line, column) {
8719
- nextToken(parser, context);
8743
+ nextToken(parser, context | 32768);
8720
8744
  const { tokenPos, linePos, colPos } = parser;
8721
8745
  if (parser.token === 14)
8722
8746
  return parseJSXSpreadChild(parser, context, tokenPos, linePos, colPos);
@@ -8770,7 +8794,7 @@ var estree = /*#__PURE__*/Object.freeze({
8770
8794
  __proto__: null
8771
8795
  });
8772
8796
 
8773
- var version$1 = "4.1.5";
8797
+ var version$1 = "4.3.0";
8774
8798
 
8775
8799
  const version = version$1;
8776
8800
  function parseScript(source, options) {