Skip to content

Commit

Permalink
fix(parser): fixed #37
Browse files Browse the repository at this point in the history
  • Loading branch information
KFlash committed Aug 22, 2019
1 parent 6a14bab commit 6c28caf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 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": "1.6.10",
"version": "1.6.11",
"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
2 changes: 1 addition & 1 deletion src/meriyah.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ export function parse(source: string, options?: Options): ESTree.Program {
export { Options, ESTree };

// Export current version
export const version = '1.6.10';
export const version = '1.6.11';
13 changes: 4 additions & 9 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4242,7 +4242,7 @@ export function parsePrimaryExpressionExtended(
case Token.NullKeyword:
return parseNullOrTrueOrFalseLiteral(parser, context, start, line, column);
case Token.ThisKeyword:
return parseThisExpression(parser, context, start, line, column);
return parseThisExpression(parser, context);
case Token.RegularExpression:
return parseRegExpLiteral(parser, context, start, line, column);
case Token.Decorator:
Expand Down Expand Up @@ -4692,16 +4692,11 @@ export function parseNullOrTrueOrFalseLiteral(
* @param parser Parser object
* @param context Context masks
*/
export function parseThisExpression(
parser: ParserState,
context: Context,
start: number,
line: number,
column: number
): ESTree.ThisExpression {
export function parseThisExpression(parser: ParserState, context: Context): ESTree.ThisExpression {
const { tokenPos, linePos, colPos } = parser;
nextToken(parser, context);
parser.assignable = AssignmentKind.CannotAssign;
return finishNode(parser, context, start, line, column, {
return finishNode(parser, context, tokenPos, linePos, colPos, {
type: 'ThisExpression'
});
}
Expand Down

0 comments on commit 6c28caf

Please sign in to comment.