mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 11:08:51 -06:00
Move cheaper check earlier in condition
This commit is contained in:
parent
5daa1fcd2c
commit
e313e2e317
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user