diff --git a/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Legacy/CSharpCodeParser.cs b/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Legacy/CSharpCodeParser.cs index 9e9d841efc0..7db73b8b5c5 100644 --- a/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Legacy/CSharpCodeParser.cs +++ b/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Legacy/CSharpCodeParser.cs @@ -30,6 +30,14 @@ internal class CSharpCodeParser : TokenizerBackedParser builder.Description = Resources.AddTagHelperDirective_Description; }); + internal static readonly DirectiveDescriptor UsingDirectiveDescriptor = DirectiveDescriptor.CreateDirective( + SyntaxConstants.CSharp.UsingKeyword, + DirectiveKind.SingleLine, + builder => + { + builder.Description = Resources.UsingDirective_Description; + }); + internal static readonly DirectiveDescriptor RemoveTagHelperDirectiveDescriptor = DirectiveDescriptor.CreateDirective( SyntaxConstants.CSharp.RemoveTagHelperKeyword, DirectiveKind.SingleLine, diff --git a/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Legacy/SyntaxConstants.cs b/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Legacy/SyntaxConstants.cs index 9fa13dff0d5..6794dfe0390 100644 --- a/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Legacy/SyntaxConstants.cs +++ b/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Legacy/SyntaxConstants.cs @@ -17,6 +17,7 @@ internal static class SyntaxConstants public static class CSharp { public const int UsingKeywordLength = 5; + public const string UsingKeyword = "using"; public const string TagHelperPrefixKeyword = "tagHelperPrefix"; public const string AddTagHelperKeyword = "addTagHelper"; public const string RemoveTagHelperKeyword = "removeTagHelper"; diff --git a/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Resources.resx b/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Resources.resx index 7b3e4b05e05..71766937f52 100644 --- a/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Resources.resx +++ b/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Resources.resx @@ -1,4 +1,4 @@ - +