File tree 3 files changed +27
-1
lines changed
3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -490,6 +490,7 @@ module ts {
490
490
case SyntaxKind . BinaryExpression :
491
491
case SyntaxKind . ConditionalExpression :
492
492
case SyntaxKind . TemplateExpression :
493
+ case SyntaxKind . NoSubstitutionTemplateLiteral :
493
494
case SyntaxKind . OmittedExpression :
494
495
return true ;
495
496
case SyntaxKind . QualifiedName :
@@ -502,7 +503,6 @@ module ts {
502
503
// fall through
503
504
case SyntaxKind . NumericLiteral :
504
505
case SyntaxKind . StringLiteral :
505
- case SyntaxKind . NoSubstitutionTemplateLiteral :
506
506
var parent = node . parent ;
507
507
switch ( parent . kind ) {
508
508
case SyntaxKind . VariableDeclaration :
@@ -531,6 +531,8 @@ module ts {
531
531
( < ForInStatement > parent ) . expression === node ;
532
532
case SyntaxKind . TypeAssertion :
533
533
return node === ( < TypeAssertion > parent ) . operand ;
534
+ case SyntaxKind . TemplateSpan :
535
+ return node === ( < TemplateSpan > parent ) . expression ;
534
536
default :
535
537
if ( isExpression ( parent ) ) {
536
538
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