meriyah 4.1.5 → 4.2.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.
@@ -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',
@@ -5999,7 +5997,7 @@
5999
5997
  function parseAwaitExpression(parser, context, inNew, inGroup, start, line, column) {
6000
5998
  if (inGroup)
6001
5999
  parser.destructible |= 128;
6002
- if (context & 4194304) {
6000
+ if (context & 4194304 || (context & 2048 && context & 8192)) {
6003
6001
  if (inNew)
6004
6002
  report(parser, 0);
6005
6003
  if (context & 8388608) {
@@ -6007,6 +6005,8 @@
6007
6005
  }
6008
6006
  nextToken(parser, context | 32768);
6009
6007
  const argument = parseLeftHandSideExpression(parser, context, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
6008
+ if (parser.token === 8457273)
6009
+ report(parser, 31);
6010
6010
  parser.assignable = 2;
6011
6011
  return finishNode(parser, context, start, line, column, {
6012
6012
  type: 'AwaitExpression',
@@ -6014,7 +6014,7 @@
6014
6014
  });
6015
6015
  }
6016
6016
  if (context & 2048)
6017
- report(parser, 107, 'Await');
6017
+ report(parser, 95);
6018
6018
  return parseIdentifierOrArrow(parser, context, start, line, column);
6019
6019
  }
6020
6020
  function parseFunctionBody(parser, context, scope, origin, firstRestricted, scopeError) {
@@ -7619,7 +7619,7 @@
7619
7619
  const { tokenPos: piStart, linePos: plStart, colPos: pcStart } = parser;
7620
7620
  nextToken(parser, context | 32768 | 1073741824);
7621
7621
  const scope = context & 64 ? addChildScope(createScope(), 1024) : void 0;
7622
- context = (context | 134217728 | 8192) ^ (8192 | 134217728);
7622
+ context = (context | 134217728) ^ 134217728;
7623
7623
  if (consumeOpt(parser, context, 16)) {
7624
7624
  return parseParenthesizedArrow(parser, context, scope, [], canAssign, 0, start, line, column);
7625
7625
  }
@@ -8772,7 +8772,7 @@
8772
8772
  __proto__: null
8773
8773
  });
8774
8774
 
8775
- var version$1 = "4.1.5";
8775
+ var version$1 = "4.2.0";
8776
8776
 
8777
8777
  const version = version$1;
8778
8778
  function parseScript(source, options) {
@@ -138,7 +138,6 @@
138
138
  _a[89] = 'Illegal return statement',
139
139
  _a[90] = 'The left hand side of the for-header binding declaration is not destructible',
140
140
  _a[91] = 'new.target only allowed within functions',
141
- _a[92] = "'Unexpected token: 'escaped keyword'",
142
141
  _a[93] = "'#' not followed by identifier",
143
142
  _a[99] = 'Invalid keyword',
144
143
  _a[98] = "Can not use 'let' as a class name",
@@ -153,7 +152,6 @@
153
152
  _a[104] = "Only '*' or '{...}' can be imported after default",
154
153
  _a[105] = 'Trailing decorator may be followed by method',
155
154
  _a[106] = "Decorators can't be used with a constructor",
156
- _a[107] = "'%0' may not be used as an identifier in this context",
157
155
  _a[108] = 'HTML comments are only allowed with web compatibility (Annex B)',
158
156
  _a[109] = "The identifier 'let' must not be in expression position in strict mode",
159
157
  _a[110] = 'Cannot assign to `eval` and `arguments` in strict mode',
@@ -6057,7 +6055,7 @@
6057
6055
  function parseAwaitExpression(parser, context, inNew, inGroup, start, line, column) {
6058
6056
  if (inGroup)
6059
6057
  parser.destructible |= 128;
6060
- if (context & 4194304) {
6058
+ if (context & 4194304 || (context & 2048 && context & 8192)) {
6061
6059
  if (inNew)
6062
6060
  report(parser, 0);
6063
6061
  if (context & 8388608) {
@@ -6065,6 +6063,8 @@
6065
6063
  }
6066
6064
  nextToken(parser, context | 32768);
6067
6065
  var argument = parseLeftHandSideExpression(parser, context, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
6066
+ if (parser.token === 8457273)
6067
+ report(parser, 31);
6068
6068
  parser.assignable = 2;
6069
6069
  return finishNode(parser, context, start, line, column, {
6070
6070
  type: 'AwaitExpression',
@@ -6072,7 +6072,7 @@
6072
6072
  });
6073
6073
  }
6074
6074
  if (context & 2048)
6075
- report(parser, 107, 'Await');
6075
+ report(parser, 95);
6076
6076
  return parseIdentifierOrArrow(parser, context, start, line, column);
6077
6077
  }
6078
6078
  function parseFunctionBody(parser, context, scope, origin, firstRestricted, scopeError) {
@@ -7677,7 +7677,7 @@
7677
7677
  var piStart = parser.tokenPos, plStart = parser.linePos, pcStart = parser.colPos;
7678
7678
  nextToken(parser, context | 32768 | 1073741824);
7679
7679
  var scope = context & 64 ? addChildScope(createScope(), 1024) : void 0;
7680
- context = (context | 134217728 | 8192) ^ (8192 | 134217728);
7680
+ context = (context | 134217728) ^ 134217728;
7681
7681
  if (consumeOpt(parser, context, 16)) {
7682
7682
  return parseParenthesizedArrow(parser, context, scope, [], canAssign, 0, start, line, column);
7683
7683
  }
@@ -8831,7 +8831,7 @@
8831
8831
  __proto__: null
8832
8832
  });
8833
8833
 
8834
- var version$1 = "4.1.5";
8834
+ var version$1 = "4.2.0";
8835
8835
 
8836
8836
  var version = version$1;
8837
8837
  function parseScript(source, options) {