Skip to content

Commit

Permalink
Bump keyword maximum length
Browse files Browse the repository at this point in the history
  • Loading branch information
ahejlsberg committed Aug 31, 2020
1 parent 95ac3d4 commit c95c000
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/compiler/scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1512,9 +1512,9 @@ namespace ts {
}

function getIdentifierToken(): SyntaxKind.Identifier | KeywordSyntaxKind {
// Reserved words are between 2 and 11 characters long and start with a lowercase letter
// Reserved words are between 2 and 12 characters long and start with a lowercase letter
const len = tokenValue.length;
if (len >= 2 && len <= 11) {
if (len >= 2 && len <= 12) {
const ch = tokenValue.charCodeAt(0);
if (ch >= CharacterCodes.a && ch <= CharacterCodes.z) {
const keyword = textToKeyword.get(tokenValue);
Expand Down

0 comments on commit c95c000

Please sign in to comment.