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.
- package/CHANGELOG.md +15 -0
- package/dist/meriyah.amd.js +6 -6
- package/dist/meriyah.amd.min.js +1 -1
- package/dist/meriyah.cjs +6 -6
- package/dist/meriyah.cjs.js +6 -6
- package/dist/meriyah.cjs.min.js +1 -1
- package/dist/meriyah.esm.js +6 -6
- package/dist/meriyah.esm.min.js +1 -1
- package/dist/meriyah.iife.js +6 -6
- package/dist/meriyah.iife.min.js +1 -1
- package/dist/meriyah.min.cjs +1 -1
- package/dist/meriyah.system.js +6 -6
- package/dist/meriyah.system.min.js +1 -1
- package/dist/meriyah.umd.cjs +6 -6
- package/dist/meriyah.umd.es5.js +6 -6
- package/dist/meriyah.umd.es5.min.js +1 -1
- package/dist/meriyah.umd.js +6 -6
- package/dist/meriyah.umd.min.cjs +1 -1
- package/dist/meriyah.umd.min.js +1 -1
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/parser.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/errors.ts +0 -2
- package/src/parser.ts +5 -4
package/dist/meriyah.esm.js
CHANGED
|
@@ -94,7 +94,6 @@ const errorMessages = {
|
|
|
94
94
|
[89]: 'Illegal return statement',
|
|
95
95
|
[90]: 'The left hand side of the for-header binding declaration is not destructible',
|
|
96
96
|
[91]: 'new.target only allowed within functions',
|
|
97
|
-
[92]: "'Unexpected token: 'escaped keyword'",
|
|
98
97
|
[93]: "'#' not followed by identifier",
|
|
99
98
|
[99]: 'Invalid keyword',
|
|
100
99
|
[98]: "Can not use 'let' as a class name",
|
|
@@ -109,7 +108,6 @@ const errorMessages = {
|
|
|
109
108
|
[104]: "Only '*' or '{...}' can be imported after default",
|
|
110
109
|
[105]: 'Trailing decorator may be followed by method',
|
|
111
110
|
[106]: "Decorators can't be used with a constructor",
|
|
112
|
-
[107]: "'%0' may not be used as an identifier in this context",
|
|
113
111
|
[108]: 'HTML comments are only allowed with web compatibility (Annex B)',
|
|
114
112
|
[109]: "The identifier 'let' must not be in expression position in strict mode",
|
|
115
113
|
[110]: 'Cannot assign to `eval` and `arguments` in strict mode',
|
|
@@ -5993,7 +5991,7 @@ function parseYieldExpression(parser, context, inGroup, canAssign, start, line,
|
|
|
5993
5991
|
function parseAwaitExpression(parser, context, inNew, inGroup, start, line, column) {
|
|
5994
5992
|
if (inGroup)
|
|
5995
5993
|
parser.destructible |= 128;
|
|
5996
|
-
if (context & 4194304) {
|
|
5994
|
+
if (context & 4194304 || (context & 2048 && context & 8192)) {
|
|
5997
5995
|
if (inNew)
|
|
5998
5996
|
report(parser, 0);
|
|
5999
5997
|
if (context & 8388608) {
|
|
@@ -6001,6 +5999,8 @@ function parseAwaitExpression(parser, context, inNew, inGroup, start, line, colu
|
|
|
6001
5999
|
}
|
|
6002
6000
|
nextToken(parser, context | 32768);
|
|
6003
6001
|
const argument = parseLeftHandSideExpression(parser, context, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
|
6002
|
+
if (parser.token === 8457273)
|
|
6003
|
+
report(parser, 31);
|
|
6004
6004
|
parser.assignable = 2;
|
|
6005
6005
|
return finishNode(parser, context, start, line, column, {
|
|
6006
6006
|
type: 'AwaitExpression',
|
|
@@ -6008,7 +6008,7 @@ function parseAwaitExpression(parser, context, inNew, inGroup, start, line, colu
|
|
|
6008
6008
|
});
|
|
6009
6009
|
}
|
|
6010
6010
|
if (context & 2048)
|
|
6011
|
-
report(parser,
|
|
6011
|
+
report(parser, 95);
|
|
6012
6012
|
return parseIdentifierOrArrow(parser, context, start, line, column);
|
|
6013
6013
|
}
|
|
6014
6014
|
function parseFunctionBody(parser, context, scope, origin, firstRestricted, scopeError) {
|
|
@@ -7613,7 +7613,7 @@ function parseParenthesizedExpression(parser, context, canAssign, kind, origin,
|
|
|
7613
7613
|
const { tokenPos: piStart, linePos: plStart, colPos: pcStart } = parser;
|
|
7614
7614
|
nextToken(parser, context | 32768 | 1073741824);
|
|
7615
7615
|
const scope = context & 64 ? addChildScope(createScope(), 1024) : void 0;
|
|
7616
|
-
context = (context | 134217728
|
|
7616
|
+
context = (context | 134217728) ^ 134217728;
|
|
7617
7617
|
if (consumeOpt(parser, context, 16)) {
|
|
7618
7618
|
return parseParenthesizedArrow(parser, context, scope, [], canAssign, 0, start, line, column);
|
|
7619
7619
|
}
|
|
@@ -8766,7 +8766,7 @@ var estree = /*#__PURE__*/Object.freeze({
|
|
|
8766
8766
|
__proto__: null
|
|
8767
8767
|
});
|
|
8768
8768
|
|
|
8769
|
-
var version$1 = "4.
|
|
8769
|
+
var version$1 = "4.2.0";
|
|
8770
8770
|
|
|
8771
8771
|
const version = version$1;
|
|
8772
8772
|
function parseScript(source, options) {
|