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.
@@ -2,7 +2,7 @@
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.meriyah = {}));
5
- }(this, (function (exports) { 'use strict';
5
+ })(this, (function (exports) { 'use strict';
6
6
 
7
7
  const errorMessages = {
8
8
  [0]: 'Unexpected token',
@@ -100,7 +100,6 @@
100
100
  [89]: 'Illegal return statement',
101
101
  [90]: 'The left hand side of the for-header binding declaration is not destructible',
102
102
  [91]: 'new.target only allowed within functions',
103
- [92]: "'Unexpected token: 'escaped keyword'",
104
103
  [93]: "'#' not followed by identifier",
105
104
  [99]: 'Invalid keyword',
106
105
  [98]: "Can not use 'let' as a class name",
@@ -115,7 +114,6 @@
115
114
  [104]: "Only '*' or '{...}' can be imported after default",
116
115
  [105]: 'Trailing decorator may be followed by method',
117
116
  [106]: "Decorators can't be used with a constructor",
118
- [107]: "'%0' may not be used as an identifier in this context",
119
117
  [108]: 'HTML comments are only allowed with web compatibility (Annex B)',
120
118
  [109]: "The identifier 'let' must not be in expression position in strict mode",
121
119
  [110]: 'Cannot assign to `eval` and `arguments` in strict mode',
@@ -871,7 +869,7 @@
871
869
  break;
872
870
  case 117:
873
871
  if (mask & 16)
874
- report(parser, 34, 'g');
872
+ report(parser, 34, 'u');
875
873
  mask |= 16;
876
874
  break;
877
875
  case 121:
@@ -880,9 +878,14 @@
880
878
  mask |= 8;
881
879
  break;
882
880
  case 115:
883
- if (mask & 12)
881
+ if (mask & 32)
884
882
  report(parser, 34, 's');
885
- mask |= 12;
883
+ mask |= 32;
884
+ break;
885
+ case 100:
886
+ if (mask & 64)
887
+ report(parser, 34, 'd');
888
+ mask |= 64;
886
889
  break;
887
890
  default:
888
891
  report(parser, 33);
@@ -902,7 +905,13 @@
902
905
  return new RegExp(pattern, flags);
903
906
  }
904
907
  catch (e) {
905
- report(parser, 32);
908
+ try {
909
+ new RegExp(pattern, flags.replace('d', ''));
910
+ return null;
911
+ }
912
+ catch (e) {
913
+ report(parser, 32);
914
+ }
906
915
  }
907
916
  }
908
917
 
@@ -1213,8 +1222,8 @@
1213
1222
  digits++;
1214
1223
  char = advanceChar(parser);
1215
1224
  }
1216
- if (digits < 1 || !allowSeparator) {
1217
- report(parser, digits < 1 ? 19 : 147);
1225
+ if (digits === 0 || !allowSeparator) {
1226
+ report(parser, digits === 0 ? 19 : 147);
1218
1227
  }
1219
1228
  }
1220
1229
  else if ((char | 32) === 111) {
@@ -1234,8 +1243,8 @@
1234
1243
  digits++;
1235
1244
  char = advanceChar(parser);
1236
1245
  }
1237
- if (digits < 1 || !allowSeparator) {
1238
- report(parser, digits < 1 ? 0 : 147);
1246
+ if (digits === 0 || !allowSeparator) {
1247
+ report(parser, digits === 0 ? 0 : 147);
1239
1248
  }
1240
1249
  }
1241
1250
  else if ((char | 32) === 98) {
@@ -1255,8 +1264,8 @@
1255
1264
  digits++;
1256
1265
  char = advanceChar(parser);
1257
1266
  }
1258
- if (digits < 1 || !allowSeparator) {
1259
- report(parser, digits < 1 ? 0 : 147);
1267
+ if (digits === 0 || !allowSeparator) {
1268
+ report(parser, digits === 0 ? 0 : 147);
1260
1269
  }
1261
1270
  }
1262
1271
  else if (CharTypes[char] & 32) {
@@ -1332,7 +1341,7 @@
1332
1341
  if (CharTypes[char] & 256)
1333
1342
  char = advanceChar(parser);
1334
1343
  const { index } = parser;
1335
- if ((CharTypes[char] & 16) < 1)
1344
+ if ((CharTypes[char] & 16) === 0)
1336
1345
  report(parser, 10);
1337
1346
  value += parser.source.substring(end, index) + scanDecimalDigitsOrSeparator(parser, char);
1338
1347
  char = parser.currentChar;
@@ -1795,7 +1804,7 @@
1795
1804
  }
1796
1805
  else if (ch === 61) {
1797
1806
  advanceChar(parser);
1798
- return 8456000;
1807
+ return 8456256;
1799
1808
  }
1800
1809
  if (ch === 33) {
1801
1810
  const index = parser.index + 1;
@@ -1813,7 +1822,7 @@
1813
1822
  return 8456258;
1814
1823
  }
1815
1824
  if (ch === 47) {
1816
- if ((context & 16) < 1)
1825
+ if ((context & 16) === 0)
1817
1826
  return 8456258;
1818
1827
  const index = parser.index + 1;
1819
1828
  if (index < parser.end) {
@@ -1978,7 +1987,7 @@
1978
1987
  const ch = parser.currentChar;
1979
1988
  if (ch === 61) {
1980
1989
  advanceChar(parser);
1981
- return 8456001;
1990
+ return 8456257;
1982
1991
  }
1983
1992
  if (ch !== 62)
1984
1993
  return 8456259;
@@ -4919,7 +4928,7 @@
4919
4928
  case 86106:
4920
4929
  report(parser, context & 1024
4921
4930
  ? 73
4922
- : (context & 256) < 1
4931
+ : (context & 256) === 0
4923
4932
  ? 75
4924
4933
  : 74);
4925
4934
  case 86096:
@@ -4965,12 +4974,12 @@
4965
4974
  });
4966
4975
  }
4967
4976
  function parseReturnStatement(parser, context, start, line, column) {
4968
- if ((context & 32) < 1 && context & 8192)
4977
+ if ((context & 32) === 0 && context & 8192)
4969
4978
  report(parser, 89);
4970
4979
  nextToken(parser, context | 32768);
4971
4980
  const argument = parser.flags & 1 || parser.token & 1048576
4972
4981
  ? null
4973
- : parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.line, parser.column);
4982
+ : parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
4974
4983
  matchOrInsertSemicolon(parser, context | 32768);
4975
4984
  return finishNode(parser, context, start, line, column, {
4976
4985
  type: 'ReturnStatement',
@@ -4989,7 +4998,7 @@
4989
4998
  validateAndDeclareLabel(parser, labels, value);
4990
4999
  nextToken(parser, context | 32768);
4991
5000
  const body = allowFuncDecl &&
4992
- (context & 1024) < 1 &&
5001
+ (context & 1024) === 0 &&
4993
5002
  context & 256 &&
4994
5003
  parser.token === 86106
4995
5004
  ? parseFunctionDeclaration(parser, context, addChildScope(scope, 2), origin, 0, 0, 0, parser.tokenPos, parser.linePos, parser.colPos)
@@ -5098,7 +5107,7 @@
5098
5107
  }
5099
5108
  function parseConsequentOrAlternative(parser, context, scope, labels, start, line, column) {
5100
5109
  return context & 1024 ||
5101
- (context & 256) < 1 ||
5110
+ (context & 256) === 0 ||
5102
5111
  parser.token !== 86106
5103
5112
  ? parseStatement(parser, context, scope, 0, { $: labels }, 0, parser.tokenPos, parser.linePos, parser.colPos)
5104
5113
  : parseFunctionDeclaration(parser, context, addChildScope(scope, 2), 0, 0, 0, 0, start, line, column);
@@ -5163,11 +5172,11 @@
5163
5172
  return parseStatement(parser, ((context | 134217728) ^ 134217728) | 131072, scope, 0, { loop: 1, $: labels }, 0, parser.tokenPos, parser.linePos, parser.colPos);
5164
5173
  }
5165
5174
  function parseContinueStatement(parser, context, labels, start, line, column) {
5166
- if ((context & 131072) < 1)
5175
+ if ((context & 131072) === 0)
5167
5176
  report(parser, 65);
5168
5177
  nextToken(parser, context);
5169
5178
  let label = null;
5170
- if ((parser.flags & 1) < 1 && parser.token & 143360) {
5179
+ if ((parser.flags & 1) === 0 && parser.token & 143360) {
5171
5180
  const { tokenValue } = parser;
5172
5181
  label = parseIdentifier(parser, context | 32768, 0);
5173
5182
  if (!isValidLabel(parser, labels, tokenValue, 1))
@@ -5182,13 +5191,13 @@
5182
5191
  function parseBreakStatement(parser, context, labels, start, line, column) {
5183
5192
  nextToken(parser, context | 32768);
5184
5193
  let label = null;
5185
- if ((parser.flags & 1) < 1 && parser.token & 143360) {
5194
+ if ((parser.flags & 1) === 0 && parser.token & 143360) {
5186
5195
  const { tokenValue } = parser;
5187
5196
  label = parseIdentifier(parser, context | 32768, 0);
5188
5197
  if (!isValidLabel(parser, labels, tokenValue, 0))
5189
5198
  report(parser, 134, tokenValue);
5190
5199
  }
5191
- else if ((context & (4096 | 131072)) < 1) {
5200
+ else if ((context & (4096 | 131072)) === 0) {
5192
5201
  report(parser, 66);
5193
5202
  }
5194
5203
  matchOrInsertSemicolon(parser, context | 32768);
@@ -5268,6 +5277,17 @@
5268
5277
  body
5269
5278
  });
5270
5279
  }
5280
+ function parseStaticBlock(parser, context, scope, start, line, column) {
5281
+ if (scope)
5282
+ scope = addChildScope(scope, 2);
5283
+ const ctorContext = 16384 | 524288;
5284
+ context = ((context | ctorContext) ^ ctorContext) | 262144;
5285
+ const { body } = parseBlock(parser, context, scope, {}, start, line, column);
5286
+ return finishNode(parser, context, start, line, column, {
5287
+ type: 'StaticBlock',
5288
+ body
5289
+ });
5290
+ }
5271
5291
  function parseDoWhileStatement(parser, context, scope, labels, start, line, column) {
5272
5292
  nextToken(parser, context | 32768);
5273
5293
  const body = parseIterationStatementBody(parser, context, scope, labels);
@@ -5355,10 +5375,10 @@
5355
5375
  if (parser.token === 1077936157) {
5356
5376
  nextToken(parser, context | 32768);
5357
5377
  init = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
5358
- if (origin & 32 || (token & 2097152) < 1) {
5378
+ if (origin & 32 || (token & 2097152) === 0) {
5359
5379
  if (parser.token === 274549 ||
5360
5380
  (parser.token === 8738868 &&
5361
- (token & 2097152 || (kind & 4) < 1 || context & 1024))) {
5381
+ (token & 2097152 || (kind & 4) === 0 || context & 1024))) {
5362
5382
  reportMessageAt(tokenPos, parser.line, parser.index - 3, 57, parser.token === 274549 ? 'of' : 'in');
5363
5383
  }
5364
5384
  }
@@ -5375,7 +5395,8 @@
5375
5395
  }
5376
5396
  function parseForStatement(parser, context, scope, labels, start, line, column) {
5377
5397
  nextToken(parser, context);
5378
- const forAwait = (context & 4194304) > 0 && consumeOpt(parser, context, 209008);
5398
+ const forAwait = ((context & 4194304) > 0 || ((context & 2048) > 0 && (context & 8192) > 0)) &&
5399
+ consumeOpt(parser, context, 209008);
5379
5400
  consume(parser, context | 32768, 67174411);
5380
5401
  if (scope)
5381
5402
  scope = addChildScope(scope, 1);
@@ -5664,7 +5685,7 @@
5664
5685
  const { tokenPos, linePos, colPos } = parser;
5665
5686
  declaration = parseIdentifier(parser, context, 0);
5666
5687
  const { flags } = parser;
5667
- if ((flags & 1) < 1) {
5688
+ if ((flags & 1) === 0) {
5668
5689
  if (parser.token === 86106) {
5669
5690
  declaration = parseFunctionDeclaration(parser, context, scope, 4, 1, 1, 1, tokenPos, linePos, colPos);
5670
5691
  }
@@ -5788,7 +5809,7 @@
5788
5809
  case 209007:
5789
5810
  const { tokenPos, linePos, colPos } = parser;
5790
5811
  nextToken(parser, context);
5791
- if ((parser.flags & 1) < 1 && parser.token === 86106) {
5812
+ if ((parser.flags & 1) === 0 && parser.token === 86106) {
5792
5813
  declaration = parseFunctionDeclaration(parser, context, scope, 4, 1, 2, 1, tokenPos, linePos, colPos);
5793
5814
  if (scope) {
5794
5815
  key = declaration.id ? declaration.id.name : '';
@@ -5945,7 +5966,7 @@
5945
5966
  const { token } = parser;
5946
5967
  const expr = parseIdentifier(parser, context, isPattern);
5947
5968
  const { flags } = parser;
5948
- if ((flags & 1) < 1) {
5969
+ if ((flags & 1) === 0) {
5949
5970
  if (parser.token === 86106) {
5950
5971
  return parseFunctionExpression(parser, context, 1, inGroup, start, line, column);
5951
5972
  }
@@ -5979,7 +6000,7 @@
5979
6000
  report(parser, 120);
5980
6001
  let argument = null;
5981
6002
  let delegate = false;
5982
- if ((parser.flags & 1) < 1) {
6003
+ if ((parser.flags & 1) === 0) {
5983
6004
  delegate = consumeOpt(parser, context | 32768, 8457014);
5984
6005
  if (parser.token & (12288 | 65536) || delegate) {
5985
6006
  argument = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
@@ -5999,7 +6020,7 @@
5999
6020
  function parseAwaitExpression(parser, context, inNew, inGroup, start, line, column) {
6000
6021
  if (inGroup)
6001
6022
  parser.destructible |= 128;
6002
- if (context & 4194304) {
6023
+ if (context & 4194304 || (context & 2048 && context & 8192)) {
6003
6024
  if (inNew)
6004
6025
  report(parser, 0);
6005
6026
  if (context & 8388608) {
@@ -6007,6 +6028,8 @@
6007
6028
  }
6008
6029
  nextToken(parser, context | 32768);
6009
6030
  const argument = parseLeftHandSideExpression(parser, context, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
6031
+ if (parser.token === 8457273)
6032
+ report(parser, 31);
6010
6033
  parser.assignable = 2;
6011
6034
  return finishNode(parser, context, start, line, column, {
6012
6035
  type: 'AwaitExpression',
@@ -6014,7 +6037,7 @@
6014
6037
  });
6015
6038
  }
6016
6039
  if (context & 2048)
6017
- report(parser, 107, 'Await');
6040
+ report(parser, 95);
6018
6041
  return parseIdentifierOrArrow(parser, context, start, line, column);
6019
6042
  }
6020
6043
  function parseFunctionBody(parser, context, scope, origin, firstRestricted, scopeError) {
@@ -6054,8 +6077,8 @@
6054
6077
  if (context & 64 &&
6055
6078
  scope &&
6056
6079
  scopeError !== void 0 &&
6057
- (prevContext & 1024) < 1 &&
6058
- (context & 8192) < 1) {
6080
+ (prevContext & 1024) === 0 &&
6081
+ (context & 8192) === 0) {
6059
6082
  reportScopeError(scopeError);
6060
6083
  }
6061
6084
  }
@@ -6081,19 +6104,19 @@
6081
6104
  case 67108991:
6082
6105
  report(parser, 161);
6083
6106
  case 67174411: {
6084
- if ((context & 524288) < 1)
6107
+ if ((context & 524288) === 0)
6085
6108
  report(parser, 26);
6086
6109
  if (context & 16384)
6087
- report(parser, 143);
6110
+ report(parser, 27);
6088
6111
  parser.assignable = 2;
6089
6112
  break;
6090
6113
  }
6091
6114
  case 69271571:
6092
6115
  case 67108877: {
6093
- if ((context & 262144) < 1)
6116
+ if ((context & 262144) === 0)
6094
6117
  report(parser, 27);
6095
6118
  if (context & 16384)
6096
- report(parser, 143);
6119
+ report(parser, 27);
6097
6120
  parser.assignable = 1;
6098
6121
  break;
6099
6122
  }
@@ -6120,14 +6143,14 @@
6120
6143
  });
6121
6144
  }
6122
6145
  function parseMemberOrUpdateExpression(parser, context, expr, inGroup, inChain, start, line, column) {
6123
- if ((parser.token & 33619968) === 33619968 && (parser.flags & 1) < 1) {
6146
+ if ((parser.token & 33619968) === 33619968 && (parser.flags & 1) === 0) {
6124
6147
  expr = parseUpdateExpression(parser, context, expr, start, line, column);
6125
6148
  }
6126
6149
  else if ((parser.token & 67108864) === 67108864) {
6127
- context = (context | 134217728 | 8192) ^ (134217728 | 8192);
6150
+ context = (context | 134217728) ^ 134217728;
6128
6151
  switch (parser.token) {
6129
6152
  case 67108877: {
6130
- nextToken(parser, context | 1073741824);
6153
+ nextToken(parser, (context | 1073741824 | 8192) ^ 8192);
6131
6154
  parser.assignable = 1;
6132
6155
  const property = parsePropertyOrPrivatePropertyName(parser, context);
6133
6156
  expr = finishNode(parser, context, start, line, column, {
@@ -6183,7 +6206,7 @@
6183
6206
  break;
6184
6207
  }
6185
6208
  case 67108991: {
6186
- nextToken(parser, context);
6209
+ nextToken(parser, (context | 1073741824 | 8192) ^ 8192);
6187
6210
  parser.flags |= 2048;
6188
6211
  parser.assignable = 2;
6189
6212
  expr = parseOptionalChain(parser, context, expr, start, line, column);
@@ -6247,7 +6270,7 @@
6247
6270
  });
6248
6271
  }
6249
6272
  else {
6250
- if ((parser.token & (143360 | 4096)) < 1)
6273
+ if ((parser.token & (143360 | 4096)) === 0)
6251
6274
  report(parser, 154);
6252
6275
  const property = parseIdentifier(parser, context, 0);
6253
6276
  parser.assignable = 2;
@@ -6265,7 +6288,7 @@
6265
6288
  return node;
6266
6289
  }
6267
6290
  function parsePropertyOrPrivatePropertyName(parser, context) {
6268
- if ((parser.token & (143360 | 4096)) < 1 && parser.token !== 131) {
6291
+ if ((parser.token & (143360 | 4096)) === 0 && parser.token !== 131) {
6269
6292
  report(parser, 154);
6270
6293
  }
6271
6294
  return context & 1 && parser.token === 131
@@ -6590,11 +6613,11 @@
6590
6613
  let firstRestricted;
6591
6614
  let functionScope = scope ? createScope() : void 0;
6592
6615
  if (parser.token === 67174411) {
6593
- if ((flags & 1) < 1)
6616
+ if ((flags & 1) === 0)
6594
6617
  report(parser, 37, 'Function');
6595
6618
  }
6596
6619
  else {
6597
- const kind = origin & 4 && ((context & 8192) < 1 || (context & 2048) < 1)
6620
+ const kind = origin & 4 && ((context & 8192) === 0 || (context & 2048) === 0)
6598
6621
  ? 4
6599
6622
  : 64;
6600
6623
  validateFunctionName(parser, context | ((context & 3072) << 11), parser.token);
@@ -6740,7 +6763,7 @@
6740
6763
  destructible |=
6741
6764
  kind & 1
6742
6765
  ? 32
6743
- : (kind & 2) < 1
6766
+ : (kind & 2) === 0
6744
6767
  ? 16
6745
6768
  : 0;
6746
6769
  left = parseMemberOrUpdateExpression(parser, context, left, inGroup, 0, tokenPos, linePos, colPos);
@@ -6799,7 +6822,7 @@
6799
6822
  left = parseLeftHandSideExpression(parser, context, 1, 0, 1, tokenPos, linePos, colPos);
6800
6823
  if (parser.token !== 18 && parser.token !== 20) {
6801
6824
  left = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, left);
6802
- if ((kind & (2 | 1)) < 1 && token === 67174411)
6825
+ if ((kind & (2 | 1)) === 0 && token === 67174411)
6803
6826
  destructible |= 16;
6804
6827
  }
6805
6828
  else if (parser.assignable & 2) {
@@ -6988,7 +7011,7 @@
6988
7011
  });
6989
7012
  }
6990
7013
  function parseMethodDefinition(parser, context, kind, inGroup, start, line, column) {
6991
- const modifierFlags = (kind & 64) < 1 ? 31981568 : 14680064;
7014
+ const modifierFlags = (kind & 64) === 0 ? 31981568 : 14680064;
6992
7015
  context =
6993
7016
  ((context | modifierFlags) ^ modifierFlags) |
6994
7017
  ((kind & 88) << 18) |
@@ -7556,7 +7579,7 @@
7556
7579
  let left = null;
7557
7580
  const { tokenPos, linePos, colPos } = parser;
7558
7581
  if (parser.token & 143360) {
7559
- if ((context & 1024) < 1) {
7582
+ if ((context & 1024) === 0) {
7560
7583
  if ((parser.token & 36864) === 36864) {
7561
7584
  parser.flags |= 256;
7562
7585
  }
@@ -7619,7 +7642,7 @@
7619
7642
  const { tokenPos: piStart, linePos: plStart, colPos: pcStart } = parser;
7620
7643
  nextToken(parser, context | 32768 | 1073741824);
7621
7644
  const scope = context & 64 ? addChildScope(createScope(), 1024) : void 0;
7622
- context = (context | 134217728 | 8192) ^ (8192 | 134217728);
7645
+ context = (context | 134217728) ^ 134217728;
7623
7646
  if (consumeOpt(parser, context, 16)) {
7624
7647
  return parseParenthesizedArrow(parser, context, scope, [], canAssign, 0, start, line, column);
7625
7648
  }
@@ -7817,7 +7840,7 @@
7817
7840
  (134221824 | 8192 | 16384), scope, 16, void 0, void 0);
7818
7841
  switch (parser.token) {
7819
7842
  case 69271571:
7820
- if ((parser.flags & 1) < 1) {
7843
+ if ((parser.flags & 1) === 0) {
7821
7844
  report(parser, 112);
7822
7845
  }
7823
7846
  break;
@@ -7826,13 +7849,13 @@
7826
7849
  case 22:
7827
7850
  report(parser, 113);
7828
7851
  case 67174411:
7829
- if ((parser.flags & 1) < 1) {
7852
+ if ((parser.flags & 1) === 0) {
7830
7853
  report(parser, 112);
7831
7854
  }
7832
7855
  parser.flags |= 1024;
7833
7856
  break;
7834
7857
  }
7835
- if ((parser.token & 8454144) === 8454144 && (parser.flags & 1) < 1)
7858
+ if ((parser.token & 8454144) === 8454144 && (parser.flags & 1) === 0)
7836
7859
  report(parser, 28, KeywordDescTable[parser.token & 255]);
7837
7860
  if ((parser.token & 33619968) === 33619968)
7838
7861
  report(parser, 121);
@@ -7858,7 +7881,7 @@
7858
7881
  let left;
7859
7882
  const { tokenPos, linePos, colPos } = parser;
7860
7883
  if (parser.token & 143360) {
7861
- if ((context & 1024) < 1) {
7884
+ if ((context & 1024) === 0) {
7862
7885
  if ((parser.token & 36864) === 36864) {
7863
7886
  parser.flags |= 256;
7864
7887
  }
@@ -8178,7 +8201,7 @@
8178
8201
  id = parseIdentifier(parser, context, 0);
8179
8202
  }
8180
8203
  else {
8181
- if ((flags & 1) < 1)
8204
+ if ((flags & 1) === 0)
8182
8205
  report(parser, 37, 'Class');
8183
8206
  }
8184
8207
  let inheritedContext = context;
@@ -8309,7 +8332,7 @@
8309
8332
  }
8310
8333
  break;
8311
8334
  case 209007:
8312
- if (parser.token !== 67174411 && (parser.flags & 1) < 1) {
8335
+ if (parser.token !== 67174411 && (parser.flags & 1) === 0) {
8313
8336
  if (context & 1 && (parser.token & 1073741824) === 1073741824) {
8314
8337
  return parsePropertyDefinition(parser, context, key, kind, decorators, tokenPos, linePos, colPos);
8315
8338
  }
@@ -8347,12 +8370,13 @@
8347
8370
  }
8348
8371
  else if (context & 1 && parser.token === 131) {
8349
8372
  kind |= 4096;
8350
- key = parsePrivateIdentifier(parser, context, tokenPos, linePos, colPos);
8351
- context = context | 16384;
8373
+ key = parsePrivateIdentifier(parser, context | 16384, tokenPos, linePos, colPos);
8352
8374
  }
8353
8375
  else if (context & 1 && (parser.token & 1073741824) === 1073741824) {
8354
8376
  kind |= 128;
8355
- context = context | 16384;
8377
+ }
8378
+ else if (isStatic && token === 2162700) {
8379
+ return parseStaticBlock(parser, context, scope, tokenPos, linePos, colPos);
8356
8380
  }
8357
8381
  else if (token === 122) {
8358
8382
  key = parseIdentifier(parser, context, 0);
@@ -8383,16 +8407,16 @@
8383
8407
  else
8384
8408
  report(parser, 131);
8385
8409
  }
8386
- if ((kind & 2) < 1) {
8410
+ if ((kind & 2) === 0) {
8387
8411
  if (parser.tokenValue === 'constructor') {
8388
8412
  if ((parser.token & 1073741824) === 1073741824) {
8389
8413
  report(parser, 125);
8390
8414
  }
8391
- else if ((kind & 32) < 1 && parser.token === 67174411) {
8415
+ else if ((kind & 32) === 0 && parser.token === 67174411) {
8392
8416
  if (kind & (768 | 16 | 128 | 8)) {
8393
8417
  report(parser, 50, 'accessor');
8394
8418
  }
8395
- else if ((context & 524288) < 1) {
8419
+ else if ((context & 524288) === 0) {
8396
8420
  if (parser.flags & 32)
8397
8421
  report(parser, 51);
8398
8422
  else
@@ -8401,7 +8425,7 @@
8401
8425
  }
8402
8426
  kind |= 64;
8403
8427
  }
8404
- else if ((kind & 4096) < 1 &&
8428
+ else if ((kind & 4096) === 0 &&
8405
8429
  kind & (32 | 768 | 8 | 16) &&
8406
8430
  parser.tokenValue === 'prototype') {
8407
8431
  report(parser, 49);
@@ -8414,7 +8438,7 @@
8414
8438
  return finishNode(parser, context, start, line, column, context & 1
8415
8439
  ? {
8416
8440
  type: 'MethodDefinition',
8417
- kind: (kind & 32) < 1 && kind & 64
8441
+ kind: (kind & 32) === 0 && kind & 64
8418
8442
  ? 'constructor'
8419
8443
  : kind & 256
8420
8444
  ? 'get'
@@ -8429,7 +8453,7 @@
8429
8453
  }
8430
8454
  : {
8431
8455
  type: 'MethodDefinition',
8432
- kind: (kind & 32) < 1 && kind & 64
8456
+ kind: (kind & 32) === 0 && kind & 64
8433
8457
  ? 'constructor'
8434
8458
  : kind & 256
8435
8459
  ? 'get'
@@ -8718,7 +8742,7 @@
8718
8742
  });
8719
8743
  }
8720
8744
  function parseJSXExpressionContainer(parser, context, inJSXChild, isAttr, start, line, column) {
8721
- nextToken(parser, context);
8745
+ nextToken(parser, context | 32768);
8722
8746
  const { tokenPos, linePos, colPos } = parser;
8723
8747
  if (parser.token === 14)
8724
8748
  return parseJSXSpreadChild(parser, context, tokenPos, linePos, colPos);
@@ -8772,7 +8796,7 @@
8772
8796
  __proto__: null
8773
8797
  });
8774
8798
 
8775
- var version$1 = "4.1.5";
8799
+ var version$1 = "4.3.0";
8776
8800
 
8777
8801
  const version = version$1;
8778
8802
  function parseScript(source, options) {
@@ -8793,4 +8817,4 @@
8793
8817
 
8794
8818
  Object.defineProperty(exports, '__esModule', { value: true });
8795
8819
 
8796
- })));
8820
+ }));