Skip to content

Commit

Permalink
fix(parser): fixed for-statement ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
KFlash committed May 30, 2019
1 parent cc915cc commit 68481ee
Show file tree
Hide file tree
Showing 3 changed files with 6,218 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meriyah",
"version": "0.1.14",
"version": "0.1.15",
"description": "A 100% compliant, self-hosted javascript parser with high focus on both performance and stability",
"main": "dist/meriyah.umd.js",
"module": "dist/meriyah.esm.js",
Expand Down
4 changes: 2 additions & 2 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1742,10 +1742,10 @@ export function parseForStatement(
report(parser, Errors.ForLoopInvalidLHS);
}

init = parseAssignmentExpression(parser, context | Context.DisallowIn, parser.startIndex, init);
init = parseAssignmentExpression(parser, context | Context.DisallowIn, startIndex, init);
}

if (parser.token === Token.Comma) init = parseSequenceExpression(parser, context, 3333333, init);
if (parser.token === Token.Comma) init = parseSequenceExpression(parser, context, parser.startIndex, init);

consume(parser, context | Context.AllowRegExp, Token.Semicolon);

Expand Down
Loading

0 comments on commit 68481ee

Please sign in to comment.