@@ -1616,6 +1616,9 @@ namespace ts {
16161616 public static jsxOpenTagName = "jsx open tag name" ;
16171617 public static jsxCloseTagName = "jsx close tag name" ;
16181618 public static jsxSelfClosingTagName = "jsx self closing tag name" ;
1619+ public static jsxAttribute = "jsx attribute" ;
1620+ public static jsxText = "jsx text" ;
1621+ public static jsxAttributeStringLiteralValue = "jsx attribute string literal value" ;
16191622 }
16201623
16211624 export const enum ClassificationType {
@@ -1642,7 +1645,7 @@ namespace ts {
16421645 jsxSelfClosingTagName = 21 ,
16431646 jsxAttribute = 22 ,
16441647 jsxText = 23 ,
1645- jsxAttributeStringValue = 24 ,
1648+ jsxAttributeStringLiteralValue = 24 ,
16461649 }
16471650
16481651 /// Language Service
@@ -6577,6 +6580,9 @@ namespace ts {
65776580 case ClassificationType . jsxOpenTagName : return ClassificationTypeNames . jsxOpenTagName ;
65786581 case ClassificationType . jsxCloseTagName : return ClassificationTypeNames . jsxCloseTagName ;
65796582 case ClassificationType . jsxSelfClosingTagName : return ClassificationTypeNames . jsxSelfClosingTagName ;
6583+ case ClassificationType . jsxAttribute : return ClassificationTypeNames . jsxAttribute ;
6584+ case ClassificationType . jsxText : return ClassificationTypeNames . jsxText ;
6585+ case ClassificationType . jsxAttributeStringLiteralValue : return ClassificationTypeNames . jsxAttributeStringLiteralValue ;
65806586 }
65816587 }
65826588
@@ -6826,7 +6832,8 @@ namespace ts {
68266832 // the '=' in a variable declaration is special cased here.
68276833 if ( token . parent . kind === SyntaxKind . VariableDeclaration ||
68286834 token . parent . kind === SyntaxKind . PropertyDeclaration ||
6829- token . parent . kind === SyntaxKind . Parameter ) {
6835+ token . parent . kind === SyntaxKind . Parameter ||
6836+ token . parent . kind === SyntaxKind . JsxAttribute ) {
68306837 return ClassificationType . operator ;
68316838 }
68326839 }
@@ -6845,7 +6852,7 @@ namespace ts {
68456852 return ClassificationType . numericLiteral ;
68466853 }
68476854 else if ( tokenKind === SyntaxKind . StringLiteral || tokenKind === SyntaxKind . StringLiteralType ) {
6848- return token . parent . kind === SyntaxKind . JsxAttribute ? ClassificationType . jsxAttributeStringValue : ClassificationType . stringLiteral ;
6855+ return token . parent . kind === SyntaxKind . JsxAttribute ? ClassificationType . jsxAttributeStringLiteralValue : ClassificationType . stringLiteral ;
68496856 }
68506857 else if ( tokenKind === SyntaxKind . RegularExpressionLiteral ) {
68516858 // TODO: we should get another classification type for these literals.
0 commit comments