@@ -38,6 +38,7 @@ public enum TokenClassification
38
38
Parameter ,
39
39
Type ,
40
40
Number ,
41
+ Member ,
41
42
}
42
43
43
44
public class KeyHandler
@@ -161,6 +162,7 @@ static KeyHandler MakeKeyHandler(Action<ConsoleKeyInfo?, object> action, string
161
162
public const ConsoleColor DefaultParameterForegroundColor = ConsoleColor . DarkGray ;
162
163
public const ConsoleColor DefaultTypeForegroundColor = ConsoleColor . Gray ;
163
164
public const ConsoleColor DefaultNumberForegroundColor = ConsoleColor . White ;
165
+ public const ConsoleColor DefaultMemberForegroundColor = ConsoleColor . Gray ;
164
166
165
167
private string _continuationPrompt ;
166
168
public const string DefaultContinuationPrompt = ">>> " ;
@@ -465,7 +467,7 @@ private PSConsoleReadLine()
465
467
466
468
_buffer = new StringBuilder ( ) ;
467
469
468
- _tokenForegroundColors = new ConsoleColor [ ( int ) TokenClassification . Number + 1 ] ;
470
+ _tokenForegroundColors = new ConsoleColor [ ( int ) TokenClassification . Member + 1 ] ;
469
471
_tokenBackgroundColors = new ConsoleColor [ _tokenForegroundColors . Length ] ;
470
472
ResetColors ( ) ;
471
473
@@ -504,6 +506,7 @@ private void ResetColors()
504
506
_tokenForegroundColors [ ( int ) TokenClassification . Parameter ] = DefaultParameterForegroundColor ;
505
507
_tokenForegroundColors [ ( int ) TokenClassification . Type ] = DefaultTypeForegroundColor ;
506
508
_tokenForegroundColors [ ( int ) TokenClassification . Number ] = DefaultNumberForegroundColor ;
509
+ _tokenForegroundColors [ ( int ) TokenClassification . Member ] = DefaultMemberForegroundColor ;
507
510
for ( int i = 0 ; i < _tokenBackgroundColors . Length ; i ++ )
508
511
{
509
512
_tokenBackgroundColors [ i ] = DefaultTokenBackgroundColor ;
@@ -1668,6 +1671,9 @@ private TokenClassification GetTokenClassification(Token token)
1668
1671
if ( ( token . TokenFlags & TokenFlags . TypeName ) != 0 )
1669
1672
return TokenClassification . Type ;
1670
1673
1674
+ if ( ( token . TokenFlags & TokenFlags . MemberName ) != 0 )
1675
+ return TokenClassification . Member ;
1676
+
1671
1677
return TokenClassification . None ;
1672
1678
}
1673
1679
0 commit comments