File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
src/PowerShellEditorServices/Services/TextDocument/Handlers
test/PowerShellEditorServices.Test/Language Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -123,9 +123,10 @@ private static SemanticTokenType MapSemanticTokenType(Token token)
123123 return SemanticTokenType . Type ;
124124 }
125125
126+ // This represents keys in hashtables and also properties like `Foo` in `$myVar.Foo`
126127 if ( ( token . TokenFlags & TokenFlags . MemberName ) != 0 )
127128 {
128- return SemanticTokenType . Member ;
129+ return SemanticTokenType . Property ;
129130 }
130131
131132 // Only check token kind after checking flags
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ function Get-A*A {
113113 }
114114
115115 [ Fact ]
116- public async Task RecognizesArrayMemberInExpandableString ( )
116+ public async Task RecognizesArrayPropertyInExpandableString ( )
117117 {
118118 string text = "\" $(@($Array).Count) OtherText\" " ;
119119 ScriptFile scriptFile = new ScriptFile (
@@ -131,7 +131,7 @@ public async Task RecognizesArrayMemberInExpandableString()
131131 Assert . Single ( mappedTokens , sToken => SemanticTokenType . Variable == sToken . Type ) ;
132132 break ;
133133 case "Count" :
134- Assert . Single ( mappedTokens , sToken => SemanticTokenType . Member == sToken . Type ) ;
134+ Assert . Single ( mappedTokens , sToken => SemanticTokenType . Property == sToken . Type ) ;
135135 break ;
136136 }
137137 }
@@ -179,7 +179,7 @@ enum MyEnum{
179179 case "one" :
180180 case "two" :
181181 case "three" :
182- Assert . Single ( mappedTokens , sToken => SemanticTokenType . Member == sToken . Type ) ;
182+ Assert . Single ( mappedTokens , sToken => SemanticTokenType . Property == sToken . Type ) ;
183183 break ;
184184 }
185185 }
You can’t perform that action at this time.
0 commit comments