Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/services/classifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -985,8 +985,7 @@ namespace ts {
return ClassificationType.bigintLiteral;
}
else if (tokenKind === SyntaxKind.StringLiteral) {
// TODO: GH#18217
return token!.parent.kind === SyntaxKind.JsxAttribute ? ClassificationType.jsxAttributeStringLiteralValue : ClassificationType.stringLiteral;
return token && token.parent.kind === SyntaxKind.JsxAttribute ? ClassificationType.jsxAttributeStringLiteralValue : ClassificationType.stringLiteral;
}
else if (tokenKind === SyntaxKind.RegularExpressionLiteral) {
// TODO: we should get another classification type for these literals.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/// <reference path="fourslash.ts"/>

//// <<<<<<< HEAD
//// "AAAA"
//// =======
//// "BBBB"
//// >>>>>>> Feature


var c = classification;
verify.syntacticClassificationsAre(
c.comment("<<<<<<< HEAD"),
c.stringLiteral("\"AAAA\""),
c.comment("======="),
c.stringLiteral("\"BBBB\""),
c.comment(">>>>>>> Feature"));