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 @@ -7533,7 +7533,8 @@ namespace ts {
75337533 return ;
75347534 case SyntaxKind . Parameter :
75357535 if ( ( < ParameterDeclaration > token . parent ) . name === token ) {
7536- return ClassificationType . parameterName ;
7536+ const isThis = token . kind === SyntaxKind . Identifier && ( < Identifier > token ) . originalKeywordKind === SyntaxKind . ThisKeyword ;
7537+ return isThis ? ClassificationType . keyword : ClassificationType . parameterName ;
75377538 }
75387539 return ;
75397540 }
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