From ff8b2260fbbc734482eb48e9caf6dbc009128dc7 Mon Sep 17 00:00:00 2001 From: Piotr Date: Mon, 7 Nov 2016 23:34:10 +0100 Subject: [PATCH] Update CSharpCodeParser.cs (#860) Cleanup CSharpCodeParser.cs code. --- .../Parser/CSharpCodeParser.cs | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Microsoft.AspNetCore.Razor/Parser/CSharpCodeParser.cs b/src/Microsoft.AspNetCore.Razor/Parser/CSharpCodeParser.cs index 50a9a49141..5069e3d712 100644 --- a/src/Microsoft.AspNetCore.Razor/Parser/CSharpCodeParser.cs +++ b/src/Microsoft.AspNetCore.Razor/Parser/CSharpCodeParser.cs @@ -18,23 +18,23 @@ namespace Microsoft.AspNetCore.Razor.Parser internal static ISet DefaultKeywords = new HashSet() { - SyntaxConstants.CSharp.TagHelperPrefixKeyword, SyntaxConstants.CSharp.AddTagHelperKeyword, SyntaxConstants.CSharp.RemoveTagHelperKeyword, - "if", + SyntaxConstants.CSharp.TagHelperPrefixKeyword, + "class", "do", - "try", "for", "foreach", - "while", - "switch", - "lock", - "using", - "section", - "inherits", "functions", + "if", + "inherits", + "lock", "namespace", - "class", + "section", + "switch", + "try", + "using", + "while", }; private Dictionary _directiveParsers = new Dictionary(); @@ -476,7 +476,7 @@ namespace Microsoft.AspNetCore.Razor.Parser Accept(dot); } } - else if (!At(CSharpSymbolType.WhiteSpace) && !At(CSharpSymbolType.NewLine)) + else if (!(At(CSharpSymbolType.WhiteSpace) || At(CSharpSymbolType.NewLine))) { PutCurrentBack(); }