File tree 2 files changed +5
-4
lines changed
src/PowerShellEditorServices/Services/TextDocument/Handlers
test/PowerShellEditorServices.Test/Language
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)
123
123
return SemanticTokenType . Type ;
124
124
}
125
125
126
+ // This represents keys in hashtables and also properties like `Foo` in `$myVar.Foo`
126
127
if ( ( token . TokenFlags & TokenFlags . MemberName ) != 0 )
127
128
{
128
- return SemanticTokenType . Member ;
129
+ return SemanticTokenType . Property ;
129
130
}
130
131
131
132
// 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 {
113
113
}
114
114
115
115
[ Fact ]
116
- public async Task RecognizesArrayMemberInExpandableString ( )
116
+ public async Task RecognizesArrayPropertyInExpandableString ( )
117
117
{
118
118
string text = "\" $(@($Array).Count) OtherText\" " ;
119
119
ScriptFile scriptFile = new ScriptFile (
@@ -131,7 +131,7 @@ public async Task RecognizesArrayMemberInExpandableString()
131
131
Assert . Single ( mappedTokens , sToken => SemanticTokenType . Variable == sToken . Type ) ;
132
132
break ;
133
133
case "Count" :
134
- Assert . Single ( mappedTokens , sToken => SemanticTokenType . Member == sToken . Type ) ;
134
+ Assert . Single ( mappedTokens , sToken => SemanticTokenType . Property == sToken . Type ) ;
135
135
break ;
136
136
}
137
137
}
@@ -179,7 +179,7 @@ enum MyEnum{
179
179
case "one" :
180
180
case "two" :
181
181
case "three" :
182
- Assert . Single ( mappedTokens , sToken => SemanticTokenType . Member == sToken . Type ) ;
182
+ Assert . Single ( mappedTokens , sToken => SemanticTokenType . Property == sToken . Type ) ;
183
183
break ;
184
184
}
185
185
}
You can’t perform that action at this time.
0 commit comments