mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Use Debug.fail to avoid a call.
This commit is contained in:
1 parent
af340b7156
commit
d5898b5b80
1 file changed
+1
-1
@@ -2104,7 +2104,7 @@ export function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean
|
||||
return token = scanNumber();
|
||||
}
|
||||
|
||||
Debug.assert(tokenInfo & TokenInfo.RecognizedMisc);
|
||||
if (!(tokenInfo & TokenInfo.RecognizedMisc)) Debug.fail(`Unhandled token category ${tokenInfo}`);
|
||||
switch (ch) {
|
||||
case CharacterCodes.exclamation:
|
||||
if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) {
|
||||
|
||||
Reference in new issue
Block a user