Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b46c22b

Browse files
author
Travis CI
committed
Deploy 0b5e955 to NPM branch
1 parent dd93ce8 commit b46c22b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

language/parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,7 @@ function expectKeyword(lexer, value) {
14621462
return token;
14631463
}
14641464

1465-
throw (0, _error.syntaxError)(lexer.source, lexer.token.start, "Expected \"".concat(value, "\", found ").concat((0, _lexer.getTokenDesc)(lexer.token)));
1465+
throw (0, _error.syntaxError)(lexer.source, token.start, "Expected \"".concat(value, "\", found ").concat((0, _lexer.getTokenDesc)(token)));
14661466
}
14671467
/**
14681468
* If the next token is a given keyword, return that token after advancing

language/parser.js.flow

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,8 +1502,8 @@ function expectKeyword(lexer: Lexer<*>, value: string): Token {
15021502

15031503
throw syntaxError(
15041504
lexer.source,
1505-
lexer.token.start,
1506-
`Expected "${value}", found ${getTokenDesc(lexer.token)}`,
1505+
token.start,
1506+
`Expected "${value}", found ${getTokenDesc(token)}`,
15071507
);
15081508
}
15091509

language/parser.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ function expectKeyword(lexer, value) {
14391439
return token;
14401440
}
14411441

1442-
throw syntaxError(lexer.source, lexer.token.start, "Expected \"".concat(value, "\", found ").concat(getTokenDesc(lexer.token)));
1442+
throw syntaxError(lexer.source, token.start, "Expected \"".concat(value, "\", found ").concat(getTokenDesc(token)));
14431443
}
14441444
/**
14451445
* If the next token is a given keyword, return that token after advancing

0 commit comments

Comments
 (0)