From 3bdfe84fd95db9ec062e31ee352b62bef5380571 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 2 Jul 2024 19:29:49 +0000 Subject: [PATCH] Rename `None` to `IdentifierOrUnknown` --- src/compiler/scanner.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index ca41554256a03..9eddd645de424 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -302,9 +302,12 @@ const regExpFlagToFirstAvailableLanguageVersion = new Map(); for (let i = 0; i < CharacterCodes.maxAsciiCharacter; i++) { - tokenCategoryLookup.push(TokenCategory.None); + tokenCategoryLookup.push(TokenCategory.IdentifierOrUnknown); } for ( @@ -2027,9 +2030,9 @@ export function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean const tokenCategory = ch < tokenCategoryLookup.length ? tokenCategoryLookup[ch] : - tokenCategoryLookupUncommon.get(ch) ?? TokenCategory.None; + tokenCategoryLookupUncommon.get(ch) ?? TokenCategory.IdentifierOrUnknown; - if (tokenCategory === TokenCategory.None) { + if (tokenCategory === TokenCategory.IdentifierOrUnknown) { const identifierKind = scanIdentifier(ch, languageVersion); if (identifierKind) { return token = identifierKind;