diff --git a/src/Microsoft.AspNetCore.Razor.Language/RazorDiagnosticFactory.cs b/src/Microsoft.AspNetCore.Razor.Language/RazorDiagnosticFactory.cs index cf1ad34dd6..ef111ac0ae 100644 --- a/src/Microsoft.AspNetCore.Razor.Language/RazorDiagnosticFactory.cs +++ b/src/Microsoft.AspNetCore.Razor.Language/RazorDiagnosticFactory.cs @@ -240,16 +240,6 @@ namespace Microsoft.AspNetCore.Razor.Language return RazorDiagnostic.Create(Parsing_InvalidTagHelperPrefixValue, location, directiveName, character, prefix); } - internal static readonly RazorDiagnosticDescriptor Parsing_InvalidTagHelperLookupText = - new RazorDiagnosticDescriptor( - $"{DiagnosticPrefix}1020", - () => Resources.InvalidTagHelperLookupText, - RazorDiagnosticSeverity.Error); - public static RazorDiagnostic CreateParsing_InvalidTagHelperLookupText(SourceSpan location, string lookupText) - { - return RazorDiagnostic.Create(Parsing_InvalidTagHelperLookupText, location, lookupText); - } - internal static readonly RazorDiagnosticDescriptor Parsing_MarkupBlockMustStartWithTag = new RazorDiagnosticDescriptor( $"{DiagnosticPrefix}1021", @@ -417,6 +407,16 @@ namespace Microsoft.AspNetCore.Razor.Language return diagnostic; } + internal static readonly RazorDiagnosticDescriptor Parsing_InvalidTagHelperLookupText = + new RazorDiagnosticDescriptor( + $"{DiagnosticPrefix}1036", + () => Resources.InvalidTagHelperLookupText, + RazorDiagnosticSeverity.Error); + public static RazorDiagnostic CreateParsing_InvalidTagHelperLookupText(SourceSpan location, string lookupText) + { + return RazorDiagnostic.Create(Parsing_InvalidTagHelperLookupText, location, lookupText); + } + #endregion #region Semantic Errors diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.diagnostics.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.diagnostics.txt index b01ced2ed2..1eb0531be3 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.diagnostics.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.diagnostics.txt @@ -1,15 +1,15 @@ TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,2): Error RZ1018: Directive 'addTagHelper' must have a value. -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,14): Error RZ1020: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,14): Error RZ1036: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,2): Error RZ1018: Directive 'addTagHelper' must have a value. -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,15): Error RZ1020: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,15): Error RZ1036: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(5,15): Error RZ1000: Unterminated string literal. Strings that start with a quotation mark (") must be terminated before the end of the line. However, strings that start with @ and a quotation mark (@") can span multiple lines. -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(5,15): Error RZ1020: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName". +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(5,15): Error RZ1036: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,2): Error RZ1018: Directive 'removeTagHelper' must have a value. -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,17): Error RZ1020: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,17): Error RZ1036: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,2): Error RZ1018: Directive 'removeTagHelper' must have a value. -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,18): Error RZ1020: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,18): Error RZ1036: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(9,18): Error RZ1000: Unterminated string literal. Strings that start with a quotation mark (") must be terminated before the end of the line. However, strings that start with @ and a quotation mark (@") can span multiple lines. -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(9,18): Error RZ1020: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName". +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(9,18): Error RZ1036: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(11,2): Error RZ1018: Directive 'tagHelperPrefix' must have a value. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(12,2): Error RZ1018: Directive 'tagHelperPrefix' must have a value. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(12,1): Error RZ2001: The 'tagHelperPrefix' directive may only occur once per document. diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.diagnostics.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.diagnostics.txt index b01ced2ed2..1eb0531be3 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.diagnostics.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.diagnostics.txt @@ -1,15 +1,15 @@ TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,2): Error RZ1018: Directive 'addTagHelper' must have a value. -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,14): Error RZ1020: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,14): Error RZ1036: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,2): Error RZ1018: Directive 'addTagHelper' must have a value. -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,15): Error RZ1020: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,15): Error RZ1036: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(5,15): Error RZ1000: Unterminated string literal. Strings that start with a quotation mark (") must be terminated before the end of the line. However, strings that start with @ and a quotation mark (@") can span multiple lines. -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(5,15): Error RZ1020: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName". +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(5,15): Error RZ1036: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,2): Error RZ1018: Directive 'removeTagHelper' must have a value. -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,17): Error RZ1020: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,17): Error RZ1036: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,2): Error RZ1018: Directive 'removeTagHelper' must have a value. -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,18): Error RZ1020: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,18): Error RZ1036: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(9,18): Error RZ1000: Unterminated string literal. Strings that start with a quotation mark (") must be terminated before the end of the line. However, strings that start with @ and a quotation mark (@") can span multiple lines. -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(9,18): Error RZ1020: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName". +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(9,18): Error RZ1036: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(11,2): Error RZ1018: Directive 'tagHelperPrefix' must have a value. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(12,2): Error RZ1018: Directive 'tagHelperPrefix' must have a value. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(12,1): Error RZ2001: The 'tagHelperPrefix' directive may only occur once per document. diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt index 0b3a224f4b..93afe6d654 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt @@ -5,6 +5,6 @@ Directive block - Gen - 18 - (0:0,0) CSharpTokenType.Identifier;[addTagHelper]; Markup span - Gen - [ ] - SpanEditHandler;Accepts:None - (13:0,13) - Tokens:1 CSharpTokenType.WhiteSpace;[ ]; - Code span - Gen - [Foo"] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:2 + Code span - Gen - [Foo"] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:2 CSharpTokenType.Identifier;[Foo]; CSharpTokenType.StringLiteral;["];RZ1000(17:0,17 [1] ) diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_InvalidLookupText_AddsError.stree.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_InvalidLookupText_AddsError.stree.txt index 138d746a0d..c6f41fdd2d 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_InvalidLookupText_AddsError.stree.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_InvalidLookupText_AddsError.stree.txt @@ -5,5 +5,5 @@ Directive block - Gen - 17 - (0:0,0) CSharpTokenType.Identifier;[addTagHelper]; Markup span - Gen - [ ] - SpanEditHandler;Accepts:None - (13:0,13) - Tokens:1 CSharpTokenType.WhiteSpace;[ ]; - Code span - Gen - [Foo] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1 + Code span - Gen - [Foo] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1 CSharpTokenType.Identifier;[Foo]; diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_NoValue_Invalid.stree.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_NoValue_Invalid.stree.txt index 9f107f20c1..2008fd4abe 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_NoValue_Invalid.stree.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_NoValue_Invalid.stree.txt @@ -5,5 +5,5 @@ Directive block - Gen - 16 - (0:0,0) CSharpTokenType.Identifier;[addTagHelper]; Markup span - Gen - [ ] - SpanEditHandler;Accepts:None - (13:0,13) - Tokens:1 CSharpTokenType.WhiteSpace;[ ]; - Code span - Gen - [""] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1 + Code span - Gen - [""] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1 CSharpTokenType.StringLiteral;[""]; diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_RequiresValue.stree.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_RequiresValue.stree.txt index 56dc421136..f3c8121f69 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_RequiresValue.stree.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_RequiresValue.stree.txt @@ -5,5 +5,5 @@ Directive block - Gen - 14 - (0:0,0) CSharpTokenType.Identifier;[addTagHelper]; Markup span - Gen - [ ] - SpanEditHandler;Accepts:None - (13:0,13) - Tokens:1 CSharpTokenType.WhiteSpace;[ ]; - Code span - Gen - [] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1 + Code span - Gen - [] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1 CSharpTokenType.Unknown;[]; diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_SingleQuotes_AddsError.stree.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_SingleQuotes_AddsError.stree.txt index e6d7ba0e8f..38b2a96f76 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_SingleQuotes_AddsError.stree.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_SingleQuotes_AddsError.stree.txt @@ -5,5 +5,5 @@ Directive block - Gen - 22 - (0:0,0) CSharpTokenType.Identifier;[addTagHelper]; Markup span - Gen - [ ] - SpanEditHandler;Accepts:None - (13:0,13) - Tokens:1 CSharpTokenType.WhiteSpace;[ ]; - Code span - Gen - ['*, Foo'] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1 + Code span - Gen - ['*, Foo'] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1 CSharpTokenType.CharacterLiteral;['*, Foo']; diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt index 817474e23d..1067f0e6c2 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt @@ -5,5 +5,5 @@ Directive block - Gen - 18 - (0:0,0) CSharpTokenType.Identifier;[addTagHelper]; Markup span - Gen - [ ] - SpanEditHandler;Accepts:None - (13:0,13) - Tokens:1 CSharpTokenType.WhiteSpace;[ ]; - Code span - Gen - ["Foo] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1 + Code span - Gen - ["Foo] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1 CSharpTokenType.StringLiteral;["Foo];RZ1000(14:0,14 [1] ) diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.stree.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.stree.txt index e009495ff2..bae8b5002c 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.stree.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/AddTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.stree.txt @@ -5,5 +5,5 @@ Directive block - Gen - 19 - (0:0,0) CSharpTokenType.Identifier;[addTagHelper]; Markup span - Gen - [ ] - SpanEditHandler;Accepts:None - (13:0,13) - Tokens:1 CSharpTokenType.WhiteSpace;[ ]; - Code span - Gen - ["Foo"] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1 + Code span - Gen - ["Foo"] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1 CSharpTokenType.StringLiteral;["Foo"]; diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt index 7d2f6da517..2d3bc151de 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt @@ -5,6 +5,6 @@ Directive block - Gen - 21 - (0:0,0) CSharpTokenType.Identifier;[removeTagHelper]; Markup span - Gen - [ ] - SpanEditHandler;Accepts:None - (16:0,16) - Tokens:1 CSharpTokenType.WhiteSpace;[ ]; - Code span - Gen - [Foo"] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:2 + Code span - Gen - [Foo"] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:2 CSharpTokenType.Identifier;[Foo]; CSharpTokenType.StringLiteral;["];RZ1000(20:0,20 [1] ) diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_InvalidLookupText_AddsError.stree.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_InvalidLookupText_AddsError.stree.txt index 860f903187..062b5be2d7 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_InvalidLookupText_AddsError.stree.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_InvalidLookupText_AddsError.stree.txt @@ -5,5 +5,5 @@ Directive block - Gen - 20 - (0:0,0) CSharpTokenType.Identifier;[removeTagHelper]; Markup span - Gen - [ ] - SpanEditHandler;Accepts:None - (16:0,16) - Tokens:1 CSharpTokenType.WhiteSpace;[ ]; - Code span - Gen - [Foo] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1 + Code span - Gen - [Foo] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1 CSharpTokenType.Identifier;[Foo]; diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_NoValue_Invalid.stree.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_NoValue_Invalid.stree.txt index 73ba9fd131..b800b7d52b 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_NoValue_Invalid.stree.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_NoValue_Invalid.stree.txt @@ -5,5 +5,5 @@ Directive block - Gen - 19 - (0:0,0) CSharpTokenType.Identifier;[removeTagHelper]; Markup span - Gen - [ ] - SpanEditHandler;Accepts:None - (16:0,16) - Tokens:1 CSharpTokenType.WhiteSpace;[ ]; - Code span - Gen - [""] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1 + Code span - Gen - [""] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1 CSharpTokenType.StringLiteral;[""]; diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_RequiresValue.stree.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_RequiresValue.stree.txt index 2666ac8a58..072bd0d67f 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_RequiresValue.stree.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_RequiresValue.stree.txt @@ -5,5 +5,5 @@ Directive block - Gen - 17 - (0:0,0) CSharpTokenType.Identifier;[removeTagHelper]; Markup span - Gen - [ ] - SpanEditHandler;Accepts:None - (16:0,16) - Tokens:1 CSharpTokenType.WhiteSpace;[ ]; - Code span - Gen - [] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1 + Code span - Gen - [] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1 CSharpTokenType.Unknown;[]; diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_SingleQuotes_AddsError.stree.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_SingleQuotes_AddsError.stree.txt index acf4682a63..09c45b5793 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_SingleQuotes_AddsError.stree.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_SingleQuotes_AddsError.stree.txt @@ -5,5 +5,5 @@ Directive block - Gen - 25 - (0:0,0) CSharpTokenType.Identifier;[removeTagHelper]; Markup span - Gen - [ ] - SpanEditHandler;Accepts:None - (16:0,16) - Tokens:1 CSharpTokenType.WhiteSpace;[ ]; - Code span - Gen - ['*, Foo'] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1 + Code span - Gen - ['*, Foo'] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1 CSharpTokenType.CharacterLiteral;['*, Foo']; diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt index 5483dd02f2..f441701e1a 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt @@ -5,5 +5,5 @@ Directive block - Gen - 21 - (0:0,0) CSharpTokenType.Identifier;[removeTagHelper]; Markup span - Gen - [ ] - SpanEditHandler;Accepts:None - (16:0,16) - Tokens:1 CSharpTokenType.WhiteSpace;[ ]; - Code span - Gen - ["Foo] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1 + Code span - Gen - ["Foo] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1 CSharpTokenType.StringLiteral;["Foo];RZ1000(17:0,17 [1] ) diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.stree.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.stree.txt index 2f9b4b42d9..70b0ecf8e8 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.stree.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/ParserTests/CSharpDirectivesTest/RemoveTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.stree.txt @@ -5,5 +5,5 @@ Directive block - Gen - 22 - (0:0,0) CSharpTokenType.Identifier;[removeTagHelper]; Markup span - Gen - [ ] - SpanEditHandler;Accepts:None - (16:0,16) - Tokens:1 CSharpTokenType.WhiteSpace;[ ]; - Code span - Gen - ["Foo"] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1 + Code span - Gen - ["Foo"] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1 CSharpTokenType.StringLiteral;["Foo"];