Browse Source

Fix highlighting of value keyword in property/event accessors.

pull/1012/head
Siegfried Pammer 8 years ago
parent
commit
6fcb5d0d0b
  1. 2
      ILSpy/Languages/CSharpHighlightingTokenWriter.cs

2
ILSpy/Languages/CSharpHighlightingTokenWriter.cs

@ -289,7 +289,7 @@ namespace ICSharpCode.ILSpy @@ -289,7 +289,7 @@ namespace ICSharpCode.ILSpy
public override void WriteIdentifier(Identifier identifier)
{
HighlightingColor color = null;
if (identifier.Name == "value" && nodeStack.PeekOrDefault() is Accessor accessor && accessor.Role != PropertyDeclaration.GetterRole)
if (identifier.Name == "value" && identifier.Ancestors.OfType<Accessor>().FirstOrDefault() is Accessor accessor && accessor.Role != PropertyDeclaration.GetterRole)
color = valueKeywordColor;
switch (GetCurrentDefinition()) {
case ITypeDefinition t:

Loading…
Cancel
Save