meriyah 4.1.5-dev.20210524 → 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.
package/dist/meriyah.cjs CHANGED
@@ -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',
@@ -5997,7 +5995,7 @@ function parseYieldExpression(parser, context, inGroup, canAssign, start, line,
5997
5995
  function parseAwaitExpression(parser, context, inNew, inGroup, start, line, column) {
5998
5996
  if (inGroup)
5999
5997
  parser.destructible |= 128;
6000
- if (context & 4194304) {
5998
+ if (context & 4194304 || (context & 2048 && context & 8192)) {
6001
5999
  if (inNew)
6002
6000
  report(parser, 0);
6003
6001
  if (context & 8388608) {
@@ -6005,6 +6003,8 @@ function parseAwaitExpression(parser, context, inNew, inGroup, start, line, colu
6005
6003
  }
6006
6004
  nextToken(parser, context | 32768);
6007
6005
  const argument = parseLeftHandSideExpression(parser, context, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
6006
+ if (parser.token === 8457273)
6007
+ report(parser, 31);
6008
6008
  parser.assignable = 2;
6009
6009
  return finishNode(parser, context, start, line, column, {
6010
6010
  type: 'AwaitExpression',
@@ -6012,7 +6012,7 @@ function parseAwaitExpression(parser, context, inNew, inGroup, start, line, colu
6012
6012
  });
6013
6013
  }
6014
6014
  if (context & 2048)
6015
- report(parser, 107, 'Await');
6015
+ report(parser, 95);
6016
6016
  return parseIdentifierOrArrow(parser, context, start, line, column);
6017
6017
  }
6018
6018
  function parseFunctionBody(parser, context, scope, origin, firstRestricted, scopeError) {
@@ -7617,7 +7617,7 @@ function parseParenthesizedExpression(parser, context, canAssign, kind, origin,
7617
7617
  const { tokenPos: piStart, linePos: plStart, colPos: pcStart } = parser;
7618
7618
  nextToken(parser, context | 32768 | 1073741824);
7619
7619
  const scope = context & 64 ? addChildScope(createScope(), 1024) : void 0;
7620
- context = (context | 134217728 | 8192) ^ (8192 | 134217728);
7620
+ context = (context | 134217728) ^ 134217728;
7621
7621
  if (consumeOpt(parser, context, 16)) {
7622
7622
  return parseParenthesizedArrow(parser, context, scope, [], canAssign, 0, start, line, column);
7623
7623
  }
@@ -8770,7 +8770,7 @@ var estree = /*#__PURE__*/Object.freeze({
8770
8770
  __proto__: null
8771
8771
  });
8772
8772
 
8773
- var version$1 = "4.1.5-dev.20210524";
8773
+ var version$1 = "4.2.0";
8774
8774
 
8775
8775
  const version = version$1;
8776
8776
  function parseScript(source, options) {
@@ -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',
@@ -5997,7 +5995,7 @@ function parseYieldExpression(parser, context, inGroup, canAssign, start, line,
5997
5995
  function parseAwaitExpression(parser, context, inNew, inGroup, start, line, column) {
5998
5996
  if (inGroup)
5999
5997
  parser.destructible |= 128;
6000
- if (context & 4194304) {
5998
+ if (context & 4194304 || (context & 2048 && context & 8192)) {
6001
5999
  if (inNew)
6002
6000
  report(parser, 0);
6003
6001
  if (context & 8388608) {
@@ -6005,6 +6003,8 @@ function parseAwaitExpression(parser, context, inNew, inGroup, start, line, colu
6005
6003
  }
6006
6004
  nextToken(parser, context | 32768);
6007
6005
  const argument = parseLeftHandSideExpression(parser, context, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
6006
+ if (parser.token === 8457273)
6007
+ report(parser, 31);
6008
6008
  parser.assignable = 2;
6009
6009
  return finishNode(parser, context, start, line, column, {
6010
6010
  type: 'AwaitExpression',
@@ -6012,7 +6012,7 @@ function parseAwaitExpression(parser, context, inNew, inGroup, start, line, colu
6012
6012
  });
6013
6013
  }
6014
6014
  if (context & 2048)
6015
- report(parser, 107, 'Await');
6015
+ report(parser, 95);
6016
6016
  return parseIdentifierOrArrow(parser, context, start, line, column);
6017
6017
  }
6018
6018
  function parseFunctionBody(parser, context, scope, origin, firstRestricted, scopeError) {
@@ -7617,7 +7617,7 @@ function parseParenthesizedExpression(parser, context, canAssign, kind, origin,
7617
7617
  const { tokenPos: piStart, linePos: plStart, colPos: pcStart } = parser;
7618
7618
  nextToken(parser, context | 32768 | 1073741824);
7619
7619
  const scope = context & 64 ? addChildScope(createScope(), 1024) : void 0;
7620
- context = (context | 134217728 | 8192) ^ (8192 | 134217728);
7620
+ context = (context | 134217728) ^ 134217728;
7621
7621
  if (consumeOpt(parser, context, 16)) {
7622
7622
  return parseParenthesizedArrow(parser, context, scope, [], canAssign, 0, start, line, column);
7623
7623
  }
@@ -8770,7 +8770,7 @@ var estree = /*#__PURE__*/Object.freeze({
8770
8770
  __proto__: null
8771
8771
  });
8772
8772
 
8773
- var version$1 = "4.1.5-dev.20210524";
8773
+ var version$1 = "4.2.0";
8774
8774
 
8775
8775
  const version = version$1;
8776
8776
  function parseScript(source, options) {