Skip to content

Commit

Permalink
Remove bitwise AND from check as it unneeded
Browse files Browse the repository at this point in the history
  • Loading branch information
ypapouski committed May 24, 2024
1 parent 7801336 commit 93017a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 1 addition & 3 deletions dist/meriyah.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -6315,9 +6315,7 @@
switch (parser.token) {
case 67108877: {
nextToken(parser, (context | 1073741824 | 8192) ^ 8192);
if (context & 16384 &&
(parser.token & 131) === 131 &&
parser.tokenValue === 'super') {
if (context & 16384 && parser.token === 131 && parser.tokenValue === 'super') {
report(parser, 27);
}
parser.assignable = 1;
Expand Down
6 changes: 1 addition & 5 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4045,11 +4045,7 @@ export function parseMemberOrUpdateExpression(
case Token.Period: {
nextToken(parser, (context | Context.AllowEscapedKeyword | Context.InGlobal) ^ Context.InGlobal);

if (
context & Context.InClass &&
(parser.token & Token.PrivateField) === Token.PrivateField &&
parser.tokenValue === 'super'
) {
if (context & Context.InClass && parser.token === Token.PrivateField && parser.tokenValue === 'super') {
report(parser, Errors.InvalidSuperProperty);
}

Expand Down

0 comments on commit 93017a2

Please sign in to comment.