mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-26 00:36:29 -05:00
Allow /* comments between < and JSX element name
This commit is contained in:
@@ -3183,6 +3183,7 @@ namespace ts {
|
||||
if (sourceFile.languageVariant !== LanguageVariant.JSX) {
|
||||
return parseTypeAssertion();
|
||||
}
|
||||
debugger;
|
||||
if (lookAhead(nextTokenIsIdentifierOrKeyword)) {
|
||||
return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true);
|
||||
}
|
||||
|
||||
@@ -1361,7 +1361,9 @@ namespace ts {
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.equals) {
|
||||
return pos += 2, token = SyntaxKind.LessThanEqualsToken;
|
||||
}
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.slash && languageVariant === LanguageVariant.JSX) {
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.slash &&
|
||||
text.charCodeAt(pos + 2) !== CharacterCodes.asterisk &&
|
||||
languageVariant === LanguageVariant.JSX) {
|
||||
return pos += 2, token = SyntaxKind.LessThanSlashToken;
|
||||
}
|
||||
return pos++, token = SyntaxKind.LessThanToken;
|
||||
|
||||
Reference in New Issue
Block a user