mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Move cheaper check earlier in condition
This commit is contained in:
@@ -1361,9 +1361,9 @@ namespace ts {
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.equals) {
|
||||
return pos += 2, token = SyntaxKind.LessThanEqualsToken;
|
||||
}
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.slash &&
|
||||
text.charCodeAt(pos + 2) !== CharacterCodes.asterisk &&
|
||||
languageVariant === LanguageVariant.JSX) {
|
||||
if (languageVariant === LanguageVariant.JSX &&
|
||||
text.charCodeAt(pos + 1) === CharacterCodes.slash &&
|
||||
text.charCodeAt(pos + 2) !== CharacterCodes.asterisk) {
|
||||
return pos += 2, token = SyntaxKind.LessThanSlashToken;
|
||||
}
|
||||
return pos++, token = SyntaxKind.LessThanToken;
|
||||
|
||||
Reference in New Issue
Block a user