File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -7541,7 +7541,8 @@ namespace ts {
7541
7541
return ;
7542
7542
case SyntaxKind . Parameter :
7543
7543
if ( ( < ParameterDeclaration > token . parent ) . name === token ) {
7544
- return ClassificationType . parameterName ;
7544
+ const isThis = token . kind === SyntaxKind . Identifier && ( < Identifier > token ) . originalKeywordKind === SyntaxKind . ThisKeyword ;
7545
+ return isThis ? ClassificationType . keyword : ClassificationType . parameterName ;
7545
7546
}
7546
7547
return ;
7547
7548
}
Original file line number Diff line number Diff line change
1
+ /// <reference path="fourslash.ts"/>
2
+
3
+ ////function f(this){}
4
+
5
+ var c = classification ;
6
+ verify . syntacticClassificationsAre (
7
+ c . keyword ( "function" ) ,
8
+ c . identifier ( "f" ) ,
9
+ c . punctuation ( "(" ) ,
10
+ c . keyword ( "this" ) ,
11
+ c . punctuation ( ")" ) ,
12
+ c . punctuation ( "{" ) ,
13
+ c . punctuation ( "}" ) ) ;
You can’t perform that action at this time.
0 commit comments