File tree Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -490,6 +490,7 @@ module ts {
490490 case SyntaxKind . BinaryExpression :
491491 case SyntaxKind . ConditionalExpression :
492492 case SyntaxKind . TemplateExpression :
493+ case SyntaxKind . NoSubstitutionTemplateLiteral :
493494 case SyntaxKind . OmittedExpression :
494495 return true ;
495496 case SyntaxKind . QualifiedName :
@@ -502,7 +503,6 @@ module ts {
502503 // fall through
503504 case SyntaxKind . NumericLiteral :
504505 case SyntaxKind . StringLiteral :
505- case SyntaxKind . NoSubstitutionTemplateLiteral :
506506 var parent = node . parent ;
507507 switch ( parent . kind ) {
508508 case SyntaxKind . VariableDeclaration :
@@ -531,6 +531,8 @@ module ts {
531531 ( < ForInStatement > parent ) . expression === node ;
532532 case SyntaxKind . TypeAssertion :
533533 return node === ( < TypeAssertion > parent ) . operand ;
534+ case SyntaxKind . TemplateSpan :
535+ return node === ( < TemplateSpan > parent ) . expression ;
534536 default :
535537 if ( isExpression ( parent ) ) {
536538 return true ;
Original file line number Diff line number Diff line change 1+ /// <reference path='fourslash.ts'/>
2+
3+ ////var [|x|] = 10;
4+ ////var y = `${ [|x|] } ${ [|x|] }`
5+
6+ test . ranges ( ) . forEach ( targetRange => {
7+ goTo . position ( targetRange . start ) ;
8+
9+ test . ranges ( ) . forEach ( range => {
10+ verify . referencesAtPositionContains ( range ) ;
11+ }
12+ }
Original file line number Diff line number Diff line change 1+ /// <reference path='fourslash.ts'/>
2+
3+ ////function [|f|](...rest: any[]) { }
4+ ////[|f|] `${ [|f|] } ${ [|f|] }`
5+
6+ test . ranges ( ) . forEach ( targetRange => {
7+ goTo . position ( targetRange . start ) ;
8+
9+ test . ranges ( ) . forEach ( range => {
10+ verify . referencesAtPositionContains ( range ) ;
11+ }
12+ }
You can’t perform that action at this time.
0 commit comments