From cdaa3e29c968145157a6bc299c1a520055c4ec59 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 21 Oct 2017 16:14:21 +0200 Subject: [PATCH] Fix highlighting of 'where' keyword in LINQ query clauses. --- ILSpy/Languages/CSharpHighlightingTokenWriter.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ILSpy/Languages/CSharpHighlightingTokenWriter.cs b/ILSpy/Languages/CSharpHighlightingTokenWriter.cs index 633ac75e6..6d91a6a11 100644 --- a/ILSpy/Languages/CSharpHighlightingTokenWriter.cs +++ b/ILSpy/Languages/CSharpHighlightingTokenWriter.cs @@ -127,9 +127,14 @@ namespace ICSharpCode.ILSpy case "global": case "dynamic": case "await": - case "where": color = structureKeywordsColor; break; + case "where": + if (nodeStack.PeekOrDefault() is QueryClause) + color = queryKeywordsColor; + else + color = structureKeywordsColor; + break; case "in": if (nodeStack.PeekOrDefault() is ForeachStatement) color = structureKeywordsColor;