meriyah 4.4.2 → 4.4.3

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/dist/meriyah.cjs CHANGED
@@ -6133,8 +6133,9 @@ function parseSuperExpression(parser, context, start, line, column) {
6133
6133
  case 67174411: {
6134
6134
  if ((context & 524288) === 0)
6135
6135
  report(parser, 26);
6136
- if (context & 16384)
6136
+ if (context & 16384 && !(context & 33554432)) {
6137
6137
  report(parser, 27);
6138
+ }
6138
6139
  parser.assignable = 2;
6139
6140
  break;
6140
6141
  }
@@ -6142,8 +6143,9 @@ function parseSuperExpression(parser, context, start, line, column) {
6142
6143
  case 67108877: {
6143
6144
  if ((context & 262144) === 0)
6144
6145
  report(parser, 27);
6145
- if (context & 16384)
6146
+ if (context & 16384 && !(context & 33554432)) {
6146
6147
  report(parser, 27);
6148
+ }
6147
6149
  parser.assignable = 1;
6148
6150
  break;
6149
6151
  }
@@ -6178,6 +6180,9 @@ function parseMemberOrUpdateExpression(parser, context, expr, inGroup, inChain,
6178
6180
  switch (parser.token) {
6179
6181
  case 67108877: {
6180
6182
  nextToken(parser, (context | 1073741824 | 8192) ^ 8192);
6183
+ if (context & 16384 && parser.token === 131 && parser.tokenValue === 'super') {
6184
+ report(parser, 27);
6185
+ }
6181
6186
  parser.assignable = 1;
6182
6187
  const property = parsePropertyOrPrivatePropertyName(parser, context | 65536);
6183
6188
  expr = finishNode(parser, context, start, line, column, {
@@ -7861,7 +7866,7 @@ function parseArrowFunctionExpression(parser, context, scope, params, isAsync, s
7861
7866
  reportScopeError(scope.scopeError);
7862
7867
  }
7863
7868
  if (expression) {
7864
- body = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
7869
+ body = parseExpression(parser, context & 16384 ? context | 33554432 : context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
7865
7870
  }
7866
7871
  else {
7867
7872
  if (scope)
@@ -8521,6 +8526,13 @@ function parsePropertyDefinition(parser, context, key, state, decorators, start,
8521
8526
  const { tokenPos, linePos, colPos } = parser;
8522
8527
  if (parser.token === 537079928)
8523
8528
  report(parser, 116);
8529
+ const modifierFlags = (state & 64) === 0
8530
+ ? 31981568
8531
+ : 14680064;
8532
+ context =
8533
+ ((context | modifierFlags) ^ modifierFlags) |
8534
+ ((state & 88) << 18) |
8535
+ 100925440;
8524
8536
  value = parsePrimaryExpression(parser, context | 16384, 2, 0, 1, 0, 0, 1, tokenPos, linePos, colPos);
8525
8537
  if ((parser.token & 1073741824) !== 1073741824 ||
8526
8538
  (parser.token & 4194304) === 4194304) {
@@ -8832,7 +8844,7 @@ var estree = /*#__PURE__*/Object.freeze({
8832
8844
  __proto__: null
8833
8845
  });
8834
8846
 
8835
- var version$1 = "4.4.2";
8847
+ var version$1 = "4.4.3";
8836
8848
 
8837
8849
  const version = version$1;
8838
8850
  function parseScript(source, options) {
@@ -6133,8 +6133,9 @@ function parseSuperExpression(parser, context, start, line, column) {
6133
6133
  case 67174411: {
6134
6134
  if ((context & 524288) === 0)
6135
6135
  report(parser, 26);
6136
- if (context & 16384)
6136
+ if (context & 16384 && !(context & 33554432)) {
6137
6137
  report(parser, 27);
6138
+ }
6138
6139
  parser.assignable = 2;
6139
6140
  break;
6140
6141
  }
@@ -6142,8 +6143,9 @@ function parseSuperExpression(parser, context, start, line, column) {
6142
6143
  case 67108877: {
6143
6144
  if ((context & 262144) === 0)
6144
6145
  report(parser, 27);
6145
- if (context & 16384)
6146
+ if (context & 16384 && !(context & 33554432)) {
6146
6147
  report(parser, 27);
6148
+ }
6147
6149
  parser.assignable = 1;
6148
6150
  break;
6149
6151
  }
@@ -6178,6 +6180,9 @@ function parseMemberOrUpdateExpression(parser, context, expr, inGroup, inChain,
6178
6180
  switch (parser.token) {
6179
6181
  case 67108877: {
6180
6182
  nextToken(parser, (context | 1073741824 | 8192) ^ 8192);
6183
+ if (context & 16384 && parser.token === 131 && parser.tokenValue === 'super') {
6184
+ report(parser, 27);
6185
+ }
6181
6186
  parser.assignable = 1;
6182
6187
  const property = parsePropertyOrPrivatePropertyName(parser, context | 65536);
6183
6188
  expr = finishNode(parser, context, start, line, column, {
@@ -7861,7 +7866,7 @@ function parseArrowFunctionExpression(parser, context, scope, params, isAsync, s
7861
7866
  reportScopeError(scope.scopeError);
7862
7867
  }
7863
7868
  if (expression) {
7864
- body = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
7869
+ body = parseExpression(parser, context & 16384 ? context | 33554432 : context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
7865
7870
  }
7866
7871
  else {
7867
7872
  if (scope)
@@ -8521,6 +8526,13 @@ function parsePropertyDefinition(parser, context, key, state, decorators, start,
8521
8526
  const { tokenPos, linePos, colPos } = parser;
8522
8527
  if (parser.token === 537079928)
8523
8528
  report(parser, 116);
8529
+ const modifierFlags = (state & 64) === 0
8530
+ ? 31981568
8531
+ : 14680064;
8532
+ context =
8533
+ ((context | modifierFlags) ^ modifierFlags) |
8534
+ ((state & 88) << 18) |
8535
+ 100925440;
8524
8536
  value = parsePrimaryExpression(parser, context | 16384, 2, 0, 1, 0, 0, 1, tokenPos, linePos, colPos);
8525
8537
  if ((parser.token & 1073741824) !== 1073741824 ||
8526
8538
  (parser.token & 4194304) === 4194304) {
@@ -8832,7 +8844,7 @@ var estree = /*#__PURE__*/Object.freeze({
8832
8844
  __proto__: null
8833
8845
  });
8834
8846
 
8835
- var version$1 = "4.4.2";
8847
+ var version$1 = "4.4.3";
8836
8848
 
8837
8849
  const version = version$1;
8838
8850
  function parseScript(source, options) {