From ae4af3d1549c651144bd4cf827fd0f93647f7fbe Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Mon, 15 Apr 2019 10:46:17 -0700 Subject: [PATCH] Shorten Microsoft.AspNetCore.Razor.Language.Test paths (dotnet/aspnetcore-tooling#425) * Shorten Microsoft.AspNetCore.Razor.Language.Test paths - aspnet/AspNetCoredotnet/aspnetcore-tooling#9358 and aspnet/AspNetCoredotnet/aspnetcore-tooling#7882 - do 4046 renames - adjust solutions to renamed directory - special-case directory of the Microsoft.AspNetCore.Razor.Language.Test project in `TestProject`\n\nCommit migrated from https://github.com/dotnet/aspnetcore-tooling/commit/72b939d85573202c4406cd1ec1c39e97f870cb08 --- .../test/AssertFrame.cs | 139 + .../BoundAttributeDescriptorExtensionsTest.cs | 279 ++ .../CodeGeneration/CSharpCodeWriterTest.cs | 339 ++ .../test/CodeGeneration/CodeTargetTest.cs | 68 + .../DefaultCodeTargetBuilderTest.cs | 46 + .../CodeGeneration/DefaultCodeTargetTest.cs | 174 + .../DefaultDocumentWriterTest.cs | 393 ++ .../DesignTimeNodeWriterTest.cs | 498 +++ .../LiteralRuntimeNodeWriterTest.cs | 48 + .../CodeGeneration/RuntimeNodeWriterTest.cs | 705 ++++ ...elperHtmlAttributeRuntimeNodeWriterTest.cs | 131 + .../ComponentDocumentClassifierPassTest.cs | 224 + .../ComponentMarkupBlockPassTest.cs | 403 ++ .../ComponentMarkupEncodingPassTest.cs | 221 + .../test/Components/NodeAssert.cs | 126 + ...ultAllowedChildTagDescriptorBuilderTest.cs | 24 + ...aultBoundAttributeDescriptorBuilderTest.cs | 47 + .../test/DefaultDocumentClassifierPassTest.cs | 62 + .../test/DefaultItemCollectionTest.cs | 54 + .../DefaultRazorCSharpLoweringPhaseTest.cs | 87 + .../test/DefaultRazorCodeDocumentTest.cs | 47 + .../test/DefaultRazorDiagnosticTest.cs | 217 + ...efaultRazorDirectiveClassifierPhaseTest.cs | 102 + ...DefaultRazorDocumentClassifierPhaseTest.cs | 102 + .../test/DefaultRazorEngineBuilderTest.cs | 42 + .../test/DefaultRazorEngineTest.cs | 72 + ...mediateNodeLoweringPhaseIntegrationTest.cs | 541 +++ ...tRazorIntermediateNodeLoweringPhaseTest.cs | 298 ++ .../test/DefaultRazorOptimizationPhaseTest.cs | 102 + .../test/DefaultRazorParsingPhaseTest.cs | 93 + .../DefaultRazorProjectEngineBuilderTest.cs | 65 + ...efaultRazorProjectEngineIntegrationTest.cs | 351 ++ .../test/DefaultRazorProjectEngineTest.cs | 62 + .../test/DefaultRazorProjectFileSystemTest.cs | 298 ++ .../test/DefaultRazorProjectItemTest.cs | 101 + .../test/DefaultRazorSyntaxTreePhaseTest.cs | 94 + .../DefaultRazorTagHelperBinderPhaseTest.cs | 1439 +++++++ ...tRequiredAttributeDescriptorBuilderTest.cs | 44 + ...irectiveDescriptorBuilderExtensionsTest.cs | 122 + .../test/DirectiveDescriptorTest.cs | 150 + .../DirectiveRemovalOptimizationPassTest.cs | 135 + .../test/DirectiveTokenEditHandlerTest.cs | 86 + .../test/DocumentClassifierPassBaseTest.cs | 295 ++ .../DefaultMetadataIdentifierFeatureTest.cs | 74 + .../DefaultTagHelperOptimizationPassTest.cs | 128 + .../DefaultTagHelperTargetExtensionTest.cs | 1239 ++++++ .../DesignTimeDirectiveTargetExtensionTest.cs | 247 ++ .../Extensions/FunctionsDirectivePassTest.cs | 98 + .../Extensions/InheritsDirectivePassTest.cs | 91 + .../Extensions/MetadataAttributePassTest.cs | 392 ++ .../MetadataAttributeTargetExtensionTest.cs | 123 + ...reallocatedAttributeTargetExtensionTest.cs | 276 ++ .../Extensions/SectionDirectivePassTest.cs | 106 + .../Extensions/SectionTargetExtensionTest.cs | 80 + .../Extensions/TemplateTargetExtensionTest.cs | 51 + .../test/HtmlConventionsTest.cs | 39 + .../test/HtmlNodeOptimizationPassTest.cs | 35 + .../IntegrationTests/BasicIntegrationTest.cs | 57 + .../CodeGenerationIntegrationTest.cs | 1065 +++++ .../ComponentBindIntegrationTest.cs | 96 + .../ComponentChildContentIntegrationTest.cs | 249 ++ .../ComponentCodeGenerationTestBase.cs | 3608 +++++++++++++++++ .../ComponentDeclarationIntegrationTest.cs | 175 + .../ComponentDesignTimeCodeGenerationTest.cs | 10 + ...ComponentDiagnosticRazorIntegrationTest.cs | 111 + .../ComponentDirectiveIntegrationTest.cs | 150 + .../ComponentDiscoveryIntegrationTest.cs | 121 + .../ComponentFilePathIntegrationTest.cs | 50 + .../ComponentGenericTypeIntegrationTest.cs | 124 + .../ComponentImportsIntegrationTest.cs | 191 + .../ComponentRuntimeCodeGenerationTest.cs | 9 + .../ComponentTemplateIntegrationTest.cs | 127 + .../IntegrationTests/ComponentTypingTest.cs | 130 + .../ExtensibleDirectiveTest.cs | 38 + .../HtmlAttributeIntegrationTest.cs | 36 + .../TagHelpersIntegrationTest.cs | 126 + .../TestTagHelperDescriptors.cs | 637 +++ ...DefaultRazorIntermediateNodeBuilderTest.cs | 217 + .../DocumentIntermediateNodeExtensionsTest.cs | 113 + .../ExtensionIntermediateNodeTest.cs | 92 + .../IntermediateNodeReferenceTest.cs | 510 +++ .../IntermediateNodeWalkerTest.cs | 140 + .../test/LargeTextSourceDocumentTest.cs | 172 + .../test/Legacy/BaselineWriter.cs | 46 + .../test/Legacy/CSharpAutoCompleteTest.cs | 53 + .../test/Legacy/CSharpBlockTest.cs | 719 ++++ .../test/Legacy/CSharpCodeParserTest.cs | 215 + .../test/Legacy/CSharpErrorTest.cs | 345 ++ .../Legacy/CSharpExplicitExpressionTest.cs | 76 + .../test/Legacy/CSharpFunctionsTest.cs | 136 + .../Legacy/CSharpImplicitExpressionTest.cs | 374 ++ .../CSharpLanguageCharacteristicsTest.cs | 20 + .../test/Legacy/CSharpNestedStatementsTest.cs | 46 + .../test/Legacy/CSharpRazorCommentsTest.cs | 134 + .../test/Legacy/CSharpReservedWordsTest.cs | 22 + .../test/Legacy/CSharpSectionTest.cs | 290 ++ .../test/Legacy/CSharpSpecialBlockTest.cs | 50 + .../test/Legacy/CSharpStatementTest.cs | 247 ++ .../test/Legacy/CSharpTemplateTest.cs | 92 + .../test/Legacy/CSharpToMarkupSwitchTest.cs | 218 + .../test/Legacy/CSharpTokenizerCommentTest.cs | 95 + .../Legacy/CSharpTokenizerIdentifierTest.cs | 171 + .../test/Legacy/CSharpTokenizerLiteralTest.cs | 288 ++ .../Legacy/CSharpTokenizerOperatorsTest.cs | 297 ++ .../test/Legacy/CSharpTokenizerTest.cs | 107 + .../test/Legacy/CSharpTokenizerTestBase.cs | 27 + .../test/Legacy/CSharpVerbatimBlockTest.cs | 49 + .../Legacy/CSharpWhitespaceHandlingTest.cs | 17 + .../test/Legacy/CodeBlockEditHandlerTest.cs | 293 ++ .../Legacy/DirectiveCSharpTokenizerTest.cs | 48 + .../test/Legacy/DirectiveHtmlTokenizerTest.cs | 42 + .../test/Legacy/DisposableActionTest.cs | 25 + .../test/Legacy/HtmlAttributeTest.cs | 252 ++ .../test/Legacy/HtmlBlockTest.cs | 279 ++ .../test/Legacy/HtmlDocumentTest.cs | 265 ++ .../test/Legacy/HtmlErrorTest.cs | 52 + .../test/Legacy/HtmlMarkupParserTests.cs | 230 ++ .../test/Legacy/HtmlTagsTest.cs | 187 + .../test/Legacy/HtmlToCodeSwitchTest.cs | 165 + .../test/Legacy/HtmlTokenizerTest.cs | 164 + .../test/Legacy/HtmlTokenizerTestBase.cs | 27 + .../ImplicitExpressionEditHandlerTest.cs | 463 +++ .../Legacy/LineTrackingStringBufferTest.cs | 26 + .../test/Legacy/MarkupElementGroupingTest.cs | 154 + .../test/Legacy/RazorDirectivesTest.cs | 910 +++++ .../test/Legacy/RazorParserTest.cs | 52 + .../test/Legacy/SourceLocationTrackerTest.cs | 214 + .../test/Legacy/TagHelperBlockRewriterTest.cs | 2187 ++++++++++ .../Legacy/TagHelperParseTreeRewriterTest.cs | 1884 +++++++++ .../test/Legacy/TagHelperRewritingTestBase.cs | 45 + .../test/Legacy/TextReaderExtensionsTest.cs | 113 + .../test/Legacy/TokenizerLookaheadTest.cs | 217 + .../test/Legacy/TokenizerTestBase.cs | 71 + .../test/Legacy/WhiteSpaceRewriterTest.cs | 37 + ...soft.AspNetCore.Razor.Language.Test.csproj | 26 + .../test/Properties/AssemblyInfo.cs | 6 + .../test/RazorCodeDocumentExtensionsTest.cs | 382 ++ .../test/RazorCodeDocumentTest.cs | 61 + .../test/RazorDiagnosticDescriptorTest.cs | 78 + .../test/RazorDiagnosticTest.cs | 45 + .../test/RazorEngineBuilderExtensionsTest.cs | 98 + .../test/RazorEngineTest.cs | 233 ++ .../test/RazorLanguageVersionTest.cs | 141 + .../test/RazorParserFeatureFlagsTest.cs | 33 + ...RazorProjectEngineBuilderExtensionsTest.cs | 103 + .../test/RazorProjectEngineFeatureBaseTest.cs | 34 + .../test/RazorProjectEngineTest.cs | 109 + .../test/RazorProjectItemTest.cs | 104 + .../test/RazorProjectTest.cs | 333 ++ .../test/RazorSourceDocumentTest.cs | 219 + .../test/RazorSyntaxTreeTest.cs | 63 + .../test/SourceChangeTest.cs | 198 + .../test/SourceLocationTest.cs | 110 + .../test/SourceSpanTest.cs | 117 + .../test/StreamSourceDocumentTest.cs | 200 + .../test/StringSourceDocumentTest.cs | 516 +++ .../test/TagHelperBinderTest.cs | 602 +++ .../test/TagHelperDescriptorBuilderTest.cs | 38 + .../test/TagHelperDescriptorExtensionsTest.cs | 64 + .../test/TagHelperMatchingConventionsTest.cs | 156 + .../DefaultRazorProjectFileSystem/Home.cshtml | 1 + .../Views/About/About.cshtml | 1 + .../Views/Home/Index.cshtml | 1 + .../Views/Home/Index.txt | 1 + .../Views/Home/_ViewImports.cshtml | 1 + .../Views/_ViewImports.cshtml | 1 + .../_ViewImports.cshtml | 1 + .../CustomDirective.cshtml | 1 + .../CustomDirective.ir.txt | 6 + .../BasicIntegrationTest/Empty.cshtml | 1 + .../BasicIntegrationTest/Empty.ir.txt | 6 + .../BasicIntegrationTest/HelloWorld.cshtml | 1 + .../BasicIntegrationTest/HelloWorld.ir.txt | 8 + .../AddTagHelperDirective.cshtml | 1 + ...ddTagHelperDirective_DesignTime.codegen.cs | 32 + .../AddTagHelperDirective_DesignTime.ir.txt | 14 + ...TagHelperDirective_DesignTime.mappings.txt | 5 + .../AttributeTargetingTagHelpers.cshtml | 8 + ...eTargetingTagHelpers_DesignTime.codegen.cs | 61 + ...ibuteTargetingTagHelpers_DesignTime.ir.txt | 85 + ...argetingTagHelpers_DesignTime.mappings.txt | 15 + ...buteTargetingTagHelpers_Runtime.codegen.cs | 130 + ...ttributeTargetingTagHelpers_Runtime.ir.txt | 68 + .../Await.cshtml | 26 + .../Await_DesignTime.codegen.cs | 145 + .../Await_DesignTime.ir.txt | 148 + .../Await_DesignTime.mappings.txt | 95 + .../Await_Runtime.codegen.cs | 130 + .../Await_Runtime.ir.txt | 143 + .../BasicTagHelpers.cshtml | 9 + .../BasicTagHelpers_DesignTime.codegen.cs | 59 + .../BasicTagHelpers_DesignTime.ir.txt | 84 + .../BasicTagHelpers_DesignTime.mappings.txt | 15 + .../BasicTagHelpers_Prefixed.cshtml | 10 + ...cTagHelpers_Prefixed_DesignTime.codegen.cs | 57 + ...BasicTagHelpers_Prefixed_DesignTime.ir.txt | 60 + ...agHelpers_Prefixed_DesignTime.mappings.txt | 15 + ...asicTagHelpers_Prefixed_Runtime.codegen.cs | 84 + .../BasicTagHelpers_Prefixed_Runtime.ir.txt | 47 + .../BasicTagHelpers_RemoveTagHelper.cshtml | 10 + ...Helpers_RemoveTagHelper_Runtime.codegen.cs | 117 + ...cTagHelpers_RemoveTagHelper_Runtime.ir.txt | 55 + .../BasicTagHelpers_Runtime.codegen.cs | 133 + .../BasicTagHelpers_Runtime.ir.txt | 69 + .../Blocks.cshtml | 37 + .../Blocks_DesignTime.codegen.cs | 176 + .../Blocks_DesignTime.ir.txt | 110 + .../Blocks_DesignTime.mappings.txt | 139 + .../Blocks_Runtime.codegen.cs | 174 + .../Blocks_Runtime.ir.txt | 121 + .../CSharp7.cshtml | 43 + .../CSharp7_DesignTime.codegen.cs | 93 + .../CSharp7_DesignTime.ir.txt | 50 + .../CSharp7_DesignTime.mappings.txt | 88 + .../CSharp7_Runtime.codegen.cs | 96 + .../CSharp7_Runtime.ir.txt | 51 + .../CSharp8.cshtml | 52 + .../CSharp8_DesignTime.codegen.cs | 123 + .../CSharp8_DesignTime.ir.txt | 40 + .../CSharp8_DesignTime.mappings.txt | 125 + .../CSharp8_Runtime.codegen.cs | 125 + .../CSharp8_Runtime.ir.txt | 35 + .../CodeBlock.cshtml | 5 + .../CodeBlockAtEOF.cshtml | 1 + .../CodeBlockAtEOF_DesignTime.codegen.cs | 29 + .../CodeBlockAtEOF_DesignTime.diagnostics.txt | 1 + .../CodeBlockAtEOF_DesignTime.ir.txt | 13 + .../CodeBlockAtEOF_DesignTime.mappings.txt | 5 + .../CodeBlockAtEOF_Runtime.codegen.cs | 18 + .../CodeBlockAtEOF_Runtime.diagnostics.txt | 1 + .../CodeBlockAtEOF_Runtime.ir.txt | 8 + .../CodeBlockWithTextElement.cshtml | 4 + ...BlockWithTextElement_DesignTime.codegen.cs | 52 + ...CodeBlockWithTextElement_DesignTime.ir.txt | 23 + ...ockWithTextElement_DesignTime.mappings.txt | 26 + ...odeBlockWithTextElement_Runtime.codegen.cs | 43 + .../CodeBlockWithTextElement_Runtime.ir.txt | 18 + .../CodeBlock_DesignTime.codegen.cs | 32 + .../CodeBlock_DesignTime.ir.txt | 13 + .../CodeBlock_DesignTime.mappings.txt | 13 + .../CodeBlock_Runtime.codegen.cs | 28 + .../CodeBlock_Runtime.ir.txt | 8 + .../ComplexTagHelpers.cshtml | 38 + .../ComplexTagHelpers_DesignTime.codegen.cs | 283 ++ ...mplexTagHelpers_DesignTime.diagnostics.txt | 2 + .../ComplexTagHelpers_DesignTime.ir.txt | 308 ++ .../ComplexTagHelpers_DesignTime.mappings.txt | 293 ++ .../ComplexTagHelpers_Runtime.codegen.cs | 564 +++ .../ComplexTagHelpers_Runtime.diagnostics.txt | 2 + .../ComplexTagHelpers_Runtime.ir.txt | 309 ++ .../ConditionalAttributes.cshtml | 15 + ...onditionalAttributes_DesignTime.codegen.cs | 189 + .../ConditionalAttributes_DesignTime.ir.txt | 128 + ...ditionalAttributes_DesignTime.mappings.txt | 138 + .../ConditionalAttributes_Runtime.codegen.cs | 130 + .../ConditionalAttributes_Runtime.ir.txt | 115 + .../CssSelectorTagHelperAttributes.cshtml | 13 + ...ctorTagHelperAttributes_Runtime.codegen.cs | 248 ++ ...SelectorTagHelperAttributes_Runtime.ir.txt | 137 + .../DesignTime.cshtml | 15 + .../DesignTime_DesignTime.codegen.cs | 88 + .../DesignTime_DesignTime.ir.txt | 68 + .../DesignTime_DesignTime.mappings.txt | 49 + .../DuplicateAttributeTagHelpers.cshtml | 7 + ...eAttributeTagHelpers_DesignTime.codegen.cs | 69 + ...icateAttributeTagHelpers_DesignTime.ir.txt | 96 + ...ttributeTagHelpers_DesignTime.mappings.txt | 20 + ...cateAttributeTagHelpers_Runtime.codegen.cs | 152 + ...uplicateAttributeTagHelpers_Runtime.ir.txt | 69 + .../DuplicateTargetTagHelper.cshtml | 3 + ...icateTargetTagHelper_DesignTime.codegen.cs | 46 + ...DuplicateTargetTagHelper_DesignTime.ir.txt | 32 + ...ateTargetTagHelper_DesignTime.mappings.txt | 10 + ...uplicateTargetTagHelper_Runtime.codegen.cs | 67 + .../DuplicateTargetTagHelper_Runtime.ir.txt | 23 + .../DynamicAttributeTagHelpers.cshtml | 14 + ...cAttributeTagHelpers_DesignTime.codegen.cs | 251 ++ ...namicAttributeTagHelpers_DesignTime.ir.txt | 133 + ...ttributeTagHelpers_DesignTime.mappings.txt | 155 + ...amicAttributeTagHelpers_Runtime.codegen.cs | 370 ++ .../DynamicAttributeTagHelpers_Runtime.ir.txt | 127 + .../EmptyAttributeTagHelpers.cshtml | 8 + ...yAttributeTagHelpers_DesignTime.codegen.cs | 65 + ...ibuteTagHelpers_DesignTime.diagnostics.txt | 3 + ...EmptyAttributeTagHelpers_DesignTime.ir.txt | 68 + ...ttributeTagHelpers_DesignTime.mappings.txt | 20 + ...mptyAttributeTagHelpers_Runtime.codegen.cs | 120 + ...ttributeTagHelpers_Runtime.diagnostics.txt | 3 + .../EmptyAttributeTagHelpers_Runtime.ir.txt | 52 + .../EmptyCodeBlock.cshtml | 3 + .../EmptyCodeBlock_DesignTime.codegen.cs | 29 + .../EmptyCodeBlock_DesignTime.ir.txt | 15 + .../EmptyCodeBlock_DesignTime.mappings.txt | 5 + .../EmptyCodeBlock_Runtime.codegen.cs | 19 + .../EmptyCodeBlock_Runtime.ir.txt | 10 + .../EmptyExplicitExpression.cshtml | 3 + ...tyExplicitExpression_DesignTime.codegen.cs | 29 + .../EmptyExplicitExpression_DesignTime.ir.txt | 15 + ...ExplicitExpression_DesignTime.mappings.txt | 5 + ...EmptyExplicitExpression_Runtime.codegen.cs | 26 + .../EmptyExplicitExpression_Runtime.ir.txt | 10 + .../EmptyImplicitExpression.cshtml | 3 + .../EmptyImplicitExpressionInCode.cshtml | 3 + ...icitExpressionInCode_DesignTime.codegen.cs | 44 + ...xpressionInCode_DesignTime.diagnostics.txt | 1 + ...ImplicitExpressionInCode_DesignTime.ir.txt | 17 + ...itExpressionInCode_DesignTime.mappings.txt | 19 + ...mplicitExpressionInCode_Runtime.codegen.cs | 25 + ...itExpressionInCode_Runtime.diagnostics.txt | 1 + ...ptyImplicitExpressionInCode_Runtime.ir.txt | 12 + ...tyImplicitExpression_DesignTime.codegen.cs | 29 + ...licitExpression_DesignTime.diagnostics.txt | 1 + .../EmptyImplicitExpression_DesignTime.ir.txt | 17 + ...ImplicitExpression_DesignTime.mappings.txt | 5 + ...EmptyImplicitExpression_Runtime.codegen.cs | 27 + ...ImplicitExpression_Runtime.diagnostics.txt | 1 + .../EmptyImplicitExpression_Runtime.ir.txt | 12 + .../EnumTagHelpers.cshtml | 11 + .../EnumTagHelpers_DesignTime.codegen.cs | 101 + .../EnumTagHelpers_DesignTime.ir.txt | 74 + .../EnumTagHelpers_DesignTime.mappings.txt | 49 + .../EnumTagHelpers_Runtime.codegen.cs | 180 + .../EnumTagHelpers_Runtime.ir.txt | 68 + .../EscapedTagHelpers.cshtml | 8 + .../EscapedTagHelpers_DesignTime.codegen.cs | 59 + .../EscapedTagHelpers_DesignTime.ir.txt | 71 + .../EscapedTagHelpers_DesignTime.mappings.txt | 20 + .../EscapedTagHelpers_Runtime.codegen.cs | 89 + .../EscapedTagHelpers_Runtime.ir.txt | 65 + .../ExplicitExpression.cshtml | 1 + .../ExplicitExpressionAtEOF.cshtml | 3 + ...licitExpressionAtEOF_DesignTime.codegen.cs | 29 + ...ExpressionAtEOF_DesignTime.diagnostics.txt | 1 + .../ExplicitExpressionAtEOF_DesignTime.ir.txt | 15 + ...citExpressionAtEOF_DesignTime.mappings.txt | 5 + ...ExplicitExpressionAtEOF_Runtime.codegen.cs | 26 + ...citExpressionAtEOF_Runtime.diagnostics.txt | 1 + .../ExplicitExpressionAtEOF_Runtime.ir.txt | 10 + .../ExplicitExpressionWithMarkup.cshtml | 1 + ...ExpressionWithMarkup_DesignTime.codegen.cs | 31 + ...ssionWithMarkup_DesignTime.diagnostics.txt | 2 + ...icitExpressionWithMarkup_DesignTime.ir.txt | 19 + ...pressionWithMarkup_DesignTime.mappings.txt | 5 + ...citExpressionWithMarkup_Runtime.codegen.cs | 31 + ...pressionWithMarkup_Runtime.diagnostics.txt | 2 + ...xplicitExpressionWithMarkup_Runtime.ir.txt | 14 + .../ExplicitExpression_DesignTime.codegen.cs | 29 + .../ExplicitExpression_DesignTime.ir.txt | 15 + ...ExplicitExpression_DesignTime.mappings.txt | 5 + .../ExplicitExpression_Runtime.codegen.cs | 26 + .../ExplicitExpression_Runtime.ir.txt | 10 + .../ExpressionsInCode.cshtml | 16 + .../ExpressionsInCode_DesignTime.codegen.cs | 86 + .../ExpressionsInCode_DesignTime.ir.txt | 42 + .../ExpressionsInCode_DesignTime.mappings.txt | 58 + .../ExpressionsInCode_Runtime.codegen.cs | 84 + .../ExpressionsInCode_Runtime.ir.txt | 38 + .../FunctionsBlock.cshtml | 12 + .../FunctionsBlockMinimal.cshtml | 7 + ...unctionsBlockMinimal_DesignTime.codegen.cs | 32 + .../FunctionsBlockMinimal_DesignTime.ir.txt | 15 + ...ctionsBlockMinimal_DesignTime.mappings.txt | 13 + .../FunctionsBlockMinimal_Runtime.codegen.cs | 29 + .../FunctionsBlockMinimal_Runtime.ir.txt | 10 + .../FunctionsBlock_DesignTime.codegen.cs | 48 + .../FunctionsBlock_DesignTime.ir.txt | 21 + .../FunctionsBlock_DesignTime.mappings.txt | 29 + .../FunctionsBlock_Runtime.codegen.cs | 38 + .../FunctionsBlock_Runtime.ir.txt | 16 + .../HiddenSpansInCode.cshtml | 3 + .../HiddenSpansInCode_DesignTime.codegen.cs | 37 + .../HiddenSpansInCode_DesignTime.ir.txt | 15 + .../HiddenSpansInCode_DesignTime.mappings.txt | 14 + .../HiddenSpansInCode_Runtime.codegen.cs | 25 + .../HiddenSpansInCode_Runtime.ir.txt | 10 + .../HtmlCommentWithQuote_Double.cshtml | 2 + ...mentWithQuote_Double_DesignTime.codegen.cs | 22 + ...lCommentWithQuote_Double_DesignTime.ir.txt | 20 + ...ntWithQuote_Double_DesignTime.mappings.txt | 0 ...CommentWithQuote_Double_Runtime.codegen.cs | 19 + ...HtmlCommentWithQuote_Double_Runtime.ir.txt | 15 + .../HtmlCommentWithQuote_Single.cshtml | 2 + ...mentWithQuote_Single_DesignTime.codegen.cs | 22 + ...lCommentWithQuote_Single_DesignTime.ir.txt | 20 + ...ntWithQuote_Single_DesignTime.mappings.txt | 0 ...CommentWithQuote_Single_Runtime.codegen.cs | 19 + ...HtmlCommentWithQuote_Single_Runtime.ir.txt | 15 + .../Implements.cshtml | 5 + .../Implements_DesignTime.codegen.cs | 40 + .../Implements_DesignTime.ir.txt | 16 + .../Implements_DesignTime.mappings.txt | 14 + .../Implements_Runtime.codegen.cs | 27 + .../Implements_Runtime.ir.txt | 10 + .../ImplicitExpression.cshtml | 3 + .../ImplicitExpressionAtEOF.cshtml | 3 + ...licitExpressionAtEOF_DesignTime.codegen.cs | 29 + ...ExpressionAtEOF_DesignTime.diagnostics.txt | 1 + .../ImplicitExpressionAtEOF_DesignTime.ir.txt | 15 + ...citExpressionAtEOF_DesignTime.mappings.txt | 5 + ...ImplicitExpressionAtEOF_Runtime.codegen.cs | 26 + ...citExpressionAtEOF_Runtime.diagnostics.txt | 1 + .../ImplicitExpressionAtEOF_Runtime.ir.txt | 10 + .../ImplicitExpression_DesignTime.codegen.cs | 45 + .../ImplicitExpression_DesignTime.ir.txt | 23 + ...ImplicitExpression_DesignTime.mappings.txt | 19 + .../ImplicitExpression_Runtime.codegen.cs | 41 + .../ImplicitExpression_Runtime.ir.txt | 20 + .../IncompleteDirectives.cshtml | 25 + ...IncompleteDirectives_DesignTime.codegen.cs | 159 + ...pleteDirectives_DesignTime.diagnostics.txt | 27 + .../IncompleteDirectives_DesignTime.ir.txt | 86 + ...completeDirectives_DesignTime.mappings.txt | 70 + .../IncompleteDirectives_Runtime.codegen.cs | 27 + ...completeDirectives_Runtime.diagnostics.txt | 27 + .../IncompleteDirectives_Runtime.ir.txt | 56 + .../IncompleteTagHelper.cshtml | 3 + .../IncompleteTagHelper_DesignTime.codegen.cs | 34 + ...mpleteTagHelper_DesignTime.diagnostics.txt | 2 + .../IncompleteTagHelper_DesignTime.ir.txt | 23 + ...ncompleteTagHelper_DesignTime.mappings.txt | 5 + .../IncompleteTagHelper_Runtime.codegen.cs | 52 + ...ncompleteTagHelper_Runtime.diagnostics.txt | 2 + .../IncompleteTagHelper_Runtime.ir.txt | 16 + .../Inherits.cshtml | 3 + .../Inherits_DesignTime.codegen.cs | 39 + .../Inherits_DesignTime.ir.txt | 16 + .../Inherits_DesignTime.mappings.txt | 10 + .../Inherits_Runtime.codegen.cs | 26 + .../Inherits_Runtime.ir.txt | 10 + .../InlineBlocks.cshtml | 3 + .../InlineBlocks_DesignTime.codegen.cs | 60 + .../InlineBlocks_DesignTime.diagnostics.txt | 1 + .../InlineBlocks_DesignTime.ir.txt | 30 + .../InlineBlocks_DesignTime.mappings.txt | 25 + .../InlineBlocks_Runtime.codegen.cs | 56 + .../InlineBlocks_Runtime.diagnostics.txt | 1 + .../InlineBlocks_Runtime.ir.txt | 24 + .../Instrumented.cshtml | 38 + .../Instrumented_DesignTime.codegen.cs | 195 + .../Instrumented_DesignTime.ir.txt | 121 + .../Instrumented_DesignTime.mappings.txt | 153 + .../Instrumented_Runtime.codegen.cs | 182 + .../Instrumented_Runtime.ir.txt | 133 + .../MarkupInCodeBlock.cshtml | 5 + .../MarkupInCodeBlock_DesignTime.codegen.cs | 46 + .../MarkupInCodeBlock_DesignTime.ir.txt | 23 + .../MarkupInCodeBlock_DesignTime.mappings.txt | 23 + .../MarkupInCodeBlock_Runtime.codegen.cs | 42 + .../MarkupInCodeBlock_Runtime.ir.txt | 20 + .../Markup_InCodeBlocks.cshtml | 45 + .../Markup_InCodeBlocksWithTagHelper.cshtml | 47 + ...eBlocksWithTagHelper_DesignTime.codegen.cs | 160 + ...nCodeBlocksWithTagHelper_DesignTime.ir.txt | 81 + ...locksWithTagHelper_DesignTime.mappings.txt | 142 + ...CodeBlocksWithTagHelper_Runtime.codegen.cs | 182 + ...p_InCodeBlocksWithTagHelper_Runtime.ir.txt | 89 + .../Markup_InCodeBlocks_DesignTime.codegen.cs | 145 + .../Markup_InCodeBlocks_DesignTime.ir.txt | 78 + ...arkup_InCodeBlocks_DesignTime.mappings.txt | 133 + .../Markup_InCodeBlocks_Runtime.codegen.cs | 136 + .../Markup_InCodeBlocks_Runtime.ir.txt | 85 + .../MinimizedTagHelpers.cshtml | 20 + .../MinimizedTagHelpers_DesignTime.codegen.cs | 51 + .../MinimizedTagHelpers_DesignTime.ir.txt | 109 + ...inimizedTagHelpers_DesignTime.mappings.txt | 5 + .../MinimizedTagHelpers_Runtime.codegen.cs | 188 + .../MinimizedTagHelpers_Runtime.ir.txt | 90 + .../NestedCSharp.cshtml | 8 + .../NestedCSharp_DesignTime.codegen.cs | 61 + .../NestedCSharp_DesignTime.ir.txt | 28 + .../NestedCSharp_DesignTime.mappings.txt | 35 + .../NestedCSharp_Runtime.codegen.cs | 42 + .../NestedCSharp_Runtime.ir.txt | 26 + .../NestedCodeBlocks.cshtml | 4 + .../NestedCodeBlocks_DesignTime.codegen.cs | 46 + .../NestedCodeBlocks_DesignTime.ir.txt | 17 + .../NestedCodeBlocks_DesignTime.mappings.txt | 21 + .../NestedCodeBlocks_Runtime.codegen.cs | 42 + .../NestedCodeBlocks_Runtime.ir.txt | 12 + .../NestedScriptTagTagHelpers.cshtml | 16 + ...dScriptTagTagHelpers_DesignTime.codegen.cs | 70 + ...estedScriptTagTagHelpers_DesignTime.ir.txt | 87 + ...criptTagTagHelpers_DesignTime.mappings.txt | 29 + ...stedScriptTagTagHelpers_Runtime.codegen.cs | 114 + .../NestedScriptTagTagHelpers_Runtime.ir.txt | 80 + .../NestedTagHelpers.cshtml | 5 + .../NestedTagHelpers_DesignTime.codegen.cs | 39 + .../NestedTagHelpers_DesignTime.ir.txt | 48 + .../NestedTagHelpers_DesignTime.mappings.txt | 5 + .../NestedTagHelpers_Runtime.codegen.cs | 89 + .../NestedTagHelpers_Runtime.ir.txt | 37 + .../NoLinePragmas.cshtml | 38 + .../NoLinePragmas_DesignTime.codegen.cs | 184 + .../NoLinePragmas_DesignTime.ir.txt | 112 + .../NoLinePragmas_DesignTime.mappings.txt | 148 + .../NoLinePragmas_Runtime.codegen.cs | 175 + .../NoLinePragmas_Runtime.ir.txt | 122 + .../NullConditionalExpressions.cshtml | 11 + ...nditionalExpressions_DesignTime.codegen.cs | 117 + ...llConditionalExpressions_DesignTime.ir.txt | 45 + ...itionalExpressions_DesignTime.mappings.txt | 75 + ...lConditionalExpressions_Runtime.codegen.cs | 78 + .../NullConditionalExpressions_Runtime.ir.txt | 40 + .../OpenedIf.cshtml | 5 + .../OpenedIf_DesignTime.codegen.cs | 43 + .../OpenedIf_DesignTime.diagnostics.txt | 3 + .../OpenedIf_DesignTime.ir.txt | 28 + .../OpenedIf_DesignTime.mappings.txt | 19 + .../OpenedIf_Runtime.codegen.cs | 27 + .../OpenedIf_Runtime.diagnostics.txt | 3 + .../OpenedIf_Runtime.ir.txt | 21 + .../ParserError.cshtml | 5 + .../ParserError_DesignTime.codegen.cs | 33 + .../ParserError_DesignTime.diagnostics.txt | 2 + .../ParserError_DesignTime.ir.txt | 13 + .../ParserError_DesignTime.mappings.txt | 13 + .../ParserError_Runtime.codegen.cs | 29 + .../ParserError_Runtime.diagnostics.txt | 2 + .../ParserError_Runtime.ir.txt | 8 + .../PrefixedAttributeTagHelpers.cshtml | 23 + ...dAttributeTagHelpers_DesignTime.codegen.cs | 145 + ...fixedAttributeTagHelpers_DesignTime.ir.txt | 136 + ...ttributeTagHelpers_DesignTime.mappings.txt | 80 + ...ixedAttributeTagHelpers_Runtime.codegen.cs | 282 ++ ...PrefixedAttributeTagHelpers_Runtime.ir.txt | 117 + .../RazorComments.cshtml | 18 + .../RazorComments_DesignTime.codegen.cs | 69 + .../RazorComments_DesignTime.ir.txt | 55 + .../RazorComments_DesignTime.mappings.txt | 47 + .../RazorComments_Runtime.codegen.cs | 64 + .../RazorComments_Runtime.ir.txt | 50 + .../RemoveTagHelperDirective.cshtml | 1 + ...veTagHelperDirective_DesignTime.codegen.cs | 32 + ...RemoveTagHelperDirective_DesignTime.ir.txt | 14 + ...TagHelperDirective_DesignTime.mappings.txt | 5 + .../Sections.cshtml | 17 + .../Sections_DesignTime.codegen.cs | 100 + .../Sections_DesignTime.ir.txt | 62 + .../Sections_DesignTime.mappings.txt | 44 + .../Sections_Runtime.codegen.cs | 80 + .../Sections_Runtime.ir.txt | 56 + .../SimpleTagHelpers.cshtml | 5 + .../SimpleTagHelpers_DesignTime.codegen.cs | 35 + .../SimpleTagHelpers_DesignTime.ir.txt | 37 + .../SimpleTagHelpers_DesignTime.mappings.txt | 5 + .../SimpleTagHelpers_Runtime.codegen.cs | 56 + .../SimpleTagHelpers_Runtime.ir.txt | 28 + .../SimpleUnspacedIf.cshtml | 4 + .../SimpleUnspacedIf_DesignTime.codegen.cs | 39 + .../SimpleUnspacedIf_DesignTime.ir.txt | 19 + .../SimpleUnspacedIf_DesignTime.mappings.txt | 16 + .../SimpleUnspacedIf_Runtime.codegen.cs | 34 + .../SimpleUnspacedIf_Runtime.ir.txt | 16 + .../SingleTagHelper.cshtml | 3 + ...agHelperWithNewlineBeforeAttributes.cshtml | 4 + ...lineBeforeAttributes_DesignTime.codegen.cs | 41 + ...hNewlineBeforeAttributes_DesignTime.ir.txt | 27 + ...neBeforeAttributes_DesignTime.mappings.txt | 10 + ...NewlineBeforeAttributes_Runtime.codegen.cs | 61 + ...WithNewlineBeforeAttributes_Runtime.ir.txt | 20 + .../SingleTagHelper_DesignTime.codegen.cs | 41 + .../SingleTagHelper_DesignTime.ir.txt | 27 + .../SingleTagHelper_DesignTime.mappings.txt | 10 + .../SingleTagHelper_Runtime.codegen.cs | 61 + .../SingleTagHelper_Runtime.ir.txt | 20 + .../StringLiterals.cshtml | 237 ++ .../StringLiterals_DesignTime.codegen.cs | 48 + .../StringLiterals_DesignTime.ir.txt | 1186 ++++++ .../StringLiterals_DesignTime.mappings.txt | 10 + .../StringLiterals_Runtime.codegen.cs | 267 ++ .../StringLiterals_Runtime.ir.txt | 1178 ++++++ .../SymbolBoundAttributes.cshtml | 19 + ...ymbolBoundAttributes_DesignTime.codegen.cs | 70 + ...BoundAttributes_DesignTime.diagnostics.txt | 5 + .../SymbolBoundAttributes_DesignTime.ir.txt | 140 + ...bolBoundAttributes_DesignTime.mappings.txt | 25 + .../SymbolBoundAttributes_Runtime.codegen.cs | 205 + ...bolBoundAttributes_Runtime.diagnostics.txt | 5 + .../SymbolBoundAttributes_Runtime.ir.txt | 126 + .../TagHelpersInSection.cshtml | 20 + .../TagHelpersInSection_DesignTime.codegen.cs | 90 + ...elpersInSection_DesignTime.diagnostics.txt | 1 + .../TagHelpersInSection_DesignTime.ir.txt | 80 + ...agHelpersInSection_DesignTime.mappings.txt | 39 + .../TagHelpersInSection_Runtime.codegen.cs | 124 + ...agHelpersInSection_Runtime.diagnostics.txt | 1 + .../TagHelpersInSection_Runtime.ir.txt | 70 + .../TagHelpersWithBoundAttributes.cshtml | 4 + ...sWithBoundAttributes_DesignTime.codegen.cs | 42 + ...lpersWithBoundAttributes_DesignTime.ir.txt | 32 + ...ithBoundAttributes_DesignTime.mappings.txt | 10 + ...persWithBoundAttributes_Runtime.codegen.cs | 64 + ...gHelpersWithBoundAttributes_Runtime.ir.txt | 24 + .../TagHelpersWithDataDashAttributes.cshtml | 5 + ...thDataDashAttributes_DesignTime.codegen.cs | 58 + ...rsWithDataDashAttributes_DesignTime.ir.txt | 67 + ...DataDashAttributes_DesignTime.mappings.txt | 20 + ...sWithDataDashAttributes_Runtime.codegen.cs | 108 + ...lpersWithDataDashAttributes_Runtime.ir.txt | 54 + .../TagHelpersWithPrefix.cshtml | 5 + ...TagHelpersWithPrefix_DesignTime.codegen.cs | 52 + .../TagHelpersWithPrefix_DesignTime.ir.txt | 35 + ...gHelpersWithPrefix_DesignTime.mappings.txt | 15 + .../TagHelpersWithPrefix_Runtime.codegen.cs | 64 + .../TagHelpersWithPrefix_Runtime.ir.txt | 24 + .../TagHelpersWithTemplate.cshtml | 19 + ...gHelpersWithTemplate_DesignTime.codegen.cs | 78 + .../TagHelpersWithTemplate_DesignTime.ir.txt | 58 + ...elpersWithTemplate_DesignTime.mappings.txt | 47 + .../TagHelpersWithTemplate_Runtime.codegen.cs | 129 + .../TagHelpersWithTemplate_Runtime.ir.txt | 51 + ...gHelpersWithWeirdlySpacedAttributes.cshtml | 15 + ...rdlySpacedAttributes_DesignTime.codegen.cs | 66 + ...hWeirdlySpacedAttributes_DesignTime.ir.txt | 75 + ...lySpacedAttributes_DesignTime.mappings.txt | 20 + ...WeirdlySpacedAttributes_Runtime.codegen.cs | 140 + ...WithWeirdlySpacedAttributes_Runtime.ir.txt | 59 + .../CodeGenerationIntegrationTest/Tags.cshtml | 5 + .../Tags_DesignTime.codegen.cs | 44 + .../Tags_DesignTime.diagnostics.txt | 1 + .../Tags_DesignTime.ir.txt | 30 + .../Tags_DesignTime.mappings.txt | 19 + .../Tags_Runtime.codegen.cs | 21 + .../Tags_Runtime.diagnostics.txt | 1 + .../Tags_Runtime.ir.txt | 27 + .../Templates.cshtml | 53 + .../Templates_DesignTime.codegen.cs | 206 + .../Templates_DesignTime.ir.txt | 158 + .../Templates_DesignTime.mappings.txt | 169 + .../Templates_Runtime.codegen.cs | 228 ++ .../Templates_Runtime.ir.txt | 156 + .../TransitionsInTagHelperAttributes.cshtml | 12 + ...nTagHelperAttributes_DesignTime.codegen.cs | 104 + ...elperAttributes_DesignTime.diagnostics.txt | 1 + ...onsInTagHelperAttributes_DesignTime.ir.txt | 105 + ...agHelperAttributes_DesignTime.mappings.txt | 116 + ...nsInTagHelperAttributes_Runtime.codegen.cs | 204 + ...agHelperAttributes_Runtime.diagnostics.txt | 1 + ...itionsInTagHelperAttributes_Runtime.ir.txt | 92 + .../UnfinishedExpressionInCode.cshtml | 3 + ...shedExpressionInCode_DesignTime.codegen.cs | 43 + ...finishedExpressionInCode_DesignTime.ir.txt | 17 + ...edExpressionInCode_DesignTime.mappings.txt | 19 + ...inishedExpressionInCode_Runtime.codegen.cs | 25 + .../UnfinishedExpressionInCode_Runtime.ir.txt | 12 + .../Usings.cshtml | 15 + .../Usings_DesignTime.codegen.cs | 87 + .../Usings_DesignTime.ir.txt | 48 + .../Usings_DesignTime.mappings.txt | 51 + .../Usings_Runtime.codegen.cs | 88 + .../Usings_Runtime.ir.txt | 35 + .../TestComponent.codegen.cs | 34 + .../TestComponent.ir.txt | 26 + .../TestComponent.mappings.txt | 10 + .../TestComponent.codegen.cs | 45 + .../TestComponent.ir.txt | 28 + .../TestComponent.mappings.txt | 25 + .../TestComponent.codegen.cs | 34 + .../TestComponent.ir.txt | 26 + .../TestComponent.mappings.txt | 10 + .../TestComponent.codegen.cs | 45 + .../TestComponent.ir.txt | 28 + .../TestComponent.mappings.txt | 25 + .../TestComponent.codegen.cs | 57 + .../TestComponent.ir.txt | 32 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 67 + .../TestComponent.ir.txt | 35 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 56 + .../TestComponent.ir.txt | 29 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 56 + .../TestComponent.ir.txt | 29 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 56 + .../TestComponent.ir.txt | 29 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 55 + .../TestComponent.ir.txt | 29 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 57 + .../TestComponent.ir.txt | 32 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 67 + .../TestComponent.ir.txt | 35 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 56 + .../TestComponent.ir.txt | 29 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 55 + .../TestComponent.ir.txt | 29 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 56 + .../TestComponent.ir.txt | 29 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 56 + .../TestComponent.ir.txt | 29 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 34 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 32 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 29 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 29 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 29 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 69 + .../TestComponent.ir.txt | 31 + .../TestComponent.mappings.txt | 20 + .../TestComponent.codegen.cs | 72 + .../TestComponent.ir.txt | 34 + .../TestComponent.mappings.txt | 20 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 32 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 39 + .../TestComponent.ir.txt | 34 + .../TestComponent.mappings.txt | 23 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 34 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 32 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 29 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 55 + .../TestComponent.ir.txt | 22 + .../TestComponent.mappings.txt | 10 + .../TestComponent.codegen.cs | 65 + .../TestComponent.ir.txt | 31 + .../TestComponent.mappings.txt | 19 + .../TestComponent.codegen.cs | 64 + .../TestComponent.ir.txt | 31 + .../TestComponent.mappings.txt | 19 + .../TestComponent.codegen.cs | 74 + .../TestComponent.ir.txt | 35 + .../TestComponent.mappings.txt | 19 + .../TestComponent.codegen.cs | 66 + .../TestComponent.ir.txt | 32 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 62 + .../TestComponent.ir.txt | 30 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 66 + .../TestComponent.ir.txt | 31 + .../TestComponent.mappings.txt | 10 + .../TestComponent.codegen.cs | 64 + .../TestComponent.ir.txt | 25 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 65 + .../TestComponent.ir.txt | 26 + .../TestComponent.mappings.txt | 10 + .../TestComponent.codegen.cs | 56 + .../TestComponent.ir.txt | 23 + .../TestComponent.mappings.txt | 5 + .../TestComponent.codegen.cs | 100 + .../TestComponent.ir.txt | 37 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 69 + .../TestComponent.ir.txt | 28 + .../TestComponent.mappings.txt | 30 + .../TestComponent.codegen.cs | 69 + .../TestComponent.ir.txt | 28 + .../TestComponent.mappings.txt | 30 + .../TestComponent.codegen.cs | 81 + .../TestComponent.ir.txt | 35 + .../TestComponent.mappings.txt | 25 + .../TestComponent.codegen.cs | 85 + .../TestComponent.ir.txt | 37 + .../TestComponent.mappings.txt | 20 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 17 + .../TestComponent.codegen.cs | 38 + .../TestComponent.ir.txt | 29 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 21 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 20 + .../TestComponent.codegen.cs | 57 + .../TestComponent.ir.txt | 24 + .../TestComponent.mappings.txt | 20 + .../TestComponent.codegen.cs | 44 + .../TestComponent.ir.txt | 20 + .../TestComponent.mappings.txt | 5 + .../TestComponent.codegen.cs | 46 + .../TestComponent.ir.txt | 20 + .../TestComponent.mappings.txt | 5 + .../TestComponent.codegen.cs | 45 + .../TestComponent.ir.txt | 29 + .../TestComponent.mappings.txt | 5 + .../TestComponent.codegen.cs | 45 + .../TestComponent.ir.txt | 31 + .../TestComponent.mappings.txt | 5 + .../TestComponent.codegen.cs | 45 + .../TestComponent.ir.txt | 31 + .../TestComponent.mappings.txt | 5 + .../TestComponent.codegen.cs | 57 + .../TestComponent.ir.txt | 24 + .../TestComponent.mappings.txt | 20 + .../TestComponent.codegen.cs | 47 + .../TestComponent.ir.txt | 23 + .../TestComponent.mappings.txt | 5 + .../TestComponent.codegen.cs | 59 + .../TestComponent.ir.txt | 21 + .../TestComponent.mappings.txt | 10 + .../TestComponent.codegen.cs | 65 + .../TestComponent.ir.txt | 26 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 54 + .../TestComponent.ir.txt | 26 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 88 + .../TestComponent.ir.txt | 43 + .../TestComponent.mappings.txt | 15 + .../ComponentImports/_Imports.codegen.cs | 59 + .../ComponentImports/_Imports.diagnostics.txt | 2 + .../ComponentImports/_Imports.ir.txt | 24 + .../ComponentImports/_Imports.mappings.txt | 20 + .../TestComponent.codegen.cs | 46 + .../TestComponent.ir.txt | 22 + .../TestComponent.mappings.txt | 5 + .../TestComponent.codegen.cs | 87 + .../TestComponent.ir.txt | 42 + .../TestComponent.mappings.txt | 49 + .../TestComponent.codegen.cs | 51 + .../TestComponent.ir.txt | 28 + .../TestComponent.mappings.txt | 10 + .../TestComponent.codegen.cs | 54 + .../TestComponent.ir.txt | 27 + .../TestComponent.mappings.txt | 16 + .../TestComponent.codegen.cs | 27 + .../TestComponent.ir.txt | 21 + .../TestComponent.codegen.cs | 57 + .../TestComponent.ir.txt | 23 + .../TestComponent.codegen.cs | 51 + .../TestComponent.ir.txt | 21 + .../TestComponent.codegen.cs | 55 + .../Component_WithRef/TestComponent.ir.txt | 30 + .../TestComponent.mappings.txt | 16 + .../TestComponent.codegen.cs | 54 + .../TestComponent.ir.txt | 35 + .../TestComponent.mappings.txt | 16 + .../TestComponent.codegen.cs | 76 + .../TestComponent.ir.txt | 27 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 61 + .../TestComponent.ir.txt | 26 + .../TestComponent.mappings.txt | 10 + .../TestComponent.codegen.cs | 42 + .../TestComponent.ir.txt | 25 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 42 + .../TestComponent.ir.txt | 25 + .../TestComponent.mappings.txt | 14 + .../Element_WithRef/TestComponent.codegen.cs | 43 + .../Element_WithRef/TestComponent.ir.txt | 32 + .../TestComponent.mappings.txt | 16 + .../TestComponent.codegen.cs | 57 + .../TestComponent.ir.txt | 24 + .../TestComponent.mappings.txt | 20 + .../TestComponent.codegen.cs | 57 + .../TestComponent.ir.txt | 24 + .../TestComponent.mappings.txt | 20 + .../TestComponent.codegen.cs | 57 + .../TestComponent.ir.txt | 24 + .../TestComponent.mappings.txt | 20 + .../TestComponent.codegen.cs | 58 + .../TestComponent.ir.txt | 24 + .../TestComponent.mappings.txt | 22 + .../TestComponent.codegen.cs | 58 + .../TestComponent.ir.txt | 24 + .../TestComponent.mappings.txt | 22 + .../TestComponent.codegen.cs | 57 + .../TestComponent.ir.txt | 24 + .../TestComponent.mappings.txt | 20 + .../TestComponent.codegen.cs | 57 + .../TestComponent.ir.txt | 24 + .../TestComponent.mappings.txt | 20 + .../TestComponent.codegen.cs | 57 + .../TestComponent.ir.txt | 24 + .../TestComponent.mappings.txt | 20 + .../TestComponent.codegen.cs | 57 + .../TestComponent.ir.txt | 24 + .../TestComponent.mappings.txt | 20 + .../TestComponent.codegen.cs | 55 + .../TestComponent.ir.txt | 31 + .../TestComponent.mappings.txt | 25 + .../TestComponent.codegen.cs | 58 + .../TestComponent.ir.txt | 24 + .../TestComponent.mappings.txt | 22 + .../TestComponent.codegen.cs | 58 + .../TestComponent.ir.txt | 24 + .../TestComponent.mappings.txt | 22 + .../TestComponent.codegen.cs | 28 + .../TestComponent.ir.txt | 24 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 26 + .../TestComponent.mappings.txt | 16 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 26 + .../TestComponent.mappings.txt | 16 + .../TestComponent.codegen.cs | 28 + .../TestComponent.ir.txt | 22 + .../TestComponent.mappings.txt | 5 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 26 + .../TestComponent.mappings.txt | 16 + .../TestComponent.codegen.cs | 28 + .../TestComponent.ir.txt | 22 + .../TestComponent.mappings.txt | 5 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 26 + .../TestComponent.mappings.txt | 16 + .../TestComponent.codegen.cs | 28 + .../TestComponent.ir.txt | 22 + .../TestComponent.mappings.txt | 5 + .../TestComponent.codegen.cs | 28 + .../TestComponent.ir.txt | 22 + .../TestComponent.codegen.cs | 71 + .../TestComponent.ir.txt | 28 + .../TestComponent.mappings.txt | 26 + .../TestComponent.codegen.cs | 75 + .../TestComponent.ir.txt | 29 + .../TestComponent.mappings.txt | 21 + .../TestComponent.codegen.cs | 66 + .../TestComponent.ir.txt | 31 + .../TestComponent.mappings.txt | 10 + .../TestComponent.codegen.cs | 34 + .../TestComponent.ir.txt | 23 + .../TestComponent.mappings.txt | 5 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 22 + .../TestComponent.codegen.cs | 33 + .../TestComponent.ir.txt | 21 + .../TestComponent.mappings.txt | 5 + .../TestComponent.codegen.cs | 42 + .../TestComponent.ir.txt | 25 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 47 + .../TestComponent.ir.txt | 23 + .../TestComponent.mappings.txt | 5 + .../TestComponent.codegen.cs | 76 + .../TestComponent.ir.txt | 36 + .../TestComponent.mappings.txt | 25 + .../TestComponent.codegen.cs | 74 + .../TestComponent.ir.txt | 28 + .../TestComponent.mappings.txt | 34 + .../TestComponent.codegen.cs | 91 + .../TestComponent.ir.txt | 38 + .../TestComponent.mappings.txt | 39 + .../TestComponent.codegen.cs | 69 + .../TestComponent.ir.txt | 30 + .../TestComponent.mappings.txt | 20 + .../TestComponent.codegen.cs | 56 + .../TestComponent.ir.txt | 27 + .../TestComponent.mappings.txt | 34 + .../TestComponent.codegen.cs | 62 + .../TestComponent.ir.txt | 26 + .../TestComponent.mappings.txt | 34 + .../TestComponent.codegen.cs | 56 + .../TestComponent.ir.txt | 27 + .../TestComponent.mappings.txt | 34 + .../TestComponent.codegen.cs | 62 + .../TestComponent.ir.txt | 30 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 44 + .../TestComponent.ir.txt | 27 + .../TestComponent.mappings.txt | 19 + .../Regression_597/TestComponent.codegen.cs | 55 + .../Regression_597/TestComponent.ir.txt | 31 + .../Regression_597/TestComponent.mappings.txt | 14 + .../Regression_609/TestComponent.codegen.cs | 66 + .../Regression_609/TestComponent.ir.txt | 39 + .../Regression_609/TestComponent.mappings.txt | 21 + .../Regression_772/TestComponent.codegen.cs | 49 + .../TestComponent.diagnostics.txt | 2 + .../Regression_772/TestComponent.ir.txt | 29 + .../Regression_772/TestComponent.mappings.txt | 5 + .../Regression_773/TestComponent.codegen.cs | 49 + .../Regression_773/TestComponent.ir.txt | 31 + .../Regression_773/TestComponent.mappings.txt | 5 + .../Regression_784/TestComponent.codegen.cs | 47 + .../Regression_784/TestComponent.ir.txt | 35 + .../Regression_784/TestComponent.mappings.txt | 27 + .../TestComponent.codegen.cs | 27 + .../TestComponent.ir.txt | 30 + .../TestComponent.codegen.cs | 34 + .../TestComponent.ir.txt | 25 + .../TestComponent.mappings.txt | 5 + .../TestComponent.codegen.cs | 37 + .../TestComponent.ir.txt | 24 + .../TestComponent.codegen.cs | 38 + .../TestComponent.ir.txt | 25 + .../TestComponent.mappings.txt | 5 + .../TestComponent.codegen.cs | 27 + .../TestComponent.ir.txt | 24 + .../TestComponent.codegen.cs | 43 + .../TestComponent.ir.txt | 26 + .../TestComponent.mappings.txt | 14 + .../TestComponent.codegen.cs | 23 + .../TestComponent.ir.txt | 15 + .../TestComponent.codegen.cs | 34 + .../TestComponent.ir.txt | 17 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 23 + .../TestComponent.ir.txt | 15 + .../TestComponent.codegen.cs | 34 + .../TestComponent.ir.txt | 17 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 25 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 33 + .../TestComponent.ir.txt | 23 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 44 + .../TestComponent.ir.txt | 26 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 20 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 20 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 20 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 20 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 33 + .../TestComponent.ir.txt | 23 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 44 + .../TestComponent.ir.txt | 26 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 20 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 20 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 20 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 20 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 33 + .../TestComponent.ir.txt | 25 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 33 + .../TestComponent.ir.txt | 23 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 20 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 20 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 20 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 46 + .../TestComponent.ir.txt | 24 + .../TestComponent.mappings.txt | 10 + .../TestComponent.codegen.cs | 50 + .../TestComponent.ir.txt | 27 + .../TestComponent.mappings.txt | 10 + .../TestComponent.codegen.cs | 33 + .../TestComponent.ir.txt | 23 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 35 + .../TestComponent.ir.txt | 25 + .../TestComponent.mappings.txt | 13 + .../TestComponent.codegen.cs | 33 + .../TestComponent.ir.txt | 25 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 33 + .../TestComponent.ir.txt | 23 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 20 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 23 + .../TestComponent.ir.txt | 15 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 22 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 22 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 44 + .../TestComponent.ir.txt | 26 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 43 + .../TestComponent.ir.txt | 23 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 31 + .../TestComponent.ir.txt | 23 + .../TestComponent.codegen.cs | 42 + .../TestComponent.ir.txt | 24 + .../TestComponent.codegen.cs | 24 + .../TestComponent.ir.txt | 18 + .../TestComponent.codegen.cs | 35 + .../TestComponent.ir.txt | 19 + .../TestComponent.codegen.cs | 34 + .../TestComponent.ir.txt | 16 + .../TestComponent.codegen.cs | 50 + .../TestComponent.ir.txt | 30 + .../TestComponent.codegen.cs | 48 + .../TestComponent.ir.txt | 21 + .../TestComponent.mappings.txt | 23 + .../TestComponent.codegen.cs | 49 + .../TestComponent.ir.txt | 23 + .../TestComponent.mappings.txt | 23 + .../TestComponent.codegen.cs | 35 + .../TestComponent.ir.txt | 29 + .../TestComponent.codegen.cs | 47 + .../TestComponent.ir.txt | 31 + .../TestComponent.codegen.cs | 22 + .../TestComponent.ir.txt | 10 + .../TestComponent.codegen.cs | 28 + .../TestComponent.ir.txt | 17 + .../TestComponent.codegen.cs | 26 + .../TestComponent.ir.txt | 12 + .../TestComponent.codegen.cs | 26 + .../TestComponent.ir.txt | 13 + .../TestComponent.codegen.cs | 34 + .../TestComponent.ir.txt | 15 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 26 + .../TestComponent.ir.txt | 13 + .../TestComponent.codegen.cs | 23 + .../TestComponent.ir.txt | 13 + .../TestComponent.codegen.cs | 31 + .../TestComponent.ir.txt | 22 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 24 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 24 + .../TestComponent.codegen.cs | 34 + .../TestComponent.ir.txt | 15 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 24 + .../TestComponent.ir.txt | 16 + .../TestComponent.codegen.cs | 24 + .../TestComponent.ir.txt | 12 + .../TestComponent.codegen.cs | 26 + .../TestComponent.ir.txt | 19 + .../TestComponent.codegen.cs | 31 + .../TestComponent.ir.txt | 17 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 48 + .../TestComponent.ir.txt | 32 + .../ComponentImports/_Imports.codegen.cs | 24 + .../ComponentImports/_Imports.diagnostics.txt | 2 + .../ComponentImports/_Imports.ir.txt | 16 + .../TestComponent.codegen.cs | 23 + .../TestComponent.ir.txt | 13 + .../TestComponent.codegen.cs | 53 + .../TestComponent.ir.txt | 28 + .../TestComponent.mappings.txt | 29 + .../TestComponent.codegen.cs | 25 + .../TestComponent.ir.txt | 13 + .../TestComponent.codegen.cs | 41 + .../TestComponent.ir.txt | 18 + .../TestComponent.mappings.txt | 18 + .../TestComponent.codegen.cs | 22 + .../TestComponent.ir.txt | 12 + .../TestComponent.codegen.cs | 28 + .../TestComponent.ir.txt | 16 + .../TestComponent.codegen.cs | 24 + .../TestComponent.ir.txt | 12 + .../TestComponent.codegen.cs | 43 + .../Component_WithRef/TestComponent.ir.txt | 19 + .../TestComponent.mappings.txt | 16 + .../TestComponent.codegen.cs | 47 + .../TestComponent.ir.txt | 20 + .../TestComponent.mappings.txt | 16 + .../TestComponent.codegen.cs | 28 + .../TestComponent.ir.txt | 16 + .../TestComponent.codegen.cs | 27 + .../TestComponent.ir.txt | 15 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 18 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 18 + .../TestComponent.mappings.txt | 9 + .../Element_WithRef/TestComponent.codegen.cs | 44 + .../Element_WithRef/TestComponent.ir.txt | 21 + .../TestComponent.mappings.txt | 16 + .../TestComponent.codegen.cs | 34 + .../TestComponent.ir.txt | 15 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 34 + .../TestComponent.ir.txt | 15 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 34 + .../TestComponent.ir.txt | 15 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 35 + .../TestComponent.ir.txt | 15 + .../TestComponent.mappings.txt | 17 + .../TestComponent.codegen.cs | 35 + .../TestComponent.ir.txt | 15 + .../TestComponent.mappings.txt | 17 + .../TestComponent.codegen.cs | 34 + .../TestComponent.ir.txt | 15 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 34 + .../TestComponent.ir.txt | 15 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 34 + .../TestComponent.ir.txt | 15 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 34 + .../TestComponent.ir.txt | 15 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 33 + .../TestComponent.ir.txt | 17 + .../TestComponent.mappings.txt | 15 + .../TestComponent.codegen.cs | 34 + .../TestComponent.ir.txt | 17 + .../TestComponent.mappings.txt | 17 + .../TestComponent.codegen.cs | 35 + .../TestComponent.ir.txt | 15 + .../TestComponent.mappings.txt | 17 + .../TestComponent.codegen.cs | 35 + .../TestComponent.ir.txt | 15 + .../TestComponent.mappings.txt | 17 + .../TestComponent.codegen.cs | 23 + .../TestComponent.ir.txt | 15 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 17 + .../TestComponent.mappings.txt | 11 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 17 + .../TestComponent.mappings.txt | 11 + .../TestComponent.codegen.cs | 23 + .../TestComponent.ir.txt | 15 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 17 + .../TestComponent.mappings.txt | 11 + .../TestComponent.codegen.cs | 23 + .../TestComponent.ir.txt | 15 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 17 + .../TestComponent.mappings.txt | 11 + .../TestComponent.codegen.cs | 23 + .../TestComponent.ir.txt | 15 + .../TestComponent.codegen.cs | 23 + .../TestComponent.ir.txt | 15 + .../TestComponent.codegen.cs | 42 + .../TestComponent.ir.txt | 17 + .../TestComponent.mappings.txt | 16 + .../TestComponent.codegen.cs | 53 + .../TestComponent.ir.txt | 18 + .../TestComponent.mappings.txt | 16 + .../TestComponent.codegen.cs | 42 + .../TestComponent.ir.txt | 24 + .../TestComponent.codegen.cs | 23 + .../TestComponent.ir.txt | 14 + .../TestComponent.codegen.cs | 24 + .../TestComponent.ir.txt | 13 + .../TestComponent.codegen.cs | 21 + .../TestComponent.ir.txt | 10 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 15 + .../TestComponent.mappings.txt | 9 + .../TestComponent.codegen.cs | 30 + .../TestComponent.ir.txt | 16 + .../TestComponent.codegen.cs | 45 + .../TestComponent.ir.txt | 27 + .../TestComponent.mappings.txt | 10 + .../TestComponent.codegen.cs | 53 + .../TestComponent.ir.txt | 21 + .../TestComponent.mappings.txt | 29 + .../TestComponent.codegen.cs | 61 + .../TestComponent.ir.txt | 29 + .../TestComponent.mappings.txt | 29 + .../TestComponent.codegen.cs | 42 + .../TestComponent.ir.txt | 21 + .../TestComponent.mappings.txt | 10 + .../TestComponent.codegen.cs | 39 + .../TestComponent.ir.txt | 18 + .../TestComponent.mappings.txt | 19 + .../TestComponent.codegen.cs | 51 + .../TestComponent.ir.txt | 19 + .../TestComponent.mappings.txt | 29 + .../TestComponent.codegen.cs | 39 + .../TestComponent.ir.txt | 18 + .../TestComponent.mappings.txt | 19 + .../TestComponent.codegen.cs | 40 + .../TestComponent.ir.txt | 19 + .../TestComponent.mappings.txt | 10 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 16 + .../TestComponent.mappings.txt | 9 + .../Regression_597/TestComponent.codegen.cs | 32 + .../Regression_597/TestComponent.ir.txt | 20 + .../Regression_597/TestComponent.mappings.txt | 9 + .../Regression_609/TestComponent.codegen.cs | 35 + .../Regression_609/TestComponent.ir.txt | 28 + .../Regression_609/TestComponent.mappings.txt | 11 + .../Regression_772/TestComponent.codegen.cs | 25 + .../TestComponent.diagnostics.txt | 2 + .../Regression_772/TestComponent.ir.txt | 15 + .../Regression_773/TestComponent.codegen.cs | 25 + .../Regression_773/TestComponent.ir.txt | 15 + .../Regression_784/TestComponent.codegen.cs | 36 + .../Regression_784/TestComponent.ir.txt | 24 + .../Regression_784/TestComponent.mappings.txt | 17 + .../TestComponent.codegen.cs | 29 + .../TestComponent.ir.txt | 21 + .../TestComponent.codegen.cs | 22 + .../TestComponent.ir.txt | 12 + .../TestComponent.codegen.cs | 23 + .../TestComponent.ir.txt | 11 + .../TestComponent.codegen.cs | 22 + .../TestComponent.ir.txt | 11 + .../TestComponent.codegen.cs | 21 + .../TestComponent.ir.txt | 10 + .../TestComponent.codegen.cs | 32 + .../TestComponent.ir.txt | 15 + .../TestComponent.mappings.txt | 9 + .../NamespaceToken.codegen.cs | 32 + .../NamespaceToken.cshtml | 1 + .../NamespaceToken.ir.txt | 12 + .../NamespaceToken.mappings.txt | 5 + .../HtmlWithConditionalAttribute.cshtml | 5 + .../HtmlWithConditionalAttribute.ir.txt | 25 + .../HtmlWithDataDashAttribute.cshtml | 5 + .../HtmlWithDataDashAttribute.ir.txt | 26 + .../NestedTagHelpers.cshtml | 5 + .../NestedTagHelpers.ir.txt | 37 + .../SimpleTagHelpers.cshtml | 5 + .../SimpleTagHelpers.ir.txt | 28 + .../TagHelpersWithBoundAttributes.cshtml | 4 + .../TagHelpersWithBoundAttributes.ir.txt | 24 + ...tionsDirectiveAutoCompleteAtEOF.cspans.txt | 5 + ...ctionsDirectiveAutoCompleteAtEOF.stree.txt | 19 + ...ectiveAutoCompleteAtStartOfFile.cspans.txt | 5 + ...rectiveAutoCompleteAtStartOfFile.stree.txt | 20 + ...ctionDirectiveAutoCompleteAtEOF.cspans.txt | 8 + ...ectionDirectiveAutoCompleteAtEOF.stree.txt | 25 + ...ectiveAutoCompleteAtStartOfFile.cspans.txt | 11 + ...rectiveAutoCompleteAtStartOfFile.stree.txt | 37 + .../VerbatimBlockAutoCompleteAtEOF.cspans.txt | 4 + .../VerbatimBlockAutoCompleteAtEOF.diag.txt | 1 + .../VerbatimBlockAutoCompleteAtEOF.stree.txt | 16 + ...mBlockAutoCompleteAtStartOfFile.cspans.txt | 7 + ...timBlockAutoCompleteAtStartOfFile.diag.txt | 1 + ...imBlockAutoCompleteAtStartOfFile.stree.txt | 29 + .../AcceptsElseIfWithNoCondition.cspans.txt | 3 + .../AcceptsElseIfWithNoCondition.stree.txt | 66 + ...citExpressionWhenEmbeddedInCode.cspans.txt | 6 + ...icitExpressionWhenEmbeddedInCode.stree.txt | 27 + .../AllowsEmptyBlockStatement.cspans.txt | 3 + .../AllowsEmptyBlockStatement.stree.txt | 16 + ...ingLiteralCharactersAndBrackets.cspans.txt | 3 + ...ringLiteralCharactersAndBrackets.stree.txt | 25 + ...sAndBracketsInsideBlockComments.cspans.txt | 3 + ...rsAndBracketsInsideBlockComments.stree.txt | 27 + .../CapturesNewlineAfterUsing.cspans.txt | 4 + .../CapturesNewlineAfterUsing.stree.txt | 16 + .../CorrectlyParsesDoWhileBlock.cspans.txt | 4 + .../CorrectlyParsesDoWhileBlock.stree.txt | 34 + ...sesDoWhileBlockMissingSemicolon.cspans.txt | 3 + ...rsesDoWhileBlockMissingSemicolon.stree.txt | 31 + ...BlockMissingWhileClauseEntirely.cspans.txt | 4 + ...eBlockMissingWhileClauseEntirely.stree.txt | 25 + ...WhileBlockMissingWhileCondition.cspans.txt | 3 + ...oWhileBlockMissingWhileCondition.stree.txt | 24 + ...singWhileConditionWithSemicolon.cspans.txt | 4 + ...ssingWhileConditionWithSemicolon.stree.txt | 27 + ...ectlyParsesMarkupInDoWhileBlock.cspans.txt | 10 + ...rectlyParsesMarkupInDoWhileBlock.stree.txt | 55 + ...esNotAllowMultipleFinallyBlocks.cspans.txt | 4 + ...oesNotAllowMultipleFinallyBlocks.stree.txt | 50 + ...erNotFollowedByOpenAngleOrColon.cspans.txt | 3 + ...terNotFollowedByOpenAngleOrColon.stree.txt | 23 + ...esntCaptureWhitespaceAfterUsing.cspans.txt | 4 + ...oesntCaptureWhitespaceAfterUsing.stree.txt | 15 + ...fNamespaceAliasMissingSemicolon.cspans.txt | 4 + ...IfNamespaceAliasMissingSemicolon.stree.txt | 23 + ...NamespaceImportMissingSemicolon.cspans.txt | 4 + ...fNamespaceImportMissingSemicolon.stree.txt | 19 + .../LocalFunctionsWithGenerics.cspans.txt | 20 + .../LocalFunctionsWithGenerics.stree.txt | 126 + .../LocalFunctionsWithRazor.cspans.txt | 13 + .../LocalFunctionsWithRazor.stree.txt | 75 + ...CodeBlockWithAtDoesntCauseError.cspans.txt | 6 + ...dCodeBlockWithAtDoesntCauseError.stree.txt | 31 + .../NestedCodeBlockWithCSharpAt.cspans.txt | 6 + .../NestedCodeBlockWithCSharpAt.stree.txt | 52 + ...eBlockWithMarkupSetsDotAsMarkup.cspans.txt | 15 + ...deBlockWithMarkupSetsDotAsMarkup.stree.txt | 58 + .../ParsersCanNestRecursively.cspans.txt | 39 + .../ParsersCanNestRecursively.stree.txt | 194 + ...rsesElseIfBranchesOfIfStatement.cspans.txt | 3 + ...arsesElseIfBranchesOfIfStatement.stree.txt | 101 + ...racterFollowedByIdentifierStart.cspans.txt | 6 + ...aracterFollowedByIdentifierStart.stree.txt | 33 + ...tchCharacterFollowedByOpenParen.cspans.txt | 8 + ...itchCharacterFollowedByOpenParen.stree.txt | 34 + ...ipleElseIfBranchesOfIfStatement.cspans.txt | 3 + ...tipleElseIfBranchesOfIfStatement.stree.txt | 245 ++ ...tatementFollowedByOneElseBranch.cspans.txt | 4 + ...StatementFollowedByOneElseBranch.stree.txt | 165 + ...orUsingKeywordIfIsInValidFormat.cspans.txt | 4 + ...ForUsingKeywordIfIsInValidFormat.stree.txt | 20 + ...orUsingKeywordIfIsInValidFormat.cspans.txt | 4 + ...ForUsingKeywordIfIsInValidFormat.stree.txt | 20 + ...esIfFirstIdentifierIsForKeyword.cspans.txt | 4 + ...cesIfFirstIdentifierIsForKeyword.stree.txt | 54 + ...FirstIdentifierIsForeachKeyword.cspans.txt | 4 + ...fFirstIdentifierIsForeachKeyword.stree.txt | 54 + ...erIsIfKeywordWithNoElseBranches.cspans.txt | 3 + ...ierIsIfKeywordWithNoElseBranches.stree.txt | 52 + ...fFirstIdentifierIsSwitchKeyword.cspans.txt | 4 + ...IfFirstIdentifierIsSwitchKeyword.stree.txt | 62 + ...IfFirstIdentifierIsWhileKeyword.cspans.txt | 4 + ...sIfFirstIdentifierIsWhileKeyword.stree.txt | 54 + ...dentifierIsUsingFollowedByParen.cspans.txt | 4 + ...IdentifierIsUsingFollowedByParen.stree.txt | 54 + ...ngCatchClausesAfterFinallyBlock.cspans.txt | 4 + ...ingCatchClausesAfterFinallyBlock.stree.txt | 54 + ...StopsParsingCodeAfterElseBranch.cspans.txt | 18 + .../StopsParsingCodeAfterElseBranch.stree.txt | 207 + ...gIfIfStatementNotFollowedByElse.cspans.txt | 3 + ...ngIfIfStatementNotFollowedByElse.stree.txt | 53 + ...entBetweenCatchAndFinallyClause.cspans.txt | 4 + ...mentBetweenCatchAndFinallyClause.stree.txt | 49 + ...kCommentBetweenDoAndWhileClause.cspans.txt | 4 + ...ckCommentBetweenDoAndWhileClause.stree.txt | 34 + ...mmentBetweenElseIfAndElseClause.cspans.txt | 4 + ...ommentBetweenElseIfAndElseClause.stree.txt | 54 + ...ckCommentBetweenIfAndElseClause.cspans.txt | 4 + ...ockCommentBetweenIfAndElseClause.stree.txt | 38 + ...CommentBetweenIfAndElseIfClause.cspans.txt | 1 + ...kCommentBetweenIfAndElseIfClause.stree.txt | 36 + ...CommentBetweenTryAndCatchClause.cspans.txt | 3 + ...kCommentBetweenTryAndCatchClause.stree.txt | 36 + ...mmentBetweenTryAndFinallyClause.cspans.txt | 4 + ...ommentBetweenTryAndFinallyClause.stree.txt | 35 + ...pportsExceptionLessCatchClauses.cspans.txt | 3 + ...upportsExceptionLessCatchClauses.stree.txt | 43 + ...entBetweenCatchAndFinallyClause.cspans.txt | 4 + ...mentBetweenCatchAndFinallyClause.stree.txt | 49 + ...eCommentBetweenDoAndWhileClause.cspans.txt | 4 + ...neCommentBetweenDoAndWhileClause.stree.txt | 34 + ...mmentBetweenElseIfAndElseClause.cspans.txt | 4 + ...ommentBetweenElseIfAndElseClause.stree.txt | 54 + ...neCommentBetweenIfAndElseClause.cspans.txt | 4 + ...ineCommentBetweenIfAndElseClause.stree.txt | 38 + ...CommentBetweenIfAndElseIfClause.cspans.txt | 3 + ...eCommentBetweenIfAndElseIfClause.stree.txt | 41 + ...CommentBetweenTryAndCatchClause.cspans.txt | 3 + ...eCommentBetweenTryAndCatchClause.stree.txt | 36 + ...mmentBetweenTryAndFinallyClause.cspans.txt | 4 + ...ommentBetweenTryAndFinallyClause.stree.txt | 35 + ...kupWithinAdditionalCatchClauses.cspans.txt | 9 + ...rkupWithinAdditionalCatchClauses.stree.txt | 105 + ...SupportsMarkupWithinCatchClause.cspans.txt | 9 + .../SupportsMarkupWithinCatchClause.stree.txt | 55 + ...pportsMarkupWithinFinallyClause.cspans.txt | 10 + ...upportsMarkupWithinFinallyClause.stree.txt | 50 + .../SupportsMarkupWithinTryClause.cspans.txt | 9 + .../SupportsMarkupWithinTryClause.stree.txt | 30 + ...entBetweenCatchAndFinallyClause.cspans.txt | 16 + ...mentBetweenCatchAndFinallyClause.stree.txt | 61 + ...rCommentBetweenDoAndWhileClause.cspans.txt | 16 + ...orCommentBetweenDoAndWhileClause.stree.txt | 46 + ...mmentBetweenElseIfAndElseClause.cspans.txt | 16 + ...ommentBetweenElseIfAndElseClause.stree.txt | 66 + ...orCommentBetweenIfAndElseClause.cspans.txt | 16 + ...zorCommentBetweenIfAndElseClause.stree.txt | 50 + ...CommentBetweenIfAndElseIfClause.cspans.txt | 15 + ...rCommentBetweenIfAndElseIfClause.stree.txt | 53 + ...CommentBetweenTryAndCatchClause.cspans.txt | 15 + ...rCommentBetweenTryAndCatchClause.stree.txt | 47 + ...mmentBetweenTryAndFinallyClause.cspans.txt | 16 + ...ommentBetweenTryAndFinallyClause.stree.txt | 47 + ...tsTryStatementWithFinallyClause.cspans.txt | 4 + ...rtsTryStatementWithFinallyClause.stree.txt | 45 + ...tatementWithMultipleCatchClause.cspans.txt | 3 + ...StatementWithMultipleCatchClause.stree.txt | 100 + ...tatementWithNoAdditionalClauses.cspans.txt | 3 + ...StatementWithNoAdditionalClauses.stree.txt | 25 + ...sTryStatementWithOneCatchClause.cspans.txt | 3 + ...tsTryStatementWithOneCatchClause.stree.txt | 50 + ...tsUsingsNestedWithinOtherBlocks.cspans.txt | 3 + ...rtsUsingsNestedWithinOtherBlocks.stree.txt | 61 + ...rminatesBlockCommentAtEndOfFile.cspans.txt | 3 + ...TerminatesBlockCommentAtEndOfFile.diag.txt | 2 + ...erminatesBlockCommentAtEndOfFile.stree.txt | 22 + .../TerminatesParenBalancingAtEOF.cspans.txt | 3 + .../TerminatesParenBalancingAtEOF.diag.txt | 1 + .../TerminatesParenBalancingAtEOF.stree.txt | 18 + ...tesSingleLineCommentAtEndOfFile.cspans.txt | 3 + ...natesSingleLineCommentAtEndOfFile.diag.txt | 1 + ...atesSingleLineCommentAtEndOfFile.stree.txt | 22 + ...erminatesSingleSlashAtEndOfFile.cspans.txt | 3 + .../TerminatesSingleSlashAtEndOfFile.diag.txt | 1 + ...TerminatesSingleSlashAtEndOfFile.stree.txt | 28 + ...ordAtEOFAndOutputsFileCodeBlock.cspans.txt | 3 + ...wordAtEOFAndOutputsFileCodeBlock.stree.txt | 10 + ...sIfFirstIdentifierIsLockKeyword.cspans.txt | 4 + ...esIfFirstIdentifierIsLockKeyword.stree.txt | 26 + ...irstPairAsPartOfCSharpStatement.cspans.txt | 5 + ...FirstPairAsPartOfCSharpStatement.stree.txt | 28 + ...scapeSequenceIfAtStatementStart.cspans.txt | 5 + ...EscapeSequenceIfAtStatementStart.stree.txt | 26 + ...ngOfAttributeValue_DoesNotThrow.cspans.txt | 13 + ...ingOfAttributeValue_DoesNotThrow.stree.txt | 47 + ...ndOfAttributeValue_DoesNotThrow.cspans.txt | 13 + ...EndOfAttributeValue_DoesNotThrow.stree.txt | 47 + ...weenAttributeValue_DoesNotThrow.cspans.txt | 14 + ...tweenAttributeValue_DoesNotThrow.stree.txt | 53 + ...onInAttributeValue_DoesNotThrow.cspans.txt | 12 + ...ionInAttributeValue_DoesNotThrow.stree.txt | 44 + ...eTransitionInEmail_DoesNotThrow.cspans.txt | 17 + ...leTransitionInEmail_DoesNotThrow.stree.txt | 61 + ...eTransitionInRegex_DoesNotThrow.cspans.txt | 14 + ...leTransitionInRegex_DoesNotThrow.stree.txt | 92 + ...ithExpressionBlock_DoesNotThrow.cspans.txt | 47 + ...WithExpressionBlock_DoesNotThrow.stree.txt | 195 + ...ubleTransition_EndOfFile_Throws.cspans.txt | 7 + ...DoubleTransition_EndOfFile_Throws.diag.txt | 2 + ...oubleTransition_EndOfFile_Throws.stree.txt | 34 + ...nsitionsInAttributeValue_Throws.cspans.txt | 15 + ...ransitionsInAttributeValue_Throws.diag.txt | 2 + ...ansitionsInAttributeValue_Throws.stree.txt | 61 + ...lidUsingStmtAndTreatsAsFileCode.cspans.txt | 4 + ...alidUsingStmtAndTreatsAsFileCode.stree.txt | 13 + ...mplicitExpressionParensUnclosed.cspans.txt | 9 + ...fImplicitExpressionParensUnclosed.diag.txt | 1 + ...ImplicitExpressionParensUnclosed.stree.txt | 41 + ...tlyParsesAtSignInDelimitedBlock.cspans.txt | 6 + ...ctlyParsesAtSignInDelimitedBlock.stree.txt | 28 + ...ectyAssumedToBeWithinAStatement.cspans.txt | 10 + ...rrectyAssumedToBeWithinAStatement.diag.txt | 1 + ...rectyAssumedToBeWithinAStatement.stree.txt | 53 + ...loseParenInExpressionWithinCode.cspans.txt | 9 + ...gCloseParenInExpressionWithinCode.diag.txt | 1 + ...CloseParenInExpressionWithinCode.stree.txt | 34 + .../HandlesQuotesAfterTransition.cspans.txt | 4 + .../HandlesQuotesAfterTransition.diag.txt | 1 + .../HandlesQuotesAfterTransition.stree.txt | 14 + ...tementControlFlowStatementError.cspans.txt | 4 + ...tatementControlFlowStatementError.diag.txt | 10 + ...atementControlFlowStatementError.stree.txt | 26 + ...anIfEofFoundAfterOpenCurlyBrace.cspans.txt | 4 + ...SpanIfEofFoundAfterOpenCurlyBrace.diag.txt | 1 + ...panIfEofFoundAfterOpenCurlyBrace.stree.txt | 16 + ...thCodeSpanIfStatementBlockEmpty.cspans.txt | 6 + ...gthCodeSpanIfStatementBlockEmpty.stree.txt | 18 + ...otIdentifierStartOrParenOrBrace.cspans.txt | 4 + ...sNotIdentifierStartOrParenOrBrace.diag.txt | 1 + ...NotIdentifierStartOrParenOrBrace.stree.txt | 16 + ...rTransitionInEmbeddedExpression.cspans.txt | 7 + ...terTransitionInEmbeddedExpression.diag.txt | 2 + ...erTransitionInEmbeddedExpression.stree.txt | 27 + ...ErrorIfNewlineFollowsTransition.cspans.txt | 4 + ...esErrorIfNewlineFollowsTransition.diag.txt | 1 + ...sErrorIfNewlineFollowsTransition.stree.txt | 14 + ...tionAndBlockStartInEmbeddedExpr.cspans.txt | 9 + ...sitionAndBlockStartInEmbeddedExpr.diag.txt | 1 + ...itionAndBlockStartInEmbeddedExpr.stree.txt | 32 + ...dByLessThanSignAtStatementStart.cspans.txt | 10 + ...wedByLessThanSignAtStatementStart.diag.txt | 5 + ...edByLessThanSignAtStatementStart.stree.txt | 35 + ...orIfCatchBlockUnterminatedAtEOF.cspans.txt | 3 + ...rrorIfCatchBlockUnterminatedAtEOF.diag.txt | 1 + ...rorIfCatchBlockUnterminatedAtEOF.stree.txt | 53 + ...orIfClassBlockUnterminatedAtEOF.cspans.txt | 6 + ...rorIfClassBlockUnterminatedAtEOF.stree.txt | 48 + ...ErrorIfDoBlockUnterminatedAtEOF.cspans.txt | 3 + ...tsErrorIfDoBlockUnterminatedAtEOF.diag.txt | 1 + ...sErrorIfDoBlockUnterminatedAtEOF.stree.txt | 39 + ...rorIfElseBlockUnterminatedAtEOF.cspans.txt | 3 + ...ErrorIfElseBlockUnterminatedAtEOF.diag.txt | 1 + ...rrorIfElseBlockUnterminatedAtEOF.stree.txt | 53 + ...rIfElseIfBlockUnterminatedAtEOF.cspans.txt | 3 + ...rorIfElseIfBlockUnterminatedAtEOF.diag.txt | 1 + ...orIfElseIfBlockUnterminatedAtEOF.stree.txt | 55 + ...licitCodeBlockUnterminatedAtEOF.cspans.txt | 4 + ...xplicitCodeBlockUnterminatedAtEOF.diag.txt | 1 + ...plicitCodeBlockUnterminatedAtEOF.stree.txt | 43 + ...IfFinallyBlockUnterminatedAtEOF.cspans.txt | 3 + ...orIfFinallyBlockUnterminatedAtEOF.diag.txt | 1 + ...rIfFinallyBlockUnterminatedAtEOF.stree.txt | 50 + ...rrorIfForBlockUnterminatedAtEOF.cspans.txt | 3 + ...sErrorIfForBlockUnterminatedAtEOF.diag.txt | 1 + ...ErrorIfForBlockUnterminatedAtEOF.stree.txt | 43 + ...IfForeachBlockUnterminatedAtEOF.cspans.txt | 3 + ...orIfForeachBlockUnterminatedAtEOF.diag.txt | 1 + ...rIfForeachBlockUnterminatedAtEOF.stree.txt | 43 + ...ErrorIfIfBlockUnterminatedAtEOF.cspans.txt | 3 + ...tsErrorIfIfBlockUnterminatedAtEOF.diag.txt | 1 + ...sErrorIfIfBlockUnterminatedAtEOF.stree.txt | 43 + ...rorIfLockBlockUnterminatedAtEOF.cspans.txt | 3 + ...ErrorIfLockBlockUnterminatedAtEOF.diag.txt | 1 + ...rrorIfLockBlockUnterminatedAtEOF.stree.txt | 43 + ...rIfSwitchBlockUnterminatedAtEOF.cspans.txt | 3 + ...rorIfSwitchBlockUnterminatedAtEOF.diag.txt | 1 + ...orIfSwitchBlockUnterminatedAtEOF.stree.txt | 43 + ...rrorIfTryBlockUnterminatedAtEOF.cspans.txt | 3 + ...sErrorIfTryBlockUnterminatedAtEOF.diag.txt | 1 + ...ErrorIfTryBlockUnterminatedAtEOF.stree.txt | 39 + ...orIfUsingBlockUnterminatedAtEOF.cspans.txt | 3 + ...rrorIfUsingBlockUnterminatedAtEOF.diag.txt | 1 + ...rorIfUsingBlockUnterminatedAtEOF.stree.txt | 43 + ...orIfWhileBlockUnterminatedAtEOF.cspans.txt | 3 + ...rrorIfWhileBlockUnterminatedAtEOF.diag.txt | 1 + ...rorIfWhileBlockUnterminatedAtEOF.stree.txt | 43 + ...ntrolFlowStatementsToHaveBraces.cspans.txt | 17 + ...ControlFlowStatementsToHaveBraces.diag.txt | 30 + ...ontrolFlowStatementsToHaveBraces.stree.txt | 69 + ...esumesIfStatementAfterOpenParen.cspans.txt | 10 + .../ResumesIfStatementAfterOpenParen.diag.txt | 1 + ...ResumesIfStatementAfterOpenParen.stree.txt | 35 + ...ketInImplicitExpressionUnclosed.cspans.txt | 3 + ...acketInImplicitExpressionUnclosed.diag.txt | 1 + ...cketInImplicitExpressionUnclosed.stree.txt | 21 + ...IfIfParenInExplicitExprUnclosed.cspans.txt | 4 + ...OFIfIfParenInExplicitExprUnclosed.diag.txt | 1 + ...FIfIfParenInExplicitExprUnclosed.stree.txt | 20 + ...OFIfParenInImplicitExprUnclosed.cspans.txt | 3 + ...tEOFIfParenInImplicitExprUnclosed.diag.txt | 1 + ...EOFIfParenInImplicitExprUnclosed.stree.txt | 21 + ...IfBracketInImplicitExprUnclosed.cspans.txt | 6 + ...upIfBracketInImplicitExprUnclosed.diag.txt | 1 + ...pIfBracketInImplicitExprUnclosed.stree.txt | 34 + ...IfIfParenInExplicitExprUnclosed.cspans.txt | 7 + ...upIfIfParenInExplicitExprUnclosed.diag.txt | 1 + ...pIfIfParenInExplicitExprUnclosed.stree.txt | 33 + ...renInImplicitExpressionUnclosed.cspans.txt | 6 + ...ParenInImplicitExpressionUnclosed.diag.txt | 1 + ...arenInImplicitExpressionUnclosed.stree.txt | 34 + ...RecoveringFromMissingCloseParen.cspans.txt | 4 + ...enRecoveringFromMissingCloseParen.diag.txt | 1 + ...nRecoveringFromMissingCloseParen.stree.txt | 16 + ...RecoveringFromMissingCloseParen.cspans.txt | 4 + ...enRecoveringFromMissingCloseParen.diag.txt | 1 + ...nRecoveringFromMissingCloseParen.stree.txt | 16 + ...rpStringsAtEOLIfEndQuoteMissing.cspans.txt | 3 + ...harpStringsAtEOLIfEndQuoteMissing.diag.txt | 1 + ...arpStringsAtEOLIfEndQuoteMissing.stree.txt | 27 + ...rminatesNormalStringAtEndOfFile.cspans.txt | 3 + ...TerminatesNormalStringAtEndOfFile.diag.txt | 2 + ...erminatesNormalStringAtEndOfFile.stree.txt | 22 + ...RecoveringFromMissingCloseParen.cspans.txt | 4 + ...enRecoveringFromMissingCloseParen.diag.txt | 1 + ...nRecoveringFromMissingCloseParen.stree.txt | 16 + ...inatesVerbatimStringAtEndOfFile.cspans.txt | 3 + ...rminatesVerbatimStringAtEndOfFile.diag.txt | 2 + ...minatesVerbatimStringAtEndOfFile.stree.txt | 22 + ...RecoveringFromMissingCloseParen.cspans.txt | 4 + ...enRecoveringFromMissingCloseParen.diag.txt | 1 + ...nRecoveringFromMissingCloseParen.stree.txt | 22 + ...ithHelperDirectiveProducesError.cspans.txt | 4 + .../WithHelperDirectiveProducesError.diag.txt | 1 + ...WithHelperDirectiveProducesError.stree.txt | 19 + ...ithNestedCodeBlockProducesError.cspans.txt | 8 + .../WithNestedCodeBlockProducesError.diag.txt | 1 + ...WithNestedCodeBlockProducesError.stree.txt | 27 + ...capedQuotesInNonVerbatimStrings.cspans.txt | 6 + ...scapedQuotesInNonVerbatimStrings.stree.txt | 18 + ...eEscapedQuotesInVerbatimStrings.cspans.txt | 6 + ...veEscapedQuotesInVerbatimStrings.stree.txt | 18 + ...scapedQuoteInNonVerbatimStrings.cspans.txt | 6 + ...EscapedQuoteInNonVerbatimStrings.stree.txt | 18 + ...ptEscapedQuoteInVerbatimStrings.cspans.txt | 6 + ...eptEscapedQuoteInVerbatimStrings.stree.txt | 18 + ...dAcceptMultiLineVerbatimStrings.cspans.txt | 6 + ...ldAcceptMultiLineVerbatimStrings.stree.txt | 18 + ...capedQuotesInNonVerbatimStrings.cspans.txt | 6 + ...scapedQuotesInNonVerbatimStrings.stree.txt | 18 + ...eEscapedQuotesInVerbatimStrings.cspans.txt | 6 + ...leEscapedQuotesInVerbatimStrings.stree.txt | 18 + ...edEscapedQuoteInVerbatimStrings.cspans.txt | 6 + ...tedEscapedQuoteInVerbatimStrings.stree.txt | 18 + ...FOccursAfterStartOfExplicitExpr.cspans.txt | 4 + ...EOFOccursAfterStartOfExplicitExpr.diag.txt | 1 + ...OFOccursAfterStartOfExplicitExpr.stree.txt | 16 + ...SpanIfExplicitExpressionIsEmpty.cspans.txt | 6 + ...eSpanIfExplicitExpressionIsEmpty.stree.txt | 18 + ...ionsBlock_CanContainCurlyBraces.cspans.txt | 26 + ...tionsBlock_CanContainCurlyBraces.stree.txt | 112 + ...lock_DoesNotParseMarkupInString.cspans.txt | 8 + ...Block_DoesNotParseMarkupInString.stree.txt | 39 + ...sNotParseMarkupInVerbatimString.cspans.txt | 8 + ...esNotParseMarkupInVerbatimString.stree.txt | 39 + ...ck_DoesNotParseWhenNotSupported.cspans.txt | 8 + ...ock_DoesNotParseWhenNotSupported.stree.txt | 51 + ...sBlock_MarkupCanContainTemplate.cspans.txt | 25 + ...nsBlock_MarkupCanContainTemplate.stree.txt | 117 + ...sBlock_ParsesMarkupInsideMethod.cspans.txt | 16 + ...nsBlock_ParsesMarkupInsideMethod.stree.txt | 66 + ...rsesMarkupWithExpressionsMethod.cspans.txt | 15 + ...arsesMarkupWithExpressionsMethod.stree.txt | 61 + ...ordsInFunctionsBlock_WithMarkup.cspans.txt | 14 + ...wordsInFunctionsBlock_WithMarkup.stree.txt | 73 + ...aractersThatAreValidIdentifiers.cspans.txt | 4 + ...haractersThatAreValidIdentifiers.stree.txt | 14 + ...xpressionTerminatedByWhitespace.cspans.txt | 4 + ...ExpressionTerminatedByWhitespace.stree.txt | 15 + ...udeDotAtEOFInImplicitExpression.cspans.txt | 4 + ...ludeDotAtEOFInImplicitExpression.stree.txt | 16 + ...idIdentifierCharInImplicitExpr1.cspans.txt | 4 + ...lidIdentifierCharInImplicitExpr1.stree.txt | 16 + ...idIdentifierCharInImplicitExpr2.cspans.txt | 5 + ...lidIdentifierCharInImplicitExpr2.stree.txt | 22 + ...DoesNotIncludeSemicolonAfterDot.cspans.txt | 4 + .../DoesNotIncludeSemicolonAfterDot.stree.txt | 16 + ...micolonAtEndOfDottedIdentifiers.cspans.txt | 4 + ...emicolonAtEndOfDottedIdentifiers.stree.txt | 18 + ...AtEndOfSimpleImplicitExpression.cspans.txt | 4 + ...nAtEndOfSimpleImplicitExpression.stree.txt | 14 + .../NestedImplicitExpression.cspans.txt | 4 + .../NestedImplicitExpression.stree.txt | 20 + ...IfModuleTokenNotFollowedByBrace.cspans.txt | 4 + ...nIfModuleTokenNotFollowedByBrace.stree.txt | 18 + ...eSpanIfEOFOccursAfterTransition.cspans.txt | 4 + ...odeSpanIfEOFOccursAfterTransition.diag.txt | 1 + ...deSpanIfEOFOccursAfterTransition.stree.txt | 14 + ...validCharacterFollowsTransition.cspans.txt | 4 + ...InvalidCharacterFollowsTransition.diag.txt | 1 + ...nvalidCharacterFollowsTransition.stree.txt | 14 + ...IdentifiersAsImplicitExpression.cspans.txt | 4 + ...dIdentifiersAsImplicitExpression.stree.txt | 18 + ...atorImplicitExpression_Bracket1.cspans.txt | 4 + ...ratorImplicitExpression_Bracket1.stree.txt | 16 + ...torImplicitExpression_Bracket10.cspans.txt | 4 + ...atorImplicitExpression_Bracket10.stree.txt | 19 + ...torImplicitExpression_Bracket11.cspans.txt | 3 + ...ratorImplicitExpression_Bracket11.diag.txt | 1 + ...atorImplicitExpression_Bracket11.stree.txt | 19 + ...torImplicitExpression_Bracket12.cspans.txt | 4 + ...atorImplicitExpression_Bracket12.stree.txt | 22 + ...torImplicitExpression_Bracket13.cspans.txt | 4 + ...atorImplicitExpression_Bracket13.stree.txt | 25 + ...torImplicitExpression_Bracket14.cspans.txt | 4 + ...atorImplicitExpression_Bracket14.stree.txt | 24 + ...torImplicitExpression_Bracket15.cspans.txt | 4 + ...atorImplicitExpression_Bracket15.stree.txt | 22 + ...torImplicitExpression_Bracket16.cspans.txt | 4 + ...atorImplicitExpression_Bracket16.stree.txt | 26 + ...atorImplicitExpression_Bracket2.cspans.txt | 4 + ...ratorImplicitExpression_Bracket2.stree.txt | 17 + ...atorImplicitExpression_Bracket3.cspans.txt | 3 + ...eratorImplicitExpression_Bracket3.diag.txt | 1 + ...ratorImplicitExpression_Bracket3.stree.txt | 14 + ...atorImplicitExpression_Bracket4.cspans.txt | 4 + ...ratorImplicitExpression_Bracket4.stree.txt | 15 + ...atorImplicitExpression_Bracket5.cspans.txt | 3 + ...eratorImplicitExpression_Bracket5.diag.txt | 1 + ...ratorImplicitExpression_Bracket5.stree.txt | 15 + ...atorImplicitExpression_Bracket6.cspans.txt | 4 + ...ratorImplicitExpression_Bracket6.stree.txt | 18 + ...atorImplicitExpression_Bracket7.cspans.txt | 4 + ...eratorImplicitExpression_Bracket7.diag.txt | 1 + ...ratorImplicitExpression_Bracket7.stree.txt | 19 + ...atorImplicitExpression_Bracket8.cspans.txt | 4 + ...eratorImplicitExpression_Bracket8.diag.txt | 1 + ...ratorImplicitExpression_Bracket8.stree.txt | 21 + ...atorImplicitExpression_Bracket9.cspans.txt | 5 + ...ratorImplicitExpression_Bracket9.stree.txt | 22 + ...OperatorImplicitExpression_Dot1.cspans.txt | 4 + ...lOperatorImplicitExpression_Dot1.stree.txt | 14 + ...peratorImplicitExpression_Dot10.cspans.txt | 4 + ...OperatorImplicitExpression_Dot10.stree.txt | 20 + ...peratorImplicitExpression_Dot11.cspans.txt | 5 + ...OperatorImplicitExpression_Dot11.stree.txt | 21 + ...peratorImplicitExpression_Dot12.cspans.txt | 4 + ...OperatorImplicitExpression_Dot12.stree.txt | 25 + ...peratorImplicitExpression_Dot13.cspans.txt | 4 + ...OperatorImplicitExpression_Dot13.stree.txt | 23 + ...peratorImplicitExpression_Dot14.cspans.txt | 4 + ...OperatorImplicitExpression_Dot14.stree.txt | 27 + ...OperatorImplicitExpression_Dot2.cspans.txt | 4 + ...lOperatorImplicitExpression_Dot2.stree.txt | 15 + ...OperatorImplicitExpression_Dot3.cspans.txt | 4 + ...lOperatorImplicitExpression_Dot3.stree.txt | 16 + ...OperatorImplicitExpression_Dot4.cspans.txt | 4 + ...lOperatorImplicitExpression_Dot4.stree.txt | 15 + ...OperatorImplicitExpression_Dot5.cspans.txt | 4 + ...lOperatorImplicitExpression_Dot5.stree.txt | 16 + ...OperatorImplicitExpression_Dot6.cspans.txt | 4 + ...lOperatorImplicitExpression_Dot6.stree.txt | 16 + ...OperatorImplicitExpression_Dot7.cspans.txt | 4 + ...lOperatorImplicitExpression_Dot7.stree.txt | 16 + ...OperatorImplicitExpression_Dot8.cspans.txt | 4 + ...lOperatorImplicitExpression_Dot8.stree.txt | 19 + ...OperatorImplicitExpression_Dot9.cspans.txt | 4 + ...lOperatorImplicitExpression_Dot9.stree.txt | 17 + ...eIdentifierAsImplicitExpression.cspans.txt | 4 + ...leIdentifierAsImplicitExpression.stree.txt | 14 + ...alancesThemInImplicitExpression.cspans.txt | 4 + ...BalancesThemInImplicitExpression.stree.txt | 34 + ...alancesThemInImplicitExpression.cspans.txt | 4 + ...BalancesThemInImplicitExpression.stree.txt | 72 + .../StopsBalancingParenthesesAtEOF.cspans.txt | 3 + .../StopsBalancingParenthesesAtEOF.diag.txt | 1 + .../StopsBalancingParenthesesAtEOF.stree.txt | 15 + ...ithinComplexImplicitExpressions.cspans.txt | 4 + ...WithinComplexImplicitExpressions.stree.txt | 48 + ...lowedByDotOrParenInImplicitExpr.cspans.txt | 4 + ...llowedByDotOrParenInImplicitExpr.stree.txt | 20 + ...otFollowedByIdentifierStartChar.cspans.txt | 4 + ...NotFollowedByIdentifierStartChar.stree.txt | 20 + ...sImplicitExpressionAtHtmlEndTag.cspans.txt | 5 + ...esImplicitExpressionAtHtmlEndTag.stree.txt | 26 + ...mplicitExpressionAtHtmlStartTag.cspans.txt | 5 + ...ImplicitExpressionAtHtmlStartTag.stree.txt | 25 + ...dPointIfDotFollowedByWhitespace.cspans.txt | 4 + ...idPointIfDotFollowedByWhitespace.stree.txt | 18 + ...oseParenFollowedByAnyWhiteSpace.cspans.txt | 4 + ...loseParenFollowedByAnyWhiteSpace.stree.txt | 19 + ...entifierFollowedByAnyWhiteSpace.cspans.txt | 4 + ...dentifierFollowedByAnyWhiteSpace.stree.txt | 17 + .../NestedCodeBlock.cspans.txt | 4 + .../NestedCodeBlock.stree.txt | 35 + .../NestedExplicitExpression.cspans.txt | 9 + .../NestedExplicitExpression.stree.txt | 32 + .../NestedImplicitExpression.cspans.txt | 7 + .../NestedImplicitExpression.stree.txt | 28 + .../NestedKeywordStatement.cspans.txt | 4 + .../NestedKeywordStatement.stree.txt | 49 + .../NestedMarkupBlock.cspans.txt | 10 + .../NestedMarkupBlock.stree.txt | 35 + .../NestedSimpleStatement.cspans.txt | 4 + .../NestedSimpleStatement.stree.txt | 23 + .../EmptyRazorComment.cspans.txt | 7 + .../EmptyRazorComment.stree.txt | 12 + .../MultipleRazorCommentInMarkup.cspans.txt | 16 + .../MultipleRazorCommentInMarkup.stree.txt | 33 + ...RazorCommentsInSameLineInMarkup.cspans.txt | 16 + ...eRazorCommentsInSameLineInMarkup.stree.txt | 32 + ...ommentBetweenCodeBlockAndMarkup.cspans.txt | 15 + ...CommentBetweenCodeBlockAndMarkup.stree.txt | 38 + .../RazorCommentInClosingTagBlock.cspans.txt | 8 + .../RazorCommentInClosingTagBlock.stree.txt | 23 + ...tInImplicitExpressionMethodCall.cspans.txt | 9 + ...entInImplicitExpressionMethodCall.diag.txt | 1 + ...ntInImplicitExpressionMethodCall.stree.txt | 22 + .../RazorCommentInMarkup.cspans.txt | 9 + .../RazorCommentInMarkup.stree.txt | 22 + .../RazorCommentInOpeningTagBlock.cspans.txt | 8 + .../RazorCommentInOpeningTagBlock.stree.txt | 21 + .../RazorCommentInVerbatimBlock.cspans.txt | 14 + .../RazorCommentInVerbatimBlock.diag.txt | 3 + .../RazorCommentInVerbatimBlock.stree.txt | 37 + ...CommentWithExtraNewLineInMarkup.cspans.txt | 16 + ...rCommentWithExtraNewLineInMarkup.stree.txt | 33 + .../RazorCommentsSurroundingMarkup.cspans.txt | 15 + .../RazorCommentsSurroundingMarkup.stree.txt | 32 + .../RazorMultilineCommentInBlock.cspans.txt | 12 + .../RazorMultilineCommentInBlock.stree.txt | 27 + .../UnterminatedRazorComment.cspans.txt | 4 + .../UnterminatedRazorComment.diag.txt | 1 + .../UnterminatedRazorComment.stree.txt | 10 + ...tInImplicitExpressionMethodCall.cspans.txt | 6 + ...entInImplicitExpressionMethodCall.diag.txt | 2 + ...ntInImplicitExpressionMethodCall.stree.txt | 19 + ...atedRazorCommentInVerbatimBlock.cspans.txt | 7 + ...inatedRazorCommentInVerbatimBlock.diag.txt | 2 + ...natedRazorCommentInVerbatimBlock.stree.txt | 22 + .../ReservedWord.cspans.txt | 4 + .../ReservedWord.diag.txt | 1 + .../ReservedWord.stree.txt | 13 + .../ReservedWordIsCaseSensitive.cspans.txt | 4 + .../ReservedWordIsCaseSensitive.stree.txt | 14 + ...ceMultipleLinesBelowSectionName.cspans.txt | 14 + ...aceMultipleLinesBelowSectionName.stree.txt | 47 + .../AllowsBracesInCSharpExpression.cspans.txt | 15 + .../AllowsBracesInCSharpExpression.stree.txt | 65 + .../BalancesBraces.cspans.txt | 14 + .../BalancesBraces.stree.txt | 51 + ...uresNewlineImmediatelyFollowing.cspans.txt | 5 + ...turesNewlineImmediatelyFollowing.stree.txt | 16 + ...neInSectionStatementMissingName.cspans.txt | 6 + ...ineInSectionStatementMissingName.stree.txt | 19 + ...ectionStatementMissingOpenBrace.cspans.txt | 7 + ...SectionStatementMissingOpenBrace.stree.txt | 22 + .../CommentRecoversFromUnclosedTag.cspans.txt | 15 + .../CommentRecoversFromUnclosedTag.stree.txt | 52 + ...seBraceImmediatelyFollowsMarkup.cspans.txt | 10 + ...oseBraceImmediatelyFollowsMarkup.stree.txt | 27 + ...eBetweenSectionNameAndOpenBrace.cspans.txt | 13 + ...ceBetweenSectionNameAndOpenBrace.stree.txt | 39 + .../HandlesEOFAfterOpenBrace.cspans.txt | 8 + .../HandlesEOFAfterOpenBrace.stree.txt | 25 + .../HandlesEOFAfterOpenContent1.cspans.txt | 8 + .../HandlesEOFAfterOpenContent1.stree.txt | 25 + .../HandlesEOFAfterOpenContent2.cspans.txt | 8 + .../HandlesEOFAfterOpenContent2.stree.txt | 25 + .../HandlesEOFAfterOpenContent3.cspans.txt | 8 + .../HandlesEOFAfterOpenContent3.stree.txt | 25 + .../HandlesEOFAfterOpenContent4.cspans.txt | 8 + .../HandlesEOFAfterOpenContent4.stree.txt | 27 + .../HandlesUnterminatedSection.cspans.txt | 11 + .../HandlesUnterminatedSection.stree.txt | 39 + ...UnterminatedSectionWithNestedIf.cspans.txt | 17 + ...sUnterminatedSectionWithNestedIf.stree.txt | 61 + ...gnoresSectionUnlessAllLowerCase.cspans.txt | 4 + ...IgnoresSectionUnlessAllLowerCase.stree.txt | 15 + ...utputErrorOtherNestedDirectives.cspans.txt | 16 + ...OutputErrorOtherNestedDirectives.stree.txt | 43 + ...tsErrorOnMultipleNestedSections.cspans.txt | 32 + ...utsErrorOnMultipleNestedSections.stree.txt | 87 + ...serOutputsErrorOnNestedSections.cspans.txt | 23 + ...rserOutputsErrorOnNestedSections.stree.txt | 64 + .../ParsesComment.cspans.txt | 13 + .../CSharpSectionTest/ParsesComment.stree.txt | 37 + .../ParsesCommentWithDelimiters.cspans.txt | 13 + .../ParsesCommentWithDelimiters.stree.txt | 42 + .../ParsesNamedSectionCorrectly.cspans.txt | 14 + .../ParsesNamedSectionCorrectly.stree.txt | 41 + .../ParsesXmlProcessingInstruction.cspans.txt | 10 + .../ParsesXmlProcessingInstruction.stree.txt | 36 + ...IfSectionNotFollowedByOpenBrace.cspans.txt | 7 + ...LIfSectionNotFollowedByOpenBrace.stree.txt | 21 + ...otFollowedByIdentifierStartChar.cspans.txt | 9 + ...NotFollowedByIdentifierStartChar.stree.txt | 34 + ...ockIfNameNotFollowedByOpenBrace.cspans.txt | 10 + ...lockIfNameNotFollowedByOpenBrace.stree.txt | 36 + ...aceFollowsCodeBlockNoWhitespace.cspans.txt | 12 + ...raceFollowsCodeBlockNoWhitespace.stree.txt | 39 + ...raceImmediatelyFollowsCodeBlock.cspans.txt | 12 + ...BraceImmediatelyFollowsCodeBlock.stree.txt | 40 + .../_WithDoubleTransition1.cspans.txt | 15 + .../_WithDoubleTransition1.stree.txt | 50 + .../_WithDoubleTransition2.cspans.txt | 17 + .../_WithDoubleTransition2.stree.txt | 63 + ...IsBraceAndReturnsSpanOfTypeCode.cspans.txt | 6 + ...rIsBraceAndReturnsSpanOfTypeCode.stree.txt | 37 + ...IsParenAndReturnsSpanOfTypeExpr.cspans.txt | 6 + ...rIsParenAndReturnsSpanOfTypeExpr.stree.txt | 37 + ...mportInsideCodeBlockCausesError.cspans.txt | 6 + ...ImportInsideCodeBlockCausesError.stree.txt | 36 + ...ntInCodeBlockIsHandledCorrectly.cspans.txt | 6 + ...entInCodeBlockIsHandledCorrectly.stree.txt | 37 + ...eBlockIgnoresSingleSlashAtStart.cspans.txt | 4 + ...rseBlockIgnoresSingleSlashAtStart.diag.txt | 1 + ...seBlockIgnoresSingleSlashAtStart.stree.txt | 16 + ...tesSingleLineCommentAtEndOfLine.cspans.txt | 9 + ...atesSingleLineCommentAtEndOfLine.stree.txt | 43 + ...eCodeBlockIsNotHandledSpecially.cspans.txt | 6 + ...deCodeBlockIsNotHandledSpecially.stree.txt | 38 + .../AwaitForEachStatement.cspans.txt | 4 + .../AwaitForEachStatement.stree.txt | 31 + .../CatchClause.cspans.txt | 3 + .../CSharpStatementTest/CatchClause.stree.txt | 50 + .../DoStatement.cspans.txt | 4 + .../CSharpStatementTest/DoStatement.stree.txt | 26 + .../CSharpStatementTest/ElseClause.cspans.txt | 4 + .../CSharpStatementTest/ElseClause.stree.txt | 34 + .../ElseIfClause.cspans.txt | 3 + .../ElseIfClause.stree.txt | 54 + ...ror_TryCatchWhen_InCompleteBody.cspans.txt | 3 + ...Error_TryCatchWhen_InCompleteBody.diag.txt | 1 + ...rror_TryCatchWhen_InCompleteBody.stree.txt | 31 + ...ryCatchWhen_InCompleteCondition.cspans.txt | 3 + ..._TryCatchWhen_InCompleteCondition.diag.txt | 1 + ...TryCatchWhen_InCompleteCondition.stree.txt | 27 + ...er_IncompleteTryCatchNoBodyWhen.cspans.txt | 3 + ...ter_IncompleteTryCatchNoBodyWhen.stree.txt | 34 + ...onFilter_IncompleteTryCatchWhen.cspans.txt | 3 + ...ionFilter_IncompleteTryCatchWhen.stree.txt | 25 + ..._IncompleteTryCatchWhenNoBodies.cspans.txt | 3 + ...r_IncompleteTryCatchWhenNoBodies.stree.txt | 29 + ...ceptionFilter_IncompleteTryWhen.cspans.txt | 4 + ...xceptionFilter_IncompleteTryWhen.stree.txt | 21 + .../ExceptionFilter_MultiLine.cspans.txt | 3 + .../ExceptionFilter_MultiLine.stree.txt | 58 + ...eptionFilter_NestedTryCatchWhen.cspans.txt | 6 + ...ceptionFilter_NestedTryCatchWhen.stree.txt | 47 + ...henCatchWhenComplete_SingleLine.cspans.txt | 3 + ...WhenCatchWhenComplete_SingleLine.stree.txt | 58 + ...TryCatchWhenComplete_SingleLine.cspans.txt | 3 + ..._TryCatchWhenComplete_SingleLine.stree.txt | 38 + ...hWhenFinallyComplete_SingleLine.cspans.txt | 4 + ...chWhenFinallyComplete_SingleLine.stree.txt | 51 + .../FinallyClause.cspans.txt | 4 + .../FinallyClause.stree.txt | 31 + .../ForEachStatement.cspans.txt | 4 + .../ForEachStatement.stree.txt | 29 + .../ForStatement.cspans.txt | 4 + .../ForStatement.stree.txt | 40 + .../IfStatement.cspans.txt | 3 + .../CSharpStatementTest/IfStatement.stree.txt | 21 + .../LockStatement.cspans.txt | 4 + .../LockStatement.stree.txt | 23 + .../MalformedAwaitForEachStatement.cspans.txt | 3 + .../MalformedAwaitForEachStatement.diag.txt | 1 + .../MalformedAwaitForEachStatement.stree.txt | 27 + ...wordTreatedAsImplicitExpression.cspans.txt | 4 + ...ywordTreatedAsImplicitExpression.stree.txt | 15 + .../StaticUsing_Complete_Spaced.cspans.txt | 4 + .../StaticUsing_Complete_Spaced.stree.txt | 21 + .../StaticUsing_GlobalPrefix.cspans.txt | 4 + .../StaticUsing_GlobalPrefix.stree.txt | 21 + ...StaticUsing_MultipleIdentifiers.cspans.txt | 4 + .../StaticUsing_MultipleIdentifiers.stree.txt | 19 + .../StaticUsing_NoUsing.cspans.txt | 4 + .../StaticUsing_NoUsing.stree.txt | 15 + .../StaticUsing_SingleIdentifier.cspans.txt | 4 + .../StaticUsing_SingleIdentifier.stree.txt | 17 + .../SwitchStatement.cspans.txt | 4 + .../SwitchStatement.stree.txt | 23 + .../TryStatement.cspans.txt | 3 + .../TryStatement.stree.txt | 18 + .../UsingNamespaceImport.cspans.txt | 4 + .../UsingNamespaceImport.stree.txt | 21 + .../UsingStatement.cspans.txt | 4 + .../UsingStatement.stree.txt | 35 + .../UsingTypeAlias.cspans.txt | 4 + .../UsingTypeAlias.stree.txt | 31 + ...ing_VariableDeclaration_Complex.cspans.txt | 6 + ...sing_VariableDeclaration_Complex.stree.txt | 61 + ...sing_VariableDeclaration_Simple.cspans.txt | 6 + ...Using_VariableDeclaration_Simple.stree.txt | 29 + .../WhileStatement.cspans.txt | 4 + .../WhileStatement.stree.txt | 23 + ...plateInExplicitExpressionParens.cspans.txt | 13 + ...mplateInExplicitExpressionParens.stree.txt | 52 + ...plateInImplicitExpressionParens.cspans.txt | 11 + ...mplateInImplicitExpressionParens.stree.txt | 48 + ...plateInStatementWithinCodeBlock.cspans.txt | 11 + ...mplateInStatementWithinCodeBlock.stree.txt | 59 + ...InStatementWithinStatementBlock.cspans.txt | 13 + ...eInStatementWithinStatementBlock.stree.txt | 64 + ...mediatelyFollowingStatementChar.cspans.txt | 10 + ...mmediatelyFollowingStatementChar.stree.txt | 30 + .../HandlesSingleLineTemplate.cspans.txt | 10 + .../HandlesSingleLineTemplate.stree.txt | 37 + ...latesInImplicitExpressionParens.cspans.txt | 18 + ...platesInImplicitExpressionParens.stree.txt | 77 + ...latesInStatementWithinCodeBlock.cspans.txt | 18 + ...platesInStatementWithinCodeBlock.stree.txt | 88 + ...InStatementWithinStatementBlock.cspans.txt | 20 + ...sInStatementWithinStatementBlock.stree.txt | 93 + ...tedTemplateInImplicitExprParens.cspans.txt | 18 + ...estedTemplateInImplicitExprParens.diag.txt | 1 + ...stedTemplateInImplicitExprParens.stree.txt | 80 + ...edTemplateInStmtWithinCodeBlock.cspans.txt | 18 + ...stedTemplateInStmtWithinCodeBlock.diag.txt | 1 + ...tedTemplateInStmtWithinCodeBlock.stree.txt | 91 + ...edTemplateInStmtWithinStmtBlock.cspans.txt | 20 + ...stedTemplateInStmtWithinStmtBlock.diag.txt | 1 + ...tedTemplateInStmtWithinStmtBlock.stree.txt | 96 + ...thDoubleTransition_DoesNotThrow.cspans.txt | 18 + ...ithDoubleTransition_DoesNotThrow.stree.txt | 80 + .../AllowsMarkupInIfBodyWithBraces.cspans.txt | 22 + .../AllowsMarkupInIfBodyWithBraces.stree.txt | 86 + ...IfBodyWithBracesWithinCodeBlock.cspans.txt | 24 + ...nIfBodyWithBracesWithinCodeBlock.stree.txt | 95 + ...rnsFromMarkupBlockWithPseudoTag.cspans.txt | 7 + ...urnsFromMarkupBlockWithPseudoTag.stree.txt | 36 + ...upBlockWithPseudoTagInCodeBlock.cspans.txt | 10 + ...kupBlockWithPseudoTagInCodeBlock.stree.txt | 47 + ...neToMarkupExclPreceedingNewline.cspans.txt | 17 + ...ineToMarkupExclPreceedingNewline.stree.txt | 82 + ...plateTransitionInDesignTimeMode.cspans.txt | 8 + ...mplateTransitionInDesignTimeMode.stree.txt | 36 + ...ColonTransitionInDesignTimeMode.cspans.txt | 10 + ...tColonTransitionInDesignTimeMode.stree.txt | 37 + ...plateTransitionInDesignTimeMode.cspans.txt | 9 + ...mplateTransitionInDesignTimeMode.stree.txt | 35 + ...AtTagTransitionInDesignTimeMode.cspans.txt | 11 + ...idAtTagTransitionInDesignTimeMode.diag.txt | 5 + ...dAtTagTransitionInDesignTimeMode.stree.txt | 37 + ...OnTagTransitionInDesignTimeMode.cspans.txt | 10 + ...eOnTagTransitionInDesignTimeMode.stree.txt | 35 + ...rkupStatementOnOpenAngleBracket.cspans.txt | 10 + ...arkupStatementOnOpenAngleBracket.stree.txt | 52 + ...ntOnOpenAngleBracketInCodeBlock.cspans.txt | 12 + ...entOnOpenAngleBracketInCodeBlock.stree.txt | 61 + ...nSwitchCharacterFollowedByColon.cspans.txt | 9 + ...OnSwitchCharacterFollowedByColon.stree.txt | 29 + ...acterFollowedByColonInCodeBlock.cspans.txt | 11 + ...racterFollowedByColonInCodeBlock.stree.txt | 38 + ...hCharacterFollowedByDoubleColon.cspans.txt | 8 + ...chCharacterFollowedByDoubleColon.stree.txt | 26 + ...hCharacterFollowedByTripleColon.cspans.txt | 8 + ...chCharacterFollowedByTripleColon.stree.txt | 26 + ...rkupWithoutPreceedingWhitespace.cspans.txt | 17 + ...arkupWithoutPreceedingWhitespace.stree.txt | 66 + ...eMarkupContainingStatementBlock.cspans.txt | 13 + ...neMarkupContainingStatementBlock.stree.txt | 43 + ...eSwitchIfOuterBlockIsTerminated.cspans.txt | 6 + ...seSwitchIfOuterBlockIsTerminated.stree.txt | 21 + ...indsOfImplicitMarkupInCodeBlock.cspans.txt | 23 + ...KindsOfImplicitMarkupInCodeBlock.stree.txt | 134 + ...nCaseAndDefaultBranchesOfSwitch.cspans.txt | 33 + ...InCaseAndDefaultBranchesOfSwitch.stree.txt | 143 + ...aultBranchesOfSwitchInCodeBlock.cspans.txt | 35 + ...faultBranchesOfSwitchInCodeBlock.stree.txt | 152 + ...TrailingNewlineInDesignTimeMode.cspans.txt | 9 + ...sTrailingNewlineInDesignTimeMode.stree.txt | 29 + ...icitExprDoesNotAcceptDotAfterAt.cspans.txt | 9 + ...plicitExprDoesNotAcceptDotAfterAt.diag.txt | 1 + ...licitExprDoesNotAcceptDotAfterAt.stree.txt | 28 + ...eptTrailingNewlineInRunTimeMode.cspans.txt | 9 + ...ceptTrailingNewlineInRunTimeMode.stree.txt | 29 + ...ingleSpaceOrNewlineAtDesignTime.cspans.txt | 9 + ...sSingleSpaceOrNewlineAtDesignTime.diag.txt | 1 + ...SingleSpaceOrNewlineAtDesignTime.stree.txt | 29 + ...ngleAtOutputsZeroLengthCodeSpan.cspans.txt | 9 + ...SingleAtOutputsZeroLengthCodeSpan.diag.txt | 1 + ...ingleAtOutputsZeroLengthCodeSpan.stree.txt | 28 + .../VerbatimBlock.cspans.txt | 6 + .../VerbatimBlock.stree.txt | 23 + ...eIfTheyAreSignificantToAncestor.cspans.txt | 12 + ...neIfTheyAreSignificantToAncestor.stree.txt | 40 + ...isabledForDataAttributesInBlock.cspans.txt | 13 + ...DisabledForDataAttributesInBlock.stree.txt | 48 + ...bledForDataAttributesInDocument.cspans.txt | 13 + ...abledForDataAttributesInDocument.stree.txt | 48 + ...aAttributesWithExperimentalFlag.cspans.txt | 13 + ...taAttributesWithExperimentalFlag.stree.txt | 50 + ...isabledForDataAttributesInBlock.cspans.txt | 13 + ...DisabledForDataAttributesInBlock.stree.txt | 51 + ...bledForDataAttributesInDocument.cspans.txt | 12 + ...abledForDataAttributesInDocument.stree.txt | 47 + .../DoubleQuotedLiteralAttribute.cspans.txt | 13 + .../DoubleQuotedLiteralAttribute.stree.txt | 52 + ...WithWhitespaceSurroundingEquals.cspans.txt | 12 + ...eWithWhitespaceSurroundingEquals.stree.txt | 54 + .../MultiPartLiteralAttribute.cspans.txt | 13 + .../MultiPartLiteralAttribute.stree.txt | 52 + .../MultiValueExpressionAttribute.cspans.txt | 16 + .../MultiValueExpressionAttribute.stree.txt | 66 + .../NewLineBetweenAttributes.cspans.txt | 14 + .../NewLineBetweenAttributes.stree.txt | 56 + .../NewLinePrecedingAttribute.cspans.txt | 11 + .../NewLinePrecedingAttribute.stree.txt | 42 + .../SimpleExpressionAttribute.cspans.txt | 12 + .../SimpleExpressionAttribute.stree.txt | 49 + .../SimpleLiteralAttribute.cspans.txt | 11 + .../SimpleLiteralAttribute.stree.txt | 42 + ...WithWhitespaceSurroundingEquals.cspans.txt | 11 + ...eWithWhitespaceSurroundingEquals.stree.txt | 47 + .../SymbolBoundAttributes1.cspans.txt | 11 + .../SymbolBoundAttributes1.stree.txt | 44 + .../SymbolBoundAttributes2.cspans.txt | 11 + .../SymbolBoundAttributes2.stree.txt | 43 + .../SymbolBoundAttributes3.cspans.txt | 11 + .../SymbolBoundAttributes3.stree.txt | 42 + .../SymbolBoundAttributes4.cspans.txt | 11 + .../SymbolBoundAttributes4.stree.txt | 42 + .../SymbolBoundAttributes5.cspans.txt | 11 + .../SymbolBoundAttributes5.stree.txt | 42 + .../SymbolBoundAttributes6.cspans.txt | 11 + .../SymbolBoundAttributes6.stree.txt | 42 + ...tributes_BeforeEqualWhitespace1.cspans.txt | 14 + ...ttributes_BeforeEqualWhitespace1.stree.txt | 63 + ...tributes_BeforeEqualWhitespace2.cspans.txt | 14 + ...ttributes_BeforeEqualWhitespace2.stree.txt | 61 + ...tributes_BeforeEqualWhitespace3.cspans.txt | 14 + ...ttributes_BeforeEqualWhitespace3.stree.txt | 59 + ...tributes_BeforeEqualWhitespace4.cspans.txt | 14 + ...ttributes_BeforeEqualWhitespace4.stree.txt | 59 + ...tributes_BeforeEqualWhitespace5.cspans.txt | 14 + ...ttributes_BeforeEqualWhitespace5.stree.txt | 59 + ...tributes_BeforeEqualWhitespace6.cspans.txt | 14 + ...ttributes_BeforeEqualWhitespace6.stree.txt | 59 + ...mbolBoundAttributes_Whitespace1.cspans.txt | 14 + ...ymbolBoundAttributes_Whitespace1.stree.txt | 63 + ...mbolBoundAttributes_Whitespace2.cspans.txt | 14 + ...ymbolBoundAttributes_Whitespace2.stree.txt | 61 + ...mbolBoundAttributes_Whitespace3.cspans.txt | 14 + ...ymbolBoundAttributes_Whitespace3.stree.txt | 59 + ...mbolBoundAttributes_Whitespace4.cspans.txt | 14 + ...ymbolBoundAttributes_Whitespace4.stree.txt | 59 + ...mbolBoundAttributes_Whitespace5.cspans.txt | 14 + ...ymbolBoundAttributes_Whitespace5.stree.txt | 59 + ...mbolBoundAttributes_Whitespace6.cspans.txt | 14 + ...ymbolBoundAttributes_Whitespace6.stree.txt | 59 + ...ributeWithCodeWithSpacesInBlock.cspans.txt | 11 + ...tributeWithCodeWithSpacesInBlock.stree.txt | 45 + ...uteWithCodeWithSpacesInDocument.cspans.txt | 6 + ...buteWithCodeWithSpacesInDocument.stree.txt | 30 + .../UnquotedLiteralAttribute.cspans.txt | 12 + .../UnquotedLiteralAttribute.stree.txt | 48 + ...esWorkWithConditionalAttributes.cspans.txt | 13 + ...tesWorkWithConditionalAttributes.stree.txt | 58 + ...aceAndNewLinePrecedingAttribute.cspans.txt | 11 + ...paceAndNewLinePrecedingAttribute.stree.txt | 43 + .../AcceptsEmptyTextTag.cspans.txt | 7 + .../AcceptsEmptyTextTag.stree.txt | 25 + ...xtTagAsOuterTagButDoesNotRender.cspans.txt | 11 + ...extTagAsOuterTagButDoesNotRender.stree.txt | 43 + ...tInAttributeValueIfDoubleQuoted.cspans.txt | 13 + ...etInAttributeValueIfDoubleQuoted.stree.txt | 52 + ...tInAttributeValueIfSingleQuoted.cspans.txt | 13 + ...etInAttributeValueIfSingleQuoted.stree.txt | 52 + ...hInAttributeValueIfDoubleQuoted.cspans.txt | 14 + ...shInAttributeValueIfDoubleQuoted.stree.txt | 53 + ...hInAttributeValueIfSingleQuoted.cspans.txt | 14 + ...shInAttributeValueIfSingleQuoted.stree.txt | 53 + ...wsStartAndEndTagsToDifferInCase.cspans.txt | 11 + ...owsStartAndEndTagsToDifferInCase.stree.txt | 41 + ...sItCanRecoverToAnExpectedEndTag.cspans.txt | 10 + ...AsItCanRecoverToAnExpectedEndTag.stree.txt | 39 + ...andleSelfClosingTagsWithinBlock.cspans.txt | 9 + ...HandleSelfClosingTagsWithinBlock.stree.txt | 38 + ...neOfMarkupWithEmbeddedStatement.cspans.txt | 12 + ...ineOfMarkupWithEmbeddedStatement.stree.txt | 46 + ...siderPsuedoTagWithinMarkupBlock.cspans.txt | 11 + ...nsiderPsuedoTagWithinMarkupBlock.stree.txt | 44 + ...leUnlessPreceededByQuestionMark.cspans.txt | 9 + ...gleUnlessPreceededByQuestionMark.stree.txt | 42 + ...sForwardSlashInAttributeContent.cspans.txt | 10 + ...esForwardSlashInAttributeContent.stree.txt | 44 + .../HandlesOpenAngleAtEof.cspans.txt | 5 + .../HandlesOpenAngleAtEof.diag.txt | 2 + .../HandlesOpenAngleAtEof.stree.txt | 22 + ...enAngleWithProperTagFollowingIt.cspans.txt | 7 + ...OpenAngleWithProperTagFollowingIt.diag.txt | 3 + ...penAngleWithProperTagFollowingIt.stree.txt | 34 + ...nbalancedTripleDashHTMLComments.cspans.txt | 12 + ...UnbalancedTripleDashHTMLComments.stree.txt | 56 + ...mlCommentSupportsMultipleDashes.cspans.txt | 24 + ...tmlCommentSupportsMultipleDashes.stree.txt | 130 + ...gnoresTagsInContentsOfScriptTag.cspans.txt | 12 + ...IgnoresTagsInContentsOfScriptTag.stree.txt | 48 + ...minatesCommentOnFullEndSequence.cspans.txt | 9 + ...rminatesCommentOnFullEndSequence.stree.txt | 36 + ...ParsesSGMLDeclarationAsEmptyTag.cspans.txt | 9 + .../ParsesSGMLDeclarationAsEmptyTag.stree.txt | 40 + ...onWhitespaceCharacterIsStartTag.cspans.txt | 12 + ...NonWhitespaceCharacterIsStartTag.stree.txt | 49 + ...ProcessingInstructionAsEmptyTag.cspans.txt | 9 + ...LProcessingInstructionAsEmptyTag.stree.txt | 41 + ...yBalancesCommentStartAndEndTags.cspans.txt | 9 + ...lyBalancesCommentStartAndEndTags.stree.txt | 35 + ...CharacterAfterTransitionIsColon.cspans.txt | 9 + ...tCharacterAfterTransitionIsColon.stree.txt | 33 + .../RendersLiteralTextTagIfDoubled.cspans.txt | 13 + .../RendersLiteralTextTagIfDoubled.stree.txt | 53 + ...opsAtMatchingCloseTagToStartTag.cspans.txt | 12 + ...topsAtMatchingCloseTagToStartTag.stree.txt | 50 + ...sParsingMidEmptyTagIfEOFReached.cspans.txt | 6 + ...opsParsingMidEmptyTagIfEOFReached.diag.txt | 1 + ...psParsingMidEmptyTagIfEOFReached.stree.txt | 23 + ...gleLineBlockAtEOFIfNoEOLReached.cspans.txt | 6 + ...ingleLineBlockAtEOFIfNoEOLReached.diag.txt | 1 + ...ngleLineBlockAtEOFIfNoEOLReached.stree.txt | 23 + .../SupportsCommentAsBlock.cspans.txt | 9 + .../SupportsCommentAsBlock.stree.txt | 31 + ...ortsCommentWithExtraDashAsBlock.cspans.txt | 9 + ...portsCommentWithExtraDashAsBlock.stree.txt | 32 + .../SupportsCommentWithinBlock.cspans.txt | 13 + .../SupportsCommentWithinBlock.stree.txt | 45 + ...riptTagsWithLessThanSignsInThem.cspans.txt | 9 + ...criptTagsWithLessThanSignsInThem.stree.txt | 41 + ...gsWithSpacedLessThanSignsInThem.cspans.txt | 9 + ...agsWithSpacedLessThanSignsInThem.stree.txt | 43 + .../SupportsTagsWithAttributes.cspans.txt | 18 + .../SupportsTagsWithAttributes.stree.txt | 69 + ...CloseAngleDoesNotTerminateBlock.cspans.txt | 4 + ...utCloseAngleDoesNotTerminateBlock.diag.txt | 2 + ...tCloseAngleDoesNotTerminateBlock.stree.txt | 25 + .../HtmlBlockTest/TerminatesAtEOF.cspans.txt | 5 + .../HtmlBlockTest/TerminatesAtEOF.diag.txt | 2 + .../HtmlBlockTest/TerminatesAtEOF.stree.txt | 22 + ...rminatesAtEOFWhenParsingComment.cspans.txt | 5 + ...TerminatesAtEOFWhenParsingComment.diag.txt | 1 + ...erminatesAtEOFWhenParsingComment.stree.txt | 24 + ...tAtFirstOccurrenceOfEndSequence.cspans.txt | 12 + ...ntAtFirstOccurrenceOfEndSequence.stree.txt | 47 + ...GMLDeclarationAtFirstCloseAngle.cspans.txt | 10 + ...SGMLDeclarationAtFirstCloseAngle.stree.txt | 42 + ...ionAtQuestionMarkCloseAnglePair.cspans.txt | 10 + ...tionAtQuestionMarkCloseAnglePair.stree.txt | 44 + .../TreatsMalformedTagsAsContent.cspans.txt | 9 + .../TreatsMalformedTagsAsContent.diag.txt | 2 + .../TreatsMalformedTagsAsContent.stree.txt | 45 + .../WithSelfClosingTagJustEmitsTag.cspans.txt | 7 + .../WithSelfClosingTagJustEmitsTag.stree.txt | 28 + ...ptsEndTagWithNoMatchingStartTag.cspans.txt | 3 + ...eptsEndTagWithNoMatchingStartTag.stree.txt | 14 + ...ileAndOutputsZeroLengthCodeSpan.cspans.txt | 4 + ...fFileAndOutputsZeroLengthCodeSpan.diag.txt | 1 + ...FileAndOutputsZeroLengthCodeSpan.stree.txt | 14 + ...yHandlesOddlySpacedHTMLElements.cspans.txt | 9 + ...lyHandlesOddlySpacedHTMLElements.stree.txt | 49 + ...neOfMarkupWithEmbeddedStatement.cspans.txt | 6 + ...ineOfMarkupWithEmbeddedStatement.stree.txt | 29 + ...oreNewLineAtTheEndOfMarkupBlock.cspans.txt | 8 + ...noreNewLineAtTheEndOfMarkupBlock.stree.txt | 25 + ...VerbatimBlockIfNoNewlinePresent.cspans.txt | 8 + ...fVerbatimBlockIfNoNewlinePresent.stree.txt | 25 + ...aNewLineAtTheEndOfVerbatimBlock.cspans.txt | 7 + ...raNewLineAtTheEndOfVerbatimBlock.stree.txt | 23 + ...dNewLineAtTheEndOfVerbatimBlock.cspans.txt | 7 + ...ndNewLineAtTheEndOfVerbatimBlock.stree.txt | 24 + ...VerbatimBlockIfFollowedByCSharp.cspans.txt | 9 + ...nVerbatimBlockIfFollowedByCSharp.stree.txt | 35 + ...sNotReturnErrorOnMismatchedTags.cspans.txt | 6 + ...esNotReturnErrorOnMismatchedTags.stree.txt | 29 + ...ToCodeOnEmailAddressInAttribute.cspans.txt | 7 + ...hToCodeOnEmailAddressInAttribute.stree.txt | 30 + ...mitsAtSignAsMarkupIfAtEndOfFile.cspans.txt | 4 + .../EmitsAtSignAsMarkupIfAtEndOfFile.diag.txt | 1 + ...EmitsAtSignAsMarkupIfAtEndOfFile.stree.txt | 15 + ...IfFirstCharacterIsSwapCharacter.cspans.txt | 4 + ...kIfFirstCharacterIsSwapCharacter.stree.txt | 14 + ...ewLineBeforeMarkupInNestedBlock.cspans.txt | 12 + ...NewLineBeforeMarkupInNestedBlock.stree.txt | 46 + ...esNewLineAndMarkupInNestedBlock.cspans.txt | 12 + ...lesNewLineAndMarkupInNestedBlock.stree.txt | 41 + .../HandlesNewLineInNestedBlock.cspans.txt | 10 + .../HandlesNewLineInNestedBlock.stree.txt | 37 + ...AtSignEncounteredAndEmitsOutput.cspans.txt | 4 + ...nAtSignEncounteredAndEmitsOutput.stree.txt | 16 + ...gnoresTagsInContentsOfScriptTag.cspans.txt | 6 + ...IgnoresTagsInContentsOfScriptTag.stree.txt | 31 + ...eBlockWithMarkupSetsDotAsMarkup.cspans.txt | 15 + ...deBlockWithMarkupSetsDotAsMarkup.stree.txt | 58 + ...portsDollarOpenBraceCombination.cspans.txt | 3 + ...pportsDollarOpenBraceCombination.stree.txt | 14 + ...arkupSpanIfContentIsEmptyString.cspans.txt | 1 + ...MarkupSpanIfContentIsEmptyString.stree.txt | 4 + ...entAsSingleWhitespaceMarkupSpan.cspans.txt | 1 + ...tentAsSingleWhitespaceMarkupSpan.stree.txt | 4 + ...witchToCodeOnEmailAddressInText.cspans.txt | 1 + ...SwitchToCodeOnEmailAddressInText.stree.txt | 4 + ...gnoresTagsInContentsOfScriptTag.cspans.txt | 17 + ...IgnoresTagsInContentsOfScriptTag.stree.txt | 58 + ...panIfNoSwapCharacterEncountered.cspans.txt | 1 + ...SpanIfNoSwapCharacterEncountered.stree.txt | 6 + ...InVerbatimBlockIfFollowedByHtml.cspans.txt | 12 + ...gInVerbatimBlockIfFollowedByHtml.stree.txt | 45 + ...ockIfFollowedByMarkupTransition.cspans.txt | 13 + ...lockIfFollowedByMarkupTransition.stree.txt | 45 + .../RendersTextPseudoTagAsMarkup.cspans.txt | 4 + .../RendersTextPseudoTagAsMarkup.stree.txt | 17 + ...egmentIfNoCodeBlocksEncountered.cspans.txt | 6 + ...SegmentIfNoCodeBlocksEncountered.stree.txt | 26 + ...ngOfAttributeValue_DoesNotThrow.cspans.txt | 9 + ...ingOfAttributeValue_DoesNotThrow.stree.txt | 34 + ...ndOfAttributeValue_DoesNotThrow.cspans.txt | 9 + ...EndOfAttributeValue_DoesNotThrow.stree.txt | 34 + ...weenAttributeValue_DoesNotThrow.cspans.txt | 10 + ...tweenAttributeValue_DoesNotThrow.stree.txt | 40 + ...onInAttributeValue_DoesNotThrow.cspans.txt | 8 + ...ionInAttributeValue_DoesNotThrow.stree.txt | 31 + ...eTransitionInEmail_DoesNotThrow.cspans.txt | 13 + ...leTransitionInEmail_DoesNotThrow.stree.txt | 48 + ...eTransitionInRegex_DoesNotThrow.cspans.txt | 10 + ...leTransitionInRegex_DoesNotThrow.stree.txt | 79 + ...ithExpressionBlock_DoesNotThrow.cspans.txt | 43 + ...WithExpressionBlock_DoesNotThrow.stree.txt | 182 + ...nsitionsInAttributeValue_Throws.cspans.txt | 9 + ...ransitionsInAttributeValue_Throws.diag.txt | 2 + ...ansitionsInAttributeValue_Throws.stree.txt | 44 + ...nDoesNotCreateDocumentLevelSpan.cspans.txt | 13 + ...onDoesNotCreateDocumentLevelSpan.stree.txt | 40 + ...AsLongAsParserCanIdentifyEndTag.cspans.txt | 9 + ...sAsLongAsParserCanIdentifyEndTag.stree.txt | 31 + ...EndTextTagContainsTextAfterName.cspans.txt | 7 + ...IfEndTextTagContainsTextAfterName.diag.txt | 1 + ...fEndTextTagContainsTextAfterName.stree.txt | 33 + ...artTextTagContainsTextAfterName.cspans.txt | 8 + ...StartTextTagContainsTextAfterName.diag.txt | 1 + ...tartTextTagContainsTextAfterName.stree.txt | 35 + ...utputsMarkupSegmentAndEndsBlock.cspans.txt | 8 + ...nOutputsMarkupSegmentAndEndsBlock.diag.txt | 1 + ...OutputsMarkupSegmentAndEndsBlock.stree.txt | 29 + ...edTagAtEOFErrorsOnMissingEndTag.cspans.txt | 5 + ...osedTagAtEOFErrorsOnMissingEndTag.diag.txt | 2 + ...sedTagAtEOFErrorsOnMissingEndTag.stree.txt | 30 + ...TagErrorsOnOutermostUnclosedTag.cspans.txt | 9 + ...elTagErrorsOnOutermostUnclosedTag.diag.txt | 1 + ...lTagErrorsOnOutermostUnclosedTag.stree.txt | 35 + ...TagAtEOFErrorsWithIncompleteTag.cspans.txt | 6 + ...edTagAtEOFErrorsWithIncompleteTag.diag.txt | 2 + ...dTagAtEOFErrorsWithIncompleteTag.stree.txt | 30 + .../HtmlTagsTest/CDataTag.cspans.txt | 8 + .../HtmlTagsTest/CDataTag.stree.txt | 31 + .../HtmlTagsTest/CommentTag.cspans.txt | 10 + .../HtmlTagsTest/CommentTag.stree.txt | 31 + .../HtmlTagsTest/DocTypeTag.cspans.txt | 8 + .../HtmlTagsTest/DocTypeTag.stree.txt | 28 + .../HtmlTagsTest/ElementTags.cspans.txt | 10 + .../HtmlTagsTest/ElementTags.stree.txt | 33 + .../HtmlTagsTest/EmptyTag.cspans.txt | 9 + .../HtmlTagsTest/EmptyTag.stree.txt | 31 + .../EmptyTagNestsLikeNormalTag.cspans.txt | 9 + .../EmptyTagNestsLikeNormalTag.diag.txt | 1 + .../EmptyTagNestsLikeNormalTag.stree.txt | 32 + .../IncompleteVoidElementEndTag.cspans.txt | 36 + .../IncompleteVoidElementEndTag.diag.txt | 1 + .../IncompleteVoidElementEndTag.stree.txt | 317 ++ .../ProcessingInstructionTag.cspans.txt | 8 + .../ProcessingInstructionTag.stree.txt | 34 + .../HtmlTagsTest/ScriptTag.cspans.txt | 3 + .../HtmlTagsTest/ScriptTag.stree.txt | 28 + .../ScriptTag_Incomplete.cspans.txt | 2 + .../ScriptTag_Incomplete.stree.txt | 13 + .../HtmlTagsTest/ScriptTag_Invalid.cspans.txt | 10 + .../HtmlTagsTest/ScriptTag_Invalid.stree.txt | 38 + .../ScriptTag_WithNestedBeginTag.cspans.txt | 3 + .../ScriptTag_WithNestedBeginTag.stree.txt | 16 + .../ScriptTag_WithNestedEndTag.cspans.txt | 3 + .../ScriptTag_WithNestedEndTag.stree.txt | 17 + ...criptTag_WithNestedMalformedTag.cspans.txt | 3 + ...ScriptTag_WithNestedMalformedTag.stree.txt | 29 + .../ScriptTag_WithNestedTag.cspans.txt | 3 + .../ScriptTag_WithNestedTag.stree.txt | 20 + .../HtmlTagsTest/TextTags.cspans.txt | 9 + .../HtmlTagsTest/TextTags.stree.txt | 31 + .../VoidElementFollowedByCloseTag.cspans.txt | 145 + .../VoidElementFollowedByCloseTag.stree.txt | 596 +++ .../VoidElementFollowedByContent.cspans.txt | 113 + .../VoidElementFollowedByContent.stree.txt | 484 +++ .../VoidElementFollowedByOtherTag.cspans.txt | 49 + .../VoidElementFollowedByOtherTag.stree.txt | 387 ++ ...rTrailingWhitespaceInDesignMode.cspans.txt | 19 + ...OrTrailingWhitespaceInDesignMode.stree.txt | 83 + ...ToCodeOnEmailAddressInAttribute.cspans.txt | 13 + ...hToCodeOnEmailAddressInAttribute.stree.txt | 47 + ...witchToCodeOnEmailAddressInText.cspans.txt | 9 + ...SwitchToCodeOnEmailAddressInText.stree.txt | 31 + ...CodeIfThereIsNoMarkupOnThatLine.cspans.txt | 22 + ...oCodeIfThereIsNoMarkupOnThatLine.stree.txt | 86 + ...CodeIfThereIsNoMarkupOnThatLine.cspans.txt | 16 + ...oCodeIfThereIsNoMarkupOnThatLine.stree.txt | 69 + ...sPairsOfAtSignsAsEscapeSequence.cspans.txt | 8 + ...tsPairsOfAtSignsAsEscapeSequence.stree.txt | 28 + ...reatsTwoAtSignsAsEscapeSequence.cspans.txt | 4 + ...TreatsTwoAtSignsAsEscapeSequence.stree.txt | 17 + ...arsesCodeWithinSingleLineMarkup.cspans.txt | 12 + ...ParsesCodeWithinSingleLineMarkup.stree.txt | 41 + ...sPairsOfAtSignsAsEscapeSequence.cspans.txt | 19 + ...tsPairsOfAtSignsAsEscapeSequence.stree.txt | 55 + ...reatsTwoAtSignsAsEscapeSequence.cspans.txt | 15 + ...TreatsTwoAtSignsAsEscapeSequence.stree.txt | 44 + ...CodeIfThereIsNoMarkupOnThatLine.cspans.txt | 31 + ...oCodeIfThereIsNoMarkupOnThatLine.stree.txt | 109 + ...portsCodeWithinCDataDeclaration.cspans.txt | 12 + ...pportsCodeWithinCDataDeclaration.stree.txt | 52 + .../SupportsCodeWithinComment.cspans.txt | 14 + .../SupportsCodeWithinComment.stree.txt | 49 + ...pportsCodeWithinSGMLDeclaration.cspans.txt | 12 + ...upportsCodeWithinSGMLDeclaration.stree.txt | 48 + ...eWithinXMLProcessingInstruction.cspans.txt | 12 + ...deWithinXMLProcessingInstruction.stree.txt | 49 + ...cterEncounteredInAttributeValue.cspans.txt | 12 + ...acterEncounteredInAttributeValue.stree.txt | 49 + ...haracterEncounteredInTagContent.cspans.txt | 16 + ...CharacterEncounteredInTagContent.stree.txt | 59 + ...nSwapCharacterEncounteredMidTag.cspans.txt | 10 + ...enSwapCharacterEncounteredMidTag.stree.txt | 38 + ...cterBeforeSwapIsNonAlphanumeric.cspans.txt | 11 + ...acterBeforeSwapIsNonAlphanumeric.stree.txt | 39 + ...sPairsOfAtSignsAsEscapeSequence.cspans.txt | 14 + ...tsPairsOfAtSignsAsEscapeSequence.stree.txt | 45 + ...reatsTwoAtSignsAsEscapeSequence.cspans.txt | 10 + ...TreatsTwoAtSignsAsEscapeSequence.stree.txt | 34 + ...les_DoesNotSpecialCase_VoidTags.cspans.txt | 5 + ...dles_DoesNotSpecialCase_VoidTags.stree.txt | 18 + ...les_EndTagsWithMissingStartTags.cspans.txt | 3 + ...dles_EndTagsWithMissingStartTags.stree.txt | 13 + .../Handles_IncompleteTags.cspans.txt | 8 + .../Handles_IncompleteTags.stree.txt | 38 + ...formedTags_RecoversSuccessfully.cspans.txt | 7 + ...lformedTags_RecoversSuccessfully.stree.txt | 26 + ...cedEndTags_RecoversSuccessfully.cspans.txt | 8 + ...acedEndTags_RecoversSuccessfully.stree.txt | 31 + .../Handles_SelfClosingTags.cspans.txt | 5 + .../Handles_SelfClosingTags.stree.txt | 23 + ...cialCasesVoidTags_WithNoEndTags.cspans.txt | 8 + ...ecialCasesVoidTags_WithNoEndTags.stree.txt | 27 + ...les_StartTagsWithMissingEndTags.cspans.txt | 7 + ...dles_StartTagsWithMissingEndTags.stree.txt | 34 + .../Handles_ValidNestedTags.cspans.txt | 8 + .../Handles_ValidNestedTags.stree.txt | 37 + ...es_ValidNestedTagsMixedWithCode.cspans.txt | 16 + ...les_ValidNestedTagsMixedWithCode.stree.txt | 67 + .../Handles_ValidTags.cspans.txt | 9 + .../Handles_ValidTags.stree.txt | 32 + ...RequiresDoubleQuotesAroundValue.cspans.txt | 6 + ...eRequiresDoubleQuotesAroundValue.stree.txt | 19 + ...ive_InvalidLookupText_AddsError.cspans.txt | 6 + ...tive_InvalidLookupText_AddsError.stree.txt | 18 + ...HelperDirective_NoValue_Invalid.cspans.txt | 6 + ...gHelperDirective_NoValue_Invalid.stree.txt | 18 + ...agHelperDirective_RequiresValue.cspans.txt | 6 + ...TagHelperDirective_RequiresValue.stree.txt | 18 + ...irective_SingleQuotes_AddsError.cspans.txt | 6 + ...Directive_SingleQuotes_AddsError.stree.txt | 18 + ...RequiresDoubleQuotesAroundValue.cspans.txt | 6 + ...eRequiresDoubleQuotesAroundValue.stree.txt | 18 + ...gHelperDirective_SupportsSpaces.cspans.txt | 6 + ...agHelperDirective_SupportsSpaces.stree.txt | 22 + ...tes_InvalidLookupText_AddsError.cspans.txt | 6 + ...otes_InvalidLookupText_AddsError.stree.txt | 18 + ...tStartOfLineBecauseOfWhitespace.cspans.txt | 7 + ...AtStartOfLineBecauseOfWhitespace.stree.txt | 20 + ...rectiveErrorsIfNotAtStartOfLine.cspans.txt | 6 + ...irectiveErrorsIfNotAtStartOfLine.stree.txt | 20 + ...eDescriptor_AllowsNullableTypes.cspans.txt | 16 + ...veDescriptor_AllowsNullableTypes.stree.txt | 80 + ...tiveDescriptor_AllowsTupleTypes.cspans.txt | 16 + ...ctiveDescriptor_AllowsTupleTypes.stree.txt | 164 + ...Types_IgnoresTrailingWhitespace.cspans.txt | 7 + ...eTypes_IgnoresTrailingWhitespace.stree.txt | 26 + ...or_AllowsWhiteSpaceAroundTokens.cspans.txt | 9 + ...tor_AllowsWhiteSpaceAroundTokens.stree.txt | 30 + ...dleEOFIncompleteNamespaceTokens.cspans.txt | 5 + ...ndleEOFIncompleteNamespaceTokens.stree.txt | 16 + ...HandleEOFInvalidNamespaceTokens.cspans.txt | 6 + ...nHandleEOFInvalidNamespaceTokens.stree.txt | 21 + ...HandleIncompleteNamespaceTokens.cspans.txt | 5 + ...nHandleIncompleteNamespaceTokens.stree.txt | 17 + ...CanHandleInvalidNamespaceTokens.cspans.txt | 6 + ..._CanHandleInvalidNamespaceTokens.stree.txt | 24 + ...rrorsExtraContentAfterDirective.cspans.txt | 7 + ...ErrorsExtraContentAfterDirective.stree.txt | 22 + ...or_ErrorsForInvalidMemberTokens.cspans.txt | 5 + ...tor_ErrorsForInvalidMemberTokens.stree.txt | 16 + ...henEOFBeforeDirectiveBlockStart.cspans.txt | 6 + ...WhenEOFBeforeDirectiveBlockStart.stree.txt | 18 + ...henExtraContentBeforeBlockStart.cspans.txt | 7 + ...WhenExtraContentBeforeBlockStart.stree.txt | 28 + ...iptor_ErrorsWhenMissingEndBrace.cspans.txt | 8 + ...riptor_ErrorsWhenMissingEndBrace.stree.txt | 25 + ...ipleOccurring_CanHaveDuplicates.cspans.txt | 12 + ...tipleOccurring_CanHaveDuplicates.stree.txt | 46 + ...nglyOccurring_ErrorsIfDuplicate.cspans.txt | 12 + ...inglyOccurring_ErrorsIfDuplicate.stree.txt | 46 + ...ped_CanBeBeneathOtherDirectives.cspans.txt | 12 + ...oped_CanBeBeneathOtherDirectives.stree.txt | 40 + ...WhiteSpaceCommentsAndDirectives.cspans.txt | 22 + ...rWhiteSpaceCommentsAndDirectives.stree.txt | 66 + ...NoErrorsSemicolonAfterDirective.cspans.txt | 9 + ..._NoErrorsSemicolonAfterDirective.stree.txt | 24 + ...en_ParserErrorForNonStringValue.cspans.txt | 5 + ...ken_ParserErrorForNonStringValue.stree.txt | 18 + ...arserErrorForPartialQuotedValue.cspans.txt | 5 + ...ParserErrorForPartialQuotedValue.stree.txt | 17 + ...ParserErrorForSingleQuotedValue.cspans.txt | 5 + ..._ParserErrorForSingleQuotedValue.stree.txt | 18 + ...ken_ParserErrorForUnquotedValue.cspans.txt | 5 + ...oken_ParserErrorForUnquotedValue.stree.txt | 16 + ...or_TokensMustBeSeparatedBySpace.cspans.txt | 6 + ...tor_TokensMustBeSeparatedBySpace.stree.txt | 20 + ...escriptor_UnderstandsCodeBlocks.cspans.txt | 10 + ...Descriptor_UnderstandsCodeBlocks.stree.txt | 37 + ...criptor_UnderstandsMemberTokens.cspans.txt | 6 + ...scriptor_UnderstandsMemberTokens.stree.txt | 18 + ...iptor_UnderstandsMultipleTokens.cspans.txt | 10 + ...riptor_UnderstandsMultipleTokens.stree.txt | 32 + ...scriptor_UnderstandsRazorBlocks.cspans.txt | 14 + ...escriptor_UnderstandsRazorBlocks.stree.txt | 45 + ...criptor_UnderstandsStringTokens.cspans.txt | 6 + ...scriptor_UnderstandsStringTokens.stree.txt | 18 + ...escriptor_UnderstandsTypeTokens.cspans.txt | 6 + ...Descriptor_UnderstandsTypeTokens.stree.txt | 24 + ...ctives_CanUseReservedWord_Class.cspans.txt | 4 + ...ectives_CanUseReservedWord_Class.stree.txt | 14 + ...es_CanUseReservedWord_Namespace.cspans.txt | 4 + ...ves_CanUseReservedWord_Namespace.stree.txt | 14 + ...ves_ReservedWordInsideCodeBlock.cspans.txt | 6 + ...ives_ReservedWordInsideCodeBlock.stree.txt | 20 + .../EmptyFunctionsDirective.cspans.txt | 8 + .../EmptyFunctionsDirective.stree.txt | 23 + ...tStartOfLineBecauseOfWhitespace.cspans.txt | 7 + ...AtStartOfLineBecauseOfWhitespace.stree.txt | 26 + ...rectiveErrorsIfNotAtStartOfLine.cspans.txt | 7 + ...irectiveErrorsIfNotAtStartOfLine.stree.txt | 27 + ...InheritsDirectiveSupportsArrays.cspans.txt | 6 + .../InheritsDirectiveSupportsArrays.stree.txt | 24 + ...DirectiveSupportsNestedGenerics.cspans.txt | 6 + ...sDirectiveSupportsNestedGenerics.stree.txt | 34 + ...tsDirectiveSupportsTypeKeywords.cspans.txt | 6 + ...itsDirectiveSupportsTypeKeywords.stree.txt | 18 + ...ionalDirectiveTokens_AreSkipped.cspans.txt | 5 + ...tionalDirectiveTokens_AreSkipped.stree.txt | 16 + ...tiveTokens_WithBraces_AreParsed.cspans.txt | 6 + ...ctiveTokens_WithBraces_AreParsed.stree.txt | 18 + ...ultipleOptionalTokens_AreParsed.cspans.txt | 8 + ...MultipleOptionalTokens_AreParsed.stree.txt | 24 + ...kens_WithSimpleTokens_AreParsed.cspans.txt | 6 + ...okens_WithSimpleTokens_AreParsed.stree.txt | 18 + ...ns_WithMemberSpecified_IsParsed.cspans.txt | 6 + ...ens_WithMemberSpecified_IsParsed.stree.txt | 18 + ...kens_WithMissingMember_IsParsed.cspans.txt | 6 + ...okens_WithMissingMember_IsParsed.stree.txt | 18 + .../Parse_FunctionsDirective.cspans.txt | 8 + .../Parse_FunctionsDirective.stree.txt | 33 + .../Parse_SectionDirective.cspans.txt | 14 + .../Parse_SectionDirective.stree.txt | 45 + ...ctiveToken_WithMultipleSegments.cspans.txt | 6 + ...ectiveToken_WithMultipleSegments.stree.txt | 22 + ...irectiveToken_WithSingleSegment.cspans.txt | 6 + ...DirectiveToken_WithSingleSegment.stree.txt | 18 + ...RequiresDoubleQuotesAroundValue.cspans.txt | 6 + ...eRequiresDoubleQuotesAroundValue.stree.txt | 19 + ...ive_InvalidLookupText_AddsError.cspans.txt | 6 + ...tive_InvalidLookupText_AddsError.stree.txt | 18 + ...HelperDirective_NoValue_Invalid.cspans.txt | 6 + ...gHelperDirective_NoValue_Invalid.stree.txt | 18 + ...agHelperDirective_RequiresValue.cspans.txt | 6 + ...TagHelperDirective_RequiresValue.stree.txt | 18 + ...irective_SingleQuotes_AddsError.cspans.txt | 6 + ...Directive_SingleQuotes_AddsError.stree.txt | 18 + ...RequiresDoubleQuotesAroundValue.cspans.txt | 6 + ...eRequiresDoubleQuotesAroundValue.stree.txt | 18 + ...gHelperDirective_SupportsSpaces.cspans.txt | 6 + ...agHelperDirective_SupportsSpaces.stree.txt | 22 + ...tes_InvalidLookupText_AddsError.cspans.txt | 6 + ...otes_InvalidLookupText_AddsError.stree.txt | 18 + ...RequiresDoubleQuotesAroundValue.cspans.txt | 6 + ...eRequiresDoubleQuotesAroundValue.stree.txt | 20 + ...PrefixDirective_NoValueSucceeds.cspans.txt | 6 + ...rPrefixDirective_NoValueSucceeds.stree.txt | 18 + ...erPrefixDirective_RequiresValue.cspans.txt | 6 + ...perPrefixDirective_RequiresValue.stree.txt | 18 + ...RequiresDoubleQuotesAroundValue.cspans.txt | 6 + ...eRequiresDoubleQuotesAroundValue.stree.txt | 18 + ...gHelperPrefixDirective_Succeeds.cspans.txt | 6 + ...agHelperPrefixDirective_Succeeds.stree.txt | 18 + ...ixDirective_WithQuotes_Succeeds.cspans.txt | 6 + ...fixDirective_WithQuotes_Succeeds.stree.txt | 18 + .../AllowsCompatibleTagStructures1.cspans.txt | 0 .../AllowsCompatibleTagStructures1.stree.txt | 12 + .../AllowsCompatibleTagStructures1.tspans.txt | 1 + .../AllowsCompatibleTagStructures2.cspans.txt | 0 .../AllowsCompatibleTagStructures2.stree.txt | 11 + .../AllowsCompatibleTagStructures2.tspans.txt | 1 + .../AllowsCompatibleTagStructures3.cspans.txt | 1 + .../AllowsCompatibleTagStructures3.stree.txt | 21 + .../AllowsCompatibleTagStructures3.tspans.txt | 1 + .../AllowsCompatibleTagStructures4.cspans.txt | 0 .../AllowsCompatibleTagStructures4.stree.txt | 12 + .../AllowsCompatibleTagStructures4.tspans.txt | 2 + .../AllowsCompatibleTagStructures5.cspans.txt | 1 + .../AllowsCompatibleTagStructures5.stree.txt | 26 + .../AllowsCompatibleTagStructures5.tspans.txt | 1 + .../AllowsCompatibleTagStructures6.cspans.txt | 0 .../AllowsCompatibleTagStructures6.stree.txt | 11 + .../AllowsCompatibleTagStructures6.tspans.txt | 1 + .../AllowsCompatibleTagStructures7.cspans.txt | 0 .../AllowsCompatibleTagStructures7.stree.txt | 11 + .../AllowsCompatibleTagStructures7.tspans.txt | 1 + .../AllowsCompatibleTagStructures8.cspans.txt | 1 + .../AllowsCompatibleTagStructures8.stree.txt | 13 + .../AllowsCompatibleTagStructures8.tspans.txt | 1 + ...CanHandleSymbolBoundAttributes1.cspans.txt | 1 + .../CanHandleSymbolBoundAttributes1.diag.txt | 5 + .../CanHandleSymbolBoundAttributes1.stree.txt | 32 + ...CanHandleSymbolBoundAttributes1.tspans.txt | 1 + ...CanHandleSymbolBoundAttributes2.cspans.txt | 1 + .../CanHandleSymbolBoundAttributes2.diag.txt | 5 + .../CanHandleSymbolBoundAttributes2.stree.txt | 32 + ...CanHandleSymbolBoundAttributes2.tspans.txt | 1 + ...CanHandleSymbolBoundAttributes3.cspans.txt | 2 + .../CanHandleSymbolBoundAttributes3.diag.txt | 5 + .../CanHandleSymbolBoundAttributes3.stree.txt | 34 + ...CanHandleSymbolBoundAttributes3.tspans.txt | 1 + ...CanHandleSymbolBoundAttributes4.cspans.txt | 2 + .../CanHandleSymbolBoundAttributes4.diag.txt | 5 + .../CanHandleSymbolBoundAttributes4.stree.txt | 34 + ...CanHandleSymbolBoundAttributes4.tspans.txt | 1 + ...CanHandleSymbolBoundAttributes5.cspans.txt | 1 + .../CanHandleSymbolBoundAttributes5.diag.txt | 5 + .../CanHandleSymbolBoundAttributes5.stree.txt | 30 + ...CanHandleSymbolBoundAttributes5.tspans.txt | 1 + ...CanHandleSymbolBoundAttributes6.cspans.txt | 0 .../CanHandleSymbolBoundAttributes6.diag.txt | 5 + .../CanHandleSymbolBoundAttributes6.stree.txt | 22 + ...CanHandleSymbolBoundAttributes6.tspans.txt | 1 + ...CanHandleSymbolBoundAttributes7.cspans.txt | 1 + .../CanHandleSymbolBoundAttributes7.diag.txt | 5 + .../CanHandleSymbolBoundAttributes7.stree.txt | 30 + ...CanHandleSymbolBoundAttributes7.tspans.txt | 1 + ...andleWithoutEndTagTagStructure1.cspans.txt | 0 ...HandleWithoutEndTagTagStructure1.stree.txt | 7 + ...andleWithoutEndTagTagStructure1.tspans.txt | 1 + ...andleWithoutEndTagTagStructure2.cspans.txt | 1 + ...HandleWithoutEndTagTagStructure2.stree.txt | 21 + ...andleWithoutEndTagTagStructure2.tspans.txt | 1 + ...andleWithoutEndTagTagStructure3.cspans.txt | 0 ...HandleWithoutEndTagTagStructure3.stree.txt | 12 + ...andleWithoutEndTagTagStructure3.tspans.txt | 2 + ...andleWithoutEndTagTagStructure4.cspans.txt | 1 + ...HandleWithoutEndTagTagStructure4.stree.txt | 26 + ...andleWithoutEndTagTagStructure4.tspans.txt | 2 + ...andleWithoutEndTagTagStructure5.cspans.txt | 2 + ...HandleWithoutEndTagTagStructure5.stree.txt | 22 + ...andleWithoutEndTagTagStructure5.tspans.txt | 2 + ...rEmptyTagHelperBoundAttributes1.cspans.txt | 1 + ...ForEmptyTagHelperBoundAttributes1.diag.txt | 1 + ...orEmptyTagHelperBoundAttributes1.stree.txt | 23 + ...rEmptyTagHelperBoundAttributes1.tspans.txt | 1 + ...EmptyTagHelperBoundAttributes10.cspans.txt | 1 + ...orEmptyTagHelperBoundAttributes10.diag.txt | 1 + ...rEmptyTagHelperBoundAttributes10.stree.txt | 23 + ...EmptyTagHelperBoundAttributes10.tspans.txt | 1 + ...EmptyTagHelperBoundAttributes11.cspans.txt | 2 + ...orEmptyTagHelperBoundAttributes11.diag.txt | 2 + ...rEmptyTagHelperBoundAttributes11.stree.txt | 35 + ...EmptyTagHelperBoundAttributes11.tspans.txt | 1 + ...EmptyTagHelperBoundAttributes12.cspans.txt | 2 + ...orEmptyTagHelperBoundAttributes12.diag.txt | 1 + ...rEmptyTagHelperBoundAttributes12.stree.txt | 33 + ...EmptyTagHelperBoundAttributes12.tspans.txt | 1 + ...EmptyTagHelperBoundAttributes13.cspans.txt | 4 + ...rEmptyTagHelperBoundAttributes13.stree.txt | 37 + ...EmptyTagHelperBoundAttributes13.tspans.txt | 1 + ...EmptyTagHelperBoundAttributes14.cspans.txt | 6 + ...rEmptyTagHelperBoundAttributes14.stree.txt | 41 + ...EmptyTagHelperBoundAttributes14.tspans.txt | 1 + ...rEmptyTagHelperBoundAttributes2.cspans.txt | 1 + ...orEmptyTagHelperBoundAttributes2.stree.txt | 25 + ...rEmptyTagHelperBoundAttributes2.tspans.txt | 1 + ...rEmptyTagHelperBoundAttributes3.cspans.txt | 1 + ...ForEmptyTagHelperBoundAttributes3.diag.txt | 1 + ...orEmptyTagHelperBoundAttributes3.stree.txt | 24 + ...rEmptyTagHelperBoundAttributes3.tspans.txt | 1 + ...rEmptyTagHelperBoundAttributes4.cspans.txt | 2 + ...ForEmptyTagHelperBoundAttributes4.diag.txt | 2 + ...orEmptyTagHelperBoundAttributes4.stree.txt | 35 + ...rEmptyTagHelperBoundAttributes4.tspans.txt | 1 + ...rEmptyTagHelperBoundAttributes5.cspans.txt | 2 + ...ForEmptyTagHelperBoundAttributes5.diag.txt | 2 + ...orEmptyTagHelperBoundAttributes5.stree.txt | 37 + ...rEmptyTagHelperBoundAttributes5.tspans.txt | 1 + ...rEmptyTagHelperBoundAttributes6.cspans.txt | 2 + ...ForEmptyTagHelperBoundAttributes6.diag.txt | 1 + ...orEmptyTagHelperBoundAttributes6.stree.txt | 32 + ...rEmptyTagHelperBoundAttributes6.tspans.txt | 1 + ...rEmptyTagHelperBoundAttributes7.cspans.txt | 2 + ...ForEmptyTagHelperBoundAttributes7.diag.txt | 1 + ...orEmptyTagHelperBoundAttributes7.stree.txt | 31 + ...rEmptyTagHelperBoundAttributes7.tspans.txt | 1 + ...rEmptyTagHelperBoundAttributes8.cspans.txt | 2 + ...ForEmptyTagHelperBoundAttributes8.diag.txt | 1 + ...orEmptyTagHelperBoundAttributes8.stree.txt | 32 + ...rEmptyTagHelperBoundAttributes8.tspans.txt | 1 + ...rEmptyTagHelperBoundAttributes9.cspans.txt | 4 + ...ForEmptyTagHelperBoundAttributes9.diag.txt | 1 + ...orEmptyTagHelperBoundAttributes9.stree.txt | 53 + ...rEmptyTagHelperBoundAttributes9.tspans.txt | 1 + ...atesErrorForMalformedTagHelper1.cspans.txt | 0 ...reatesErrorForMalformedTagHelper1.diag.txt | 2 + ...eatesErrorForMalformedTagHelper1.stree.txt | 7 + ...atesErrorForMalformedTagHelper1.tspans.txt | 1 + ...atesErrorForMalformedTagHelper2.cspans.txt | 0 ...reatesErrorForMalformedTagHelper2.diag.txt | 1 + ...eatesErrorForMalformedTagHelper2.stree.txt | 12 + ...atesErrorForMalformedTagHelper2.tspans.txt | 1 + ...atesErrorForMalformedTagHelper3.cspans.txt | 0 ...reatesErrorForMalformedTagHelper3.diag.txt | 3 + ...eatesErrorForMalformedTagHelper3.stree.txt | 12 + ...atesErrorForMalformedTagHelper3.tspans.txt | 2 + ...atesErrorForMalformedTagHelper4.cspans.txt | 0 ...reatesErrorForMalformedTagHelper4.diag.txt | 3 + ...eatesErrorForMalformedTagHelper4.stree.txt | 15 + ...atesErrorForMalformedTagHelper4.tspans.txt | 2 + ...atesErrorForMalformedTagHelper5.cspans.txt | 0 ...reatesErrorForMalformedTagHelper5.diag.txt | 2 + ...eatesErrorForMalformedTagHelper5.stree.txt | 15 + ...atesErrorForMalformedTagHelper5.tspans.txt | 1 + ...atesErrorForMalformedTagHelper6.cspans.txt | 5 + ...reatesErrorForMalformedTagHelper6.diag.txt | 2 + ...eatesErrorForMalformedTagHelper6.stree.txt | 30 + ...atesErrorForMalformedTagHelper6.tspans.txt | 1 + ...atesErrorForMalformedTagHelper7.cspans.txt | 6 + ...reatesErrorForMalformedTagHelper7.diag.txt | 1 + ...eatesErrorForMalformedTagHelper7.stree.txt | 32 + ...atesErrorForMalformedTagHelper7.tspans.txt | 1 + ...atesErrorForMalformedTagHelper8.cspans.txt | 2 + ...reatesErrorForMalformedTagHelper8.diag.txt | 1 + ...eatesErrorForMalformedTagHelper8.stree.txt | 23 + ...atesErrorForMalformedTagHelper8.tspans.txt | 1 + ...formedTagHelpersWithAttributes1.cspans.txt | 1 + ...alformedTagHelpersWithAttributes1.diag.txt | 2 + ...lformedTagHelpersWithAttributes1.stree.txt | 17 + ...formedTagHelpersWithAttributes1.tspans.txt | 1 + ...ormedTagHelpersWithAttributes10.cspans.txt | 1 + ...lformedTagHelpersWithAttributes10.diag.txt | 3 + ...formedTagHelpersWithAttributes10.stree.txt | 29 + ...ormedTagHelpersWithAttributes10.tspans.txt | 1 + ...ormedTagHelpersWithAttributes11.cspans.txt | 2 + ...lformedTagHelpersWithAttributes11.diag.txt | 3 + ...formedTagHelpersWithAttributes11.stree.txt | 36 + ...ormedTagHelpersWithAttributes11.tspans.txt | 2 + ...ormedTagHelpersWithAttributes12.cspans.txt | 2 + ...formedTagHelpersWithAttributes12.stree.txt | 36 + ...ormedTagHelpersWithAttributes12.tspans.txt | 1 + ...ormedTagHelpersWithAttributes13.cspans.txt | 0 ...lformedTagHelpersWithAttributes13.diag.txt | 1 + ...formedTagHelpersWithAttributes13.stree.txt | 32 + ...ormedTagHelpersWithAttributes13.tspans.txt | 1 + ...ormedTagHelpersWithAttributes14.cspans.txt | 0 ...lformedTagHelpersWithAttributes14.diag.txt | 1 + ...formedTagHelpersWithAttributes14.stree.txt | 30 + ...ormedTagHelpersWithAttributes14.tspans.txt | 1 + ...ormedTagHelpersWithAttributes15.cspans.txt | 2 + ...lformedTagHelpersWithAttributes15.diag.txt | 3 + ...formedTagHelpersWithAttributes15.stree.txt | 34 + ...ormedTagHelpersWithAttributes15.tspans.txt | 1 + ...ormedTagHelpersWithAttributes16.cspans.txt | 2 + ...lformedTagHelpersWithAttributes16.diag.txt | 3 + ...formedTagHelpersWithAttributes16.stree.txt | 25 + ...ormedTagHelpersWithAttributes16.tspans.txt | 1 + ...ormedTagHelpersWithAttributes17.cspans.txt | 2 + ...lformedTagHelpersWithAttributes17.diag.txt | 4 + ...formedTagHelpersWithAttributes17.stree.txt | 26 + ...ormedTagHelpersWithAttributes17.tspans.txt | 1 + ...ormedTagHelpersWithAttributes18.cspans.txt | 0 ...lformedTagHelpersWithAttributes18.diag.txt | 5 + ...formedTagHelpersWithAttributes18.stree.txt | 31 + ...ormedTagHelpersWithAttributes18.tspans.txt | 1 + ...ormedTagHelpersWithAttributes19.cspans.txt | 1 + ...lformedTagHelpersWithAttributes19.diag.txt | 1 + ...formedTagHelpersWithAttributes19.stree.txt | 40 + ...ormedTagHelpersWithAttributes19.tspans.txt | 1 + ...formedTagHelpersWithAttributes2.cspans.txt | 1 + ...alformedTagHelpersWithAttributes2.diag.txt | 3 + ...lformedTagHelpersWithAttributes2.stree.txt | 28 + ...formedTagHelpersWithAttributes2.tspans.txt | 1 + ...ormedTagHelpersWithAttributes20.cspans.txt | 11 + ...lformedTagHelpersWithAttributes20.diag.txt | 12 + ...formedTagHelpersWithAttributes20.stree.txt | 67 + ...ormedTagHelpersWithAttributes20.tspans.txt | 1 + ...formedTagHelpersWithAttributes3.cspans.txt | 2 + ...alformedTagHelpersWithAttributes3.diag.txt | 2 + ...lformedTagHelpersWithAttributes3.stree.txt | 26 + ...formedTagHelpersWithAttributes3.tspans.txt | 1 + ...formedTagHelpersWithAttributes4.cspans.txt | 2 + ...alformedTagHelpersWithAttributes4.diag.txt | 2 + ...lformedTagHelpersWithAttributes4.stree.txt | 27 + ...formedTagHelpersWithAttributes4.tspans.txt | 1 + ...formedTagHelpersWithAttributes5.cspans.txt | 1 + ...alformedTagHelpersWithAttributes5.diag.txt | 3 + ...lformedTagHelpersWithAttributes5.stree.txt | 20 + ...formedTagHelpersWithAttributes5.tspans.txt | 1 + ...formedTagHelpersWithAttributes6.cspans.txt | 1 + ...alformedTagHelpersWithAttributes6.diag.txt | 2 + ...lformedTagHelpersWithAttributes6.stree.txt | 20 + ...formedTagHelpersWithAttributes6.tspans.txt | 1 + ...formedTagHelpersWithAttributes7.cspans.txt | 2 + ...alformedTagHelpersWithAttributes7.diag.txt | 2 + ...lformedTagHelpersWithAttributes7.stree.txt | 29 + ...formedTagHelpersWithAttributes7.tspans.txt | 1 + ...formedTagHelpersWithAttributes8.cspans.txt | 0 ...alformedTagHelpersWithAttributes8.diag.txt | 3 + ...lformedTagHelpersWithAttributes8.stree.txt | 22 + ...formedTagHelpersWithAttributes8.tspans.txt | 2 + ...formedTagHelpersWithAttributes9.cspans.txt | 1 + ...alformedTagHelpersWithAttributes9.diag.txt | 3 + ...lformedTagHelpersWithAttributes9.stree.txt | 25 + ...formedTagHelpersWithAttributes9.tspans.txt | 1 + ...orNonStringTagHelperAttributes1.cspans.txt | 1 + ...ForNonStringTagHelperAttributes1.stree.txt | 24 + ...orNonStringTagHelperAttributes1.tspans.txt | 1 + ...rNonStringTagHelperAttributes10.cspans.txt | 5 + ...orNonStringTagHelperAttributes10.stree.txt | 55 + ...rNonStringTagHelperAttributes10.tspans.txt | 1 + ...rNonStringTagHelperAttributes11.cspans.txt | 12 + ...orNonStringTagHelperAttributes11.stree.txt | 85 + ...rNonStringTagHelperAttributes11.tspans.txt | 1 + ...rNonStringTagHelperAttributes12.cspans.txt | 4 + ...orNonStringTagHelperAttributes12.stree.txt | 47 + ...rNonStringTagHelperAttributes12.tspans.txt | 1 + ...orNonStringTagHelperAttributes2.cspans.txt | 1 + ...ForNonStringTagHelperAttributes2.stree.txt | 24 + ...orNonStringTagHelperAttributes2.tspans.txt | 1 + ...orNonStringTagHelperAttributes3.cspans.txt | 2 + ...ForNonStringTagHelperAttributes3.stree.txt | 35 + ...orNonStringTagHelperAttributes3.tspans.txt | 1 + ...orNonStringTagHelperAttributes4.cspans.txt | 3 + ...ForNonStringTagHelperAttributes4.stree.txt | 39 + ...orNonStringTagHelperAttributes4.tspans.txt | 1 + ...orNonStringTagHelperAttributes5.cspans.txt | 1 + ...ForNonStringTagHelperAttributes5.stree.txt | 24 + ...orNonStringTagHelperAttributes5.tspans.txt | 1 + ...orNonStringTagHelperAttributes6.cspans.txt | 4 + ...ForNonStringTagHelperAttributes6.stree.txt | 37 + ...orNonStringTagHelperAttributes6.tspans.txt | 1 + ...orNonStringTagHelperAttributes7.cspans.txt | 18 + ...ForNonStringTagHelperAttributes7.stree.txt | 99 + ...orNonStringTagHelperAttributes7.tspans.txt | 1 + ...orNonStringTagHelperAttributes8.cspans.txt | 6 + ...ForNonStringTagHelperAttributes8.stree.txt | 63 + ...orNonStringTagHelperAttributes8.tspans.txt | 1 + ...orNonStringTagHelperAttributes9.cspans.txt | 8 + ...ForNonStringTagHelperAttributes9.stree.txt | 69 + ...orNonStringTagHelperAttributes9.tspans.txt | 1 + ...MinimizedBooleanBoundAttributes.cspans.txt | 0 ...orMinimizedBooleanBoundAttributes.diag.txt | 2 + ...rMinimizedBooleanBoundAttributes.stree.txt | 21 + ...MinimizedBooleanBoundAttributes.tspans.txt | 1 + ...nboundDataDashAttributes_Block1.cspans.txt | 8 + ...UnboundDataDashAttributes_Block1.stree.txt | 49 + ...nboundDataDashAttributes_Block1.tspans.txt | 1 + ...nboundDataDashAttributes_Block2.cspans.txt | 7 + ...UnboundDataDashAttributes_Block2.stree.txt | 41 + ...nboundDataDashAttributes_Block2.tspans.txt | 1 + ...nboundDataDashAttributes_Block3.cspans.txt | 9 + ...UnboundDataDashAttributes_Block3.stree.txt | 52 + ...nboundDataDashAttributes_Block3.tspans.txt | 1 + ...nboundDataDashAttributes_Block4.cspans.txt | 9 + ...UnboundDataDashAttributes_Block4.stree.txt | 52 + ...nboundDataDashAttributes_Block4.tspans.txt | 1 + ...nboundDataDashAttributes_Block5.cspans.txt | 10 + ...UnboundDataDashAttributes_Block5.stree.txt | 55 + ...nboundDataDashAttributes_Block5.tspans.txt | 1 + ...nboundDataDashAttributes_Block6.cspans.txt | 10 + ...UnboundDataDashAttributes_Block6.stree.txt | 65 + ...nboundDataDashAttributes_Block6.tspans.txt | 1 + ...nboundDataDashAttributes_Block7.cspans.txt | 11 + ...UnboundDataDashAttributes_Block7.stree.txt | 63 + ...nboundDataDashAttributes_Block7.tspans.txt | 1 + ...undDataDashAttributes_Document1.cspans.txt | 2 + ...oundDataDashAttributes_Document1.stree.txt | 32 + ...undDataDashAttributes_Document1.tspans.txt | 1 + ...undDataDashAttributes_Document2.cspans.txt | 1 + ...oundDataDashAttributes_Document2.stree.txt | 24 + ...undDataDashAttributes_Document2.tspans.txt | 1 + ...undDataDashAttributes_Document3.cspans.txt | 3 + ...oundDataDashAttributes_Document3.stree.txt | 35 + ...undDataDashAttributes_Document3.tspans.txt | 1 + ...undDataDashAttributes_Document4.cspans.txt | 3 + ...oundDataDashAttributes_Document4.stree.txt | 35 + ...undDataDashAttributes_Document4.tspans.txt | 1 + ...undDataDashAttributes_Document5.cspans.txt | 4 + ...oundDataDashAttributes_Document5.stree.txt | 38 + ...undDataDashAttributes_Document5.tspans.txt | 1 + ...undDataDashAttributes_Document6.cspans.txt | 4 + ...oundDataDashAttributes_Document6.stree.txt | 48 + ...undDataDashAttributes_Document6.tspans.txt | 1 + ...undDataDashAttributes_Document7.cspans.txt | 5 + ...oundDataDashAttributes_Document7.stree.txt | 46 + ...undDataDashAttributes_Document7.tspans.txt | 1 + ...TreeRewriter_AllowsInvalidHtml1.cspans.txt | 3 + ...eTreeRewriter_AllowsInvalidHtml1.stree.txt | 25 + ...TreeRewriter_AllowsInvalidHtml1.tspans.txt | 1 + ...reeRewriter_AllowsInvalidHtml10.cspans.txt | 8 + ...TreeRewriter_AllowsInvalidHtml10.stree.txt | 53 + ...reeRewriter_AllowsInvalidHtml10.tspans.txt | 1 + ...TreeRewriter_AllowsInvalidHtml2.cspans.txt | 1 + ...eTreeRewriter_AllowsInvalidHtml2.stree.txt | 16 + ...TreeRewriter_AllowsInvalidHtml2.tspans.txt | 1 + ...TreeRewriter_AllowsInvalidHtml3.cspans.txt | 3 + ...eTreeRewriter_AllowsInvalidHtml3.stree.txt | 16 + ...TreeRewriter_AllowsInvalidHtml4.cspans.txt | 1 + ...eTreeRewriter_AllowsInvalidHtml4.stree.txt | 19 + ...TreeRewriter_AllowsInvalidHtml4.tspans.txt | 1 + ...TreeRewriter_AllowsInvalidHtml5.cspans.txt | 5 + ...eTreeRewriter_AllowsInvalidHtml5.stree.txt | 33 + ...TreeRewriter_AllowsInvalidHtml5.tspans.txt | 1 + ...TreeRewriter_AllowsInvalidHtml6.cspans.txt | 4 + ...eTreeRewriter_AllowsInvalidHtml6.stree.txt | 28 + ...TreeRewriter_AllowsInvalidHtml6.tspans.txt | 1 + ...TreeRewriter_AllowsInvalidHtml7.cspans.txt | 5 + ...eTreeRewriter_AllowsInvalidHtml7.stree.txt | 33 + ...TreeRewriter_AllowsInvalidHtml7.tspans.txt | 1 + ...TreeRewriter_AllowsInvalidHtml8.cspans.txt | 7 + ...eTreeRewriter_AllowsInvalidHtml8.stree.txt | 43 + ...TreeRewriter_AllowsInvalidHtml8.tspans.txt | 1 + ...TreeRewriter_AllowsInvalidHtml9.cspans.txt | 8 + ...eTreeRewriter_AllowsInvalidHtml9.stree.txt | 59 + ...TreeRewriter_AllowsInvalidHtml9.tspans.txt | 1 + ...tesErrorForIncompleteTagHelper1.cspans.txt | 5 + ...eatesErrorForIncompleteTagHelper1.diag.txt | 2 + ...atesErrorForIncompleteTagHelper1.stree.txt | 62 + ...tesErrorForIncompleteTagHelper1.tspans.txt | 2 + ...tesErrorForIncompleteTagHelper2.cspans.txt | 4 + ...eatesErrorForIncompleteTagHelper2.diag.txt | 1 + ...atesErrorForIncompleteTagHelper2.stree.txt | 32 + ...tesErrorForIncompleteTagHelper2.tspans.txt | 2 + ...tesErrorForIncompleteTagHelper3.cspans.txt | 4 + ...eatesErrorForIncompleteTagHelper3.diag.txt | 2 + ...atesErrorForIncompleteTagHelper3.stree.txt | 27 + ...tesErrorForIncompleteTagHelper3.tspans.txt | 2 + ...tesErrorForIncompleteTagHelper4.cspans.txt | 4 + ...eatesErrorForIncompleteTagHelper4.diag.txt | 1 + ...atesErrorForIncompleteTagHelper4.stree.txt | 50 + ...tesErrorForIncompleteTagHelper4.tspans.txt | 2 + ...lexAttributeTagHelperTagBlocks1.cspans.txt | 4 + ...plexAttributeTagHelperTagBlocks1.stree.txt | 58 + ...lexAttributeTagHelperTagBlocks1.tspans.txt | 1 + ...lexAttributeTagHelperTagBlocks2.cspans.txt | 12 + ...plexAttributeTagHelperTagBlocks2.stree.txt | 132 + ...lexAttributeTagHelperTagBlocks2.tspans.txt | 1 + ...lexAttributeTagHelperTagBlocks3.cspans.txt | 5 + ...plexAttributeTagHelperTagBlocks3.stree.txt | 62 + ...lexAttributeTagHelperTagBlocks3.tspans.txt | 1 + ...lexAttributeTagHelperTagBlocks4.cspans.txt | 13 + ...plexAttributeTagHelperTagBlocks4.stree.txt | 136 + ...lexAttributeTagHelperTagBlocks4.tspans.txt | 1 + ...lexAttributeTagHelperTagBlocks5.cspans.txt | 7 + ...plexAttributeTagHelperTagBlocks5.stree.txt | 74 + ...lexAttributeTagHelperTagBlocks5.tspans.txt | 2 + ...lexAttributeTagHelperTagBlocks6.cspans.txt | 15 + ...plexAttributeTagHelperTagBlocks6.stree.txt | 148 + ...lexAttributeTagHelperTagBlocks6.tspans.txt | 2 + ...lexAttributeTagHelperTagBlocks7.cspans.txt | 13 + ...plexAttributeTagHelperTagBlocks7.stree.txt | 104 + ...lexAttributeTagHelperTagBlocks7.tspans.txt | 1 + ...ritesComplexTagHelperTagBlocks1.cspans.txt | 2 + ...writesComplexTagHelperTagBlocks1.stree.txt | 22 + ...ritesComplexTagHelperTagBlocks1.tspans.txt | 1 + ...ritesComplexTagHelperTagBlocks2.cspans.txt | 6 + ...writesComplexTagHelperTagBlocks2.stree.txt | 61 + ...ritesComplexTagHelperTagBlocks2.tspans.txt | 2 + ...ritesComplexTagHelperTagBlocks3.cspans.txt | 3 + ...writesComplexTagHelperTagBlocks3.stree.txt | 27 + ...ritesComplexTagHelperTagBlocks3.tspans.txt | 1 + ...ritesComplexTagHelperTagBlocks4.cspans.txt | 7 + ...writesComplexTagHelperTagBlocks4.stree.txt | 66 + ...ritesComplexTagHelperTagBlocks4.tspans.txt | 2 + ...ritesComplexTagHelperTagBlocks5.cspans.txt | 5 + ...writesComplexTagHelperTagBlocks5.stree.txt | 44 + ...ritesComplexTagHelperTagBlocks5.tspans.txt | 2 + ...ritesComplexTagHelperTagBlocks6.cspans.txt | 13 + ...writesComplexTagHelperTagBlocks6.stree.txt | 122 + ...ritesComplexTagHelperTagBlocks6.tspans.txt | 4 + ...ritesComplexTagHelperTagBlocks7.cspans.txt | 9 + ...writesComplexTagHelperTagBlocks7.stree.txt | 55 + ...ritesComplexTagHelperTagBlocks7.tspans.txt | 1 + ...ritesComplexTagHelperTagBlocks8.cspans.txt | 17 + ...writesComplexTagHelperTagBlocks8.stree.txt | 133 + ...ritesComplexTagHelperTagBlocks8.tspans.txt | 3 + ...sOddlySpacedTagHelperTagBlocks1.cspans.txt | 6 + ...esOddlySpacedTagHelperTagBlocks1.stree.txt | 65 + ...sOddlySpacedTagHelperTagBlocks1.tspans.txt | 1 + ...sOddlySpacedTagHelperTagBlocks2.cspans.txt | 7 + ...esOddlySpacedTagHelperTagBlocks2.stree.txt | 69 + ...sOddlySpacedTagHelperTagBlocks2.tspans.txt | 1 + ...sOddlySpacedTagHelperTagBlocks3.cspans.txt | 7 + ...esOddlySpacedTagHelperTagBlocks3.stree.txt | 72 + ...sOddlySpacedTagHelperTagBlocks3.tspans.txt | 2 + ...ewritesPlainTagHelperTagBlocks1.cspans.txt | 0 ...RewritesPlainTagHelperTagBlocks1.stree.txt | 12 + ...ewritesPlainTagHelperTagBlocks1.tspans.txt | 1 + ...ewritesPlainTagHelperTagBlocks2.cspans.txt | 1 + ...RewritesPlainTagHelperTagBlocks2.stree.txt | 16 + ...ewritesPlainTagHelperTagBlocks2.tspans.txt | 1 + ...ewritesPlainTagHelperTagBlocks3.cspans.txt | 3 + ...RewritesPlainTagHelperTagBlocks3.stree.txt | 28 + ...ewritesPlainTagHelperTagBlocks3.tspans.txt | 2 + ...ewritesPlainTagHelperTagBlocks4.cspans.txt | 4 + ...RewritesPlainTagHelperTagBlocks4.stree.txt | 35 + ...ewritesPlainTagHelperTagBlocks4.tspans.txt | 1 + ...riter_RewritesScriptTagHelpers1.cspans.txt | 1 + ...writer_RewritesScriptTagHelpers1.stree.txt | 20 + ...riter_RewritesScriptTagHelpers1.tspans.txt | 1 + ...riter_RewritesScriptTagHelpers2.cspans.txt | 1 + ...writer_RewritesScriptTagHelpers2.stree.txt | 24 + ...riter_RewritesScriptTagHelpers2.tspans.txt | 1 + ...riter_RewritesScriptTagHelpers3.cspans.txt | 3 + ...writer_RewritesScriptTagHelpers3.stree.txt | 46 + ...riter_RewritesScriptTagHelpers3.tspans.txt | 3 + ...riter_RewritesScriptTagHelpers4.cspans.txt | 3 + ...writer_RewritesScriptTagHelpers4.stree.txt | 43 + ...riter_RewritesScriptTagHelpers4.tspans.txt | 2 + ...riter_RewritesScriptTagHelpers5.cspans.txt | 2 + ...writer_RewritesScriptTagHelpers5.stree.txt | 39 + ...riter_RewritesScriptTagHelpers5.tspans.txt | 1 + ...riter_RewritesScriptTagHelpers6.cspans.txt | 4 + ...writer_RewritesScriptTagHelpers6.stree.txt | 56 + ...riter_RewritesScriptTagHelpers6.tspans.txt | 2 + ...riter_RewritesScriptTagHelpers7.cspans.txt | 6 + ...writer_RewritesScriptTagHelpers7.stree.txt | 61 + ...riter_RewritesScriptTagHelpers7.tspans.txt | 2 + ..._RewritesSelfClosingTagHelpers1.cspans.txt | 2 + ...r_RewritesSelfClosingTagHelpers1.stree.txt | 39 + ..._RewritesSelfClosingTagHelpers1.tspans.txt | 1 + ..._RewritesSelfClosingTagHelpers2.cspans.txt | 4 + ...r_RewritesSelfClosingTagHelpers2.stree.txt | 55 + ..._RewritesSelfClosingTagHelpers2.tspans.txt | 2 + ..._RewritesSelfClosingTagHelpers3.cspans.txt | 5 + ...r_RewritesSelfClosingTagHelpers3.stree.txt | 54 + ..._RewritesSelfClosingTagHelpers3.tspans.txt | 2 + ...sTagHelpersWithPlainAttributes1.cspans.txt | 2 + ...esTagHelpersWithPlainAttributes1.stree.txt | 40 + ...sTagHelpersWithPlainAttributes1.tspans.txt | 1 + ...sTagHelpersWithPlainAttributes2.cspans.txt | 3 + ...esTagHelpersWithPlainAttributes2.stree.txt | 44 + ...sTagHelpersWithPlainAttributes2.tspans.txt | 1 + ...sTagHelpersWithPlainAttributes3.cspans.txt | 5 + ...esTagHelpersWithPlainAttributes3.stree.txt | 56 + ...sTagHelpersWithPlainAttributes3.tspans.txt | 2 + ...sTagHelpersWithPlainAttributes4.cspans.txt | 10 + ...esTagHelpersWithPlainAttributes4.stree.txt | 77 + ...sTagHelpersWithPlainAttributes4.tspans.txt | 1 + ...HelpersWithQuotelessAttributes1.cspans.txt | 4 + ...gHelpersWithQuotelessAttributes1.stree.txt | 51 + ...HelpersWithQuotelessAttributes1.tspans.txt | 1 + ...HelpersWithQuotelessAttributes2.cspans.txt | 5 + ...gHelpersWithQuotelessAttributes2.stree.txt | 55 + ...HelpersWithQuotelessAttributes2.tspans.txt | 1 + ...HelpersWithQuotelessAttributes3.cspans.txt | 8 + ...gHelpersWithQuotelessAttributes3.stree.txt | 63 + ...HelpersWithQuotelessAttributes3.tspans.txt | 1 + ...HelpersWithQuotelessAttributes4.cspans.txt | 9 + ...gHelpersWithQuotelessAttributes4.stree.txt | 86 + ...HelpersWithQuotelessAttributes4.tspans.txt | 2 + ...HelpersWithQuotelessAttributes5.cspans.txt | 12 + ...gHelpersWithQuotelessAttributes5.stree.txt | 88 + ...HelpersWithQuotelessAttributes5.tspans.txt | 1 + ...standsEmptyAttributeTagHelpers1.cspans.txt | 1 + ...rstandsEmptyAttributeTagHelpers1.stree.txt | 24 + ...standsEmptyAttributeTagHelpers1.tspans.txt | 1 + ...standsEmptyAttributeTagHelpers2.cspans.txt | 1 + ...rstandsEmptyAttributeTagHelpers2.stree.txt | 24 + ...standsEmptyAttributeTagHelpers2.tspans.txt | 1 + ...standsEmptyAttributeTagHelpers3.cspans.txt | 1 + ...rstandsEmptyAttributeTagHelpers3.stree.txt | 20 + ...standsEmptyAttributeTagHelpers3.tspans.txt | 1 + ...standsEmptyAttributeTagHelpers4.cspans.txt | 3 + ...rstandsEmptyAttributeTagHelpers4.stree.txt | 43 + ...standsEmptyAttributeTagHelpers4.tspans.txt | 1 + ...standsEmptyAttributeTagHelpers5.cspans.txt | 3 + ...rstandsEmptyAttributeTagHelpers5.stree.txt | 39 + ...standsEmptyAttributeTagHelpers5.tspans.txt | 1 + ...tandsMinimizedAttributes_Block1.cspans.txt | 6 + ...standsMinimizedAttributes_Block1.stree.txt | 33 + ...tandsMinimizedAttributes_Block1.tspans.txt | 1 + ...andsMinimizedAttributes_Block10.cspans.txt | 6 + ...standsMinimizedAttributes_Block10.diag.txt | 1 + ...tandsMinimizedAttributes_Block10.stree.txt | 30 + ...andsMinimizedAttributes_Block10.tspans.txt | 1 + ...andsMinimizedAttributes_Block11.cspans.txt | 6 + ...standsMinimizedAttributes_Block11.diag.txt | 1 + ...tandsMinimizedAttributes_Block11.stree.txt | 33 + ...andsMinimizedAttributes_Block11.tspans.txt | 1 + ...andsMinimizedAttributes_Block12.cspans.txt | 7 + ...standsMinimizedAttributes_Block12.diag.txt | 1 + ...tandsMinimizedAttributes_Block12.stree.txt | 40 + ...andsMinimizedAttributes_Block12.tspans.txt | 1 + ...andsMinimizedAttributes_Block13.cspans.txt | 7 + ...tandsMinimizedAttributes_Block13.stree.txt | 37 + ...andsMinimizedAttributes_Block13.tspans.txt | 1 + ...andsMinimizedAttributes_Block14.cspans.txt | 7 + ...tandsMinimizedAttributes_Block14.stree.txt | 38 + ...andsMinimizedAttributes_Block14.tspans.txt | 1 + ...andsMinimizedAttributes_Block15.cspans.txt | 8 + ...tandsMinimizedAttributes_Block15.stree.txt | 44 + ...andsMinimizedAttributes_Block15.tspans.txt | 1 + ...andsMinimizedAttributes_Block16.cspans.txt | 6 + ...standsMinimizedAttributes_Block16.diag.txt | 1 + ...tandsMinimizedAttributes_Block16.stree.txt | 38 + ...andsMinimizedAttributes_Block16.tspans.txt | 1 + ...andsMinimizedAttributes_Block17.cspans.txt | 6 + ...standsMinimizedAttributes_Block17.diag.txt | 2 + ...tandsMinimizedAttributes_Block17.stree.txt | 39 + ...andsMinimizedAttributes_Block17.tspans.txt | 1 + ...andsMinimizedAttributes_Block18.cspans.txt | 6 + ...standsMinimizedAttributes_Block18.diag.txt | 2 + ...tandsMinimizedAttributes_Block18.stree.txt | 43 + ...andsMinimizedAttributes_Block18.tspans.txt | 1 + ...andsMinimizedAttributes_Block19.cspans.txt | 6 + ...standsMinimizedAttributes_Block19.diag.txt | 3 + ...tandsMinimizedAttributes_Block19.stree.txt | 44 + ...andsMinimizedAttributes_Block19.tspans.txt | 1 + ...tandsMinimizedAttributes_Block2.cspans.txt | 6 + ...rstandsMinimizedAttributes_Block2.diag.txt | 1 + ...standsMinimizedAttributes_Block2.stree.txt | 34 + ...tandsMinimizedAttributes_Block2.tspans.txt | 1 + ...andsMinimizedAttributes_Block20.cspans.txt | 7 + ...tandsMinimizedAttributes_Block20.stree.txt | 47 + ...andsMinimizedAttributes_Block20.tspans.txt | 1 + ...andsMinimizedAttributes_Block21.cspans.txt | 7 + ...standsMinimizedAttributes_Block21.diag.txt | 1 + ...tandsMinimizedAttributes_Block21.stree.txt | 48 + ...andsMinimizedAttributes_Block21.tspans.txt | 1 + ...andsMinimizedAttributes_Block22.cspans.txt | 7 + ...tandsMinimizedAttributes_Block22.stree.txt | 47 + ...andsMinimizedAttributes_Block22.tspans.txt | 1 + ...andsMinimizedAttributes_Block23.cspans.txt | 7 + ...standsMinimizedAttributes_Block23.diag.txt | 1 + ...tandsMinimizedAttributes_Block23.stree.txt | 48 + ...andsMinimizedAttributes_Block23.tspans.txt | 1 + ...andsMinimizedAttributes_Block24.cspans.txt | 7 + ...standsMinimizedAttributes_Block24.diag.txt | 1 + ...tandsMinimizedAttributes_Block24.stree.txt | 47 + ...andsMinimizedAttributes_Block24.tspans.txt | 1 + ...andsMinimizedAttributes_Block25.cspans.txt | 7 + ...standsMinimizedAttributes_Block25.diag.txt | 1 + ...tandsMinimizedAttributes_Block25.stree.txt | 47 + ...andsMinimizedAttributes_Block25.tspans.txt | 1 + ...andsMinimizedAttributes_Block26.cspans.txt | 7 + ...standsMinimizedAttributes_Block26.diag.txt | 1 + ...tandsMinimizedAttributes_Block26.stree.txt | 47 + ...andsMinimizedAttributes_Block26.tspans.txt | 1 + ...andsMinimizedAttributes_Block27.cspans.txt | 7 + ...standsMinimizedAttributes_Block27.diag.txt | 1 + ...tandsMinimizedAttributes_Block27.stree.txt | 48 + ...andsMinimizedAttributes_Block27.tspans.txt | 1 + ...andsMinimizedAttributes_Block28.cspans.txt | 7 + ...standsMinimizedAttributes_Block28.diag.txt | 1 + ...tandsMinimizedAttributes_Block28.stree.txt | 47 + ...andsMinimizedAttributes_Block28.tspans.txt | 1 + ...andsMinimizedAttributes_Block29.cspans.txt | 7 + ...standsMinimizedAttributes_Block29.diag.txt | 1 + ...tandsMinimizedAttributes_Block29.stree.txt | 48 + ...andsMinimizedAttributes_Block29.tspans.txt | 1 + ...tandsMinimizedAttributes_Block3.cspans.txt | 6 + ...rstandsMinimizedAttributes_Block3.diag.txt | 1 + ...standsMinimizedAttributes_Block3.stree.txt | 33 + ...tandsMinimizedAttributes_Block3.tspans.txt | 1 + ...andsMinimizedAttributes_Block30.cspans.txt | 10 + ...standsMinimizedAttributes_Block30.diag.txt | 1 + ...tandsMinimizedAttributes_Block30.stree.txt | 66 + ...andsMinimizedAttributes_Block30.tspans.txt | 1 + ...andsMinimizedAttributes_Block31.cspans.txt | 10 + ...standsMinimizedAttributes_Block31.diag.txt | 1 + ...tandsMinimizedAttributes_Block31.stree.txt | 67 + ...andsMinimizedAttributes_Block31.tspans.txt | 1 + ...andsMinimizedAttributes_Block32.cspans.txt | 14 + ...standsMinimizedAttributes_Block32.diag.txt | 2 + ...tandsMinimizedAttributes_Block32.stree.txt | 109 + ...andsMinimizedAttributes_Block32.tspans.txt | 1 + ...andsMinimizedAttributes_Block33.cspans.txt | 14 + ...standsMinimizedAttributes_Block33.diag.txt | 3 + ...tandsMinimizedAttributes_Block33.stree.txt | 110 + ...andsMinimizedAttributes_Block33.tspans.txt | 1 + ...tandsMinimizedAttributes_Block4.cspans.txt | 6 + ...rstandsMinimizedAttributes_Block4.diag.txt | 1 + ...standsMinimizedAttributes_Block4.stree.txt | 33 + ...tandsMinimizedAttributes_Block4.tspans.txt | 1 + ...tandsMinimizedAttributes_Block5.cspans.txt | 6 + ...rstandsMinimizedAttributes_Block5.diag.txt | 1 + ...standsMinimizedAttributes_Block5.stree.txt | 34 + ...tandsMinimizedAttributes_Block5.tspans.txt | 1 + ...tandsMinimizedAttributes_Block6.cspans.txt | 6 + ...rstandsMinimizedAttributes_Block6.diag.txt | 1 + ...standsMinimizedAttributes_Block6.stree.txt | 30 + ...tandsMinimizedAttributes_Block6.tspans.txt | 1 + ...tandsMinimizedAttributes_Block7.cspans.txt | 6 + ...rstandsMinimizedAttributes_Block7.diag.txt | 1 + ...standsMinimizedAttributes_Block7.stree.txt | 33 + ...tandsMinimizedAttributes_Block7.tspans.txt | 1 + ...tandsMinimizedAttributes_Block8.cspans.txt | 6 + ...rstandsMinimizedAttributes_Block8.diag.txt | 2 + ...standsMinimizedAttributes_Block8.stree.txt | 33 + ...tandsMinimizedAttributes_Block8.tspans.txt | 1 + ...tandsMinimizedAttributes_Block9.cspans.txt | 6 + ...rstandsMinimizedAttributes_Block9.diag.txt | 2 + ...standsMinimizedAttributes_Block9.stree.txt | 30 + ...tandsMinimizedAttributes_Block9.tspans.txt | 1 + ...dsMinimizedAttributes_Document1.cspans.txt | 0 ...ndsMinimizedAttributes_Document1.stree.txt | 16 + ...dsMinimizedAttributes_Document1.tspans.txt | 1 + ...sMinimizedAttributes_Document10.cspans.txt | 0 ...ndsMinimizedAttributes_Document10.diag.txt | 1 + ...dsMinimizedAttributes_Document10.stree.txt | 13 + ...sMinimizedAttributes_Document10.tspans.txt | 1 + ...sMinimizedAttributes_Document11.cspans.txt | 0 ...ndsMinimizedAttributes_Document11.diag.txt | 1 + ...dsMinimizedAttributes_Document11.stree.txt | 16 + ...sMinimizedAttributes_Document11.tspans.txt | 1 + ...sMinimizedAttributes_Document12.cspans.txt | 1 + ...ndsMinimizedAttributes_Document12.diag.txt | 1 + ...dsMinimizedAttributes_Document12.stree.txt | 23 + ...sMinimizedAttributes_Document12.tspans.txt | 1 + ...sMinimizedAttributes_Document13.cspans.txt | 1 + ...dsMinimizedAttributes_Document13.stree.txt | 20 + ...sMinimizedAttributes_Document13.tspans.txt | 1 + ...sMinimizedAttributes_Document14.cspans.txt | 1 + ...dsMinimizedAttributes_Document14.stree.txt | 21 + ...sMinimizedAttributes_Document14.tspans.txt | 1 + ...sMinimizedAttributes_Document15.cspans.txt | 2 + ...dsMinimizedAttributes_Document15.stree.txt | 27 + ...sMinimizedAttributes_Document15.tspans.txt | 1 + ...sMinimizedAttributes_Document16.cspans.txt | 0 ...ndsMinimizedAttributes_Document16.diag.txt | 1 + ...dsMinimizedAttributes_Document16.stree.txt | 21 + ...sMinimizedAttributes_Document16.tspans.txt | 1 + ...sMinimizedAttributes_Document17.cspans.txt | 0 ...ndsMinimizedAttributes_Document17.diag.txt | 2 + ...dsMinimizedAttributes_Document17.stree.txt | 22 + ...sMinimizedAttributes_Document17.tspans.txt | 1 + ...sMinimizedAttributes_Document18.cspans.txt | 0 ...ndsMinimizedAttributes_Document18.diag.txt | 2 + ...dsMinimizedAttributes_Document18.stree.txt | 26 + ...sMinimizedAttributes_Document18.tspans.txt | 1 + ...sMinimizedAttributes_Document19.cspans.txt | 0 ...ndsMinimizedAttributes_Document19.diag.txt | 3 + ...dsMinimizedAttributes_Document19.stree.txt | 27 + ...sMinimizedAttributes_Document19.tspans.txt | 1 + ...dsMinimizedAttributes_Document2.cspans.txt | 0 ...andsMinimizedAttributes_Document2.diag.txt | 1 + ...ndsMinimizedAttributes_Document2.stree.txt | 17 + ...dsMinimizedAttributes_Document2.tspans.txt | 1 + ...sMinimizedAttributes_Document20.cspans.txt | 1 + ...dsMinimizedAttributes_Document20.stree.txt | 30 + ...sMinimizedAttributes_Document20.tspans.txt | 1 + ...sMinimizedAttributes_Document21.cspans.txt | 1 + ...ndsMinimizedAttributes_Document21.diag.txt | 1 + ...dsMinimizedAttributes_Document21.stree.txt | 31 + ...sMinimizedAttributes_Document21.tspans.txt | 1 + ...sMinimizedAttributes_Document22.cspans.txt | 1 + ...dsMinimizedAttributes_Document22.stree.txt | 30 + ...sMinimizedAttributes_Document22.tspans.txt | 1 + ...sMinimizedAttributes_Document23.cspans.txt | 1 + ...ndsMinimizedAttributes_Document23.diag.txt | 1 + ...dsMinimizedAttributes_Document23.stree.txt | 31 + ...sMinimizedAttributes_Document23.tspans.txt | 1 + ...sMinimizedAttributes_Document24.cspans.txt | 1 + ...ndsMinimizedAttributes_Document24.diag.txt | 1 + ...dsMinimizedAttributes_Document24.stree.txt | 30 + ...sMinimizedAttributes_Document24.tspans.txt | 1 + ...sMinimizedAttributes_Document25.cspans.txt | 1 + ...ndsMinimizedAttributes_Document25.diag.txt | 1 + ...dsMinimizedAttributes_Document25.stree.txt | 30 + ...sMinimizedAttributes_Document25.tspans.txt | 1 + ...sMinimizedAttributes_Document26.cspans.txt | 1 + ...ndsMinimizedAttributes_Document26.diag.txt | 1 + ...dsMinimizedAttributes_Document26.stree.txt | 30 + ...sMinimizedAttributes_Document26.tspans.txt | 1 + ...sMinimizedAttributes_Document27.cspans.txt | 1 + ...ndsMinimizedAttributes_Document27.diag.txt | 1 + ...dsMinimizedAttributes_Document27.stree.txt | 31 + ...sMinimizedAttributes_Document27.tspans.txt | 1 + ...sMinimizedAttributes_Document28.cspans.txt | 1 + ...ndsMinimizedAttributes_Document28.diag.txt | 1 + ...dsMinimizedAttributes_Document28.stree.txt | 30 + ...sMinimizedAttributes_Document28.tspans.txt | 1 + ...sMinimizedAttributes_Document29.cspans.txt | 1 + ...ndsMinimizedAttributes_Document29.diag.txt | 1 + ...dsMinimizedAttributes_Document29.stree.txt | 31 + ...sMinimizedAttributes_Document29.tspans.txt | 1 + ...dsMinimizedAttributes_Document3.cspans.txt | 0 ...andsMinimizedAttributes_Document3.diag.txt | 1 + ...ndsMinimizedAttributes_Document3.stree.txt | 16 + ...dsMinimizedAttributes_Document3.tspans.txt | 1 + ...sMinimizedAttributes_Document30.cspans.txt | 4 + ...ndsMinimizedAttributes_Document30.diag.txt | 1 + ...dsMinimizedAttributes_Document30.stree.txt | 49 + ...sMinimizedAttributes_Document30.tspans.txt | 1 + ...sMinimizedAttributes_Document31.cspans.txt | 4 + ...ndsMinimizedAttributes_Document31.diag.txt | 1 + ...dsMinimizedAttributes_Document31.stree.txt | 50 + ...sMinimizedAttributes_Document31.tspans.txt | 1 + ...sMinimizedAttributes_Document32.cspans.txt | 8 + ...ndsMinimizedAttributes_Document32.diag.txt | 2 + ...dsMinimizedAttributes_Document32.stree.txt | 92 + ...sMinimizedAttributes_Document32.tspans.txt | 1 + ...sMinimizedAttributes_Document33.cspans.txt | 8 + ...ndsMinimizedAttributes_Document33.diag.txt | 3 + ...dsMinimizedAttributes_Document33.stree.txt | 93 + ...sMinimizedAttributes_Document33.tspans.txt | 1 + ...dsMinimizedAttributes_Document4.cspans.txt | 0 ...andsMinimizedAttributes_Document4.diag.txt | 1 + ...ndsMinimizedAttributes_Document4.stree.txt | 16 + ...dsMinimizedAttributes_Document4.tspans.txt | 1 + ...dsMinimizedAttributes_Document5.cspans.txt | 0 ...andsMinimizedAttributes_Document5.diag.txt | 1 + ...ndsMinimizedAttributes_Document5.stree.txt | 17 + ...dsMinimizedAttributes_Document5.tspans.txt | 1 + ...dsMinimizedAttributes_Document6.cspans.txt | 0 ...andsMinimizedAttributes_Document6.diag.txt | 1 + ...ndsMinimizedAttributes_Document6.stree.txt | 13 + ...dsMinimizedAttributes_Document6.tspans.txt | 1 + ...dsMinimizedAttributes_Document7.cspans.txt | 0 ...andsMinimizedAttributes_Document7.diag.txt | 1 + ...ndsMinimizedAttributes_Document7.stree.txt | 16 + ...dsMinimizedAttributes_Document7.tspans.txt | 1 + ...dsMinimizedAttributes_Document8.cspans.txt | 0 ...andsMinimizedAttributes_Document8.diag.txt | 2 + ...ndsMinimizedAttributes_Document8.stree.txt | 16 + ...dsMinimizedAttributes_Document8.tspans.txt | 1 + ...dsMinimizedAttributes_Document9.cspans.txt | 0 ...andsMinimizedAttributes_Document9.diag.txt | 2 + ...ndsMinimizedAttributes_Document9.stree.txt | 13 + ...dsMinimizedAttributes_Document9.tspans.txt | 1 + ...inimizedAttributes_PartialTags1.cspans.txt | 0 ...sMinimizedAttributes_PartialTags1.diag.txt | 2 + ...MinimizedAttributes_PartialTags1.stree.txt | 12 + ...inimizedAttributes_PartialTags1.tspans.txt | 1 + ...inimizedAttributes_PartialTags2.cspans.txt | 0 ...sMinimizedAttributes_PartialTags2.diag.txt | 3 + ...MinimizedAttributes_PartialTags2.stree.txt | 12 + ...inimizedAttributes_PartialTags2.tspans.txt | 1 + ...inimizedAttributes_PartialTags3.cspans.txt | 0 ...sMinimizedAttributes_PartialTags3.diag.txt | 3 + ...MinimizedAttributes_PartialTags3.stree.txt | 12 + ...inimizedAttributes_PartialTags3.tspans.txt | 1 + ...inimizedAttributes_PartialTags4.cspans.txt | 0 ...sMinimizedAttributes_PartialTags4.diag.txt | 4 + ...MinimizedAttributes_PartialTags4.stree.txt | 22 + ...inimizedAttributes_PartialTags4.tspans.txt | 1 + ...inimizedAttributes_PartialTags5.cspans.txt | 0 ...sMinimizedAttributes_PartialTags5.diag.txt | 3 + ...MinimizedAttributes_PartialTags5.stree.txt | 12 + ...inimizedAttributes_PartialTags5.tspans.txt | 1 + ...inimizedAttributes_PartialTags6.cspans.txt | 0 ...sMinimizedAttributes_PartialTags6.diag.txt | 3 + ...MinimizedAttributes_PartialTags6.stree.txt | 12 + ...inimizedAttributes_PartialTags6.tspans.txt | 1 + ...inimizedAttributes_PartialTags7.cspans.txt | 0 ...sMinimizedAttributes_PartialTags7.diag.txt | 4 + ...MinimizedAttributes_PartialTags7.stree.txt | 17 + ...inimizedAttributes_PartialTags7.tspans.txt | 1 + ...inimizedAttributes_PartialTags8.cspans.txt | 0 ...sMinimizedAttributes_PartialTags8.diag.txt | 8 + ...MinimizedAttributes_PartialTags8.stree.txt | 37 + ...inimizedAttributes_PartialTags8.tspans.txt | 2 + ...MinimizedBooleanBoundAttributes.cspans.txt | 0 ...sMinimizedBooleanBoundAttributes.stree.txt | 21 + ...MinimizedBooleanBoundAttributes.tspans.txt | 1 + .../AllowsPrefixedTagHelpers1.cspans.txt | 1 + .../AllowsPrefixedTagHelpers1.stree.txt | 11 + .../AllowsPrefixedTagHelpers10.cspans.txt | 2 + .../AllowsPrefixedTagHelpers10.stree.txt | 32 + .../AllowsPrefixedTagHelpers10.tspans.txt | 1 + .../AllowsPrefixedTagHelpers11.cspans.txt | 2 + .../AllowsPrefixedTagHelpers11.stree.txt | 33 + .../AllowsPrefixedTagHelpers11.tspans.txt | 1 + .../AllowsPrefixedTagHelpers2.cspans.txt | 3 + .../AllowsPrefixedTagHelpers2.stree.txt | 18 + .../AllowsPrefixedTagHelpers3.cspans.txt | 0 .../AllowsPrefixedTagHelpers3.stree.txt | 11 + .../AllowsPrefixedTagHelpers3.tspans.txt | 1 + .../AllowsPrefixedTagHelpers4.cspans.txt | 0 .../AllowsPrefixedTagHelpers4.stree.txt | 12 + .../AllowsPrefixedTagHelpers4.tspans.txt | 1 + .../AllowsPrefixedTagHelpers5.cspans.txt | 2 + .../AllowsPrefixedTagHelpers5.stree.txt | 22 + .../AllowsPrefixedTagHelpers5.tspans.txt | 1 + .../AllowsPrefixedTagHelpers6.cspans.txt | 3 + .../AllowsPrefixedTagHelpers6.stree.txt | 12 + .../AllowsPrefixedTagHelpers7.cspans.txt | 6 + .../AllowsPrefixedTagHelpers7.stree.txt | 14 + .../AllowsPrefixedTagHelpers8.cspans.txt | 1 + .../AllowsPrefixedTagHelpers8.stree.txt | 25 + .../AllowsPrefixedTagHelpers8.tspans.txt | 1 + .../AllowsPrefixedTagHelpers9.cspans.txt | 1 + .../AllowsPrefixedTagHelpers9.stree.txt | 25 + .../AllowsPrefixedTagHelpers9.tspans.txt | 1 + .../AllowsRazorCommentsAsChildren.cspans.txt | 8 + .../AllowsRazorCommentsAsChildren.stree.txt | 30 + .../AllowsRazorCommentsAsChildren.tspans.txt | 1 + .../AllowsRazorMarkupInHtmlComment.cspans.txt | 8 + .../AllowsRazorMarkupInHtmlComment.stree.txt | 43 + .../AllowsRazorMarkupInHtmlComment.tspans.txt | 1 + ...owsSimpleHtmlCommentsAsChildren.cspans.txt | 6 + ...lowsSimpleHtmlCommentsAsChildren.stree.txt | 36 + ...owsSimpleHtmlCommentsAsChildren.tspans.txt | 1 + ...gInCSharpBlock_WithAttrTextTag1.cspans.txt | 11 + ...TagInCSharpBlock_WithAttrTextTag1.diag.txt | 2 + ...agInCSharpBlock_WithAttrTextTag1.stree.txt | 37 + ...gInCSharpBlock_WithAttrTextTag2.cspans.txt | 16 + ...agInCSharpBlock_WithAttrTextTag2.stree.txt | 45 + ...gInCSharpBlock_WithAttrTextTag3.cspans.txt | 17 + ...agInCSharpBlock_WithAttrTextTag3.stree.txt | 51 + ...gInCSharpBlock_WithAttrTextTag4.cspans.txt | 19 + ...agInCSharpBlock_WithAttrTextTag4.stree.txt | 60 + ...gInCSharpBlock_WithAttrTextTag5.cspans.txt | 20 + ...agInCSharpBlock_WithAttrTextTag5.stree.txt | 64 + ...InCSharpBlock_WithBlockTextTag1.cspans.txt | 7 + ...agInCSharpBlock_WithBlockTextTag1.diag.txt | 2 + ...gInCSharpBlock_WithBlockTextTag1.stree.txt | 23 + ...InCSharpBlock_WithBlockTextTag2.cspans.txt | 9 + ...agInCSharpBlock_WithBlockTextTag2.diag.txt | 1 + ...gInCSharpBlock_WithBlockTextTag2.stree.txt | 26 + ...InCSharpBlock_WithBlockTextTag3.cspans.txt | 12 + ...gInCSharpBlock_WithBlockTextTag3.stree.txt | 31 + ...InCSharpBlock_WithBlockTextTag4.cspans.txt | 13 + ...gInCSharpBlock_WithBlockTextTag4.stree.txt | 37 + ...InCSharpBlock_WithBlockTextTag5.cspans.txt | 10 + ...agInCSharpBlock_WithBlockTextTag5.diag.txt | 2 + ...gInCSharpBlock_WithBlockTextTag5.stree.txt | 31 + ...InCSharpBlock_WithBlockTextTag6.cspans.txt | 10 + ...agInCSharpBlock_WithBlockTextTag6.diag.txt | 1 + ...gInCSharpBlock_WithBlockTextTag6.stree.txt | 31 + ...InCSharpBlock_WithBlockTextTag7.cspans.txt | 12 + ...gInCSharpBlock_WithBlockTextTag7.stree.txt | 41 + ...InCSharpBlock_WithBlockTextTag7.tspans.txt | 1 + ...InCSharpBlock_WithBlockTextTag8.cspans.txt | 11 + ...agInCSharpBlock_WithBlockTextTag8.diag.txt | 2 + ...gInCSharpBlock_WithBlockTextTag8.stree.txt | 34 + ...InCSharpBlock_WithBlockTextTag9.cspans.txt | 13 + ...agInCSharpBlock_WithBlockTextTag9.diag.txt | 2 + ...gInCSharpBlock_WithBlockTextTag9.stree.txt | 38 + ...perElementOptForIncompleteHTML1.cspans.txt | 1 + ...lperElementOptForIncompleteHTML1.stree.txt | 5 + ...perElementOptForIncompleteHTML2.cspans.txt | 3 + ...lperElementOptForIncompleteHTML2.stree.txt | 8 + ...perElementOptForIncompleteHTML3.cspans.txt | 3 + ...lperElementOptForIncompleteHTML3.stree.txt | 14 + ...perElementOptForIncompleteHTML4.cspans.txt | 4 + ...lperElementOptForIncompleteHTML4.stree.txt | 14 + ...perElementOptForIncompleteHTML5.cspans.txt | 5 + ...lperElementOptForIncompleteHTML5.stree.txt | 20 + ...perElementOptForIncompleteHTML6.cspans.txt | 6 + ...lperElementOptForIncompleteHTML6.stree.txt | 22 + ...perElementOptForIncompleteHTML7.cspans.txt | 7 + ...lperElementOptForIncompleteHTML7.stree.txt | 28 + ...ForIncompleteHTMLInCSharpBlock1.cspans.txt | 6 + ...ptForIncompleteHTMLInCSharpBlock1.diag.txt | 2 + ...tForIncompleteHTMLInCSharpBlock1.stree.txt | 21 + ...ForIncompleteHTMLInCSharpBlock2.cspans.txt | 6 + ...ptForIncompleteHTMLInCSharpBlock2.diag.txt | 2 + ...tForIncompleteHTMLInCSharpBlock2.stree.txt | 21 + ...ForIncompleteHTMLInCSharpBlock3.cspans.txt | 7 + ...ptForIncompleteHTMLInCSharpBlock3.diag.txt | 2 + ...tForIncompleteHTMLInCSharpBlock3.stree.txt | 30 + ...ForIncompleteHTMLInCSharpBlock4.cspans.txt | 8 + ...ptForIncompleteHTMLInCSharpBlock4.diag.txt | 2 + ...tForIncompleteHTMLInCSharpBlock4.stree.txt | 31 + ...ForIncompleteHTMLInCSharpBlock5.cspans.txt | 8 + ...ptForIncompleteHTMLInCSharpBlock5.diag.txt | 2 + ...tForIncompleteHTMLInCSharpBlock5.stree.txt | 33 + ...ForIncompleteHTMLInCSharpBlock6.cspans.txt | 11 + ...ptForIncompleteHTMLInCSharpBlock6.diag.txt | 2 + ...tForIncompleteHTMLInCSharpBlock6.stree.txt | 41 + ...ForIncompleteHTMLInCSharpBlock7.cspans.txt | 10 + ...ptForIncompleteHTMLInCSharpBlock7.diag.txt | 2 + ...tForIncompleteHTMLInCSharpBlock7.stree.txt | 38 + ...ForIncompleteHTMLInCSharpBlock8.cspans.txt | 11 + ...ptForIncompleteHTMLInCSharpBlock8.diag.txt | 2 + ...tForIncompleteHTMLInCSharpBlock8.stree.txt | 44 + ...IncompleteTextTagInCSharpBlock1.cspans.txt | 6 + ...orIncompleteTextTagInCSharpBlock1.diag.txt | 2 + ...rIncompleteTextTagInCSharpBlock1.stree.txt | 21 + ...IncompleteTextTagInCSharpBlock2.cspans.txt | 7 + ...orIncompleteTextTagInCSharpBlock2.diag.txt | 2 + ...rIncompleteTextTagInCSharpBlock2.stree.txt | 30 + ...IncompleteTextTagInCSharpBlock3.cspans.txt | 8 + ...orIncompleteTextTagInCSharpBlock3.diag.txt | 2 + ...rIncompleteTextTagInCSharpBlock3.stree.txt | 31 + ...IncompleteTextTagInCSharpBlock4.cspans.txt | 8 + ...orIncompleteTextTagInCSharpBlock4.diag.txt | 2 + ...rIncompleteTextTagInCSharpBlock4.stree.txt | 33 + ...IncompleteTextTagInCSharpBlock5.cspans.txt | 10 + ...orIncompleteTextTagInCSharpBlock5.diag.txt | 2 + ...rIncompleteTextTagInCSharpBlock5.stree.txt | 38 + ...IncompleteTextTagInCSharpBlock6.cspans.txt | 11 + ...orIncompleteTextTagInCSharpBlock6.diag.txt | 2 + ...rIncompleteTextTagInCSharpBlock6.stree.txt | 44 + ...OptOutCSharp_WithAttributeData1.cspans.txt | 11 + ...ntOptOutCSharp_WithAttributeData1.diag.txt | 2 + ...tOptOutCSharp_WithAttributeData1.stree.txt | 37 + ...OptOutCSharp_WithAttributeData2.cspans.txt | 16 + ...tOptOutCSharp_WithAttributeData2.stree.txt | 45 + ...OptOutCSharp_WithAttributeData3.cspans.txt | 17 + ...tOptOutCSharp_WithAttributeData3.stree.txt | 51 + ...OptOutCSharp_WithAttributeData4.cspans.txt | 19 + ...tOptOutCSharp_WithAttributeData4.stree.txt | 60 + ...OptOutCSharp_WithAttributeData5.cspans.txt | 20 + ...tOptOutCSharp_WithAttributeData5.stree.txt | 64 + ...mentOptOutCSharp_WithBlockData1.cspans.txt | 7 + ...lementOptOutCSharp_WithBlockData1.diag.txt | 2 + ...ementOptOutCSharp_WithBlockData1.stree.txt | 23 + ...entOptOutCSharp_WithBlockData10.cspans.txt | 10 + ...ementOptOutCSharp_WithBlockData10.diag.txt | 4 + ...mentOptOutCSharp_WithBlockData10.stree.txt | 38 + ...entOptOutCSharp_WithBlockData10.tspans.txt | 1 + ...entOptOutCSharp_WithBlockData11.cspans.txt | 12 + ...mentOptOutCSharp_WithBlockData11.stree.txt | 42 + ...entOptOutCSharp_WithBlockData11.tspans.txt | 1 + ...entOptOutCSharp_WithBlockData12.cspans.txt | 16 + ...ementOptOutCSharp_WithBlockData12.diag.txt | 6 + ...mentOptOutCSharp_WithBlockData12.stree.txt | 57 + ...entOptOutCSharp_WithBlockData12.tspans.txt | 2 + ...mentOptOutCSharp_WithBlockData2.cspans.txt | 9 + ...lementOptOutCSharp_WithBlockData2.diag.txt | 1 + ...ementOptOutCSharp_WithBlockData2.stree.txt | 26 + ...mentOptOutCSharp_WithBlockData3.cspans.txt | 12 + ...ementOptOutCSharp_WithBlockData3.stree.txt | 31 + ...mentOptOutCSharp_WithBlockData4.cspans.txt | 13 + ...ementOptOutCSharp_WithBlockData4.stree.txt | 37 + ...mentOptOutCSharp_WithBlockData5.cspans.txt | 10 + ...lementOptOutCSharp_WithBlockData5.diag.txt | 2 + ...ementOptOutCSharp_WithBlockData5.stree.txt | 31 + ...mentOptOutCSharp_WithBlockData6.cspans.txt | 9 + ...lementOptOutCSharp_WithBlockData6.diag.txt | 2 + ...ementOptOutCSharp_WithBlockData6.stree.txt | 31 + ...mentOptOutCSharp_WithBlockData6.tspans.txt | 1 + ...mentOptOutCSharp_WithBlockData7.cspans.txt | 12 + ...ementOptOutCSharp_WithBlockData7.stree.txt | 41 + ...mentOptOutCSharp_WithBlockData7.tspans.txt | 1 + ...mentOptOutCSharp_WithBlockData8.cspans.txt | 10 + ...lementOptOutCSharp_WithBlockData8.diag.txt | 3 + ...ementOptOutCSharp_WithBlockData8.stree.txt | 34 + ...mentOptOutCSharp_WithBlockData8.tspans.txt | 1 + ...mentOptOutCSharp_WithBlockData9.cspans.txt | 13 + ...lementOptOutCSharp_WithBlockData9.diag.txt | 2 + ...ementOptOutCSharp_WithBlockData9.stree.txt | 38 + ...ntOptOutHTML_WithAttributeData1.cspans.txt | 7 + ...entOptOutHTML_WithAttributeData1.stree.txt | 22 + ...ntOptOutHTML_WithAttributeData2.cspans.txt | 10 + ...entOptOutHTML_WithAttributeData2.stree.txt | 28 + ...ntOptOutHTML_WithAttributeData3.cspans.txt | 11 + ...entOptOutHTML_WithAttributeData3.stree.txt | 34 + ...ntOptOutHTML_WithAttributeData4.cspans.txt | 13 + ...entOptOutHTML_WithAttributeData4.stree.txt | 43 + ...ntOptOutHTML_WithAttributeData5.cspans.txt | 14 + ...entOptOutHTML_WithAttributeData5.stree.txt | 47 + ...lementOptOutHTML_WithBlockData1.cspans.txt | 3 + ...ElementOptOutHTML_WithBlockData1.stree.txt | 8 + ...ementOptOutHTML_WithBlockData10.cspans.txt | 3 + ...lementOptOutHTML_WithBlockData10.stree.txt | 19 + ...ementOptOutHTML_WithBlockData10.tspans.txt | 1 + ...ementOptOutHTML_WithBlockData11.cspans.txt | 6 + ...lementOptOutHTML_WithBlockData11.stree.txt | 24 + ...ementOptOutHTML_WithBlockData11.tspans.txt | 1 + ...ementOptOutHTML_WithBlockData12.cspans.txt | 9 + ...ElementOptOutHTML_WithBlockData12.diag.txt | 1 + ...lementOptOutHTML_WithBlockData12.stree.txt | 37 + ...ementOptOutHTML_WithBlockData12.tspans.txt | 2 + ...lementOptOutHTML_WithBlockData2.cspans.txt | 3 + ...ElementOptOutHTML_WithBlockData2.stree.txt | 9 + ...lementOptOutHTML_WithBlockData3.cspans.txt | 6 + ...ElementOptOutHTML_WithBlockData3.stree.txt | 14 + ...lementOptOutHTML_WithBlockData4.cspans.txt | 7 + ...ElementOptOutHTML_WithBlockData4.stree.txt | 20 + ...lementOptOutHTML_WithBlockData5.cspans.txt | 4 + ...rElementOptOutHTML_WithBlockData5.diag.txt | 1 + ...ElementOptOutHTML_WithBlockData5.stree.txt | 14 + ...lementOptOutHTML_WithBlockData6.cspans.txt | 3 + ...rElementOptOutHTML_WithBlockData6.diag.txt | 1 + ...ElementOptOutHTML_WithBlockData6.stree.txt | 14 + ...lementOptOutHTML_WithBlockData6.tspans.txt | 1 + ...lementOptOutHTML_WithBlockData7.cspans.txt | 6 + ...ElementOptOutHTML_WithBlockData7.stree.txt | 24 + ...lementOptOutHTML_WithBlockData7.tspans.txt | 1 + ...lementOptOutHTML_WithBlockData8.cspans.txt | 6 + ...rElementOptOutHTML_WithBlockData8.diag.txt | 1 + ...ElementOptOutHTML_WithBlockData8.stree.txt | 19 + ...lementOptOutHTML_WithBlockData8.tspans.txt | 1 + ...lementOptOutHTML_WithBlockData9.cspans.txt | 7 + ...rElementOptOutHTML_WithBlockData9.diag.txt | 1 + ...ElementOptOutHTML_WithBlockData9.stree.txt | 20 + ...leInvalidChildrenWithWhitespace.cspans.txt | 5 + ...ndleInvalidChildrenWithWhitespace.diag.txt | 1 + ...dleInvalidChildrenWithWhitespace.stree.txt | 33 + ...leInvalidChildrenWithWhitespace.tspans.txt | 1 + ...leTagHelpersWithAllowedChildren.cspans.txt | 1 + ...pleTagHelpersWithAllowedChildren.stree.txt | 31 + ...leTagHelpersWithAllowedChildren.tspans.txt | 3 + ...persWithAllowedChildren_OneNull.cspans.txt | 1 + ...lpersWithAllowedChildren_OneNull.stree.txt | 31 + ...persWithAllowedChildren_OneNull.tspans.txt | 3 + ...CanHandleStartTagOnlyTagTagMode.cspans.txt | 0 .../CanHandleStartTagOnlyTagTagMode.stree.txt | 7 + ...CanHandleStartTagOnlyTagTagMode.tspans.txt | 1 + ...rorForInconsistentTagStructures.cspans.txt | 0 ...ErrorForInconsistentTagStructures.diag.txt | 1 + ...rrorForInconsistentTagStructures.stree.txt | 7 + ...rorForInconsistentTagStructures.tspans.txt | 1 + ...outEndTagTagStructureForEndTags.cspans.txt | 1 + ...thoutEndTagTagStructureForEndTags.diag.txt | 1 + ...houtEndTagTagStructureForEndTags.stree.txt | 8 + ...NotRewriteSpecialTagTagHelpers1.cspans.txt | 5 + ...esNotRewriteSpecialTagTagHelpers1.diag.txt | 5 + ...sNotRewriteSpecialTagTagHelpers1.stree.txt | 26 + ...NotRewriteSpecialTagTagHelpers2.cspans.txt | 8 + ...esNotRewriteSpecialTagTagHelpers2.diag.txt | 5 + ...sNotRewriteSpecialTagTagHelpers2.stree.txt | 32 + ...NotRewriteSpecialTagTagHelpers3.cspans.txt | 3 + ...esNotRewriteSpecialTagTagHelpers3.diag.txt | 5 + ...sNotRewriteSpecialTagTagHelpers3.stree.txt | 23 + ...NotRewriteSpecialTagTagHelpers4.cspans.txt | 6 + ...esNotRewriteSpecialTagTagHelpers4.diag.txt | 5 + ...sNotRewriteSpecialTagTagHelpers4.stree.txt | 29 + ...NotRewriteSpecialTagTagHelpers5.cspans.txt | 6 + ...esNotRewriteSpecialTagTagHelpers5.diag.txt | 5 + ...sNotRewriteSpecialTagTagHelpers5.stree.txt | 28 + ...NotRewriteSpecialTagTagHelpers6.cspans.txt | 3 + ...esNotRewriteSpecialTagTagHelpers6.diag.txt | 5 + ...sNotRewriteSpecialTagTagHelpers6.stree.txt | 24 + ...NotRewriteSpecialTagTagHelpers7.cspans.txt | 3 + ...esNotRewriteSpecialTagTagHelpers7.diag.txt | 5 + ...sNotRewriteSpecialTagTagHelpers7.stree.txt | 26 + ...NotRewriteSpecialTagTagHelpers8.cspans.txt | 6 + ...esNotRewriteSpecialTagTagHelpers8.diag.txt | 5 + ...sNotRewriteSpecialTagTagHelpers8.stree.txt | 32 + ...iteTextTagTransitionTagHelpers1.cspans.txt | 1 + ...riteTextTagTransitionTagHelpers1.stree.txt | 16 + ...iteTextTagTransitionTagHelpers1.tspans.txt | 1 + ...iteTextTagTransitionTagHelpers2.cspans.txt | 9 + ...riteTextTagTransitionTagHelpers2.stree.txt | 33 + ...iteTextTagTransitionTagHelpers3.cspans.txt | 9 + ...riteTextTagTransitionTagHelpers3.stree.txt | 43 + ...iteTextTagTransitionTagHelpers3.tspans.txt | 1 + ...iteTextTagTransitionTagHelpers4.cspans.txt | 7 + ...riteTextTagTransitionTagHelpers4.stree.txt | 43 + ...iteTextTagTransitionTagHelpers4.tspans.txt | 2 + ...rsInInvalidHtmlTypedScriptTags1.cspans.txt | 5 + ...ersInInvalidHtmlTypedScriptTags1.stree.txt | 23 + ...rsInInvalidHtmlTypedScriptTags2.cspans.txt | 7 + ...ersInInvalidHtmlTypedScriptTags2.stree.txt | 34 + ...rsInInvalidHtmlTypedScriptTags3.cspans.txt | 8 + ...ersInInvalidHtmlTypedScriptTags3.stree.txt | 39 + ...rsInInvalidHtmlTypedScriptTags4.cspans.txt | 10 + ...ersInInvalidHtmlTypedScriptTags4.stree.txt | 50 + ...sAsChildrenWhenFeatureFlagIsOff.cspans.txt | 3 + ...ntsAsChildrenWhenFeatureFlagIsOff.diag.txt | 3 + ...tsAsChildrenWhenFeatureFlagIsOff.stree.txt | 22 + ...sAsChildrenWhenFeatureFlagIsOff.tspans.txt | 1 + ...orContentWithCommentsAsChildren.cspans.txt | 7 + ...sForContentWithCommentsAsChildren.diag.txt | 1 + ...ForContentWithCommentsAsChildren.stree.txt | 34 + ...orContentWithCommentsAsChildren.tspans.txt | 1 + ...estedNonTagHelperTags_Correctly.cspans.txt | 7 + ...dNestedNonTagHelperTags_Correctly.diag.txt | 1 + ...NestedNonTagHelperTags_Correctly.stree.txt | 28 + ...erStartAndEndVoidTags_Correctly.cspans.txt | 3 + ...perStartAndEndVoidTags_Correctly.stree.txt | 14 + ...AllowedChildrenAndRequireParent.cspans.txt | 1 + ...ndAllowedChildrenAndRequireParent.diag.txt | 1 + ...dAllowedChildrenAndRequireParent.stree.txt | 18 + ...AllowedChildrenAndRequireParent.tspans.txt | 1 + ...CreateTagHelperBlocksCorrectly1.cspans.txt | 3 + ...sCreateTagHelperBlocksCorrectly1.stree.txt | 36 + ...CreateTagHelperBlocksCorrectly1.tspans.txt | 1 + ...reateTagHelperBlocksCorrectly10.cspans.txt | 8 + ...CreateTagHelperBlocksCorrectly10.stree.txt | 80 + ...reateTagHelperBlocksCorrectly10.tspans.txt | 2 + ...CreateTagHelperBlocksCorrectly2.cspans.txt | 3 + ...sCreateTagHelperBlocksCorrectly2.stree.txt | 36 + ...CreateTagHelperBlocksCorrectly2.tspans.txt | 1 + ...CreateTagHelperBlocksCorrectly3.cspans.txt | 5 + ...sCreateTagHelperBlocksCorrectly3.stree.txt | 46 + ...CreateTagHelperBlocksCorrectly3.tspans.txt | 1 + ...CreateTagHelperBlocksCorrectly4.cspans.txt | 5 + ...sCreateTagHelperBlocksCorrectly4.stree.txt | 46 + ...CreateTagHelperBlocksCorrectly4.tspans.txt | 1 + ...CreateTagHelperBlocksCorrectly5.cspans.txt | 4 + ...sCreateTagHelperBlocksCorrectly5.stree.txt | 60 + ...CreateTagHelperBlocksCorrectly5.tspans.txt | 2 + ...CreateTagHelperBlocksCorrectly6.cspans.txt | 4 + ...sCreateTagHelperBlocksCorrectly6.stree.txt | 60 + ...CreateTagHelperBlocksCorrectly6.tspans.txt | 2 + ...CreateTagHelperBlocksCorrectly7.cspans.txt | 4 + ...sCreateTagHelperBlocksCorrectly7.stree.txt | 60 + ...CreateTagHelperBlocksCorrectly7.tspans.txt | 2 + ...CreateTagHelperBlocksCorrectly8.cspans.txt | 4 + ...sCreateTagHelperBlocksCorrectly8.stree.txt | 60 + ...CreateTagHelperBlocksCorrectly8.tspans.txt | 2 + ...CreateTagHelperBlocksCorrectly9.cspans.txt | 8 + ...sCreateTagHelperBlocksCorrectly9.stree.txt | 80 + ...CreateTagHelperBlocksCorrectly9.tspans.txt | 2 + ...gHelperPrefixAndAllowedChildren.cspans.txt | 2 + ...agHelperPrefixAndAllowedChildren.stree.txt | 22 + ...gHelperPrefixAndAllowedChildren.tspans.txt | 1 + ...teMismatchAndRestrictedChildren.cspans.txt | 2 + ...buteMismatchAndRestrictedChildren.diag.txt | 1 + ...uteMismatchAndRestrictedChildren.stree.txt | 27 + ...teMismatchAndRestrictedChildren.tspans.txt | 1 + ...formedTagHelperBlocksCorrectly1.cspans.txt | 1 + ...lformedTagHelperBlocksCorrectly1.stree.txt | 7 + ...ormedTagHelperBlocksCorrectly10.cspans.txt | 2 + ...lformedTagHelperBlocksCorrectly10.diag.txt | 2 + ...formedTagHelperBlocksCorrectly10.stree.txt | 43 + ...ormedTagHelperBlocksCorrectly10.tspans.txt | 1 + ...formedTagHelperBlocksCorrectly2.cspans.txt | 1 + ...alformedTagHelperBlocksCorrectly2.diag.txt | 2 + ...lformedTagHelperBlocksCorrectly2.stree.txt | 21 + ...formedTagHelperBlocksCorrectly2.tspans.txt | 1 + ...formedTagHelperBlocksCorrectly3.cspans.txt | 2 + ...alformedTagHelperBlocksCorrectly3.diag.txt | 2 + ...lformedTagHelperBlocksCorrectly3.stree.txt | 35 + ...formedTagHelperBlocksCorrectly3.tspans.txt | 1 + ...formedTagHelperBlocksCorrectly4.cspans.txt | 2 + ...lformedTagHelperBlocksCorrectly4.stree.txt | 12 + ...formedTagHelperBlocksCorrectly5.cspans.txt | 1 + ...alformedTagHelperBlocksCorrectly5.diag.txt | 1 + ...lformedTagHelperBlocksCorrectly5.stree.txt | 26 + ...formedTagHelperBlocksCorrectly5.tspans.txt | 1 + ...formedTagHelperBlocksCorrectly6.cspans.txt | 2 + ...alformedTagHelperBlocksCorrectly6.diag.txt | 1 + ...lformedTagHelperBlocksCorrectly6.stree.txt | 40 + ...formedTagHelperBlocksCorrectly6.tspans.txt | 1 + ...formedTagHelperBlocksCorrectly7.cspans.txt | 2 + ...alformedTagHelperBlocksCorrectly7.diag.txt | 2 + ...lformedTagHelperBlocksCorrectly7.stree.txt | 29 + ...formedTagHelperBlocksCorrectly7.tspans.txt | 1 + ...formedTagHelperBlocksCorrectly8.cspans.txt | 3 + ...alformedTagHelperBlocksCorrectly8.diag.txt | 2 + ...lformedTagHelperBlocksCorrectly8.stree.txt | 43 + ...formedTagHelperBlocksCorrectly8.tspans.txt | 1 + ...formedTagHelperBlocksCorrectly9.cspans.txt | 1 + ...alformedTagHelperBlocksCorrectly9.diag.txt | 2 + ...lformedTagHelperBlocksCorrectly9.stree.txt | 29 + ...formedTagHelperBlocksCorrectly9.tspans.txt | 1 + ...CreateTagHelperBlocksCorrectly1.cspans.txt | 1 + ...sCreateTagHelperBlocksCorrectly1.stree.txt | 11 + ...reateTagHelperBlocksCorrectly10.cspans.txt | 1 + ...CreateTagHelperBlocksCorrectly10.stree.txt | 25 + ...reateTagHelperBlocksCorrectly10.tspans.txt | 1 + ...reateTagHelperBlocksCorrectly11.cspans.txt | 2 + ...CreateTagHelperBlocksCorrectly11.stree.txt | 34 + ...reateTagHelperBlocksCorrectly11.tspans.txt | 1 + ...reateTagHelperBlocksCorrectly12.cspans.txt | 2 + ...CreateTagHelperBlocksCorrectly12.stree.txt | 32 + ...reateTagHelperBlocksCorrectly12.tspans.txt | 1 + ...reateTagHelperBlocksCorrectly13.cspans.txt | 3 + ...CreateTagHelperBlocksCorrectly13.stree.txt | 41 + ...reateTagHelperBlocksCorrectly13.tspans.txt | 1 + ...reateTagHelperBlocksCorrectly14.cspans.txt | 5 + ...CreateTagHelperBlocksCorrectly14.stree.txt | 25 + ...reateTagHelperBlocksCorrectly15.cspans.txt | 6 + ...CreateTagHelperBlocksCorrectly15.stree.txt | 26 + ...reateTagHelperBlocksCorrectly16.cspans.txt | 2 + ...CreateTagHelperBlocksCorrectly16.stree.txt | 39 + ...reateTagHelperBlocksCorrectly16.tspans.txt | 1 + ...reateTagHelperBlocksCorrectly17.cspans.txt | 3 + ...CreateTagHelperBlocksCorrectly17.stree.txt | 48 + ...reateTagHelperBlocksCorrectly17.tspans.txt | 1 + ...reateTagHelperBlocksCorrectly18.cspans.txt | 3 + ...CreateTagHelperBlocksCorrectly18.stree.txt | 46 + ...reateTagHelperBlocksCorrectly18.tspans.txt | 1 + ...reateTagHelperBlocksCorrectly19.cspans.txt | 2 + ...CreateTagHelperBlocksCorrectly19.stree.txt | 37 + ...reateTagHelperBlocksCorrectly19.tspans.txt | 1 + ...CreateTagHelperBlocksCorrectly2.cspans.txt | 2 + ...sCreateTagHelperBlocksCorrectly2.stree.txt | 12 + ...reateTagHelperBlocksCorrectly20.cspans.txt | 3 + ...CreateTagHelperBlocksCorrectly20.stree.txt | 48 + ...reateTagHelperBlocksCorrectly20.tspans.txt | 1 + ...reateTagHelperBlocksCorrectly21.cspans.txt | 3 + ...CreateTagHelperBlocksCorrectly21.stree.txt | 44 + ...reateTagHelperBlocksCorrectly21.tspans.txt | 1 + ...reateTagHelperBlocksCorrectly22.cspans.txt | 5 + ...CreateTagHelperBlocksCorrectly22.stree.txt | 64 + ...reateTagHelperBlocksCorrectly22.tspans.txt | 1 + ...reateTagHelperBlocksCorrectly23.cspans.txt | 7 + ...CreateTagHelperBlocksCorrectly23.stree.txt | 54 + ...reateTagHelperBlocksCorrectly23.tspans.txt | 1 + ...reateTagHelperBlocksCorrectly24.cspans.txt | 2 + ...CreateTagHelperBlocksCorrectly24.stree.txt | 39 + ...reateTagHelperBlocksCorrectly24.tspans.txt | 1 + ...reateTagHelperBlocksCorrectly25.cspans.txt | 3 + ...CreateTagHelperBlocksCorrectly25.stree.txt | 46 + ...reateTagHelperBlocksCorrectly25.tspans.txt | 1 + ...reateTagHelperBlocksCorrectly26.cspans.txt | 3 + ...CreateTagHelperBlocksCorrectly26.stree.txt | 51 + ...reateTagHelperBlocksCorrectly26.tspans.txt | 1 + ...reateTagHelperBlocksCorrectly27.cspans.txt | 4 + ...CreateTagHelperBlocksCorrectly27.stree.txt | 61 + ...reateTagHelperBlocksCorrectly27.tspans.txt | 1 + ...reateTagHelperBlocksCorrectly28.cspans.txt | 6 + ...CreateTagHelperBlocksCorrectly28.stree.txt | 66 + ...reateTagHelperBlocksCorrectly28.tspans.txt | 1 + ...reateTagHelperBlocksCorrectly29.cspans.txt | 7 + ...CreateTagHelperBlocksCorrectly29.stree.txt | 90 + ...reateTagHelperBlocksCorrectly29.tspans.txt | 1 + ...CreateTagHelperBlocksCorrectly3.cspans.txt | 1 + ...sCreateTagHelperBlocksCorrectly3.stree.txt | 11 + ...reateTagHelperBlocksCorrectly30.cspans.txt | 8 + ...CreateTagHelperBlocksCorrectly30.stree.txt | 71 + ...reateTagHelperBlocksCorrectly30.tspans.txt | 1 + ...CreateTagHelperBlocksCorrectly4.cspans.txt | 2 + ...sCreateTagHelperBlocksCorrectly4.stree.txt | 12 + ...CreateTagHelperBlocksCorrectly5.cspans.txt | 1 + ...sCreateTagHelperBlocksCorrectly5.stree.txt | 25 + ...CreateTagHelperBlocksCorrectly5.tspans.txt | 1 + ...CreateTagHelperBlocksCorrectly6.cspans.txt | 2 + ...sCreateTagHelperBlocksCorrectly6.stree.txt | 34 + ...CreateTagHelperBlocksCorrectly6.tspans.txt | 1 + ...CreateTagHelperBlocksCorrectly7.cspans.txt | 2 + ...sCreateTagHelperBlocksCorrectly7.stree.txt | 32 + ...CreateTagHelperBlocksCorrectly7.tspans.txt | 1 + ...CreateTagHelperBlocksCorrectly8.cspans.txt | 3 + ...sCreateTagHelperBlocksCorrectly8.stree.txt | 41 + ...CreateTagHelperBlocksCorrectly8.tspans.txt | 1 + ...CreateTagHelperBlocksCorrectly9.cspans.txt | 6 + ...sCreateTagHelperBlocksCorrectly9.stree.txt | 42 + ...CreateTagHelperBlocksCorrectly9.tspans.txt | 1 + ...writesNestedTagHelperTagBlocks1.cspans.txt | 0 ...ewritesNestedTagHelperTagBlocks1.stree.txt | 22 + ...writesNestedTagHelperTagBlocks1.tspans.txt | 2 + ...writesNestedTagHelperTagBlocks2.cspans.txt | 1 + ...ewritesNestedTagHelperTagBlocks2.stree.txt | 27 + ...writesNestedTagHelperTagBlocks2.tspans.txt | 2 + ...writesNestedTagHelperTagBlocks3.cspans.txt | 4 + ...ewritesNestedTagHelperTagBlocks3.stree.txt | 50 + ...writesNestedTagHelperTagBlocks3.tspans.txt | 4 + ...writesNestedTagHelperTagBlocks4.cspans.txt | 8 + ...ewritesNestedTagHelperTagBlocks4.stree.txt | 50 + ...writesNestedTagHelperTagBlocks4.tspans.txt | 2 + .../UnderstandsAllowedChildren1.cspans.txt | 0 .../UnderstandsAllowedChildren1.stree.txt | 21 + .../UnderstandsAllowedChildren1.tspans.txt | 2 + .../UnderstandsAllowedChildren10.cspans.txt | 5 + .../UnderstandsAllowedChildren10.diag.txt | 5 + .../UnderstandsAllowedChildren10.stree.txt | 56 + .../UnderstandsAllowedChildren10.tspans.txt | 4 + .../UnderstandsAllowedChildren11.cspans.txt | 7 + .../UnderstandsAllowedChildren11.diag.txt | 2 + .../UnderstandsAllowedChildren11.stree.txt | 56 + .../UnderstandsAllowedChildren11.tspans.txt | 3 + .../UnderstandsAllowedChildren12.cspans.txt | 1 + .../UnderstandsAllowedChildren12.diag.txt | 1 + .../UnderstandsAllowedChildren12.stree.txt | 18 + .../UnderstandsAllowedChildren12.tspans.txt | 1 + .../UnderstandsAllowedChildren13.cspans.txt | 1 + .../UnderstandsAllowedChildren13.diag.txt | 1 + .../UnderstandsAllowedChildren13.stree.txt | 17 + .../UnderstandsAllowedChildren13.tspans.txt | 1 + .../UnderstandsAllowedChildren14.cspans.txt | 6 + .../UnderstandsAllowedChildren14.diag.txt | 1 + .../UnderstandsAllowedChildren14.stree.txt | 58 + .../UnderstandsAllowedChildren14.tspans.txt | 4 + .../UnderstandsAllowedChildren2.cspans.txt | 2 + .../UnderstandsAllowedChildren2.stree.txt | 25 + .../UnderstandsAllowedChildren2.tspans.txt | 2 + .../UnderstandsAllowedChildren3.cspans.txt | 0 .../UnderstandsAllowedChildren3.diag.txt | 1 + .../UnderstandsAllowedChildren3.stree.txt | 17 + .../UnderstandsAllowedChildren3.tspans.txt | 2 + .../UnderstandsAllowedChildren4.cspans.txt | 1 + .../UnderstandsAllowedChildren4.diag.txt | 1 + .../UnderstandsAllowedChildren4.stree.txt | 14 + .../UnderstandsAllowedChildren4.tspans.txt | 1 + .../UnderstandsAllowedChildren5.cspans.txt | 1 + .../UnderstandsAllowedChildren5.diag.txt | 1 + .../UnderstandsAllowedChildren5.stree.txt | 21 + .../UnderstandsAllowedChildren5.tspans.txt | 1 + .../UnderstandsAllowedChildren6.cspans.txt | 1 + .../UnderstandsAllowedChildren6.diag.txt | 2 + .../UnderstandsAllowedChildren6.stree.txt | 19 + .../UnderstandsAllowedChildren6.tspans.txt | 2 + .../UnderstandsAllowedChildren7.cspans.txt | 2 + .../UnderstandsAllowedChildren7.diag.txt | 3 + .../UnderstandsAllowedChildren7.stree.txt | 35 + .../UnderstandsAllowedChildren7.tspans.txt | 3 + .../UnderstandsAllowedChildren8.cspans.txt | 2 + .../UnderstandsAllowedChildren8.diag.txt | 2 + .../UnderstandsAllowedChildren8.stree.txt | 35 + .../UnderstandsAllowedChildren8.tspans.txt | 3 + .../UnderstandsAllowedChildren9.cspans.txt | 4 + .../UnderstandsAllowedChildren9.diag.txt | 2 + .../UnderstandsAllowedChildren9.stree.txt | 40 + .../UnderstandsAllowedChildren9.tspans.txt | 3 + ...nderstandsNestedRequiredParent1.cspans.txt | 2 + ...UnderstandsNestedRequiredParent1.stree.txt | 12 + ...nderstandsNestedRequiredParent2.cspans.txt | 0 ...UnderstandsNestedRequiredParent2.stree.txt | 22 + ...nderstandsNestedRequiredParent2.tspans.txt | 2 + ...nderstandsNestedRequiredParent3.cspans.txt | 2 + ...UnderstandsNestedRequiredParent3.stree.txt | 22 + ...nderstandsNestedRequiredParent3.tspans.txt | 1 + ...nderstandsNestedRequiredParent4.cspans.txt | 4 + ...UnderstandsNestedRequiredParent4.stree.txt | 22 + ...nderstandsNestedRequiredParent5.cspans.txt | 2 + ...UnderstandsNestedRequiredParent5.stree.txt | 32 + ...nderstandsNestedRequiredParent5.tspans.txt | 2 + ...dVoidSelfClosingRequiredParent1.cspans.txt | 2 + ...edVoidSelfClosingRequiredParent1.stree.txt | 17 + ...dVoidSelfClosingRequiredParent1.tspans.txt | 1 + ...dVoidSelfClosingRequiredParent2.cspans.txt | 0 ...edVoidSelfClosingRequiredParent2.stree.txt | 27 + ...dVoidSelfClosingRequiredParent2.tspans.txt | 3 + ...dVoidSelfClosingRequiredParent3.cspans.txt | 1 + ...edVoidSelfClosingRequiredParent3.stree.txt | 27 + ...dVoidSelfClosingRequiredParent3.tspans.txt | 2 + ...dVoidSelfClosingRequiredParent4.cspans.txt | 1 + ...edVoidSelfClosingRequiredParent4.stree.txt | 37 + ...dVoidSelfClosingRequiredParent4.tspans.txt | 3 + ...dVoidSelfClosingRequiredParent5.cspans.txt | 2 + ...edVoidSelfClosingRequiredParent5.stree.txt | 17 + ...dVoidSelfClosingRequiredParent5.tspans.txt | 1 + ...dVoidSelfClosingRequiredParent6.cspans.txt | 0 ...edVoidSelfClosingRequiredParent6.stree.txt | 30 + ...dVoidSelfClosingRequiredParent6.tspans.txt | 3 + ...dVoidSelfClosingRequiredParent7.cspans.txt | 1 + ...edVoidSelfClosingRequiredParent7.stree.txt | 30 + ...dVoidSelfClosingRequiredParent7.tspans.txt | 2 + ...dVoidSelfClosingRequiredParent8.cspans.txt | 1 + ...edVoidSelfClosingRequiredParent8.stree.txt | 40 + ...dVoidSelfClosingRequiredParent8.tspans.txt | 3 + ...eWithAllowedChildrenForCatchAll.cspans.txt | 1 + ...ameWithAllowedChildrenForCatchAll.diag.txt | 1 + ...meWithAllowedChildrenForCatchAll.stree.txt | 18 + ...eWithAllowedChildrenForCatchAll.tspans.txt | 1 + ...edChildrenForCatchAllWithPrefix.cspans.txt | 1 + ...owedChildrenForCatchAllWithPrefix.diag.txt | 1 + ...wedChildrenForCatchAllWithPrefix.stree.txt | 18 + ...edChildrenForCatchAllWithPrefix.tspans.txt | 1 + ...tandsPartialRequiredParentTags1.cspans.txt | 0 ...rstandsPartialRequiredParentTags1.diag.txt | 2 + ...standsPartialRequiredParentTags1.stree.txt | 12 + ...tandsPartialRequiredParentTags1.tspans.txt | 2 + ...tandsPartialRequiredParentTags2.cspans.txt | 0 ...rstandsPartialRequiredParentTags2.diag.txt | 1 + ...standsPartialRequiredParentTags2.stree.txt | 17 + ...tandsPartialRequiredParentTags2.tspans.txt | 2 + ...tandsPartialRequiredParentTags3.cspans.txt | 0 ...rstandsPartialRequiredParentTags3.diag.txt | 2 + ...standsPartialRequiredParentTags3.stree.txt | 22 + ...tandsPartialRequiredParentTags3.tspans.txt | 3 + ...tandsPartialRequiredParentTags4.cspans.txt | 4 + ...rstandsPartialRequiredParentTags4.diag.txt | 2 + ...standsPartialRequiredParentTags4.stree.txt | 44 + ...tandsPartialRequiredParentTags4.tspans.txt | 2 + ...tandsPartialRequiredParentTags5.cspans.txt | 4 + ...rstandsPartialRequiredParentTags5.diag.txt | 1 + ...standsPartialRequiredParentTags5.stree.txt | 44 + ...tandsPartialRequiredParentTags5.tspans.txt | 2 + ...tandsPartialRequiredParentTags6.cspans.txt | 5 + ...rstandsPartialRequiredParentTags6.diag.txt | 1 + ...standsPartialRequiredParentTags6.stree.txt | 49 + ...tandsPartialRequiredParentTags6.tspans.txt | 2 + ...gHelperPrefixAndAllowedChildren.cspans.txt | 0 ...agHelperPrefixAndAllowedChildren.stree.txt | 22 + ...gHelperPrefixAndAllowedChildren.tspans.txt | 2 + ...AllowedChildrenAndRequireParent.cspans.txt | 0 ...dAllowedChildrenAndRequireParent.stree.txt | 22 + ...AllowedChildrenAndRequireParent.tspans.txt | 2 + ...agHelpersInHtmlTypedScriptTags1.cspans.txt | 6 + ...TagHelpersInHtmlTypedScriptTags1.stree.txt | 37 + ...agHelpersInHtmlTypedScriptTags1.tspans.txt | 1 + ...agHelpersInHtmlTypedScriptTags2.cspans.txt | 12 + ...TagHelpersInHtmlTypedScriptTags2.stree.txt | 65 + ...agHelpersInHtmlTypedScriptTags2.tspans.txt | 1 + ...agHelpersInHtmlTypedScriptTags3.cspans.txt | 12 + ...TagHelpersInHtmlTypedScriptTags3.stree.txt | 73 + ...agHelpersInHtmlTypedScriptTags3.tspans.txt | 2 + ...agHelpersInHtmlTypedScriptTags4.cspans.txt | 14 + ...TagHelpersInHtmlTypedScriptTags4.stree.txt | 74 + ...agHelpersInHtmlTypedScriptTags4.tspans.txt | 1 + ...ExpressionBlock_To_Parent_Block.cspans.txt | 18 + ..._ExpressionBlock_To_Parent_Block.stree.txt | 58 + .../test/TestFiles/Source/BasicMarkup.cshtml | 8 + .../test/TestFiles/nested-1000.html | 2002 +++++++++ .../test/TestRazorProject.cs | 47 + .../test/VirtualRazorProjectFileSystemTest.cs | 400 ++ .../test/xunit.runner.json | 4 + .../Language/TestProject.cs | 9 +- 4047 files changed, 134377 insertions(+), 1 deletion(-) create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/AssertFrame.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/BoundAttributeDescriptorExtensionsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/CSharpCodeWriterTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/CodeTargetTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/DefaultCodeTargetBuilderTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/DefaultCodeTargetTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/DefaultDocumentWriterTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/DesignTimeNodeWriterTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/LiteralRuntimeNodeWriterTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/RuntimeNodeWriterTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/TagHelperHtmlAttributeRuntimeNodeWriterTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Components/ComponentDocumentClassifierPassTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Components/ComponentMarkupBlockPassTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Components/ComponentMarkupEncodingPassTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Components/NodeAssert.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultAllowedChildTagDescriptorBuilderTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultBoundAttributeDescriptorBuilderTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultDocumentClassifierPassTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultItemCollectionTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorCSharpLoweringPhaseTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorCodeDocumentTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorDiagnosticTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorDirectiveClassifierPhaseTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorDocumentClassifierPhaseTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorEngineBuilderTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorEngineTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorIntermediateNodeLoweringPhaseIntegrationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorIntermediateNodeLoweringPhaseTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorOptimizationPhaseTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorParsingPhaseTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectEngineBuilderTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectEngineIntegrationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectEngineTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectFileSystemTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectItemTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorSyntaxTreePhaseTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorTagHelperBinderPhaseTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRequiredAttributeDescriptorBuilderTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DirectiveDescriptorBuilderExtensionsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DirectiveDescriptorTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DirectiveRemovalOptimizationPassTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DirectiveTokenEditHandlerTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/DocumentClassifierPassBaseTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/DefaultMetadataIdentifierFeatureTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/DefaultTagHelperOptimizationPassTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/DefaultTagHelperTargetExtensionTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/DesignTimeDirectiveTargetExtensionTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/FunctionsDirectivePassTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/InheritsDirectivePassTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/MetadataAttributePassTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/MetadataAttributeTargetExtensionTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/PreallocatedAttributeTargetExtensionTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/SectionDirectivePassTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/SectionTargetExtensionTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/TemplateTargetExtensionTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/HtmlConventionsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/HtmlNodeOptimizationPassTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/BasicIntegrationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/CodeGenerationIntegrationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentBindIntegrationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentChildContentIntegrationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDeclarationIntegrationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDesignTimeCodeGenerationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDiagnosticRazorIntegrationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDirectiveIntegrationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDiscoveryIntegrationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentFilePathIntegrationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentGenericTypeIntegrationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentImportsIntegrationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentRuntimeCodeGenerationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentTemplateIntegrationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentTypingTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ExtensibleDirectiveTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/HtmlAttributeIntegrationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/TagHelpersIntegrationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/TestTagHelperDescriptors.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/DefaultRazorIntermediateNodeBuilderTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/DocumentIntermediateNodeExtensionsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/ExtensionIntermediateNodeTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/IntermediateNodeReferenceTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/IntermediateNodeWalkerTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/LargeTextSourceDocumentTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/BaselineWriter.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpAutoCompleteTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpBlockTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpCodeParserTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpErrorTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpExplicitExpressionTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpFunctionsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpImplicitExpressionTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpLanguageCharacteristicsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpNestedStatementsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpRazorCommentsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpReservedWordsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpSectionTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpSpecialBlockTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpStatementTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTemplateTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpToMarkupSwitchTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerCommentTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerIdentifierTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerLiteralTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerOperatorsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerTestBase.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpVerbatimBlockTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpWhitespaceHandlingTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CodeBlockEditHandlerTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/DirectiveCSharpTokenizerTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/DirectiveHtmlTokenizerTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/DisposableActionTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlAttributeTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlBlockTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlDocumentTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlErrorTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlMarkupParserTests.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlTagsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlToCodeSwitchTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlTokenizerTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlTokenizerTestBase.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/ImplicitExpressionEditHandlerTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/LineTrackingStringBufferTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/MarkupElementGroupingTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/RazorDirectivesTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/RazorParserTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/SourceLocationTrackerTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperBlockRewriterTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperParseTreeRewriterTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperRewritingTestBase.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TextReaderExtensionsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TokenizerLookaheadTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TokenizerTestBase.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/WhiteSpaceRewriterTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Microsoft.AspNetCore.Razor.Language.Test.csproj create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/Properties/AssemblyInfo.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorCodeDocumentExtensionsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorCodeDocumentTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorDiagnosticDescriptorTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorDiagnosticTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorEngineBuilderExtensionsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorEngineTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorLanguageVersionTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorParserFeatureFlagsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectEngineBuilderExtensionsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectEngineFeatureBaseTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectEngineTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectItemTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorSourceDocumentTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorSyntaxTreeTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/SourceChangeTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/SourceLocationTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/SourceSpanTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/StreamSourceDocumentTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/StringSourceDocumentTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TagHelperBinderTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TagHelperDescriptorBuilderTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TagHelperDescriptorExtensionsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TagHelperMatchingConventionsTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Home.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/About/About.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/Home/Index.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/Home/Index.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/Home/_ViewImports.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/_ViewImports.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/_ViewImports.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/CustomDirective.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/CustomDirective.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/Empty.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/Empty.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/HelloWorld.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/HelloWorld.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_Runtime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_Runtime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_DesignTime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_Runtime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_Runtime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteTagHelper.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteTagHelper_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteTagHelper_DesignTime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteTagHelper_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteTagHelper_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteTagHelper_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteTagHelper_Runtime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteTagHelper_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inherits.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inherits_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inherits_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inherits_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inherits_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inherits_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InlineBlocks.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InlineBlocks_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InlineBlocks_DesignTime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InlineBlocks_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InlineBlocks_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InlineBlocks_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InlineBlocks_Runtime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InlineBlocks_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_Runtime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_DesignTime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_Runtime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_DesignTime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_Runtime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags_DesignTime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags_Runtime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes_DesignTime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes_Runtime.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_DesignTime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_DesignTime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_DesignTime.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_Runtime.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_Runtime.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BodyAndAttributeChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BodyAndAttributeChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BodyAndAttributeChildContent/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BodyAndExplicitChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BodyAndExplicitChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BodyAndExplicitChildContent/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Generic/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Generic/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Generic/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericChildContent/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericChildContent_TypeInference/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericChildContent_TypeInference/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericChildContent_TypeInference/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute_TypeInference/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute_TypeInference/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute_TypeInference/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Generic_TypeInference/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Generic_TypeInference/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Generic_TypeInference/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Generic_TypeInference_Multiple/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Generic_TypeInference_Multiple/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Generic_TypeInference_Multiple/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_InFunctionsDirective/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_InFunctionsDirective/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_InFunctionsDirective/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_InLocalFunction/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_InLocalFunction/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_InLocalFunction/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_MultipleGenerics/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_MultipleGenerics/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_MultipleGenerics/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_MultipleGenerics_TypeInference/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_MultipleGenerics_TypeInference/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_MultipleGenerics_TypeInference/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Simple/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_Simple/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithElementOnlyChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithElementOnlyChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitGenericChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitGenericChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitGenericChildContent/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitStringParameter/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitStringParameter/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithExplicitStringParameter/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithGenericChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithGenericChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithGenericChildContent/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterName/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterName/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterName/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterNameOnComponent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterNameOnComponent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterNameOnComponent/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithNonPropertyAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithNonPropertyAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithNonPropertyAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithPageDirective/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithPageDirective/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithPageDirective/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithParameters/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithParameters/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithParameters/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildContent_FromAnotherNamespace/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildContent_FromAnotherNamespace/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ChildContent_FromAnotherNamespace/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentImports/_Imports.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentImports/_Imports.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentImports/_Imports.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentImports/_Imports.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentParameter_TypeMismatch_ReportsDiagnostic/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentParameter_TypeMismatch_ReportsDiagnostic/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentParameter_TypeMismatch_ReportsDiagnostic/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithTypeParameters/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithTypeParameters/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ComponentWithTypeParameters/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_IgnoresStaticAndAliasUsings/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_IgnoresStaticAndAliasUsings/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_IgnoresStaticAndAliasUsings/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_TextTagsAreNotRendered/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_TextTagsAreNotRendered/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_TextTagsAreNotRendered/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithDocType/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithDocType/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithFullyQualifiedTagNames/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithFullyQualifiedTagNames/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithImportsFile/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithImportsFile/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithUsingDirectives/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithUsingDirectives/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithUsingDirectives/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithUsingDirectives_AmbiguousImport/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithUsingDirectives_AmbiguousImport/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Component_WithUsingDirectives_AmbiguousImport/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DataDashAttribute_ExplicitExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DataDashAttribute_ExplicitExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DataDashAttribute_ExplicitExpression/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DataDashAttribute_ImplicitExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DataDashAttribute_ImplicitExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/DataDashAttribute_ImplicitExpression/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Element_WithRef/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Explicitly/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Explicitly/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Explicitly/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_Action/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_Action/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_Action/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_ActionOfObject/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_ActionOfObject/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_ActionOfObject/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_ActionOfT/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_ActionOfT/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_ActionOfT/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfTask/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfTask/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfTask/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfobjectTask/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfobjectTask/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfobjectTask/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandlerTagHelper_EscapeQuotes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandlerTagHelper_EscapeQuotes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithFullyQualifiedTagName/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithFullyQualifiedTagName/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/GenericComponent_WithFullyQualifiedTagName/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/LeadingWhiteSpace_WithCSharpExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/LeadingWhiteSpace_WithCSharpExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/LeadingWhiteSpace_WithCSharpExpression/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/LeadingWhiteSpace_WithComponent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/LeadingWhiteSpace_WithComponent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/LeadingWhiteSpace_WithDirective/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/LeadingWhiteSpace_WithDirective/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/LeadingWhiteSpace_WithDirective/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/MarkupComment_IsNotIncluded/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/MarkupComment_IsNotIncluded/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/MarkupComment_IsNotIncluded/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/MultipleExplictChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/MultipleExplictChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/MultipleExplictChildContent/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_AsComponentParameter_MixedContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_AsComponentParameter_MixedContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_AsComponentParameter_MixedContent/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_ContainsComponent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_ContainsComponent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_ContainsComponent/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_FollowedByComponent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_FollowedByComponent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_FollowedByComponent/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_Generic_AsComponentParameter/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_Generic_AsComponentParameter/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_Generic_AsComponentParameter/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_Generic_InImplicitExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_Generic_InImplicitExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_Generic_InImplicitExpression/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_InCodeBlock/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_InCodeBlock/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_InCodeBlock/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_InExplicitExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_InExplicitExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_InExplicitExpression/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_NonGeneric_AsComponentParameter/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_NonGeneric_AsComponentParameter/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_NonGeneric_AsComponentParameter/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_NonGeneric_InImplicitExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_NonGeneric_InImplicitExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/RazorTemplate_NonGeneric_InImplicitExpression/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_597/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_597/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_597/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_609/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_609/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_609/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_772/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_772/TestComponent.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_772/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_772/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_773/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_773/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_773/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ScriptTag_WithErrorSuppressed/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/ScriptTag_WithErrorSuppressed/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/TrailingWhiteSpace_WithCSharpExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/TrailingWhiteSpace_WithCSharpExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/TrailingWhiteSpace_WithCSharpExpression/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/TrailingWhiteSpace_WithComponent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/TrailingWhiteSpace_WithComponent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/TrailingWhiteSpace_WithDirective/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/TrailingWhiteSpace_WithDirective/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/TrailingWhiteSpace_WithDirective/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/WhiteSpace_InsideAttribute_InMarkupBlock/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/WhiteSpace_InsideAttribute_InMarkupBlock/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Whitespace_BetweenElementAndFunctions/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Whitespace_BetweenElementAndFunctions/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentDesignTimeCodeGenerationTest/Whitespace_BetweenElementAndFunctions/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_Lambda/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/AsyncEventHandler_OnElement_Action_MethodGroup/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_Delegate_SpecifiesValueAndExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_Delegate_SpecifiesValueAndExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_Delegate_SpecifiesValueAndExpression/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_EventCallback_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValueAndExpression_Generic/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithMatchingProperties/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_SpecifiesValue_WithoutMatchingProperties/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_TypeChecked_WithMatchingProperties/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToComponent_WithStringAttribute_DoesNotUseStringSyntax/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WithFormat_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementFallback_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElementWithSuffix_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WithStringAttribute_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BindToElement_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BodyAndAttributeChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BodyAndAttributeChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BodyAndAttributeChildContent/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BodyAndExplicitChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BodyAndExplicitChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BodyAndExplicitChildContent/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputCheckbox_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WithFormat_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputText_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/BuiltIn_BindToInputWithoutType_WritesAttributes/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBindWeaklyTyped_TypeInference/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericBind_TypeInference/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericChildContent_TypeInference/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericChildContent_TypeInference/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute_TypeInference/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_GenericWeaklyTypedAttribute_TypeInference/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic_TypeInference/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic_TypeInference/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic_TypeInference_Multiple/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Generic_TypeInference_Multiple/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InFunctionsDirective/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InFunctionsDirective/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InFunctionsDirective/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InLocalFunction/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InLocalFunction/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_InLocalFunction/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_MultipleGenerics/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_MultipleGenerics/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_MultipleGenerics_TypeInference/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_MultipleGenerics_TypeInference/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Simple/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_Simple/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithElementOnlyChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithElementOnlyChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitEventHandler/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitGenericChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitGenericChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitStringParameter/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithExplicitStringParameter/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterName/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterName/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterNameOnComponent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithGenericChildContent_SetsParameterNameOnComponent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithLambdaEventHandler/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithNonPropertyAttributes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithNonPropertyAttributes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithPageDirective/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithPageDirective/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithParameters/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithParameters/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildComponent_WithWeaklyTypeEventHandler/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildContent_FromAnotherNamespace/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ChildContent_FromAnotherNamespace/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentImports/_Imports.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentImports/_Imports.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentImports/_Imports.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentParameter_TypeMismatch_ReportsDiagnostic/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentParameter_TypeMismatch_ReportsDiagnostic/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ComponentWithTypeParameters/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_IgnoresStaticAndAliasUsings/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_IgnoresStaticAndAliasUsings/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_TextTagsAreNotRendered/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_TextTagsAreNotRendered/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_TextTagsAreNotRendered/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithDocType/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithDocType/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithFullyQualifiedTagNames/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithFullyQualifiedTagNames/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImportsFile/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithImportsFile/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithRef_WithChildContent/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives_AmbiguousImport/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Component_WithUsingDirectives_AmbiguousImport/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DataDashAttribute_ExplicitExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DataDashAttribute_ExplicitExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DataDashAttribute_ExplicitExpression/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DataDashAttribute_ImplicitExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DataDashAttribute_ImplicitExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/DataDashAttribute_ImplicitExpression/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Element_WithRef/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Explicitly/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_Action/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Explicitly/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Explicitly/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Explicitly/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_Action/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_Action/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_Action/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_ActionOfObject/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_ActionOfObject/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_ActionOfObject/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_ActionOfT/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_ActionOfT/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_ActionOfT/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfTTask/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfTTask/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfTTask/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfTask/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfTask/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfTask/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfobjectTask/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfobjectTask/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventCallback_CanPassEventCallback_Implicitly_FuncOfobjectTask/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandlerTagHelper_EscapeQuotes/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandlerTagHelper_EscapeQuotes/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithDelegate/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsLambdaDelegate/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithEventArgsMethodGroup/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithLambdaDelegate/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgMethodGroup/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithNoArgsLambdaDelegate/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/EventHandler_OnElement_WithString/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithComponentRef_TypeInference/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithFullyQualifiedTagName/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/GenericComponent_WithFullyQualifiedTagName/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/LeadingWhiteSpace_WithCSharpExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/LeadingWhiteSpace_WithCSharpExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/LeadingWhiteSpace_WithComponent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/LeadingWhiteSpace_WithComponent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/LeadingWhiteSpace_WithDirective/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/LeadingWhiteSpace_WithDirective/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/MarkupComment_IsNotIncluded/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/MarkupComment_IsNotIncluded/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/MarkupComment_IsNotIncluded/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/MultipleExplictChildContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/MultipleExplictChildContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_AsComponentParameter_MixedContent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_AsComponentParameter_MixedContent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_AsComponentParameter_MixedContent/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_ContainsComponent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_ContainsComponent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_ContainsComponent/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_FollowedByComponent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_FollowedByComponent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_FollowedByComponent/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_Generic_AsComponentParameter/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_Generic_AsComponentParameter/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_Generic_AsComponentParameter/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_Generic_InImplicitExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_Generic_InImplicitExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_Generic_InImplicitExpression/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_InCodeBlock/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_InCodeBlock/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_InCodeBlock/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_InExplicitExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_InExplicitExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_InExplicitExpression/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_NonGeneric_AsComponentParameter/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_NonGeneric_AsComponentParameter/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_NonGeneric_AsComponentParameter/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_NonGeneric_InImplicitExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_NonGeneric_InImplicitExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/RazorTemplate_NonGeneric_InImplicitExpression/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_597/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_609/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_772/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_772/TestComponent.diagnostics.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_772/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_773/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_773/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Regression_784/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ScriptTag_WithErrorSuppressed/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/ScriptTag_WithErrorSuppressed/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/TrailingWhiteSpace_WithCSharpExpression/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/TrailingWhiteSpace_WithCSharpExpression/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/TrailingWhiteSpace_WithComponent/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/TrailingWhiteSpace_WithComponent/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/TrailingWhiteSpace_WithDirective/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/TrailingWhiteSpace_WithDirective/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/WhiteSpace_InsideAttribute_InMarkupBlock/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/WhiteSpace_InsideAttribute_InMarkupBlock/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Whitespace_BetweenElementAndFunctions/TestComponent.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Whitespace_BetweenElementAndFunctions/TestComponent.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ComponentRuntimeCodeGenerationTest/Whitespace_BetweenElementAndFunctions/TestComponent.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ExtensibleDirectiveTest/NamespaceToken.codegen.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ExtensibleDirectiveTest/NamespaceToken.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ExtensibleDirectiveTest/NamespaceToken.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/ExtensibleDirectiveTest/NamespaceToken.mappings.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/HtmlAttributeIntegrationTest/HtmlWithConditionalAttribute.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/HtmlAttributeIntegrationTest/HtmlWithConditionalAttribute.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/HtmlAttributeIntegrationTest/HtmlWithDataDashAttribute.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/HtmlAttributeIntegrationTest/HtmlWithDataDashAttribute.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/TagHelpersIntegrationTest/NestedTagHelpers.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/TagHelpersIntegrationTest/NestedTagHelpers.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/TagHelpersIntegrationTest/SimpleTagHelpers.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/TagHelpersIntegrationTest/SimpleTagHelpers.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/TagHelpersIntegrationTest/TagHelpersWithBoundAttributes.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/TagHelpersIntegrationTest/TagHelpersWithBoundAttributes.ir.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpAutoCompleteTest/FunctionsDirectiveAutoCompleteAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpAutoCompleteTest/FunctionsDirectiveAutoCompleteAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpAutoCompleteTest/FunctionsDirectiveAutoCompleteAtStartOfFile.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpAutoCompleteTest/FunctionsDirectiveAutoCompleteAtStartOfFile.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpAutoCompleteTest/SectionDirectiveAutoCompleteAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpAutoCompleteTest/SectionDirectiveAutoCompleteAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpAutoCompleteTest/SectionDirectiveAutoCompleteAtStartOfFile.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpAutoCompleteTest/SectionDirectiveAutoCompleteAtStartOfFile.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpAutoCompleteTest/VerbatimBlockAutoCompleteAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpAutoCompleteTest/VerbatimBlockAutoCompleteAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpAutoCompleteTest/VerbatimBlockAutoCompleteAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpAutoCompleteTest/VerbatimBlockAutoCompleteAtStartOfFile.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpAutoCompleteTest/VerbatimBlockAutoCompleteAtStartOfFile.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpAutoCompleteTest/VerbatimBlockAutoCompleteAtStartOfFile.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/AcceptsElseIfWithNoCondition.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/AcceptsElseIfWithNoCondition.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/AcceptsTrailingDotIntoImplicitExpressionWhenEmbeddedInCode.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/AcceptsTrailingDotIntoImplicitExpressionWhenEmbeddedInCode.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/AllowsEmptyBlockStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/AllowsEmptyBlockStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/BalancingBracketsIgnoresStringLiteralCharactersAndBrackets.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/BalancingBracketsIgnoresStringLiteralCharactersAndBrackets.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/BalancingBracketsIgnoresStringLiteralCharactersAndBracketsInsideBlockComments.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/BalancingBracketsIgnoresStringLiteralCharactersAndBracketsInsideBlockComments.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/CapturesNewlineAfterUsing.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/CapturesNewlineAfterUsing.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/CorrectlyParsesDoWhileBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/CorrectlyParsesDoWhileBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/CorrectlyParsesDoWhileBlockMissingSemicolon.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/CorrectlyParsesDoWhileBlockMissingSemicolon.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/CorrectlyParsesDoWhileBlockMissingWhileClauseEntirely.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/CorrectlyParsesDoWhileBlockMissingWhileClauseEntirely.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/CorrectlyParsesDoWhileBlockMissingWhileCondition.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/CorrectlyParsesDoWhileBlockMissingWhileCondition.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/CorrectlyParsesDoWhileBlockMissingWhileConditionWithSemicolon.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/CorrectlyParsesDoWhileBlockMissingWhileConditionWithSemicolon.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/CorrectlyParsesMarkupInDoWhileBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/CorrectlyParsesMarkupInDoWhileBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/DoesNotAllowMultipleFinallyBlocks.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/DoesNotAllowMultipleFinallyBlocks.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/DoesNotParseOnSwitchCharacterNotFollowedByOpenAngleOrColon.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/DoesNotParseOnSwitchCharacterNotFollowedByOpenAngleOrColon.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/DoesntCaptureWhitespaceAfterUsing.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/DoesntCaptureWhitespaceAfterUsing.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/HasErrorsIfNamespaceAliasMissingSemicolon.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/HasErrorsIfNamespaceAliasMissingSemicolon.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/HasErrorsIfNamespaceImportMissingSemicolon.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/HasErrorsIfNamespaceImportMissingSemicolon.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/LocalFunctionsWithGenerics.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/LocalFunctionsWithGenerics.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/LocalFunctionsWithRazor.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/LocalFunctionsWithRazor.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/NestedCodeBlockWithAtDoesntCauseError.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/NestedCodeBlockWithAtDoesntCauseError.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/NestedCodeBlockWithCSharpAt.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/NestedCodeBlockWithCSharpAt.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/NestedCodeBlockWithMarkupSetsDotAsMarkup.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/NestedCodeBlockWithMarkupSetsDotAsMarkup.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsersCanNestRecursively.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsersCanNestRecursively.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesElseIfBranchesOfIfStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesElseIfBranchesOfIfStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesExpressionOnSwitchCharacterFollowedByIdentifierStart.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesExpressionOnSwitchCharacterFollowedByIdentifierStart.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesExpressionOnSwitchCharacterFollowedByOpenParen.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesExpressionOnSwitchCharacterFollowedByOpenParen.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesMultipleElseIfBranchesOfIfStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesMultipleElseIfBranchesOfIfStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesMultipleElseIfBranchesOfIfStatementFollowedByOneElseBranch.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesMultipleElseIfBranchesOfIfStatementFollowedByOneElseBranch.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesNamespaceAliasWithSemicolonForUsingKeywordIfIsInValidFormat.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesNamespaceAliasWithSemicolonForUsingKeywordIfIsInValidFormat.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesNamespaceImportWithSemicolonForUsingKeywordIfIsInValidFormat.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesNamespaceImportWithSemicolonForUsingKeywordIfIsInValidFormat.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsForKeyword.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsForKeyword.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsForeachKeyword.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsForeachKeyword.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsIfKeywordWithNoElseBranches.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsIfKeywordWithNoElseBranches.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsSwitchKeyword.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsSwitchKeyword.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsWhileKeyword.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsWhileKeyword.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesIfFirstIdentifierIsUsingFollowedByParen.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesIfFirstIdentifierIsUsingFollowedByParen.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingCatchClausesAfterFinallyBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingCatchClausesAfterFinallyBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingCodeAfterElseBranch.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingCodeAfterElseBranch.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingIfIfStatementNotFollowedByElse.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingIfIfStatementNotFollowedByElse.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenCatchAndFinallyClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenCatchAndFinallyClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenDoAndWhileClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenDoAndWhileClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenElseIfAndElseClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenElseIfAndElseClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenIfAndElseClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenIfAndElseClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenIfAndElseIfClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenIfAndElseIfClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenTryAndCatchClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenTryAndCatchClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenTryAndFinallyClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenTryAndFinallyClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsExceptionLessCatchClauses.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsExceptionLessCatchClauses.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenCatchAndFinallyClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenCatchAndFinallyClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenDoAndWhileClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenDoAndWhileClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenElseIfAndElseClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenElseIfAndElseClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenIfAndElseClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenIfAndElseClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenIfAndElseIfClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenIfAndElseIfClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenTryAndCatchClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenTryAndCatchClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenTryAndFinallyClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenTryAndFinallyClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinAdditionalCatchClauses.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinAdditionalCatchClauses.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinCatchClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinCatchClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinFinallyClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinFinallyClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinTryClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinTryClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenCatchAndFinallyClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenCatchAndFinallyClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenDoAndWhileClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenDoAndWhileClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenElseIfAndElseClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenElseIfAndElseClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenIfAndElseClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenIfAndElseClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenIfAndElseIfClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenIfAndElseIfClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenTryAndCatchClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenTryAndCatchClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenTryAndFinallyClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenTryAndFinallyClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithFinallyClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithFinallyClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithMultipleCatchClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithMultipleCatchClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithNoAdditionalClauses.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithNoAdditionalClauses.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithOneCatchClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithOneCatchClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsUsingsNestedWithinOtherBlocks.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsUsingsNestedWithinOtherBlocks.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesBlockCommentAtEndOfFile.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesBlockCommentAtEndOfFile.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesBlockCommentAtEndOfFile.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesParenBalancingAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesParenBalancingAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesParenBalancingAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleLineCommentAtEndOfFile.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleLineCommentAtEndOfFile.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleLineCommentAtEndOfFile.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleSlashAtEndOfFile.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleSlashAtEndOfFile.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleSlashAtEndOfFile.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesUsingKeywordAtEOFAndOutputsFileCodeBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesUsingKeywordAtEOFAndOutputsFileCodeBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ThenBalancesBracesIfFirstIdentifierIsLockKeyword.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ThenBalancesBracesIfFirstIdentifierIsLockKeyword.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TreatsAtSignsAfterFirstPairAsPartOfCSharpStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TreatsAtSignsAfterFirstPairAsPartOfCSharpStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TreatsDoubleAtSignAsEscapeSequenceIfAtStatementStart.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TreatsDoubleAtSignAsEscapeSequenceIfAtStatementStart.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionAtBeginningOfAttributeValue_DoesNotThrow.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionAtBeginningOfAttributeValue_DoesNotThrow.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionAtEndOfAttributeValue_DoesNotThrow.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionAtEndOfAttributeValue_DoesNotThrow.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionBetweenAttributeValue_DoesNotThrow.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionBetweenAttributeValue_DoesNotThrow.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInAttributeValue_DoesNotThrow.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInAttributeValue_DoesNotThrow.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInEmail_DoesNotThrow.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInEmail_DoesNotThrow.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInRegex_DoesNotThrow.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInRegex_DoesNotThrow.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionWithExpressionBlock_DoesNotThrow.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionWithExpressionBlock_DoesNotThrow.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransition_EndOfFile_Throws.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransition_EndOfFile_Throws.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransition_EndOfFile_Throws.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithUnexpectedTransitionsInAttributeValue_Throws.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithUnexpectedTransitionsInAttributeValue_Throws.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithUnexpectedTransitionsInAttributeValue_Throws.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CapturesWhitespaceToEOLInInvalidUsingStmtAndTreatsAsFileCode.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CapturesWhitespaceToEOLInInvalidUsingStmtAndTreatsAsFileCode.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyHandlesInCorrectTransitionsIfImplicitExpressionParensUnclosed.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyHandlesInCorrectTransitionsIfImplicitExpressionParensUnclosed.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyHandlesInCorrectTransitionsIfImplicitExpressionParensUnclosed.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesAtSignInDelimitedBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesAtSignInDelimitedBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesMarkupIncorrectyAssumedToBeWithinAStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesMarkupIncorrectyAssumedToBeWithinAStatement.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesMarkupIncorrectyAssumedToBeWithinAStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyRecoversFromMissingCloseParenInExpressionWithinCode.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyRecoversFromMissingCloseParenInExpressionWithinCode.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyRecoversFromMissingCloseParenInExpressionWithinCode.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/HandlesQuotesAfterTransition.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/HandlesQuotesAfterTransition.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/HandlesQuotesAfterTransition.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/IncludesUnexpectedCharacterInSingleStatementControlFlowStatementError.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/IncludesUnexpectedCharacterInSingleStatementControlFlowStatementError.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/IncludesUnexpectedCharacterInSingleStatementControlFlowStatementError.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsOpenCurlyAsCodeSpanIfEofFoundAfterOpenCurlyBrace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsOpenCurlyAsCodeSpanIfEofFoundAfterOpenCurlyBrace.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsOpenCurlyAsCodeSpanIfEofFoundAfterOpenCurlyBrace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsZeroLengthCodeSpanIfStatementBlockEmpty.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsZeroLengthCodeSpanIfStatementBlockEmpty.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodParsesNothingIfFirstCharacterIsNotIdentifierStartOrParenOrBrace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodParsesNothingIfFirstCharacterIsNotIdentifierStartOrParenOrBrace.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodParsesNothingIfFirstCharacterIsNotIdentifierStartOrParenOrBrace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfEOFAfterTransitionInEmbeddedExpression.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfEOFAfterTransitionInEmbeddedExpression.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfEOFAfterTransitionInEmbeddedExpression.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfNewlineFollowsTransition.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfNewlineFollowsTransition.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfNewlineFollowsTransition.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfWhitespaceBetweenTransitionAndBlockStartInEmbeddedExpr.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfWhitespaceBetweenTransitionAndBlockStartInEmbeddedExpr.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfWhitespaceBetweenTransitionAndBlockStartInEmbeddedExpr.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/OutputsErrorIfAtSignFollowedByLessThanSignAtStatementStart.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/OutputsErrorIfAtSignFollowedByLessThanSignAtStatementStart.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/OutputsErrorIfAtSignFollowedByLessThanSignAtStatementStart.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfCatchBlockUnterminatedAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfCatchBlockUnterminatedAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfCatchBlockUnterminatedAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfClassBlockUnterminatedAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfClassBlockUnterminatedAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfDoBlockUnterminatedAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfDoBlockUnterminatedAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfDoBlockUnterminatedAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseBlockUnterminatedAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseBlockUnterminatedAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseBlockUnterminatedAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseIfBlockUnterminatedAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseIfBlockUnterminatedAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseIfBlockUnterminatedAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfExplicitCodeBlockUnterminatedAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfExplicitCodeBlockUnterminatedAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfExplicitCodeBlockUnterminatedAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfFinallyBlockUnterminatedAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfFinallyBlockUnterminatedAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfFinallyBlockUnterminatedAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForBlockUnterminatedAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForBlockUnterminatedAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForBlockUnterminatedAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForeachBlockUnterminatedAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForeachBlockUnterminatedAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForeachBlockUnterminatedAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfIfBlockUnterminatedAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfIfBlockUnterminatedAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfIfBlockUnterminatedAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfLockBlockUnterminatedAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfLockBlockUnterminatedAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfLockBlockUnterminatedAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfSwitchBlockUnterminatedAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfSwitchBlockUnterminatedAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfSwitchBlockUnterminatedAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfTryBlockUnterminatedAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfTryBlockUnterminatedAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfTryBlockUnterminatedAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfUsingBlockUnterminatedAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfUsingBlockUnterminatedAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfUsingBlockUnterminatedAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfWhileBlockUnterminatedAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfWhileBlockUnterminatedAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfWhileBlockUnterminatedAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/RequiresControlFlowStatementsToHaveBraces.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/RequiresControlFlowStatementsToHaveBraces.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/RequiresControlFlowStatementsToHaveBraces.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ResumesIfStatementAfterOpenParen.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ResumesIfStatementAfterOpenParen.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ResumesIfStatementAfterOpenParen.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfBracketInImplicitExpressionUnclosed.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfBracketInImplicitExpressionUnclosed.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfBracketInImplicitExpressionUnclosed.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfIfParenInExplicitExprUnclosed.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfIfParenInExplicitExprUnclosed.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfIfParenInExplicitExprUnclosed.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfParenInImplicitExprUnclosed.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfParenInImplicitExprUnclosed.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfParenInImplicitExprUnclosed.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfBracketInImplicitExprUnclosed.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfBracketInImplicitExprUnclosed.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfBracketInImplicitExprUnclosed.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfIfParenInExplicitExprUnclosed.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfIfParenInExplicitExprUnclosed.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfIfParenInExplicitExprUnclosed.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfParenInImplicitExpressionUnclosed.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfParenInImplicitExpressionUnclosed.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfParenInImplicitExpressionUnclosed.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesForeachBlockAtEOLWhenRecoveringFromMissingCloseParen.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesForeachBlockAtEOLWhenRecoveringFromMissingCloseParen.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesForeachBlockAtEOLWhenRecoveringFromMissingCloseParen.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesIfBlockAtEOLWhenRecoveringFromMissingCloseParen.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesIfBlockAtEOLWhenRecoveringFromMissingCloseParen.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesIfBlockAtEOLWhenRecoveringFromMissingCloseParen.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalCSharpStringsAtEOLIfEndQuoteMissing.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalCSharpStringsAtEOLIfEndQuoteMissing.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalCSharpStringsAtEOLIfEndQuoteMissing.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalStringAtEndOfFile.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalStringAtEndOfFile.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalStringAtEndOfFile.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesUsingBlockAtEOLWhenRecoveringFromMissingCloseParen.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesUsingBlockAtEOLWhenRecoveringFromMissingCloseParen.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesUsingBlockAtEOLWhenRecoveringFromMissingCloseParen.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesVerbatimStringAtEndOfFile.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesVerbatimStringAtEndOfFile.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesVerbatimStringAtEndOfFile.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesWhileClauseInDoStmtAtEOLWhenRecoveringFromMissingCloseParen.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesWhileClauseInDoStmtAtEOLWhenRecoveringFromMissingCloseParen.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesWhileClauseInDoStmtAtEOLWhenRecoveringFromMissingCloseParen.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithHelperDirectiveProducesError.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithHelperDirectiveProducesError.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithHelperDirectiveProducesError.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithNestedCodeBlockProducesError.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithNestedCodeBlockProducesError.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithNestedCodeBlockProducesError.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptConsecutiveEscapedQuotesInNonVerbatimStrings.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptConsecutiveEscapedQuotesInNonVerbatimStrings.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptConsecutiveEscapedQuotesInVerbatimStrings.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptConsecutiveEscapedQuotesInVerbatimStrings.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptEscapedQuoteInNonVerbatimStrings.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptEscapedQuoteInNonVerbatimStrings.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptEscapedQuoteInVerbatimStrings.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptEscapedQuoteInVerbatimStrings.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultiLineVerbatimStrings.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultiLineVerbatimStrings.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleEscapedQuotesInNonVerbatimStrings.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleEscapedQuotesInNonVerbatimStrings.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleEscapedQuotesInVerbatimStrings.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleEscapedQuotesInVerbatimStrings.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleRepeatedEscapedQuoteInVerbatimStrings.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleRepeatedEscapedQuoteInVerbatimStrings.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfEOFOccursAfterStartOfExplicitExpr.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfEOFOccursAfterStartOfExplicitExpr.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfEOFOccursAfterStartOfExplicitExpr.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfExplicitExpressionIsEmpty.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfExplicitExpressionIsEmpty.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_CanContainCurlyBraces.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_CanContainCurlyBraces.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseMarkupInString.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseMarkupInString.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseMarkupInVerbatimString.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseMarkupInVerbatimString.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseWhenNotSupported.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseWhenNotSupported.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_MarkupCanContainTemplate.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_MarkupCanContainTemplate.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_ParsesMarkupInsideMethod.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_ParsesMarkupInsideMethod.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_ParsesMarkupWithExpressionsMethod.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_ParsesMarkupWithExpressionsMethod.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/ReservedKeywordsInFunctionsBlock_WithMarkup.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/ReservedKeywordsInFunctionsBlock_WithMarkup.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/AcceptsNonEnglishCharactersThatAreValidIdentifiers.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/AcceptsNonEnglishCharactersThatAreValidIdentifiers.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotAcceptSemicolonIfExpressionTerminatedByWhitespace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotAcceptSemicolonIfExpressionTerminatedByWhitespace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotAtEOFInImplicitExpression.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotAtEOFInImplicitExpression.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeSemicolonAfterDot.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeSemicolonAfterDot.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/IgnoresSemicolonAtEndOfDottedIdentifiers.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/IgnoresSemicolonAtEndOfDottedIdentifiers.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/IgnoresSemicolonAtEndOfSimpleImplicitExpression.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/IgnoresSemicolonAtEndOfSimpleImplicitExpression.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/NestedImplicitExpression.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/NestedImplicitExpression.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputExpressionIfModuleTokenNotFollowedByBrace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputExpressionIfModuleTokenNotFollowedByBrace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfEOFOccursAfterTransition.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfEOFOccursAfterTransition.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfEOFOccursAfterTransition.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfInvalidCharacterFollowsTransition.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfInvalidCharacterFollowsTransition.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfInvalidCharacterFollowsTransition.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesDottedIdentifiersAsImplicitExpression.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesDottedIdentifiersAsImplicitExpression.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket10.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket10.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket11.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket11.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket11.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket12.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket12.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket13.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket13.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket14.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket14.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket15.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket15.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket16.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket16.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket3.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket5.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket7.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket8.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket9.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket9.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot10.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot10.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot11.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot11.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot12.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot12.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot13.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot13.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot14.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot14.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot9.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot9.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesSingleIdentifierAsImplicitExpression.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesSingleIdentifierAsImplicitExpression.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ProperlyParsesBracketsAndBalancesThemInImplicitExpression.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ProperlyParsesBracketsAndBalancesThemInImplicitExpression.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ProperlyParsesParenthesesAndBalancesThemInImplicitExpression.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ProperlyParsesParenthesesAndBalancesThemInImplicitExpression.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/StopsBalancingParenthesesAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/StopsBalancingParenthesesAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/StopsBalancingParenthesesAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/SupportsSlashesWithinComplexImplicitExpressions.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/SupportsSlashesWithinComplexImplicitExpressions.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesAfterIdentifierUnlessFollowedByDotOrParenInImplicitExpr.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesAfterIdentifierUnlessFollowedByDotOrParenInImplicitExpr.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExprBeforeDotIfDotNotFollowedByIdentifierStartChar.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExprBeforeDotIfDotNotFollowedByIdentifierStartChar.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtHtmlEndTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtHtmlEndTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtHtmlStartTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtHtmlStartTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtLastValidPointIfDotFollowedByWhitespace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtLastValidPointIfDotFollowedByWhitespace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionIfCloseParenFollowedByAnyWhiteSpace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionIfCloseParenFollowedByAnyWhiteSpace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionIfIdentifierFollowedByAnyWhiteSpace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionIfIdentifierFollowedByAnyWhiteSpace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedCodeBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedCodeBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedExplicitExpression.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedExplicitExpression.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedImplicitExpression.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedImplicitExpression.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedKeywordStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedKeywordStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedMarkupBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedMarkupBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedSimpleStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedSimpleStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/EmptyRazorComment.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/EmptyRazorComment.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/MultipleRazorCommentInMarkup.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/MultipleRazorCommentInMarkup.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/MultipleRazorCommentsInSameLineInMarkup.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/MultipleRazorCommentsInSameLineInMarkup.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentBetweenCodeBlockAndMarkup.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentBetweenCodeBlockAndMarkup.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInClosingTagBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInClosingTagBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInImplicitExpressionMethodCall.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInImplicitExpressionMethodCall.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInImplicitExpressionMethodCall.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInMarkup.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInMarkup.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInOpeningTagBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInOpeningTagBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInVerbatimBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInVerbatimBlock.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInVerbatimBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentWithExtraNewLineInMarkup.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentWithExtraNewLineInMarkup.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentsSurroundingMarkup.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentsSurroundingMarkup.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorMultilineCommentInBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorMultilineCommentInBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorComment.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorComment.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorComment.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInImplicitExpressionMethodCall.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInImplicitExpressionMethodCall.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInImplicitExpressionMethodCall.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInVerbatimBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInVerbatimBlock.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInVerbatimBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWord.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWord.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWord.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWordIsCaseSensitive.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWordIsCaseSensitive.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/AcceptsOpenBraceMultipleLinesBelowSectionName.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/AcceptsOpenBraceMultipleLinesBelowSectionName.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/AllowsBracesInCSharpExpression.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/AllowsBracesInCSharpExpression.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/BalancesBraces.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/BalancesBraces.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesNewlineImmediatelyFollowing.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesNewlineImmediatelyFollowing.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesWhitespaceToEndOfLineInSectionStatementMissingName.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesWhitespaceToEndOfLineInSectionStatementMissingName.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesWhitespaceToEndOfLineInSectionStatementMissingOpenBrace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesWhitespaceToEndOfLineInSectionStatementMissingOpenBrace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CommentRecoversFromUnclosedTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CommentRecoversFromUnclosedTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CorrectlyTerminatesWhenCloseBraceImmediatelyFollowsMarkup.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CorrectlyTerminatesWhenCloseBraceImmediatelyFollowsMarkup.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/DoesNotRequireSpaceBetweenSectionNameAndOpenBrace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/DoesNotRequireSpaceBetweenSectionNameAndOpenBrace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenBrace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenBrace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesUnterminatedSection.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesUnterminatedSection.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesUnterminatedSectionWithNestedIf.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesUnterminatedSectionWithNestedIf.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/IgnoresSectionUnlessAllLowerCase.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/IgnoresSectionUnlessAllLowerCase.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserDoesNotOutputErrorOtherNestedDirectives.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserDoesNotOutputErrorOtherNestedDirectives.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnMultipleNestedSections.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnMultipleNestedSections.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnNestedSections.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnNestedSections.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesComment.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesComment.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesCommentWithDelimiters.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesCommentWithDelimiters.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesNamedSectionCorrectly.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesNamedSectionCorrectly.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesXmlProcessingInstruction.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesXmlProcessingInstruction.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndAcceptsWhitespaceToEOLIfSectionNotFollowedByOpenBrace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndAcceptsWhitespaceToEOLIfSectionNotFollowedByOpenBrace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndTerminatesSectionBlockIfKeywordNotFollowedByIdentifierStartChar.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndTerminatesSectionBlockIfKeywordNotFollowedByIdentifierStartChar.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndTerminatesSectionBlockIfNameNotFollowedByOpenBrace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndTerminatesSectionBlockIfNameNotFollowedByOpenBrace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/SectionCorrectlyTerminatedWhenCloseBraceFollowsCodeBlockNoWhitespace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/SectionCorrectlyTerminatedWhenCloseBraceFollowsCodeBlockNoWhitespace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/SectionIsCorrectlyTerminatedWhenCloseBraceImmediatelyFollowsCodeBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/SectionIsCorrectlyTerminatedWhenCloseBraceImmediatelyFollowsCodeBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/_WithDoubleTransition1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/_WithDoubleTransition1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/_WithDoubleTransition2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/_WithDoubleTransition2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/BalancesBracesOutsideStringsIfFirstCharIsBraceAndReturnsSpanOfTypeCode.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/BalancesBracesOutsideStringsIfFirstCharIsBraceAndReturnsSpanOfTypeCode.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/BalancesParensOutsideStringsIfFirstCharIsParenAndReturnsSpanOfTypeExpr.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/BalancesParensOutsideStringsIfFirstCharIsParenAndReturnsSpanOfTypeExpr.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/NamespaceImportInsideCodeBlockCausesError.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/NamespaceImportInsideCodeBlockCausesError.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/NonKeywordStatementInCodeBlockIsHandledCorrectly.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/NonKeywordStatementInCodeBlockIsHandledCorrectly.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockIgnoresSingleSlashAtStart.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockIgnoresSingleSlashAtStart.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockIgnoresSingleSlashAtStart.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockTerminatesSingleLineCommentAtEndOfLine.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockTerminatesSingleLineCommentAtEndOfLine.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/TypeAliasInsideCodeBlockIsNotHandledSpecially.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/TypeAliasInsideCodeBlockIsNotHandledSpecially.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/AwaitForEachStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/AwaitForEachStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/CatchClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/CatchClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/DoStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/DoStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ElseClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ElseClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ElseIfClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ElseIfClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteBody.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteBody.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteBody.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteCondition.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteCondition.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteCondition.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchNoBodyWhen.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchNoBodyWhen.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchWhen.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchWhen.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchWhenNoBodies.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchWhenNoBodies.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryWhen.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryWhen.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_MultiLine.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_MultiLine.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_NestedTryCatchWhen.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_NestedTryCatchWhen.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenCatchWhenComplete_SingleLine.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenCatchWhenComplete_SingleLine.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenComplete_SingleLine.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenComplete_SingleLine.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenFinallyComplete_SingleLine.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenFinallyComplete_SingleLine.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/FinallyClause.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/FinallyClause.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ForEachStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ForEachStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ForStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ForStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/IfStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/IfStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/LockStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/LockStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/MalformedAwaitForEachStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/MalformedAwaitForEachStatement.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/MalformedAwaitForEachStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/NonBlockKeywordTreatedAsImplicitExpression.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/NonBlockKeywordTreatedAsImplicitExpression.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_Complete_Spaced.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_Complete_Spaced.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_GlobalPrefix.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_GlobalPrefix.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_MultipleIdentifiers.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_MultipleIdentifiers.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_NoUsing.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_NoUsing.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_SingleIdentifier.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_SingleIdentifier.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/SwitchStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/SwitchStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/TryStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/TryStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingNamespaceImport.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingNamespaceImport.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingTypeAlias.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingTypeAlias.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/Using_VariableDeclaration_Complex.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/Using_VariableDeclaration_Complex.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/Using_VariableDeclaration_Simple.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/Using_VariableDeclaration_Simple.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/WhileStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/WhileStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInExplicitExpressionParens.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInExplicitExpressionParens.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInImplicitExpressionParens.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInImplicitExpressionParens.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInStatementWithinCodeBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInStatementWithinCodeBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInStatementWithinStatementBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInStatementWithinStatementBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSingleLineImmediatelyFollowingStatementChar.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSingleLineImmediatelyFollowingStatementChar.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSingleLineTemplate.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSingleLineTemplate.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesTwoTemplatesInImplicitExpressionParens.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesTwoTemplatesInImplicitExpressionParens.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesTwoTemplatesInStatementWithinCodeBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesTwoTemplatesInStatementWithinCodeBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlessTwoTemplatesInStatementWithinStatementBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlessTwoTemplatesInStatementWithinStatementBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInImplicitExprParens.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInImplicitExprParens.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInImplicitExprParens.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinCodeBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinCodeBlock.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinCodeBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinStmtBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinStmtBlock.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinStmtBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/_WithDoubleTransition_DoesNotThrow.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/_WithDoubleTransition_DoesNotThrow.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/AllowsMarkupInIfBodyWithBraces.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/AllowsMarkupInIfBodyWithBraces.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/AllowsMarkupInIfBodyWithBracesWithinCodeBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/AllowsMarkupInIfBodyWithBracesWithinCodeBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/CorrectlyReturnsFromMarkupBlockWithPseudoTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/CorrectlyReturnsFromMarkupBlockWithPseudoTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/CorrectlyReturnsFromMarkupBlockWithPseudoTagInCodeBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/CorrectlyReturnsFromMarkupBlockWithPseudoTagInCodeBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesAllWhitespaceOnSameLineWithTrailingNewLineToMarkupExclPreceedingNewline.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesAllWhitespaceOnSameLineWithTrailingNewLineToMarkupExclPreceedingNewline.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtColonTemplateTransitionInDesignTimeMode.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtColonTemplateTransitionInDesignTimeMode.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtColonTransitionInDesignTimeMode.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtColonTransitionInDesignTimeMode.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtTagTemplateTransitionInDesignTimeMode.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtTagTemplateTransitionInDesignTimeMode.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnInvalidAtTagTransitionInDesignTimeMode.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnInvalidAtTagTransitionInDesignTimeMode.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnInvalidAtTagTransitionInDesignTimeMode.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnTagTransitionInDesignTimeMode.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnTagTransitionInDesignTimeMode.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnOpenAngleBracket.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnOpenAngleBracket.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnOpenAngleBracketInCodeBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnOpenAngleBracketInCodeBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByColon.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByColon.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByColonInCodeBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByColonInCodeBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByDoubleColon.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByDoubleColon.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByTripleColon.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByTripleColon.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ShouldSupportMarkupWithoutPreceedingWhitespace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ShouldSupportMarkupWithoutPreceedingWhitespace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ShouldSupportSingleLineMarkupContainingStatementBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ShouldSupportSingleLineMarkupContainingStatementBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SingleAngleBracketDoesNotCauseSwitchIfOuterBlockIsTerminated.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SingleAngleBracketDoesNotCauseSwitchIfOuterBlockIsTerminated.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsAllKindsOfImplicitMarkupInCodeBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsAllKindsOfImplicitMarkupInCodeBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsMarkupInCaseAndDefaultBranchesOfSwitch.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsMarkupInCaseAndDefaultBranchesOfSwitch.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsMarkupInCaseAndDefaultBranchesOfSwitchInCodeBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsMarkupInCaseAndDefaultBranchesOfSwitchInCodeBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprAcceptsTrailingNewlineInDesignTimeMode.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprAcceptsTrailingNewlineInDesignTimeMode.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptDotAfterAt.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptDotAfterAt.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptDotAfterAt.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptTrailingNewlineInRunTimeMode.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptTrailingNewlineInRunTimeMode.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtAcceptsSingleSpaceOrNewlineAtDesignTime.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtAcceptsSingleSpaceOrNewlineAtDesignTime.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtAcceptsSingleSpaceOrNewlineAtDesignTime.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtOutputsZeroLengthCodeSpan.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtOutputsZeroLengthCodeSpan.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtOutputsZeroLengthCodeSpan.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/VerbatimBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/VerbatimBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpWhitespaceHandlingTest/StmtBlockDoesNotAcceptTrailingNewlineIfTheyAreSignificantToAncestor.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpWhitespaceHandlingTest/StmtBlockDoesNotAcceptTrailingNewlineIfTheyAreSignificantToAncestor.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreDisabledForDataAttributesInBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreDisabledForDataAttributesInBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreDisabledForDataAttributesInDocument.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreDisabledForDataAttributesInDocument.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreEnabledForDataAttributesWithExperimentalFlag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreEnabledForDataAttributesWithExperimentalFlag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInDocument.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInDocument.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/DoubleQuotedLiteralAttribute.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/DoubleQuotedLiteralAttribute.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/DynamicAttributeWithWhitespaceSurroundingEquals.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/DynamicAttributeWithWhitespaceSurroundingEquals.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/MultiPartLiteralAttribute.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/MultiPartLiteralAttribute.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/MultiValueExpressionAttribute.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/MultiValueExpressionAttribute.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/NewLineBetweenAttributes.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/NewLineBetweenAttributes.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/NewLinePrecedingAttribute.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/NewLinePrecedingAttribute.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleExpressionAttribute.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleExpressionAttribute.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleLiteralAttribute.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleLiteralAttribute.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleLiteralAttributeWithWhitespaceSurroundingEquals.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleLiteralAttributeWithWhitespaceSurroundingEquals.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedAttributeWithCodeWithSpacesInBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedAttributeWithCodeWithSpacesInBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedAttributeWithCodeWithSpacesInDocument.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedAttributeWithCodeWithSpacesInDocument.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedLiteralAttribute.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedLiteralAttribute.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/VirtualPathAttributesWorkWithConditionalAttributes.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/VirtualPathAttributesWorkWithConditionalAttributes.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/WhitespaceAndNewLinePrecedingAttribute.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/WhitespaceAndNewLinePrecedingAttribute.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AcceptsEmptyTextTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AcceptsEmptyTextTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AcceptsTextTagAsOuterTagButDoesNotRender.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AcceptsTextTagAsOuterTagButDoesNotRender.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsCloseAngleBracketInAttributeValueIfDoubleQuoted.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsCloseAngleBracketInAttributeValueIfDoubleQuoted.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsCloseAngleBracketInAttributeValueIfSingleQuoted.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsCloseAngleBracketInAttributeValueIfSingleQuoted.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsSlashInAttributeValueIfDoubleQuoted.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsSlashInAttributeValueIfDoubleQuoted.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsSlashInAttributeValueIfSingleQuoted.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsSlashInAttributeValueIfSingleQuoted.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsStartAndEndTagsToDifferInCase.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsStartAndEndTagsToDifferInCase.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsUnclosedTagsAsLongAsItCanRecoverToAnExpectedEndTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsUnclosedTagsAsLongAsItCanRecoverToAnExpectedEndTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/CanHandleSelfClosingTagsWithinBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/CanHandleSelfClosingTagsWithinBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/CorrectlyHandlesSingleLineOfMarkupWithEmbeddedStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/CorrectlyHandlesSingleLineOfMarkupWithEmbeddedStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/DoesNotConsiderPsuedoTagWithinMarkupBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/DoesNotConsiderPsuedoTagWithinMarkupBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/DoesNotTerminateXMLProcInstrAtCloseAngleUnlessPreceededByQuestionMark.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/DoesNotTerminateXMLProcInstrAtCloseAngleUnlessPreceededByQuestionMark.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesForwardSlashInAttributeContent.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesForwardSlashInAttributeContent.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleAtEof.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleAtEof.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleAtEof.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleWithProperTagFollowingIt.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleWithProperTagFollowingIt.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleWithProperTagFollowingIt.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesUnbalancedTripleDashHTMLComments.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesUnbalancedTripleDashHTMLComments.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HtmlCommentSupportsMultipleDashes.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HtmlCommentSupportsMultipleDashes.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/IgnoresTagsInContentsOfScriptTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/IgnoresTagsInContentsOfScriptTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/OnlyTerminatesCommentOnFullEndSequence.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/OnlyTerminatesCommentOnFullEndSequence.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesSGMLDeclarationAsEmptyTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesSGMLDeclarationAsEmptyTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesUntilMatchingEndTagIfFirstNonWhitespaceCharacterIsStartTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesUntilMatchingEndTagIfFirstNonWhitespaceCharacterIsStartTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesXMLProcessingInstructionAsEmptyTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesXMLProcessingInstructionAsEmptyTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ProperlyBalancesCommentStartAndEndTags.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ProperlyBalancesCommentStartAndEndTags.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ReadsToEndOfLineIfFirstCharacterAfterTransitionIsColon.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ReadsToEndOfLineIfFirstCharacterAfterTransitionIsColon.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/RendersLiteralTextTagIfDoubled.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/RendersLiteralTextTagIfDoubled.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsAtMatchingCloseTagToStartTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsAtMatchingCloseTagToStartTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingMidEmptyTagIfEOFReached.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingMidEmptyTagIfEOFReached.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingMidEmptyTagIfEOFReached.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingSingleLineBlockAtEOFIfNoEOLReached.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingSingleLineBlockAtEOFIfNoEOLReached.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingSingleLineBlockAtEOFIfNoEOLReached.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentAsBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentAsBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentWithExtraDashAsBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentWithExtraDashAsBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentWithinBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentWithinBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsScriptTagsWithLessThanSignsInThem.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsScriptTagsWithLessThanSignsInThem.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsScriptTagsWithSpacedLessThanSignsInThem.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsScriptTagsWithSpacedLessThanSignsInThem.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsTagsWithAttributes.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsTagsWithAttributes.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TagWithoutCloseAngleDoesNotTerminateBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TagWithoutCloseAngleDoesNotTerminateBlock.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TagWithoutCloseAngleDoesNotTerminateBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOF.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOF.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOF.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOFWhenParsingComment.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOFWhenParsingComment.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOFWhenParsingComment.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesCommentAtFirstOccurrenceOfEndSequence.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesCommentAtFirstOccurrenceOfEndSequence.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesSGMLDeclarationAtFirstCloseAngle.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesSGMLDeclarationAtFirstCloseAngle.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesXMLProcessingInstructionAtQuestionMarkCloseAnglePair.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesXMLProcessingInstructionAtQuestionMarkCloseAnglePair.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TreatsMalformedTagsAsContent.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TreatsMalformedTagsAsContent.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TreatsMalformedTagsAsContent.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/WithSelfClosingTagJustEmitsTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/WithSelfClosingTagJustEmitsTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsEndTagWithNoMatchingStartTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsEndTagWithNoMatchingStartTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsSwapTokenAtEndOfFileAndOutputsZeroLengthCodeSpan.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsSwapTokenAtEndOfFileAndOutputsZeroLengthCodeSpan.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsSwapTokenAtEndOfFileAndOutputsZeroLengthCodeSpan.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/CorrectlyHandlesOddlySpacedHTMLElements.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/CorrectlyHandlesOddlySpacedHTMLElements.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/CorrectlyHandlesSingleLineOfMarkupWithEmbeddedStatement.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/CorrectlyHandlesSingleLineOfMarkupWithEmbeddedStatement.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotIgnoreNewLineAtTheEndOfMarkupBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotIgnoreNewLineAtTheEndOfMarkupBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotIgnoreWhitespaceAtTheEndOfVerbatimBlockIfNoNewlinePresent.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotIgnoreWhitespaceAtTheEndOfVerbatimBlockIfNoNewlinePresent.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderExtraNewLineAtTheEndOfVerbatimBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderExtraNewLineAtTheEndOfVerbatimBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderExtraWhitespaceAndNewLineAtTheEndOfVerbatimBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderExtraWhitespaceAndNewLineAtTheEndOfVerbatimBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderNewlineAfterTextTagInVerbatimBlockIfFollowedByCSharp.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderNewlineAfterTextTagInVerbatimBlockIfFollowedByCSharp.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotReturnErrorOnMismatchedTags.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotReturnErrorOnMismatchedTags.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotSwitchToCodeOnEmailAddressInAttribute.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotSwitchToCodeOnEmailAddressInAttribute.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsAtSignAsMarkupIfAtEndOfFile.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsAtSignAsMarkupIfAtEndOfFile.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsAtSignAsMarkupIfAtEndOfFile.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsCodeBlockIfFirstCharacterIsSwapCharacter.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsCodeBlockIfFirstCharacterIsSwapCharacter.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesExtraNewLineBeforeMarkupInNestedBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesExtraNewLineBeforeMarkupInNestedBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesNewLineAndMarkupInNestedBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesNewLineAndMarkupInNestedBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesNewLineInNestedBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesNewLineInNestedBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandsParsingOverToCodeParserWhenAtSignEncounteredAndEmitsOutput.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandsParsingOverToCodeParserWhenAtSignEncounteredAndEmitsOutput.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/IgnoresTagsInContentsOfScriptTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/IgnoresTagsInContentsOfScriptTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/NestedCodeBlockWithMarkupSetsDotAsMarkup.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/NestedCodeBlockWithMarkupSetsDotAsMarkup.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/NoLongerSupportsDollarOpenBraceCombination.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/NoLongerSupportsDollarOpenBraceCombination.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/OutputsEmptyBlockWithEmptyMarkupSpanIfContentIsEmptyString.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/OutputsEmptyBlockWithEmptyMarkupSpanIfContentIsEmptyString.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/OutputsWhitespaceOnlyContentAsSingleWhitespaceMarkupSpan.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/OutputsWhitespaceOnlyContentAsSingleWhitespaceMarkupSpan.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParseDocumentDoesNotSwitchToCodeOnEmailAddressInText.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParseDocumentDoesNotSwitchToCodeOnEmailAddressInText.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParseSectionIgnoresTagsInContentsOfScriptTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParseSectionIgnoresTagsInContentsOfScriptTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParsesWholeContentAsOneSpanIfNoSwapCharacterEncountered.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParsesWholeContentAsOneSpanIfNoSwapCharacterEncountered.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersExtraNewlineAtTheEndTextTagInVerbatimBlockIfFollowedByHtml.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersExtraNewlineAtTheEndTextTagInVerbatimBlockIfFollowedByHtml.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersNewlineAfterTextTagInVerbatimBlockIfFollowedByMarkupTransition.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersNewlineAfterTextTagInVerbatimBlockIfFollowedByMarkupTransition.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersTextPseudoTagAsMarkup.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersTextPseudoTagAsMarkup.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ReturnsOneMarkupSegmentIfNoCodeBlocksEncountered.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ReturnsOneMarkupSegmentIfNoCodeBlocksEncountered.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithDoubleTransitionAtBeginningOfAttributeValue_DoesNotThrow.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithDoubleTransitionAtBeginningOfAttributeValue_DoesNotThrow.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithDoubleTransitionAtEndOfAttributeValue_DoesNotThrow.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithDoubleTransitionAtEndOfAttributeValue_DoesNotThrow.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithDoubleTransitionBetweenAttributeValue_DoesNotThrow.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithDoubleTransitionBetweenAttributeValue_DoesNotThrow.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithDoubleTransitionInAttributeValue_DoesNotThrow.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithDoubleTransitionInAttributeValue_DoesNotThrow.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithDoubleTransitionInEmail_DoesNotThrow.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithDoubleTransitionInEmail_DoesNotThrow.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithDoubleTransitionInRegex_DoesNotThrow.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithDoubleTransitionInRegex_DoesNotThrow.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithDoubleTransitionWithExpressionBlock_DoesNotThrow.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithDoubleTransitionWithExpressionBlock_DoesNotThrow.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithUnexpectedTransitionsInAttributeValue_Throws.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithUnexpectedTransitionsInAttributeValue_Throws.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithUnexpectedTransitionsInAttributeValue_Throws.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithinSectionDoesNotCreateDocumentLevelSpan.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/WithinSectionDoesNotCreateDocumentLevelSpan.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/AllowsInvalidTagNamesAsLongAsParserCanIdentifyEndTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/AllowsInvalidTagNamesAsLongAsParserCanIdentifyEndTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/ErrorIfEndTextTagContainsTextAfterName.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/ErrorIfEndTextTagContainsTextAfterName.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/ErrorIfEndTextTagContainsTextAfterName.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/ErrorIfStartTextTagContainsTextAfterName.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/ErrorIfStartTextTagContainsTextAfterName.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/ErrorIfStartTextTagContainsTextAfterName.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/StartingWithEndTagErrorsThenOutputsMarkupSegmentAndEndsBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/StartingWithEndTagErrorsThenOutputsMarkupSegmentAndEndsBlock.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/StartingWithEndTagErrorsThenOutputsMarkupSegmentAndEndsBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/WithUnclosedTagAtEOFErrorsOnMissingEndTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/WithUnclosedTagAtEOFErrorsOnMissingEndTag.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/WithUnclosedTagAtEOFErrorsOnMissingEndTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/WithUnclosedTopLevelTagErrorsOnOutermostUnclosedTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/WithUnclosedTopLevelTagErrorsOnOutermostUnclosedTag.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/WithUnclosedTopLevelTagErrorsOnOutermostUnclosedTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/WithUnfinishedTagAtEOFErrorsWithIncompleteTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/WithUnfinishedTagAtEOFErrorsWithIncompleteTag.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlErrorTest/WithUnfinishedTagAtEOFErrorsWithIncompleteTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/CDataTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/CDataTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/CommentTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/CommentTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/DocTypeTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/DocTypeTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ElementTags.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ElementTags.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTagNestsLikeNormalTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTagNestsLikeNormalTag.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTagNestsLikeNormalTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/IncompleteVoidElementEndTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/IncompleteVoidElementEndTag.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/IncompleteVoidElementEndTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ProcessingInstructionTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ProcessingInstructionTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_Incomplete.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_Incomplete.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_Invalid.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_Invalid.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedBeginTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedBeginTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedEndTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedEndTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedMalformedTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedMalformedTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/TextTags.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/TextTags.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByCloseTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByCloseTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByContent.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByContent.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByOtherTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByOtherTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/CSharpCodeParserDoesNotAcceptLeadingOrTrailingWhitespaceInDesignMode.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/CSharpCodeParserDoesNotAcceptLeadingOrTrailingWhitespaceInDesignMode.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/DoesNotSwitchToCodeOnEmailAddressInAttribute.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/DoesNotSwitchToCodeOnEmailAddressInAttribute.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/DoesNotSwitchToCodeOnEmailAddressInText.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/DoesNotSwitchToCodeOnEmailAddressInText.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/GivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/GivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentTreatsPairsOfAtSignsAsEscapeSequence.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentTreatsPairsOfAtSignsAsEscapeSequence.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentTreatsTwoAtSignsAsEscapeSequence.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentTreatsTwoAtSignsAsEscapeSequence.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParsesCodeWithinSingleLineMarkup.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParsesCodeWithinSingleLineMarkup.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionBodyTreatsPairsOfAtSignsAsEscapeSequence.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionBodyTreatsPairsOfAtSignsAsEscapeSequence.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionBodyTreatsTwoAtSignsAsEscapeSequence.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionBodyTreatsTwoAtSignsAsEscapeSequence.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionContextGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionContextGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinCDataDeclaration.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinCDataDeclaration.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinComment.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinComment.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinSGMLDeclaration.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinSGMLDeclaration.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinXMLProcessingInstruction.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinXMLProcessingInstruction.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredInAttributeValue.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredInAttributeValue.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredInTagContent.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredInTagContent.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredMidTag.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredMidTag.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesWhenCharacterBeforeSwapIsNonAlphanumeric.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesWhenCharacterBeforeSwapIsNonAlphanumeric.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/TreatsPairsOfAtSignsAsEscapeSequence.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/TreatsPairsOfAtSignsAsEscapeSequence.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/TreatsTwoAtSignsAsEscapeSequence.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/TreatsTwoAtSignsAsEscapeSequence.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_DoesNotSpecialCase_VoidTags.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_DoesNotSpecialCase_VoidTags.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_EndTagsWithMissingStartTags.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_EndTagsWithMissingStartTags.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_IncompleteTags.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_IncompleteTags.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_MalformedTags_RecoversSuccessfully.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_MalformedTags_RecoversSuccessfully.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_MisplacedEndTags_RecoversSuccessfully.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_MisplacedEndTags_RecoversSuccessfully.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_SelfClosingTags.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_SelfClosingTags.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_SpecialCasesVoidTags_WithNoEndTags.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_SpecialCasesVoidTags_WithNoEndTags.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_StartTagsWithMissingEndTags.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_StartTagsWithMissingEndTags.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidNestedTags.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidNestedTags.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidNestedTagsMixedWithCode.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidNestedTagsMixedWithCode.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidTags.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidTags.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_InvalidLookupText_AddsError.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_InvalidLookupText_AddsError.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_NoValue_Invalid.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_NoValue_Invalid.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_RequiresValue.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_RequiresValue.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_SingleQuotes_AddsError.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_SingleQuotes_AddsError.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_SupportsSpaces.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_SupportsSpaces.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/BuiltInDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/BuiltInDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/BuiltInDirectiveErrorsIfNotAtStartOfLine.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/BuiltInDirectiveErrorsIfNotAtStartOfLine.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsNullableTypes.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsNullableTypes.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsTupleTypes.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsTupleTypes.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsTupleTypes_IgnoresTrailingWhitespace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsTupleTypes_IgnoresTrailingWhitespace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsWhiteSpaceAroundTokens.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsWhiteSpaceAroundTokens.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleEOFIncompleteNamespaceTokens.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleEOFIncompleteNamespaceTokens.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleEOFInvalidNamespaceTokens.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleEOFInvalidNamespaceTokens.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleIncompleteNamespaceTokens.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleIncompleteNamespaceTokens.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleInvalidNamespaceTokens.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleInvalidNamespaceTokens.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsExtraContentAfterDirective.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsExtraContentAfterDirective.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsForInvalidMemberTokens.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsForInvalidMemberTokens.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenEOFBeforeDirectiveBlockStart.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenEOFBeforeDirectiveBlockStart.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenExtraContentBeforeBlockStart.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenExtraContentBeforeBlockStart.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenMissingEndBrace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenMissingEndBrace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScopedMultipleOccurring_CanHaveDuplicates.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScopedMultipleOccurring_CanHaveDuplicates.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScopedSinglyOccurring_ErrorsIfDuplicate.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScopedSinglyOccurring_ErrorsIfDuplicate.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScoped_CanBeBeneathOtherDirectives.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScoped_CanBeBeneathOtherDirectives.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScoped_CanBeBeneathOtherWhiteSpaceCommentsAndDirectives.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScoped_CanBeBeneathOtherWhiteSpaceCommentsAndDirectives.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_NoErrorsSemicolonAfterDirective.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_NoErrorsSemicolonAfterDirective.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForNonStringValue.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForNonStringValue.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForPartialQuotedValue.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForPartialQuotedValue.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForSingleQuotedValue.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForSingleQuotedValue.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForUnquotedValue.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForUnquotedValue.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_TokensMustBeSeparatedBySpace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_TokensMustBeSeparatedBySpace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsCodeBlocks.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsCodeBlocks.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsMemberTokens.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsMemberTokens.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsMultipleTokens.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsMultipleTokens.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsRazorBlocks.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsRazorBlocks.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsStringTokens.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsStringTokens.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsTypeTokens.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsTypeTokens.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_CanUseReservedWord_Class.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_CanUseReservedWord_Class.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_CanUseReservedWord_Namespace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_CanUseReservedWord_Namespace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_ReservedWordInsideCodeBlock.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_ReservedWordInsideCodeBlock.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/EmptyFunctionsDirective.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/EmptyFunctionsDirective.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveErrorsIfNotAtStartOfLine.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveErrorsIfNotAtStartOfLine.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsArrays.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsArrays.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsNestedGenerics.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsNestedGenerics.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsTypeKeywords.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsTypeKeywords.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_AreSkipped.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_AreSkipped.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithBraces_AreParsed.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithBraces_AreParsed.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithMultipleOptionalTokens_AreParsed.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithMultipleOptionalTokens_AreParsed.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithSimpleTokens_AreParsed.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithSimpleTokens_AreParsed.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalMemberTokens_WithMemberSpecified_IsParsed.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalMemberTokens_WithMemberSpecified_IsParsed.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalMemberTokens_WithMissingMember_IsParsed.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalMemberTokens_WithMissingMember_IsParsed.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parse_FunctionsDirective.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parse_FunctionsDirective.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parse_SectionDirective.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parse_SectionDirective.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parser_ParsesNamespaceDirectiveToken_WithMultipleSegments.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parser_ParsesNamespaceDirectiveToken_WithMultipleSegments.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parser_ParsesNamespaceDirectiveToken_WithSingleSegment.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parser_ParsesNamespaceDirectiveToken_WithSingleSegment.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_InvalidLookupText_AddsError.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_InvalidLookupText_AddsError.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_NoValue_Invalid.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_NoValue_Invalid.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_RequiresValue.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_RequiresValue.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_SingleQuotes_AddsError.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_SingleQuotes_AddsError.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_SupportsSpaces.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_SupportsSpaces.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_EndQuoteRequiresDoubleQuotesAroundValue.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_NoValueSucceeds.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_NoValueSucceeds.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_RequiresValue.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_RequiresValue.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_StartQuoteRequiresDoubleQuotesAroundValue.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_Succeeds.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_Succeeds.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_WithQuotes_Succeeds.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_WithQuotes_Succeeds.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes1.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes2.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes3.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes4.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes5.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes6.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes7.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes1.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes10.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes10.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes10.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes10.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes11.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes11.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes11.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes11.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes12.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes12.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes12.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes12.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes13.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes13.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes13.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes14.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes14.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes14.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes3.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes4.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes5.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes6.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes7.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes8.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes9.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes9.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes9.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes9.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper1.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper2.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper3.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper4.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper5.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper6.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper7.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper8.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes1.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes10.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes10.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes10.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes10.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes11.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes11.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes11.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes11.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes12.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes12.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes12.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes13.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes13.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes13.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes13.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes14.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes14.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes14.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes14.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes15.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes15.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes15.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes15.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes16.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes16.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes16.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes16.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes17.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes17.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes17.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes17.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes18.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes18.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes18.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes18.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes19.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes19.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes19.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes19.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes2.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes20.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes20.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes20.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes20.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes3.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes4.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes5.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes6.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes7.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes8.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes9.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes9.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes9.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes9.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes10.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes10.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes10.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes11.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes11.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes11.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes12.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes12.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes12.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes9.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes9.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes9.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/FeatureDisabled_AddsErrorForMinimizedBooleanBoundAttributes.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/FeatureDisabled_AddsErrorForMinimizedBooleanBoundAttributes.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/FeatureDisabled_AddsErrorForMinimizedBooleanBoundAttributes.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/FeatureDisabled_AddsErrorForMinimizedBooleanBoundAttributes.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml10.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml10.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml10.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml9.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml9.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml9.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper1.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper2.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper3.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper4.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block10.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block10.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block10.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block10.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block11.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block11.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block11.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block11.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block12.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block12.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block12.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block12.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block13.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block13.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block13.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block14.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block14.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block14.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block15.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block15.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block15.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block16.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block16.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block16.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block16.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block17.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block17.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block17.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block17.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block18.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block18.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block18.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block18.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block19.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block19.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block19.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block19.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block2.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block20.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block20.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block20.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block21.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block21.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block21.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block21.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block22.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block22.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block22.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block23.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block23.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block23.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block23.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block24.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block24.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block24.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block24.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block25.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block25.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block25.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block25.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block26.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block26.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block26.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block26.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block27.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block27.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block27.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block27.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block28.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block28.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block28.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block28.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block29.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block29.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block29.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block29.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block3.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block30.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block30.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block30.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block30.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block31.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block31.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block31.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block31.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block32.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block32.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block32.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block32.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block33.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block33.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block33.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block33.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block4.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block5.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block6.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block7.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document10.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document10.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document10.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document10.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document11.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document11.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document11.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document11.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document12.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document12.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document12.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document12.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document13.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document13.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document13.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document14.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document14.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document14.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document15.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document15.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document15.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document16.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document16.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document16.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document16.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document17.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document17.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document17.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document17.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document18.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document18.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document18.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document18.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document19.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document19.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document19.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document19.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document2.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document20.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document20.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document20.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document21.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document21.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document21.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document21.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document22.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document22.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document22.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document23.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document23.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document23.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document23.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document24.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document24.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document24.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document24.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document25.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document25.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document25.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document25.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document26.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document26.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document26.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document26.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document27.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document27.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document27.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document27.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document28.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document28.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document28.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document28.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document29.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document29.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document29.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document29.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document3.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document30.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document30.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document30.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document30.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document31.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document31.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document31.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document31.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document32.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document32.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document32.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document32.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document33.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document33.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document33.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document33.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document4.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document5.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document6.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document7.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags1.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags2.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags3.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags4.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags5.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags6.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags7.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags8.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedBooleanBoundAttributes.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedBooleanBoundAttributes.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedBooleanBoundAttributes.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers10.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers10.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers10.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers11.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers11.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers11.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers9.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers9.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers9.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorCommentsAsChildren.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorCommentsAsChildren.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorCommentsAsChildren.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorMarkupInHtmlComment.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorMarkupInHtmlComment.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorMarkupInHtmlComment.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsSimpleHtmlCommentsAsChildren.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsSimpleHtmlCommentsAsChildren.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsSimpleHtmlCommentsAsChildren.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag1.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag1.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag2.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag5.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag6.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag8.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag9.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag9.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag9.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock1.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock2.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock3.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock4.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock5.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock6.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock7.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock8.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock1.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock2.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock3.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock4.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock5.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock6.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData1.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData1.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData10.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData10.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData10.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData10.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData11.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData11.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData11.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData12.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData12.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData12.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData12.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData2.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData5.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData6.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData8.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData9.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData9.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData9.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData10.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData10.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData10.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData11.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData11.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData11.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData12.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData12.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData12.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData12.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData5.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData6.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData8.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData9.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData9.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData9.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleInvalidChildrenWithWhitespace.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleInvalidChildrenWithWhitespace.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleInvalidChildrenWithWhitespace.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleInvalidChildrenWithWhitespace.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren_OneNull.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren_OneNull.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren_OneNull.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleStartTagOnlyTagTagMode.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleStartTagOnlyTagTagMode.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleStartTagOnlyTagTagMode.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForInconsistentTagStructures.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForInconsistentTagStructures.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForInconsistentTagStructures.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForInconsistentTagStructures.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForWithoutEndTagTagStructureForEndTags.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForWithoutEndTagTagStructureForEndTags.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForWithoutEndTagTagStructureForEndTags.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers1.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers2.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers3.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers4.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers5.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers6.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers7.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers8.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesntAllowSimpleHtmlCommentsAsChildrenWhenFeatureFlagIsOff.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesntAllowSimpleHtmlCommentsAsChildrenWhenFeatureFlagIsOff.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesntAllowSimpleHtmlCommentsAsChildrenWhenFeatureFlagIsOff.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesntAllowSimpleHtmlCommentsAsChildrenWhenFeatureFlagIsOff.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/FailsForContentWithCommentsAsChildren.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/FailsForContentWithCommentsAsChildren.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/FailsForContentWithCommentsAsChildren.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/FailsForContentWithCommentsAsChildren.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesMalformedNestedNonTagHelperTags_Correctly.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesMalformedNestedNonTagHelperTags_Correctly.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesMalformedNestedNonTagHelperTags_Correctly.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesNonTagHelperStartAndEndVoidTags_Correctly.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesNonTagHelperStartAndEndVoidTags_Correctly.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/InvalidStructure_UnderstandsTHPrefixAndAllowedChildrenAndRequireParent.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/InvalidStructure_UnderstandsTHPrefixAndAllowedChildrenAndRequireParent.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/InvalidStructure_UnderstandsTHPrefixAndAllowedChildrenAndRequireParent.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/InvalidStructure_UnderstandsTHPrefixAndAllowedChildrenAndRequireParent.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NonTagHelperChild_UnderstandsTagHelperPrefixAndAllowedChildren.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NonTagHelperChild_UnderstandsTagHelperPrefixAndAllowedChildren.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NonTagHelperChild_UnderstandsTagHelperPrefixAndAllowedChildren.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RecoversWhenRequiredAttributeMismatchAndRestrictedChildren.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RecoversWhenRequiredAttributeMismatchAndRestrictedChildren.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RecoversWhenRequiredAttributeMismatchAndRestrictedChildren.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RecoversWhenRequiredAttributeMismatchAndRestrictedChildren.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly10.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly10.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly10.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly10.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly2.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly3.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly5.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly6.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly7.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly11.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly11.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly11.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly12.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly12.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly12.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly13.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly13.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly13.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly14.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly14.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly15.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly15.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly16.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly16.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly16.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly17.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly17.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly17.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly18.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly18.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly18.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly19.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly19.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly19.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly20.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly20.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly20.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly21.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly21.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly21.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly22.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly22.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly22.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly23.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly23.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly23.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly24.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly24.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly24.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly25.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly25.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly25.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly26.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly26.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly26.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly27.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly27.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly27.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly28.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly28.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly28.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly29.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly29.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly29.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly30.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly30.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly30.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren10.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren10.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren10.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren10.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren11.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren11.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren11.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren11.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren12.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren12.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren12.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren12.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren13.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren13.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren13.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren13.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren14.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren14.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren14.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren14.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren3.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren4.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren5.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren6.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren7.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren8.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren9.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren9.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren9.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren9.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent7.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent7.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent7.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent8.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent8.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent8.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAll.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAll.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAll.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAll.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAllWithPrefix.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAllWithPrefix.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAllWithPrefix.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAllWithPrefix.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags1.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags2.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags3.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags4.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags5.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags5.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags5.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags5.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags6.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags6.diag.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags6.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags6.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildren.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildren.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildren.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildrenAndRequireParent.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildrenAndRequireParent.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildrenAndRequireParent.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags1.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags1.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags1.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags2.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags2.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags2.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags3.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags3.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags3.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags4.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags4.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags4.tspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/WhiteSpaceRewriterTest/Moves_Whitespace_Preceeding_ExpressionBlock_To_Parent_Block.cspans.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/WhiteSpaceRewriterTest/Moves_Whitespace_Preceeding_ExpressionBlock_To_Parent_Block.stree.txt create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/Source/BasicMarkup.cshtml create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/nested-1000.html create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestRazorProject.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/VirtualRazorProjectFileSystemTest.cs create mode 100644 src/Razor/Microsoft.AspNetCore.Razor.Language/test/xunit.runner.json diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/AssertFrame.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/AssertFrame.cs new file mode 100644 index 0000000000..a03c4db92e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/AssertFrame.cs @@ -0,0 +1,139 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Components.RenderTree; +using Xunit; + +namespace Microsoft.AspNetCore.Components +{ + internal static class AssertFrame + { + public static void Sequence(RenderTreeFrame frame, int? sequence = null) + { + if (sequence.HasValue) + { + Assert.Equal(sequence.Value, frame.Sequence); + } + } + + public static void Text(RenderTreeFrame frame, string textContent, int? sequence = null) + { + Assert.Equal(RenderTreeFrameType.Text, frame.FrameType); + Assert.Equal(textContent, frame.TextContent); + Assert.Equal(0, frame.ElementSubtreeLength); + AssertFrame.Sequence(frame, sequence); + } + + internal static void Markup(RenderTreeFrame frame, string markupContent, int? sequence = null) + { + Assert.Equal(RenderTreeFrameType.Markup, frame.FrameType); + Assert.Equal(markupContent, frame.MarkupContent); + Assert.Equal(0, frame.ElementSubtreeLength); + AssertFrame.Sequence(frame, sequence); + } + + public static void Element(RenderTreeFrame frame, string elementName, int subtreeLength, int? sequence = null) + { + Assert.Equal(RenderTreeFrameType.Element, frame.FrameType); + Assert.Equal(elementName, frame.ElementName); + Assert.Equal(subtreeLength, frame.ElementSubtreeLength); + AssertFrame.Sequence(frame, sequence); + } + + public static void Attribute(RenderTreeFrame frame, string attributeName, int? sequence = null) + { + Assert.Equal(RenderTreeFrameType.Attribute, frame.FrameType); + Assert.Equal(attributeName, frame.AttributeName); + AssertFrame.Sequence(frame, sequence); + } + + public static void Attribute(RenderTreeFrame frame, string attributeName, string attributeValue, int? sequence = null) + { + AssertFrame.Attribute(frame, attributeName, sequence); + Assert.Equal(attributeValue, frame.AttributeValue); + } + + public static void Attribute(RenderTreeFrame frame, string attributeName, Action attributeEventHandlerValue, int? sequence = null) + { + AssertFrame.Attribute(frame, attributeName, sequence); + Assert.Equal(attributeEventHandlerValue, frame.AttributeValue); + } + + public static void Attribute(RenderTreeFrame frame, string attributeName, object attributeValue, int? sequence = null) + { + AssertFrame.Attribute(frame, attributeName, sequence); + Assert.Equal(attributeValue, frame.AttributeValue); + } + + public static void Attribute(RenderTreeFrame frame, string attributeName, Type valueType, int? sequence = null) + { + AssertFrame.Attribute(frame, attributeName, sequence); + Assert.IsType(valueType, frame.AttributeValue); + } + + public static void Attribute(RenderTreeFrame frame, string attributeName, Action attributeValidator, int? sequence = null) + { + AssertFrame.Attribute(frame, attributeName, sequence); + attributeValidator(frame.AttributeValue); + } + + public static void Component(RenderTreeFrame frame, int? subtreeLength = null, int? sequence = null) where T : IComponent + { + Component(frame, typeof(T).FullName, subtreeLength, sequence); + } + + public static void Component(RenderTreeFrame frame, string typeName, int? subtreeLength = null, int? sequence = null) + { + Assert.Equal(RenderTreeFrameType.Component, frame.FrameType); + Assert.Equal(typeName, frame.ComponentType.FullName); + if (subtreeLength.HasValue) + { + Assert.Equal(subtreeLength.Value, frame.ComponentSubtreeLength); + } + AssertFrame.Sequence(frame, sequence); + } + + public static void ComponentWithInstance(RenderTreeFrame frame, int componentId, int? subtreeLength = null, int? sequence = null) where T : IComponent + { + AssertFrame.Component(frame, subtreeLength, sequence); + Assert.IsType(frame.Component); + Assert.Equal(componentId, frame.ComponentId); + } + + public static void Region(RenderTreeFrame frame, int subtreeLength, int? sequence = null) + { + Assert.Equal(RenderTreeFrameType.Region, frame.FrameType); + Assert.Equal(subtreeLength, frame.RegionSubtreeLength); + AssertFrame.Sequence(frame, sequence); + } + + public static void Whitespace(RenderTreeFrame frame, int? sequence = null) + { + Assert.Equal(RenderTreeFrameType.Text, frame.FrameType); + AssertFrame.Sequence(frame, sequence); + Assert.True(string.IsNullOrWhiteSpace(frame.TextContent)); + } + + public static void ElementReferenceCapture(RenderTreeFrame frame, Action action, int? sequence = null) + { + Assert.Equal(RenderTreeFrameType.ElementReferenceCapture, frame.FrameType); + Assert.Same(action, frame.ElementReferenceCaptureAction); + AssertFrame.Sequence(frame, sequence); + } + + public static void ComponentReferenceCapture(RenderTreeFrame frame, int? sequence = null) + { + Assert.Equal(RenderTreeFrameType.ComponentReferenceCapture, frame.FrameType); + Assert.NotNull(frame.ComponentReferenceCaptureAction); + AssertFrame.Sequence(frame, sequence); + } + + public static void ComponentReferenceCapture(RenderTreeFrame frame, Action action, int? sequence = null) + { + Assert.Equal(RenderTreeFrameType.ComponentReferenceCapture, frame.FrameType); + Assert.Same(action, frame.ComponentReferenceCaptureAction); + AssertFrame.Sequence(frame, sequence); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/BoundAttributeDescriptorExtensionsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/BoundAttributeDescriptorExtensionsTest.cs new file mode 100644 index 0000000000..8b1c290d3a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/BoundAttributeDescriptorExtensionsTest.cs @@ -0,0 +1,279 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class BoundAttributeDescriptorExtensionsTest + { + [Fact] + public void GetPropertyName_ReturnsPropertyName() + { + // Arrange + var expectedPropertyName = "IntProperty"; + + var tagHelperBuilder = new DefaultTagHelperDescriptorBuilder(TagHelperConventions.DefaultKind, "TestTagHelper", "Test"); + tagHelperBuilder.TypeName("TestTagHelper"); + + var builder = new DefaultBoundAttributeDescriptorBuilder(tagHelperBuilder, TagHelperConventions.DefaultKind); + builder + .Name("test") + .PropertyName(expectedPropertyName) + .TypeName(typeof(int).FullName); + + var descriptor = builder.Build(); + + // Act + var propertyName = descriptor.GetPropertyName(); + + // Assert + Assert.Equal(expectedPropertyName, propertyName); + } + + [Fact] + public void GetPropertyName_ReturnsNullIfNoPropertyName() + { + // Arrange + var tagHelperBuilder = new DefaultTagHelperDescriptorBuilder(TagHelperConventions.DefaultKind, "TestTagHelper", "Test"); + tagHelperBuilder.TypeName("TestTagHelper"); + + var builder = new DefaultBoundAttributeDescriptorBuilder(tagHelperBuilder, TagHelperConventions.DefaultKind); + builder + .Name("test") + .TypeName(typeof(int).FullName); + + var descriptor = builder.Build(); + + // Act + var propertyName = descriptor.GetPropertyName(); + + // Assert + Assert.Null(propertyName); + } + + [Fact] + public void IsDefaultKind_ReturnsTrue_IfKindIsDefault() + { + // Arrange + var tagHelperBuilder = new DefaultTagHelperDescriptorBuilder(TagHelperConventions.DefaultKind, "TestTagHelper", "Test"); + tagHelperBuilder.TypeName("TestTagHelper"); + + var builder = new DefaultBoundAttributeDescriptorBuilder(tagHelperBuilder, TagHelperConventions.DefaultKind); + builder + .Name("test") + .PropertyName("IntProperty") + .TypeName(typeof(int).FullName); + + var descriptor = builder.Build(); + + // Act + var isDefault = descriptor.IsDefaultKind(); + + // Assert + Assert.True(isDefault); + } + + [Fact] + public void IsDefaultKind_ReturnsFalse_IfKindIsNotDefault() + { + // Arrange + var tagHelperBuilder = new DefaultTagHelperDescriptorBuilder("other-kind", "TestTagHelper", "Test"); + tagHelperBuilder.TypeName("TestTagHelper"); + + var builder = new DefaultBoundAttributeDescriptorBuilder(tagHelperBuilder, "other-kind"); + builder + .Name("test") + .PropertyName("IntProperty") + .TypeName(typeof(int).FullName); + + var descriptor = builder.Build(); + + // Act + var isDefault = descriptor.IsDefaultKind(); + + // Assert + Assert.False(isDefault); + } + + [Fact] + public void ExpectsStringValue_ReturnsTrue_ForStringProperty() + { + // Arrange + var tagHelperBuilder = new DefaultTagHelperDescriptorBuilder(TagHelperConventions.DefaultKind, "TestTagHelper", "Test"); + tagHelperBuilder.TypeName("TestTagHelper"); + + var builder = new DefaultBoundAttributeDescriptorBuilder(tagHelperBuilder, TagHelperConventions.DefaultKind); + builder + .Name("test") + .PropertyName("BoundProp") + .TypeName(typeof(string).FullName); + + var descriptor = builder.Build(); + + // Act + var result = descriptor.ExpectsStringValue("test"); + + // Assert + Assert.True(result); + } + + [Fact] + public void ExpectsStringValue_ReturnsFalse_ForNonStringProperty() + { + // Arrange + var tagHelperBuilder = new DefaultTagHelperDescriptorBuilder(TagHelperConventions.DefaultKind, "TestTagHelper", "Test"); + tagHelperBuilder.TypeName("TestTagHelper"); + + var builder = new DefaultBoundAttributeDescriptorBuilder(tagHelperBuilder, TagHelperConventions.DefaultKind); + builder + .Name("test") + .PropertyName("BoundProp") + .TypeName(typeof(bool).FullName); + + var descriptor = builder.Build(); + + // Act + var result = descriptor.ExpectsStringValue("test"); + + // Assert + Assert.False(result); + } + + [Fact] + public void ExpectsStringValue_ReturnsTrue_StringIndexerAndNameMatch() + { + // Arrange + var tagHelperBuilder = new DefaultTagHelperDescriptorBuilder(TagHelperConventions.DefaultKind, "TestTagHelper", "Test"); + tagHelperBuilder.TypeName("TestTagHelper"); + + var builder = new DefaultBoundAttributeDescriptorBuilder(tagHelperBuilder, TagHelperConventions.DefaultKind); + builder + .Name("test") + .PropertyName("BoundProp") + .TypeName("System.Collection.Generic.IDictionary") + .AsDictionary("prefix-test-", typeof(string).FullName); + + var descriptor = builder.Build(); + + // Act + var result = descriptor.ExpectsStringValue("prefix-test-key"); + + // Assert + Assert.True(result); + } + + [Fact] + public void ExpectsStringValue_ReturnsFalse_StringIndexerAndNameMismatch() + { + // Arrange + var tagHelperBuilder = new DefaultTagHelperDescriptorBuilder(TagHelperConventions.DefaultKind, "TestTagHelper", "Test"); + tagHelperBuilder.TypeName("TestTagHelper"); + + var builder = new DefaultBoundAttributeDescriptorBuilder(tagHelperBuilder, TagHelperConventions.DefaultKind); + builder + .Name("test") + .PropertyName("BoundProp") + .TypeName("System.Collection.Generic.IDictionary") + .AsDictionary("prefix-test-", typeof(string).FullName); + + var descriptor = builder.Build(); + + // Act + var result = descriptor.ExpectsStringValue("test"); + + // Assert + Assert.False(result); + } + + [Fact] + public void ExpectsBooleanValue_ReturnsTrue_ForBooleanProperty() + { + // Arrange + var tagHelperBuilder = new DefaultTagHelperDescriptorBuilder(TagHelperConventions.DefaultKind, "TestTagHelper", "Test"); + tagHelperBuilder.TypeName("TestTagHelper"); + + var builder = new DefaultBoundAttributeDescriptorBuilder(tagHelperBuilder, TagHelperConventions.DefaultKind); + builder + .Name("test") + .PropertyName("BoundProp") + .TypeName(typeof(bool).FullName); + + var descriptor = builder.Build(); + + // Act + var result = descriptor.ExpectsBooleanValue("test"); + + // Assert + Assert.True(result); + } + + [Fact] + public void ExpectsBooleanValue_ReturnsFalse_ForNonBooleanProperty() + { + // Arrange + var tagHelperBuilder = new DefaultTagHelperDescriptorBuilder(TagHelperConventions.DefaultKind, "TestTagHelper", "Test"); + tagHelperBuilder.TypeName("TestTagHelper"); + + var builder = new DefaultBoundAttributeDescriptorBuilder(tagHelperBuilder, TagHelperConventions.DefaultKind); + builder + .Name("test") + .PropertyName("BoundProp") + .TypeName(typeof(int).FullName); + + var descriptor = builder.Build(); + + // Act + var result = descriptor.ExpectsBooleanValue("test"); + + // Assert + Assert.False(result); + } + + [Fact] + public void ExpectsBooleanValue_ReturnsTrue_BooleanIndexerAndNameMatch() + { + // Arrange + var tagHelperBuilder = new DefaultTagHelperDescriptorBuilder(TagHelperConventions.DefaultKind, "TestTagHelper", "Test"); + tagHelperBuilder.TypeName("TestTagHelper"); + + var builder = new DefaultBoundAttributeDescriptorBuilder(tagHelperBuilder, TagHelperConventions.DefaultKind); + builder + .Name("test") + .PropertyName("BoundProp") + .TypeName("System.Collection.Generic.IDictionary") + .AsDictionary("prefix-test-", typeof(bool).FullName); + + var descriptor = builder.Build(); + + // Act + var result = descriptor.ExpectsBooleanValue("prefix-test-key"); + + // Assert + Assert.True(result); + } + + [Fact] + public void ExpectsBooleanValue_ReturnsFalse_BooleanIndexerAndNameMismatch() + { + // Arrange + var tagHelperBuilder = new DefaultTagHelperDescriptorBuilder(TagHelperConventions.DefaultKind, "TestTagHelper", "Test"); + tagHelperBuilder.TypeName("TestTagHelper"); + + var builder = new DefaultBoundAttributeDescriptorBuilder(tagHelperBuilder, TagHelperConventions.DefaultKind); + builder + .Name("test") + .PropertyName("BoundProp") + .TypeName("System.Collection.Generic.IDictionary") + .AsDictionary("prefix-test-", typeof(bool).FullName); + + var descriptor = builder.Build(); + + // Act + var result = descriptor.ExpectsBooleanValue("test"); + + // Assert + Assert.False(result); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/CSharpCodeWriterTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/CSharpCodeWriterTest.cs new file mode 100644 index 0000000000..e0bfa57ca1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/CSharpCodeWriterTest.cs @@ -0,0 +1,339 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration +{ + public class CSharpCodeWriterTest + { + // The length of the newline string written by writer.WriteLine. + private static readonly int WriterNewLineLength = Environment.NewLine.Length; + + public static IEnumerable NewLines + { + get + { + return new object[][] + { + new object[] { "\r" }, + new object[] { "\n" }, + new object[] { "\r\n" }, + }; + } + } + + [Fact] + public void CSharpCodeWriter_TracksPosition_WithWrite() + { + // Arrange + var writer = new CodeWriter(); + + // Act + writer.Write("1234"); + + // Assert + var location = writer.Location; + var expected = new SourceLocation(absoluteIndex: 4, lineIndex: 0, characterIndex: 4); + + Assert.Equal(expected, location); + } + + [Fact] + public void CSharpCodeWriter_TracksPosition_WithIndent() + { + // Arrange + var writer = new CodeWriter(); + + // Act + writer.WriteLine(); + writer.Indent(size: 3); + + // Assert + var location = writer.Location; + var expected = new SourceLocation(absoluteIndex: 3 + WriterNewLineLength, lineIndex: 1, characterIndex: 3); + + Assert.Equal(expected, location); + } + + [Fact] + public void CSharpCodeWriter_TracksPosition_WithWriteLine() + { + // Arrange + var writer = new CodeWriter(); + + // Act + writer.WriteLine("1234"); + + // Assert + var location = writer.Location; + + var expected = new SourceLocation(absoluteIndex: 4 + WriterNewLineLength, lineIndex: 1, characterIndex: 0); + + Assert.Equal(expected, location); + } + + [Theory] + [MemberData(nameof(NewLines))] + public void CSharpCodeWriter_TracksPosition_WithWriteLine_WithNewLineInContent(string newLine) + { + // Arrange + var writer = new CodeWriter(); + + // Act + writer.WriteLine("1234" + newLine + "12"); + + // Assert + var location = writer.Location; + + var expected = new SourceLocation( + absoluteIndex: 6 + newLine.Length + WriterNewLineLength, + lineIndex: 2, + characterIndex: 0); + + Assert.Equal(expected, location); + } + + [Theory] + [MemberData(nameof(NewLines))] + public void CSharpCodeWriter_TracksPosition_WithWrite_WithNewlineInContent(string newLine) + { + // Arrange + var writer = new CodeWriter(); + + // Act + writer.Write("1234" + newLine + "123" + newLine + "12"); + + // Assert + var location = writer.Location; + + var expected = new SourceLocation( + absoluteIndex: 9 + newLine.Length + newLine.Length, + lineIndex: 2, + characterIndex: 2); + + Assert.Equal(expected, location); + } + + [Fact] + public void CSharpCodeWriter_TracksPosition_WithWrite_WithNewlineInContent_RepeatedN() + { + // Arrange + var writer = new CodeWriter(); + + // Act + writer.Write("1234\n\n123"); + + // Assert + var location = writer.Location; + + var expected = new SourceLocation( + absoluteIndex: 9, + lineIndex: 2, + characterIndex: 3); + + Assert.Equal(expected, location); + } + + [Fact] + public void CSharpCodeWriter_TracksPosition_WithWrite_WithMixedNewlineInContent() + { + // Arrange + var writer = new CodeWriter(); + + // Act + writer.Write("1234\r123\r\n12\n1"); + + // Assert + var location = writer.Location; + + var expected = new SourceLocation( + absoluteIndex: 14, + lineIndex: 3, + characterIndex: 1); + + Assert.Equal(expected, location); + } + + [Fact] + public void CSharpCodeWriter_TracksPosition_WithNewline_SplitAcrossWrites() + { + // Arrange + var writer = new CodeWriter(); + + // Act + writer.Write("1234\r"); + var location1 = writer.Location; + + writer.Write("\n"); + var location2 = writer.Location; + + // Assert + var expected1 = new SourceLocation(absoluteIndex: 5, lineIndex: 1, characterIndex: 0); + Assert.Equal(expected1, location1); + + var expected2 = new SourceLocation(absoluteIndex: 6, lineIndex: 1, characterIndex: 0); + Assert.Equal(expected2, location2); + } + + [Fact] + public void CSharpCodeWriter_TracksPosition_WithTwoNewline_SplitAcrossWrites_R() + { + // Arrange + var writer = new CodeWriter(); + + // Act + writer.Write("1234\r"); + var location1 = writer.Location; + + writer.Write("\r"); + var location2 = writer.Location; + + // Assert + var expected1 = new SourceLocation(absoluteIndex: 5, lineIndex: 1, characterIndex: 0); + Assert.Equal(expected1, location1); + + var expected2 = new SourceLocation(absoluteIndex: 6, lineIndex: 2, characterIndex: 0); + Assert.Equal(expected2, location2); + } + + [Fact] + public void CSharpCodeWriter_TracksPosition_WithTwoNewline_SplitAcrossWrites_N() + { + // Arrange + var writer = new CodeWriter(); + + // Act + writer.Write("1234\n"); + var location1 = writer.Location; + + writer.Write("\n"); + var location2 = writer.Location; + + // Assert + var expected1 = new SourceLocation(absoluteIndex: 5, lineIndex: 1, characterIndex: 0); + Assert.Equal(expected1, location1); + + var expected2 = new SourceLocation(absoluteIndex: 6, lineIndex: 2, characterIndex: 0); + Assert.Equal(expected2, location2); + } + + [Fact] + public void CSharpCodeWriter_TracksPosition_WithTwoNewline_SplitAcrossWrites_Reversed() + { + // Arrange + var writer = new CodeWriter(); + + // Act + writer.Write("1234\n"); + var location1 = writer.Location; + + writer.Write("\r"); + var location2 = writer.Location; + + // Assert + var expected1 = new SourceLocation(absoluteIndex: 5, lineIndex: 1, characterIndex: 0); + Assert.Equal(expected1, location1); + + var expected2 = new SourceLocation(absoluteIndex: 6, lineIndex: 2, characterIndex: 0); + Assert.Equal(expected2, location2); + } + + [Fact] + public void CSharpCodeWriter_TracksPosition_WithNewline_SplitAcrossWrites_AtBeginning() + { + // Arrange + var writer = new CodeWriter(); + + // Act + writer.Write("\r"); + var location1 = writer.Location; + + writer.Write("\n"); + var location2 = writer.Location; + + // Assert + var expected1 = new SourceLocation(absoluteIndex: 1, lineIndex: 1, characterIndex: 0); + Assert.Equal(expected1, location1); + + var expected2 = new SourceLocation(absoluteIndex: 2, lineIndex: 1, characterIndex: 0); + Assert.Equal(expected2, location2); + } + + [Fact] + public void WriteLineNumberDirective_UsesFilePath_FromSourceLocation() + { + // Arrange + var filePath = "some-path"; + var mappingLocation = new SourceSpan(filePath, 10, 4, 3, 9); + + var writer = new CodeWriter(); + var expected = $"#line 5 \"{filePath}\"" + writer.NewLine; + + // Act + writer.WriteLineNumberDirective(mappingLocation); + var code = writer.GenerateCode(); + + // Assert + Assert.Equal(expected, code); + } + + [Fact] + public void WriteField_WritesFieldDeclaration() + { + // Arrange + var writer = new CodeWriter(); + + // Act + writer.WriteField(new[] { "private" }, "global::System.String", "_myString"); + + // Assert + var output = writer.GenerateCode(); + Assert.Equal("private global::System.String _myString;" + Environment.NewLine, output); + } + + [Fact] + public void WriteField_WithModifiers_WritesFieldDeclaration() + { + // Arrange + var writer = new CodeWriter(); + + // Act + writer.WriteField(new[] { "private", "readonly", "static" }, "global::System.String", "_myString"); + + // Assert + var output = writer.GenerateCode(); + Assert.Equal("private readonly static global::System.String _myString;" + Environment.NewLine, output); + } + + [Fact] + public void WriteAutoPropertyDeclaration_WritesPropertyDeclaration() + { + // Arrange + var writer = new CodeWriter(); + + // Act + writer.WriteAutoPropertyDeclaration(new[] { "public" }, "global::System.String", "MyString"); + + // Assert + var output = writer.GenerateCode(); + Assert.Equal("public global::System.String MyString { get; set; }" + Environment.NewLine, output); + } + + [Fact] + public void WriteAutoPropertyDeclaration_WithModifiers_WritesPropertyDeclaration() + { + // Arrange + var writer = new CodeWriter(); + + // Act + writer.WriteAutoPropertyDeclaration(new[] { "public", "static" }, "global::System.String", "MyString"); + + // Assert + var output = writer.GenerateCode(); + Assert.Equal("public static global::System.String MyString { get; set; }" + Environment.NewLine, output); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/CodeTargetTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/CodeTargetTest.cs new file mode 100644 index 0000000000..7626e3369a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/CodeTargetTest.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration +{ + public class CodeTargetTest + { + [Fact] + public void CreateDefault_CreatesDefaultCodeTarget() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + var options = RazorCodeGenerationOptions.CreateDefault(); + + // Act + var target = CodeTarget.CreateDefault(codeDocument, options); + + // Assert + Assert.IsType(target); + } + + [Fact] + public void CreateDefault_CallsDelegate() + { + // Arrange + var wasCalled = false; + Action @delegate = (b) => { wasCalled = true; }; + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + var options = RazorCodeGenerationOptions.CreateDefault(); + + // Act + CodeTarget.CreateDefault(codeDocument, options, @delegate); + + // Assert + Assert.True(wasCalled); + } + + [Fact] + public void CreateDefault_AllowsNullDelegate() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + var options = RazorCodeGenerationOptions.CreateDefault(); + + // Act + CodeTarget.CreateDefault(codeDocument, options, configure: null); + + // Assert (does not throw) + } + + [Fact] + public void CreateEmpty_AllowsNullDelegate() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + var options = RazorCodeGenerationOptions.CreateDefault(); + + // Act + CodeTarget.CreateDefault(codeDocument, options, configure: null); + + // Assert (does not throw) + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/DefaultCodeTargetBuilderTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/DefaultCodeTargetBuilderTest.cs new file mode 100644 index 0000000000..95f124300a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/DefaultCodeTargetBuilderTest.cs @@ -0,0 +1,46 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration +{ + public class DefaultCodeTargetBuilderTest + { + [Fact] + public void Build_CreatesDefaultCodeTarget() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + var options = RazorCodeGenerationOptions.CreateDefault(); + + var builder = new DefaultCodeTargetBuilder(codeDocument, options); + + var extensions = new ICodeTargetExtension[] + { + new MyExtension1(), + new MyExtension2(), + }; + + for (var i = 0; i < extensions.Length; i++) + { + builder.TargetExtensions.Add(extensions[i]); + } + + // Act + var result = builder.Build(); + + // Assert + var target = Assert.IsType(result); + Assert.Equal(extensions, target.Extensions); + } + + private class MyExtension1 : ICodeTargetExtension + { + } + + private class MyExtension2 : ICodeTargetExtension + { + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/DefaultCodeTargetTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/DefaultCodeTargetTest.cs new file mode 100644 index 0000000000..05756c09bb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/DefaultCodeTargetTest.cs @@ -0,0 +1,174 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Linq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration +{ + public class DefaultCodeTargetTest + { + [Fact] + public void Constructor_CreatesDefensiveCopy() + { + // Arrange + var options = RazorCodeGenerationOptions.CreateDefault(); + + var extensions = new ICodeTargetExtension[] + { + new MyExtension2(), + new MyExtension1(), + }; + + // Act + var target = new DefaultCodeTarget(options, extensions); + + // Assert + Assert.NotSame(extensions, target); + } + + [Fact] + public void CreateWriter_DesignTime_CreatesDesignTimeNodeWriter() + { + // Arrange + var options = RazorCodeGenerationOptions.CreateDesignTimeDefault(); + var target = new DefaultCodeTarget(options, Enumerable.Empty()); + + // Act + var writer = target.CreateNodeWriter(); + + // Assert + Assert.IsType(writer); + } + + [Fact] + public void CreateWriter_Runtime_CreatesRuntimeNodeWriter() + { + // Arrange + var options = RazorCodeGenerationOptions.CreateDefault(); + var target = new DefaultCodeTarget(options, Enumerable.Empty()); + + // Act + var writer = target.CreateNodeWriter(); + + // Assert + Assert.IsType(writer); + } + + [Fact] + public void HasExtension_ReturnsTrue_WhenExtensionFound() + { + // Arrange + var options = RazorCodeGenerationOptions.CreateDefault(); + + var extensions = new ICodeTargetExtension[] + { + new MyExtension2(), + new MyExtension1(), + }; + + var target = new DefaultCodeTarget(options, extensions); + + // Act + var result = target.HasExtension(); + + // Assert + Assert.True(result); + } + + [Fact] + public void HasExtension_ReturnsFalse_WhenExtensionNotFound() + { + // Arrange + var options = RazorCodeGenerationOptions.CreateDefault(); + + var extensions = new ICodeTargetExtension[] + { + new MyExtension2(), + new MyExtension2(), + }; + + var target = new DefaultCodeTarget(options, extensions); + + // Act + var result = target.HasExtension(); + + // Assert + Assert.False(result); + } + + [Fact] + public void GetExtension_ReturnsExtension_WhenExtensionFound() + { + // Arrange + var options = RazorCodeGenerationOptions.CreateDefault(); + + var extensions = new ICodeTargetExtension[] + { + new MyExtension2(), + new MyExtension1(), + }; + + var target = new DefaultCodeTarget(options, extensions); + + // Act + var result = target.GetExtension(); + + // Assert + Assert.Same(extensions[1], result); + } + + [Fact] + public void GetExtension_ReturnsFirstMatch_WhenExtensionFound() + { + // Arrange + var options = RazorCodeGenerationOptions.CreateDefault(); + + var extensions = new ICodeTargetExtension[] + { + new MyExtension2(), + new MyExtension1(), + new MyExtension2(), + new MyExtension1(), + }; + + var target = new DefaultCodeTarget(options, extensions); + + // Act + var result = target.GetExtension(); + + // Assert + Assert.Same(extensions[1], result); + } + + + [Fact] + public void GetExtension_ReturnsNull_WhenExtensionNotFound() + { + // Arrange + var options = RazorCodeGenerationOptions.CreateDefault(); + + var extensions = new ICodeTargetExtension[] + { + new MyExtension2(), + new MyExtension2(), + }; + + var target = new DefaultCodeTarget(options, extensions); + + // Act + var result = target.GetExtension(); + + // Assert + Assert.Null(result); + } + + private class MyExtension1 : ICodeTargetExtension + { + } + + private class MyExtension2 : ICodeTargetExtension + { + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/DefaultDocumentWriterTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/DefaultDocumentWriterTest.cs new file mode 100644 index 0000000000..3537eea4f6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/DefaultDocumentWriterTest.cs @@ -0,0 +1,393 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Moq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration +{ + public class DefaultDocumentWriterTest + { + [Fact] // This test covers the whole process including actual hashing. + public void WriteDocument_EndToEnd_WritesChecksumAndMarksAutoGenerated() + { + // Arrange + var document = new DocumentIntermediateNode(); + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + var options = RazorCodeGenerationOptions.CreateDefault(); + + var target = CodeTarget.CreateDefault(codeDocument, options); + var writer = new DefaultDocumentWriter(target, options); + + // Act + var result = writer.WriteDocument(codeDocument, document); + + // Assert + var csharp = result.GeneratedCode; + Assert.Equal( +@"#pragma checksum ""test.cshtml"" ""{ff1816ec-aa5e-4d10-87f7-6f4963833460}"" ""da39a3ee5e6b4b0d3255bfef95601890afd80709"" +// +#pragma warning disable 1591 +#pragma warning restore 1591 +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteDocument_SHA1_WritesChecksumAndMarksAutoGenerated() + { + // Arrange + var checksumBytes = new byte[] { (byte)'t', (byte)'e', (byte)'s', (byte)'t', }; + + var sourceDocument = Mock.Of(d => + d.FilePath == "test.cshtml" && + d.GetChecksum() == checksumBytes && + d.GetChecksumAlgorithm() == "SHA1"); + + var document = new DocumentIntermediateNode(); + + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var options = RazorCodeGenerationOptions.CreateDefault(); + + var target = CodeTarget.CreateDefault(codeDocument, options); + var writer = new DefaultDocumentWriter(target, options); + + // Act + var result = writer.WriteDocument(codeDocument, document); + + // Assert + var csharp = result.GeneratedCode; + Assert.Equal( +@"#pragma checksum ""test.cshtml"" ""{ff1816ec-aa5e-4d10-87f7-6f4963833460}"" ""74657374"" +// +#pragma warning disable 1591 +#pragma warning restore 1591 +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteDocument_SHA256_WritesChecksumAndMarksAutoGenerated() + { + // Arrange + var checksumBytes = new byte[] { (byte)'t', (byte)'e', (byte)'s', (byte)'t', }; + + var sourceDocument = Mock.Of(d => + d.FilePath == "test.cshtml" && + d.GetChecksum() == checksumBytes && + d.GetChecksumAlgorithm() == "SHA256"); + + var document = new DocumentIntermediateNode(); + + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var options = RazorCodeGenerationOptions.CreateDefault(); + + var target = CodeTarget.CreateDefault(codeDocument, options); + var writer = new DefaultDocumentWriter(target, options); + + // Act + var result = writer.WriteDocument(codeDocument, document); + + // Assert + var csharp = result.GeneratedCode; + Assert.Equal( +@"#pragma checksum ""test.cshtml"" ""{8829d00f-11b8-4213-878b-770e8597ac16}"" ""74657374"" +// +#pragma warning disable 1591 +#pragma warning restore 1591 +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteDocument_UnsupportedChecksumAlgorithm_Throws() + { + // Arrange + var checksumBytes = new byte[] { (byte)'t', (byte)'e', (byte)'s', (byte)'t', }; + + var sourceDocument = Mock.Of(d => + d.FilePath == "test.cshtml" && + d.GetChecksum() == checksumBytes && + d.GetChecksumAlgorithm() == "SHA3"); + + var document = new DocumentIntermediateNode(); + + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var options = RazorCodeGenerationOptions.CreateDefault(); + + var target = CodeTarget.CreateDefault(codeDocument, options); + var writer = new DefaultDocumentWriter(target, options); + + // Act & Assert + var exception = Assert.Throws(() => + { + var result = writer.WriteDocument(codeDocument, document); + }); + Assert.Equal( + "The hash algorithm 'SHA3' is not supported for checksum generation. Supported algorithms are: 'SHA1 SHA256'. " + + "Set 'RazorCodeGenerationOptions.SuppressChecksum' to 'True' to suppress automatic checksum generation.", + exception.Message); + } + + + + [Fact] + public void WriteDocument_Empty_SuppressChecksumTrue_DoesnotWriteChecksum() + { + // Arrange + var document = new DocumentIntermediateNode(); + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + var optionsBuilder = new DefaultRazorCodeGenerationOptionsBuilder(designTime: false) + { + SuppressChecksum = true + }; + var options = optionsBuilder.Build(); + + var target = CodeTarget.CreateDefault(codeDocument, options); + var writer = new DefaultDocumentWriter(target, options); + + // Act + var result = writer.WriteDocument(codeDocument, document); + + // Assert + var csharp = result.GeneratedCode; + Assert.Equal( +@"// +#pragma warning disable 1591 +#pragma warning restore 1591 +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteDocument_WritesNamespace() + { + // Arrange + var document = new DocumentIntermediateNode(); + var builder = IntermediateNodeBuilder.Create(document); + builder.Add(new NamespaceDeclarationIntermediateNode() + { + Content = "TestNamespace", + }); + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + var options = RazorCodeGenerationOptions.CreateDefault(); + + var target = CodeTarget.CreateDefault(codeDocument, options); + var writer = new DefaultDocumentWriter(target, options); + + // Act + var result = writer.WriteDocument(codeDocument, document); + + // Assert + var csharp = result.GeneratedCode; + Assert.Equal( +@"#pragma checksum ""test.cshtml"" ""{ff1816ec-aa5e-4d10-87f7-6f4963833460}"" ""da39a3ee5e6b4b0d3255bfef95601890afd80709"" +// +#pragma warning disable 1591 +namespace TestNamespace +{ + #line hidden +} +#pragma warning restore 1591 +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteDocument_WritesClass() + { + // Arrange + var document = new DocumentIntermediateNode(); + var builder = IntermediateNodeBuilder.Create(document); + builder.Add(new ClassDeclarationIntermediateNode() + { + Modifiers = + { + "internal" + }, + BaseType = "TestBase", + Interfaces = new List { "IFoo", "IBar", }, + TypeParameters = new List + { + new TypeParameter() { ParameterName = "TKey", }, + new TypeParameter() { ParameterName = "TValue", }, + }, + ClassName = "TestClass", + }); + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + var options = RazorCodeGenerationOptions.CreateDefault(); + + var target = CodeTarget.CreateDefault(codeDocument, options); + var writer = new DefaultDocumentWriter(target, options); + + // Act + var result = writer.WriteDocument(codeDocument, document); + + // Assert + var csharp = result.GeneratedCode; + Assert.Equal( +@"#pragma checksum ""test.cshtml"" ""{ff1816ec-aa5e-4d10-87f7-6f4963833460}"" ""da39a3ee5e6b4b0d3255bfef95601890afd80709"" +// +#pragma warning disable 1591 +internal class TestClass : TestBase, IFoo, IBar +{ +} +#pragma warning restore 1591 +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteDocument_WritesMethod() + { + // Arrange + var document = new DocumentIntermediateNode(); + var builder = IntermediateNodeBuilder.Create(document); + builder.Add(new MethodDeclarationIntermediateNode() + { + Modifiers = + { + "internal", + "virtual", + "async", + }, + MethodName = "TestMethod", + Parameters = + { + new MethodParameter() + { + Modifiers = + { + "readonly", + "ref", + }, + ParameterName = "a", + TypeName = "int", + }, + new MethodParameter() + { + ParameterName = "b", + TypeName = "string", + } + }, + ReturnType = "string", + }); + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + var options = RazorCodeGenerationOptions.CreateDefault(); + + var target = CodeTarget.CreateDefault(codeDocument, options); + var writer = new DefaultDocumentWriter(target, options); + + // Act + var result = writer.WriteDocument(codeDocument, document); + + // Assert + var csharp = result.GeneratedCode; + Assert.Equal( +@"#pragma checksum ""test.cshtml"" ""{ff1816ec-aa5e-4d10-87f7-6f4963833460}"" ""da39a3ee5e6b4b0d3255bfef95601890afd80709"" +// +#pragma warning disable 1591 +#pragma warning disable 1998 +internal virtual async string TestMethod(readonly ref int a, string b) +{ +} +#pragma warning restore 1998 +#pragma warning restore 1591 +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteDocument_WritesField() + { + // Arrange + var document = new DocumentIntermediateNode(); + var builder = IntermediateNodeBuilder.Create(document); + builder.Add(new FieldDeclarationIntermediateNode() + { + Modifiers = + { + "internal", + "readonly", + }, + FieldName = "_foo", + FieldType = "string", + }); + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + var options = RazorCodeGenerationOptions.CreateDefault(); + + var target = CodeTarget.CreateDefault(codeDocument, options); + var writer = new DefaultDocumentWriter(target, options); + + // Act + var result = writer.WriteDocument(codeDocument, document); + + // Assert + var csharp = result.GeneratedCode; + Assert.Equal( +@"#pragma checksum ""test.cshtml"" ""{ff1816ec-aa5e-4d10-87f7-6f4963833460}"" ""da39a3ee5e6b4b0d3255bfef95601890afd80709"" +// +#pragma warning disable 1591 +internal readonly string _foo; +#pragma warning restore 1591 +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteDocument_WritesProperty() + { + // Arrange + var document = new DocumentIntermediateNode(); + var builder = IntermediateNodeBuilder.Create(document); + builder.Add(new PropertyDeclarationIntermediateNode() + { + Modifiers = + { + "internal", + "virtual", + }, + PropertyName = "Foo", + PropertyType = "string", + }); + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + var options = RazorCodeGenerationOptions.CreateDefault(); + + var target = CodeTarget.CreateDefault(codeDocument, options); + var writer = new DefaultDocumentWriter(target, options); + + // Act + var result = writer.WriteDocument(codeDocument, document); + + // Assert + var csharp = result.GeneratedCode; + Assert.Equal( +@"#pragma checksum ""test.cshtml"" ""{ff1816ec-aa5e-4d10-87f7-6f4963833460}"" ""da39a3ee5e6b4b0d3255bfef95601890afd80709"" +// +#pragma warning disable 1591 +internal virtual string Foo { get; set; } +#pragma warning restore 1591 +", + csharp, + ignoreLineEndingDifferences: true); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/DesignTimeNodeWriterTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/DesignTimeNodeWriterTest.cs new file mode 100644 index 0000000000..39ab11c211 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/DesignTimeNodeWriterTest.cs @@ -0,0 +1,498 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration +{ + public class DesignTimeNodeWriterTest : RazorProjectEngineTestBase + { + protected override RazorLanguageVersion Version => RazorLanguageVersion.Latest; + + [Fact] + public void WriteUsingDirective_NoSource_WritesContent() + { + // Arrange + var writer = new DesignTimeNodeWriter(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var node = new UsingDirectiveIntermediateNode() + { + Content = "System", + }; + + // Act + writer.WriteUsingDirective(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"using System; +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteUsingDirective_WithSource_WritesContentWithLinePragmaAndMapping() + { + // Arrange + var writer = new DesignTimeNodeWriter(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var originalSpan = new SourceSpan("test.cshtml", 0, 0, 0, 6); + var generatedSpan = new SourceSpan(null, 38 + Environment.NewLine.Length * 3, 3, 0, 6); + var expectedSourceMapping = new SourceMapping(originalSpan, generatedSpan); + var node = new UsingDirectiveIntermediateNode() + { + Content = "System", + Source = originalSpan, + }; + + // Act + writer.WriteUsingDirective(context, node); + + // Assert + var mapping = Assert.Single(((DefaultCodeRenderingContext)context).SourceMappings); + Assert.Equal(expectedSourceMapping, mapping); + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 1 ""test.cshtml"" +using System; + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpExpression_SkipsLinePragma_WithoutSource() + { + // Arrange + var writer = new DesignTimeNodeWriter(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var node = new CSharpExpressionIntermediateNode(); + var builder = IntermediateNodeBuilder.Create(node); + builder.Add(new IntermediateToken() + { + Content = "i++", + Kind = TokenKind.CSharp, + }); + + // Act + writer.WriteCSharpExpression(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"__o = i++; +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpExpression_WritesLinePragma_WithSource() + { + // Arrange + var writer = new DesignTimeNodeWriter(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var node = new CSharpExpressionIntermediateNode() + { + Source = new SourceSpan("test.cshtml", 0, 0, 0, 3), + }; + var builder = IntermediateNodeBuilder.Create(node); + builder.Add(new IntermediateToken() + { + Content = "i++", + Kind = TokenKind.CSharp, + }); + + // Act + writer.WriteCSharpExpression(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 1 ""test.cshtml"" +__o = i++; + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpExpression_WithExtensionNode_WritesPadding() + { + // Arrange + var writer = new DesignTimeNodeWriter(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var node = new CSharpExpressionIntermediateNode(); + var builder = IntermediateNodeBuilder.Create(node); + builder.Add(new IntermediateToken() + { + Content = "i", + Kind = TokenKind.CSharp, + }); + builder.Add(new MyExtensionIntermediateNode()); + builder.Add(new IntermediateToken() + { + Content = "++", + Kind = TokenKind.CSharp, + }); + + // Act + writer.WriteCSharpExpression(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"__o = iRender Children +++; +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpExpression_WithSource_WritesPadding() + { + // Arrange + var writer = new DesignTimeNodeWriter(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var node = new CSharpExpressionIntermediateNode() + { + Source = new SourceSpan("test.cshtml", 8, 0, 8, 3), + }; + var builder = IntermediateNodeBuilder.Create(node); + builder.Add(new IntermediateToken() + { + Content = "i", + Kind = TokenKind.CSharp, + }); + builder.Add(new MyExtensionIntermediateNode()); + builder.Add(new IntermediateToken() + { + Content = "++", + Kind = TokenKind.CSharp, + }); + + // Act + writer.WriteCSharpExpression(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 1 ""test.cshtml"" + __o = iRender Children +++; + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpCode_WhitespaceContentWithSource_WritesContent() + { + // Arrange + var writer = new DesignTimeNodeWriter(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var node = new CSharpCodeIntermediateNode() + { + Source = new SourceSpan("test.cshtml", 0, 0, 0, 3), + }; + IntermediateNodeBuilder.Create(node) + .Add(new IntermediateToken() + { + Kind = TokenKind.CSharp, + Content = " " + }); + + // Act + writer.WriteCSharpCode(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 1 ""test.cshtml"" + + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpCode_SkipsLinePragma_WithoutSource() + { + // Arrange + var writer = new DesignTimeNodeWriter(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var node = new CSharpCodeIntermediateNode(); + IntermediateNodeBuilder.Create(node) + .Add(new IntermediateToken() + { + Kind = TokenKind.CSharp, + Content = "if (true) { }" + }); + + // Act + writer.WriteCSharpCode(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"if (true) { } +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpCode_WritesLinePragma_WithSource() + { + // Arrange + var writer = new DesignTimeNodeWriter(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var node = new CSharpCodeIntermediateNode() + { + Source = new SourceSpan("test.cshtml", 0, 0, 0, 13), + }; + IntermediateNodeBuilder.Create(node) + .Add(new IntermediateToken() + { + Kind = TokenKind.CSharp, + Content = "if (true) { }", + }); + + // Act + writer.WriteCSharpCode(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 1 ""test.cshtml"" +if (true) { } + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpCode_WritesPadding_WithSource() + { + // Arrange + var writer = new DesignTimeNodeWriter(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var node = new CSharpCodeIntermediateNode() + { + Source = new SourceSpan("test.cshtml", 0, 0, 0, 17), + }; + IntermediateNodeBuilder.Create(node) + .Add(new IntermediateToken() + { + Kind = TokenKind.CSharp, + Content = " if (true) { }", + }); + + // Act + writer.WriteCSharpCode(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 1 ""test.cshtml"" + if (true) { } + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpExpressionAttributeValue_RendersCorrectly() + { + var writer = new DesignTimeNodeWriter(); + + var content = ""; + var sourceDocument = TestRazorSourceDocument.Create(content); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var documentNode = Lower(codeDocument); + var node = documentNode.Children.OfType().Single().Children[1] as CSharpExpressionAttributeValueIntermediateNode; + + var context = TestCodeRenderingContext.CreateDesignTime(source: sourceDocument); + + // Act + writer.WriteCSharpExpressionAttributeValue(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 1 ""test.cshtml"" + __o = false; + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpCodeAttributeValue_RendersCorrectly() + { + var writer = new DesignTimeNodeWriter(); + var content = ""; + var sourceDocument = TestRazorSourceDocument.Create(content); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var documentNode = Lower(codeDocument); + var node = documentNode.Children.OfType().Single().Children[1] as CSharpCodeAttributeValueIntermediateNode; + + var context = TestCodeRenderingContext.CreateDesignTime(source: sourceDocument); + + // Act + writer.WriteCSharpCodeAttributeValue(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 1 ""test.cshtml"" + if(@true){ } + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpCodeAttributeValue_WithExpression_RendersCorrectly() + { + var writer = new DesignTimeNodeWriter(); + var content = ""; + var sourceDocument = TestRazorSourceDocument.Create(content); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var documentNode = Lower(codeDocument); + var node = documentNode.Children.OfType().Single().Children[1] as CSharpCodeAttributeValueIntermediateNode; + + var context = TestCodeRenderingContext.CreateDesignTime(source: sourceDocument); + + // Act + writer.WriteCSharpCodeAttributeValue(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 1 ""test.cshtml"" + if(@true){ + +#line default +#line hidden +#nullable disable +Render Children +#nullable restore +#line 1 ""test.cshtml"" + } + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + private DocumentIntermediateNode Lower(RazorCodeDocument codeDocument) + { + var projectEngine = CreateProjectEngine(); + return Lower(codeDocument, projectEngine); + } + + private DocumentIntermediateNode Lower(RazorCodeDocument codeDocument, RazorProjectEngine projectEngine) + { + for (var i = 0; i < projectEngine.Phases.Count; i++) + { + var phase = projectEngine.Phases[i]; + phase.Execute(codeDocument); + + if (phase is IRazorIntermediateNodeLoweringPhase) + { + break; + } + } + + var documentNode = codeDocument.GetDocumentIntermediateNode(); + Assert.NotNull(documentNode); + + return documentNode; + } + + private class MyExtensionIntermediateNode : ExtensionIntermediateNode + { + public override IntermediateNodeCollection Children => IntermediateNodeCollection.ReadOnly; + + public override void Accept(IntermediateNodeVisitor visitor) + { + visitor.VisitDefault(this); + } + + public override void WriteNode(CodeTarget target, CodeRenderingContext context) + { + context.CodeWriter.WriteLine("MyExtensionNode"); + } + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/LiteralRuntimeNodeWriterTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/LiteralRuntimeNodeWriterTest.cs new file mode 100644 index 0000000000..36267fb658 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/LiteralRuntimeNodeWriterTest.cs @@ -0,0 +1,48 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration +{ + public class LiteralRuntimeNodeWriterTest + { + [Fact] + public void WriteCSharpExpression_UsesWriteLiteral_WritesLinePragma_WithSource() + { + // Arrange + var writer = new LiteralRuntimeNodeWriter(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new CSharpExpressionIntermediateNode() + { + Source = new SourceSpan("test.cshtml", 0, 0, 0, 3), + }; + var builder = IntermediateNodeBuilder.Create(node); + builder.Add(new IntermediateToken() + { + Content = "i++", + Kind = TokenKind.CSharp, + }); + + // Act + writer.WriteCSharpExpression(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 1 ""test.cshtml"" +WriteLiteral(i++); + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/RuntimeNodeWriterTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/RuntimeNodeWriterTest.cs new file mode 100644 index 0000000000..666bdb649b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/RuntimeNodeWriterTest.cs @@ -0,0 +1,705 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration +{ + public class RuntimeNodeWriterTest : RazorProjectEngineTestBase + { + protected override RazorLanguageVersion Version => RazorLanguageVersion.Latest; + + [Fact] + public void WriteUsingDirective_NoSource_WritesContent() + { + // Arrange + var codeWriter = new CodeWriter(); + var writer = new RuntimeNodeWriter(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new UsingDirectiveIntermediateNode() + { + Content = "System", + }; + + // Act + writer.WriteUsingDirective(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"using System; +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteUsingDirective_WithSource_WritesContentWithLinePragma() + { + // Arrange + var codeWriter = new CodeWriter(); + var writer = new RuntimeNodeWriter(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new UsingDirectiveIntermediateNode() + { + Content = "System", + Source = new SourceSpan("test.cshtml", 0, 0, 0, 3), + }; + + // Act + writer.WriteUsingDirective(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 1 ""test.cshtml"" +using System; + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpExpression_SkipsLinePragma_WithoutSource() + { + // Arrange + var codeWriter = new CodeWriter(); + var writer = new RuntimeNodeWriter() + { + WriteCSharpExpressionMethod = "Test", + }; + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new CSharpExpressionIntermediateNode(); + var builder = IntermediateNodeBuilder.Create(node); + builder.Add(new IntermediateToken() + { + Content = "i++", + Kind = TokenKind.CSharp, + }); + + // Act + writer.WriteCSharpExpression(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"Test(i++); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpExpression_WritesLinePragma_WithSource() + { + // Arrange + var codeWriter = new CodeWriter(); + var writer = new RuntimeNodeWriter() + { + WriteCSharpExpressionMethod = "Test", + }; + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new CSharpExpressionIntermediateNode() + { + Source = new SourceSpan("test.cshtml", 0, 0, 0, 3), + }; + var builder = IntermediateNodeBuilder.Create(node); + builder.Add(new IntermediateToken() + { + Content = "i++", + Kind = TokenKind.CSharp, + }); + + // Act + writer.WriteCSharpExpression(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 1 ""test.cshtml"" +Test(i++); + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpExpression_WithExtensionNode_WritesPadding() + { + // Arrange + var codeWriter = new CodeWriter(); + var writer = new RuntimeNodeWriter() + { + WriteCSharpExpressionMethod = "Test", + }; + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new CSharpExpressionIntermediateNode(); + var builder = IntermediateNodeBuilder.Create(node); + builder.Add(new IntermediateToken() + { + Content = "i", + Kind = TokenKind.CSharp, + }); + builder.Add(new MyExtensionIntermediateNode()); + builder.Add(new IntermediateToken() + { + Content = "++", + Kind = TokenKind.CSharp, + }); + + // Act + writer.WriteCSharpExpression(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"Test(iRender Children +++); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpExpression_WithSource_WritesPadding() + { + // Arrange + var codeWriter = new CodeWriter(); + var writer = new RuntimeNodeWriter() + { + WriteCSharpExpressionMethod = "Test", + }; + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new CSharpExpressionIntermediateNode() + { + Source = new SourceSpan("test.cshtml", 8, 0, 8, 3), + }; + var builder = IntermediateNodeBuilder.Create(node); + builder.Add(new IntermediateToken() + { + Content = "i", + Kind = TokenKind.CSharp, + }); + builder.Add(new MyExtensionIntermediateNode()); + builder.Add(new IntermediateToken() + { + Content = "++", + Kind = TokenKind.CSharp, + }); + + // Act + writer.WriteCSharpExpression(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 1 ""test.cshtml"" + Test(iRender Children +++); + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpCode_WhitespaceContent_DoesNothing() + { + // Arrange + var codeWriter = new CodeWriter(); + var writer = new RuntimeNodeWriter(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new CSharpCodeIntermediateNode(); + IntermediateNodeBuilder.Create(node) + .Add(new IntermediateToken() + { + Kind = TokenKind.CSharp, + Content = " \t" + }); + + // Act + writer.WriteCSharpCode(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Empty(csharp); + } + + [Fact] + public void WriteCSharpCode_SkipsLinePragma_WithoutSource() + { + // Arrange + var codeWriter = new CodeWriter(); + var writer = new RuntimeNodeWriter(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new CSharpCodeIntermediateNode(); + IntermediateNodeBuilder.Create(node) + .Add(new IntermediateToken() + { + Kind = TokenKind.CSharp, + Content = "if (true) { }" + }); + + // Act + writer.WriteCSharpCode(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"if (true) { } +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpCode_WritesLinePragma_WithSource() + { + // Arrange + var codeWriter = new CodeWriter(); + var writer = new RuntimeNodeWriter(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new CSharpCodeIntermediateNode() + { + Source = new SourceSpan("test.cshtml", 0, 0, 0, 13), + }; + IntermediateNodeBuilder.Create(node) + .Add(new IntermediateToken() + { + Kind = TokenKind.CSharp, + Content = "if (true) { }", + }); + + // Act + writer.WriteCSharpCode(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 1 ""test.cshtml"" +if (true) { } + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpCode_WritesPadding_WithSource() + { + // Arrange + var codeWriter = new CodeWriter(); + var writer = new RuntimeNodeWriter(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new CSharpCodeIntermediateNode() + { + Source = new SourceSpan("test.cshtml", 0, 0, 0, 17), + }; + IntermediateNodeBuilder.Create(node) + .Add(new IntermediateToken() + { + Kind = TokenKind.CSharp, + Content = " if (true) { }", + }); + + // Act + writer.WriteCSharpCode(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 1 ""test.cshtml"" + if (true) { } + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteHtmlLiteral_WithinMaxSize_WritesSingleLiteral() + { + // Arrange + var codeWriter = new CodeWriter(); + var writer = new RuntimeNodeWriter(); + var context = TestCodeRenderingContext.CreateRuntime(); + + // Act + writer.WriteHtmlLiteral(context, maxStringLiteralLength: 6, "Hello"); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"WriteLiteral(""Hello""); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteHtmlLiteral_GreaterThanMaxSize_WritesMultipleLiterals() + { + // Arrange + var codeWriter = new CodeWriter(); + var writer = new RuntimeNodeWriter(); + var context = TestCodeRenderingContext.CreateRuntime(); + + // Act + writer.WriteHtmlLiteral(context, maxStringLiteralLength: 6, "Hello World"); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"WriteLiteral(""Hello ""); +WriteLiteral(""World""); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteHtmlLiteral_GreaterThanMaxSize_SingleEmojisSplit() + { + // Arrange + var codeWriter = new CodeWriter(); + var writer = new RuntimeNodeWriter(); + var context = TestCodeRenderingContext.CreateRuntime(); + + // Act + writer.WriteHtmlLiteral(context, maxStringLiteralLength: 2, " 👦"); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"WriteLiteral("" ""); +WriteLiteral(""👦""); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteHtmlLiteral_GreaterThanMaxSize_SequencedZeroWithJoinedEmojisSplit() + { + // Arrange + var codeWriter = new CodeWriter(); + var writer = new RuntimeNodeWriter(); + var context = TestCodeRenderingContext.CreateRuntime(); + + // Act + writer.WriteHtmlLiteral(context, maxStringLiteralLength: 6, "👩‍👩‍👧‍👧👩‍👩‍👧‍👧"); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"WriteLiteral(""👩‍👩‍""); +WriteLiteral(""👧‍👧""); +WriteLiteral(""👩‍👩‍""); +WriteLiteral(""👧‍👧""); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteHtmlContent_RendersContentCorrectly() + { + // Arrange + var codeWriter = new CodeWriter(); + var writer = new RuntimeNodeWriter(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new HtmlContentIntermediateNode(); + node.Children.Add(new IntermediateToken() + { + Content = "SomeContent", + Kind = TokenKind.Html, + }); + + // Act + writer.WriteHtmlContent(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"WriteLiteral(""SomeContent""); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteHtmlContent_LargeStringLiteral_UsesMultipleWrites() + { + // Arrange + var codeWriter = new CodeWriter(); + var writer = new RuntimeNodeWriter(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new HtmlContentIntermediateNode(); + node.Children.Add(new IntermediateToken() + { + Content = new string('*', 2000), + Kind = TokenKind.Html, + }); + + // Act + writer.WriteHtmlContent(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal(string.Format( +@"WriteLiteral(@""{0}""); +WriteLiteral(@""{1}""); +", new string('*', 1024), new string('*', 976)), + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteHtmlAttribute_RendersCorrectly() + { + // Arrange + var writer = new RuntimeNodeWriter(); + var content = ""; + var sourceDocument = TestRazorSourceDocument.Create(content); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var documentNode = Lower(codeDocument); + var node = documentNode.Children.OfType().Single(); + + var context = TestCodeRenderingContext.CreateRuntime(); + + // Act + writer.WriteHtmlAttribute(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"BeginWriteAttribute(""checked"", "" checked=\"""", 6, ""\"""", 34, 2); +Render Children +Render Children +EndWriteAttribute(); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteHtmlAttributeValue_RendersCorrectly() + { + // Arrange + var writer = new RuntimeNodeWriter(); + var content = ""; + var sourceDocument = TestRazorSourceDocument.Create(content); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var documentNode = Lower(codeDocument); + var node = documentNode.Children.OfType().Single().Children[0] as HtmlAttributeValueIntermediateNode; + + var context = TestCodeRenderingContext.CreateRuntime(); + + // Act + writer.WriteHtmlAttributeValue(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"WriteAttributeValue("""", 16, ""hello-world"", 16, 11, true); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpExpressionAttributeValue_RendersCorrectly() + { + // Arrange + var writer = new RuntimeNodeWriter(); + var content = ""; + var sourceDocument = TestRazorSourceDocument.Create(content); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var documentNode = Lower(codeDocument); + var node = documentNode.Children.OfType().Single().Children[1] as CSharpExpressionAttributeValueIntermediateNode; + + var context = TestCodeRenderingContext.CreateRuntime(); + + // Act + writer.WriteCSharpExpressionAttributeValue(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 1 ""test.cshtml"" +WriteAttributeValue("" "", 27, false, 28, 6, false); + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpCodeAttributeValue_BuffersResult() + { + // Arrange + var writer = new RuntimeNodeWriter(); + + var content = ""; + var sourceDocument = TestRazorSourceDocument.Create(content); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var documentNode = Lower(codeDocument); + var node = documentNode.Children.OfType().Single().Children[1] as CSharpCodeAttributeValueIntermediateNode; + + var context = TestCodeRenderingContext.CreateRuntime(source: sourceDocument); + + // Act + writer.WriteCSharpCodeAttributeValue(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"WriteAttributeValue("" "", 27, new Microsoft.AspNetCore.Mvc.Razor.HelperResult(async(__razor_attribute_value_writer) => { + PushWriter(__razor_attribute_value_writer); +#nullable restore +#line 1 ""test.cshtml"" + if(@true){ } + +#line default +#line hidden +#nullable disable + PopWriter(); +} +), 28, 13, false); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void BeginWriterScope_UsesSpecifiedWriter_RendersCorrectly() + { + // Arrange + var writer = new RuntimeNodeWriter() + { + PushWriterMethod = "TestPushWriter" + }; + var context = TestCodeRenderingContext.CreateRuntime(); + + // Act + writer.BeginWriterScope(context, "MyWriter"); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"TestPushWriter(MyWriter); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void EndWriterScope_RendersCorrectly() + { + // Arrange + var writer = new RuntimeNodeWriter() + { + PopWriterMethod = "TestPopWriter" + }; + var context = TestCodeRenderingContext.CreateRuntime(); + + // Act + writer.EndWriterScope(context); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"TestPopWriter(); +", + csharp, + ignoreLineEndingDifferences: true); + } + + private DocumentIntermediateNode Lower(RazorCodeDocument codeDocument) + { + var projectEngine = CreateProjectEngine(); + return Lower(codeDocument, projectEngine); + } + + private DocumentIntermediateNode Lower(RazorCodeDocument codeDocument, RazorProjectEngine projectEngine) + { + for (var i = 0; i < projectEngine.Phases.Count; i++) + { + var phase = projectEngine.Phases[i]; + phase.Execute(codeDocument); + + if (phase is IRazorIntermediateNodeLoweringPhase) + { + break; + } + } + + var irDocument = codeDocument.GetDocumentIntermediateNode(); + Assert.NotNull(irDocument); + + return irDocument; + } + + private class MyExtensionIntermediateNode : ExtensionIntermediateNode + { + public override IntermediateNodeCollection Children => IntermediateNodeCollection.ReadOnly; + + public override void Accept(IntermediateNodeVisitor visitor) + { + visitor.VisitDefault(this); + } + + public override void WriteNode(CodeTarget target, CodeRenderingContext context) + { + throw new NotImplementedException(); + } + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/TagHelperHtmlAttributeRuntimeNodeWriterTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/TagHelperHtmlAttributeRuntimeNodeWriterTest.cs new file mode 100644 index 0000000000..dc942970d9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/CodeGeneration/TagHelperHtmlAttributeRuntimeNodeWriterTest.cs @@ -0,0 +1,131 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration +{ + public class TagHelperHtmlAttributeRuntimeNodeWriterTest : RazorProjectEngineTestBase + { + protected override RazorLanguageVersion Version => RazorLanguageVersion.Latest; + + [Fact] + public void WriteHtmlAttributeValue_RendersCorrectly() + { + var writer = new TagHelperHtmlAttributeRuntimeNodeWriter(); + + var content = ""; + var sourceDocument = TestRazorSourceDocument.Create(content); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var documentNode = Lower(codeDocument); + var node = documentNode.Children.OfType().Single().Children[0] as HtmlAttributeValueIntermediateNode; + + var context = TestCodeRenderingContext.CreateRuntime(); + + // Act + writer.WriteHtmlAttributeValue(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"AddHtmlAttributeValue("""", 16, ""hello-world"", 16, 11, true); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpExpressionAttributeValue_RendersCorrectly() + { + var writer = new TagHelperHtmlAttributeRuntimeNodeWriter(); + var content = ""; + var sourceDocument = TestRazorSourceDocument.Create(content); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var documentNode = Lower(codeDocument); + var node = documentNode.Children.OfType().Single().Children[1] as CSharpExpressionAttributeValueIntermediateNode; + + var context = TestCodeRenderingContext.CreateRuntime(); + + // Act + writer.WriteCSharpExpressionAttributeValue(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 1 ""test.cshtml"" +AddHtmlAttributeValue("" "", 27, false, 28, 6, false); + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteCSharpCodeAttributeValue_BuffersResult() + { + var writer = new TagHelperHtmlAttributeRuntimeNodeWriter(); + + var content = ""; + var sourceDocument = TestRazorSourceDocument.Create(content); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var documentNode = Lower(codeDocument); + var node = documentNode.Children.OfType().Single().Children[1] as CSharpCodeAttributeValueIntermediateNode; + + var context = TestCodeRenderingContext.CreateRuntime(source: sourceDocument); + + // Act + writer.WriteCSharpCodeAttributeValue(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"AddHtmlAttributeValue("" "", 27, new Microsoft.AspNetCore.Mvc.Razor.HelperResult(async(__razor_attribute_value_writer) => { + PushWriter(__razor_attribute_value_writer); +#nullable restore +#line 1 ""test.cshtml"" + if(@true){ } + +#line default +#line hidden +#nullable disable + PopWriter(); +} +), 28, 13, false); +", + csharp, + ignoreLineEndingDifferences: true); + } + + private DocumentIntermediateNode Lower(RazorCodeDocument codeDocument) + { + var projectEngine = CreateProjectEngine(); + return Lower(codeDocument, projectEngine); + } + + private DocumentIntermediateNode Lower(RazorCodeDocument codeDocument, RazorProjectEngine projectEngine) + { + for (var i = 0; i < projectEngine.Phases.Count; i++) + { + var phase = projectEngine.Phases[i]; + phase.Execute(codeDocument); + + if (phase is IRazorIntermediateNodeLoweringPhase) + { + break; + } + } + + var documentNode = codeDocument.GetDocumentIntermediateNode(); + Assert.NotNull(documentNode); + + return documentNode; + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Components/ComponentDocumentClassifierPassTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Components/ComponentDocumentClassifierPassTest.cs new file mode 100644 index 0000000000..8c6df48979 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Components/ComponentDocumentClassifierPassTest.cs @@ -0,0 +1,224 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Components +{ + public class ComponentDocumentClassifierPassTest : RazorProjectEngineTestBase + { + protected override RazorLanguageVersion Version => RazorLanguageVersion.Latest; + + [Fact] + public void Execute_SetsDocumentKind() + { + // Arrange + var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create("some-content", "Test.razor")); + codeDocument.SetFileKind(FileKinds.Component); + + var projectEngine = CreateProjectEngine(); + var irDocument = CreateIRDocument(projectEngine, codeDocument); + var pass = new ComponentDocumentClassifierPass + { + Engine = projectEngine.Engine + }; + + // Act + pass.Execute(codeDocument, irDocument); + + // Assert + Assert.Equal(ComponentDocumentClassifierPass.ComponentDocumentKind, irDocument.DocumentKind); + } + + [Fact] + public void ComponentDocumentClassifierPass_SetsNamespace() + { + // Arrange + var properties = new RazorSourceDocumentProperties(filePath: "/MyApp/Test.razor", relativePath: "Test.razor"); + var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create("some-content", properties)); + codeDocument.SetFileKind(FileKinds.Component); + + var projectEngine = CreateProjectEngine(b => + { + b.SetRootNamespace("MyApp"); + }); + + var irDocument = CreateIRDocument(projectEngine, codeDocument); + var pass = new ComponentDocumentClassifierPass + { + Engine = projectEngine.Engine + }; + + // Act + pass.Execute(codeDocument, irDocument); + var visitor = new Visitor(); + visitor.Visit(irDocument); + + // Assert + Assert.Equal("MyApp", visitor.Namespace.Content); + } + + [Fact] + public void ComponentDocumentClassifierPass_SetsClass() + { + // Arrange + var properties = new RazorSourceDocumentProperties(filePath: "/MyApp/Test.razor", relativePath: "Test.razor"); + var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create("some-content", properties)); + codeDocument.SetFileKind(FileKinds.Component); + + var projectEngine = CreateProjectEngine(b => + { + b.SetRootNamespace("MyApp"); + }); + + var irDocument = CreateIRDocument(projectEngine, codeDocument); + var pass = new ComponentDocumentClassifierPass + { + Engine = projectEngine.Engine + }; + + // Act + pass.Execute(codeDocument, irDocument); + var visitor = new Visitor(); + visitor.Visit(irDocument); + + // Assert + Assert.Equal($"{CodeGenerationConstants.ComponentBase.FullTypeName}", visitor.Class.BaseType); + Assert.Equal(new[] { "public", }, visitor.Class.Modifiers); + Assert.Equal("Test", visitor.Class.ClassName); + } + + [Fact] + public void ComponentDocumentClassifierPass_UsesRelativePathToGenerateTypeNameAndNamespace() + { + // Arrange + var relativePath = "/Pages/Announcements/Banner.razor"; + var properties = new RazorSourceDocumentProperties(filePath: $"/MyApp{relativePath}", relativePath: relativePath); + var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create("some-content", properties)); + codeDocument.SetFileKind(FileKinds.Component); + + var projectEngine = CreateProjectEngine(b => + { + b.SetRootNamespace("MyApp"); + }); + + var irDocument = CreateIRDocument(projectEngine, codeDocument); + var pass = new ComponentDocumentClassifierPass + { + Engine = projectEngine.Engine + }; + + // Act + pass.Execute(codeDocument, irDocument); + var visitor = new Visitor(); + visitor.Visit(irDocument); + + // Assert + Assert.Equal("Banner", visitor.Class.ClassName); + Assert.Equal("MyApp.Pages.Announcements", visitor.Namespace.Content); + } + + [Fact] + public void ComponentDocumentClassifierPass_SanitizesClassName() + { + // Arrange + var properties = new RazorSourceDocumentProperties(filePath: @"x:\My.+App\path.with+invalid-chars.razor", relativePath: "path.with+invalid-chars.razor"); + var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create("some-content", properties)); + codeDocument.SetFileKind(FileKinds.Component); + + var projectEngine = CreateProjectEngine(b => + { + b.SetRootNamespace("My.+App"); + }); + + var irDocument = CreateIRDocument(projectEngine, codeDocument); + var pass = new ComponentDocumentClassifierPass + { + Engine = projectEngine.Engine + }; + + // Act + pass.Execute(codeDocument, irDocument); + var visitor = new Visitor(); + visitor.Visit(irDocument); + + // Assert + Assert.Equal("path_with_invalid_chars", visitor.Class.ClassName); + Assert.Equal("My._App", visitor.Namespace.Content); + } + + [Fact] + public void ComponentDocumentClassifierPass_SetsUpMainMethod() + { + // Arrange + var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create("some-content", "Test.razor")); + codeDocument.SetFileKind(FileKinds.Component); + + var projectEngine = CreateProjectEngine(); + var irDocument = CreateIRDocument(projectEngine, codeDocument); + var pass = new ComponentDocumentClassifierPass + { + Engine = projectEngine.Engine + }; + + // Act + pass.Execute(codeDocument, irDocument); + var visitor = new Visitor(); + visitor.Visit(irDocument); + + // Assert + Assert.Equal(CodeGenerationConstants.ComponentBase.BuildRenderTree, visitor.Method.MethodName); + Assert.Equal("void", visitor.Method.ReturnType); + Assert.Equal(new[] { "protected", "override" }, visitor.Method.Modifiers); + } + + private DocumentIntermediateNode CreateIRDocument(RazorProjectEngine projectEngine, RazorCodeDocument codeDocument) + { + for (var i = 0; i < projectEngine.Phases.Count; i++) + { + var phase = projectEngine.Phases[i]; + phase.Execute(codeDocument); + + if (phase is IRazorIntermediateNodeLoweringPhase) + { + break; + } + } + + return codeDocument.GetDocumentIntermediateNode(); + } + + private class Visitor : IntermediateNodeWalker + { + public NamespaceDeclarationIntermediateNode Namespace { get; private set; } + + public ClassDeclarationIntermediateNode Class { get; private set; } + + public MethodDeclarationIntermediateNode Method { get; private set; } + + public override void VisitMethodDeclaration(MethodDeclarationIntermediateNode node) + { + Method = node; + } + + public override void VisitNamespaceDeclaration(NamespaceDeclarationIntermediateNode node) + { + Namespace = node; + base.VisitNamespaceDeclaration(node); + } + + public override void VisitClassDeclaration(ClassDeclarationIntermediateNode node) + { + Class = node; + base.VisitClassDeclaration(node); + } + } + + private class TestComponentDocumentClassifierPass : ComponentDocumentClassifierPass + { + public new bool IsMatch(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode) + => base.IsMatch(codeDocument, documentNode); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Components/ComponentMarkupBlockPassTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Components/ComponentMarkupBlockPassTest.cs new file mode 100644 index 0000000000..b823d72ef8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Components/ComponentMarkupBlockPassTest.cs @@ -0,0 +1,403 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Components +{ + public class ComponentMarkupBlockPassTest + { + public ComponentMarkupBlockPassTest() + { + Pass = new ComponentMarkupBlockPass(); + ProjectEngine = (DefaultRazorProjectEngine)RazorProjectEngine.Create( + RazorConfiguration.Default, + RazorProjectFileSystem.Create(Environment.CurrentDirectory), + b => + { + if (b.Features.OfType().Any()) + { + b.Features.Remove(b.Features.OfType().Single()); + } + }); + Engine = ProjectEngine.Engine; + + Pass.Engine = Engine; + } + + private DefaultRazorProjectEngine ProjectEngine { get; } + + private RazorEngine Engine { get; } + + private ComponentMarkupBlockPass Pass { get; } + + [Fact] + public void Execute_RewritesHtml_Basic() + { + // Arrange + var document = CreateDocument(@" + + + Hello, World! + +"); + + var expected = NormalizeContent(@" + + + Hello, World! + +"); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + var block = documentNode.FindDescendantNodes().Single(); + Assert.Equal(expected, block.Content, ignoreLineEndingDifferences: true); + } + + [Fact] + public void Execute_RewritesHtml_WithComment() + { + // Arrange + var document = CreateDocument(@"StartEnd"); + + var expected = NormalizeContent(@"StartEnd"); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + var block = documentNode.FindDescendantNodes().Single(); + Assert.Equal(expected, block.Content, ignoreLineEndingDifferences: true); + } + + // See: https://github.com/aspnet/AspNetCore/issues/6480 + [Fact] + public void Execute_RewritesHtml_HtmlAttributePrefix() + { + // Arrange + var document = CreateDocument(@"
Hi
"); + + var expected = NormalizeContent(@"
Hi
"); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + var block = documentNode.FindDescendantNodes().Single(); + Assert.Equal(expected, block.Content, ignoreLineEndingDifferences: true); + } + + [Fact] + public void Execute_RewritesHtml_MergesSiblings() + { + // Arrange + var document = CreateDocument(@" + + @(""Hi"")
+
+
@(""Hi"")
+"); + + var expected = NormalizeContent(@" +
+
+ "); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + var block = documentNode.FindDescendantNodes().Single(); + Assert.Equal(expected, block.Content, ignoreLineEndingDifferences: true); + } + + [Fact] + public void Execute_RewritesHtml_MergesSiblings_LeftEdge() + { + // Arrange + var document = CreateDocument(@" +
+
+
@(""Hi"")
+"); + + var expected = NormalizeContent(@" +
+
+ "); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + var block = documentNode.FindDescendantNodes().Single(); + Assert.Equal(expected, block.Content, ignoreLineEndingDifferences: true); + } + + + [Fact] + public void Execute_RewritesHtml_CSharpInAttributes() + { + // Arrange + var document = CreateDocument(@" + + +
foo
+ +"); + + var expected = NormalizeContent("
foo
\n "); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + var block = documentNode.FindDescendantNodes().Single(); + Assert.Equal(expected, block.Content, ignoreLineEndingDifferences: true); + } + + [Fact] + public void Execute_RewritesHtml_CSharpInBody() + { + // Arrange + var document = CreateDocument(@" + + +
@foo
+
rewriteme
+
@bar
+ +"); + + var expected = NormalizeContent("
rewriteme
\n "); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + var block = documentNode.FindDescendantNodes().Single(); + Assert.Equal(expected, block.Content, ignoreLineEndingDifferences: true); + } + + [Fact] + public void Execute_RewritesHtml_EncodesHtmlEntities() + { + // Arrange + var document = CreateDocument(@" +
+ <span>Hi</span> +
"); + + var expected = NormalizeContent(@" +
+ <span>Hi</span> +
"); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + var block = documentNode.FindDescendantNodes().Single(); + Assert.Equal(expected, block.Content, ignoreLineEndingDifferences: true); + } + + [Fact] + public void Execute_RewritesHtml_EmptyNonvoid() + { + // Arrange + var document = CreateDocument(@""); + + var expected = NormalizeContent(@""); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + var block = documentNode.FindDescendantNodes().Single(); + Assert.Equal(expected, block.Content, ignoreLineEndingDifferences: true); + } + + [Fact] + public void Execute_RewritesHtml_Void() + { + // Arrange + var document = CreateDocument(@""); + + var expected = NormalizeContent(@""); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + var block = documentNode.FindDescendantNodes().Single(); + Assert.Equal(expected, block.Content, ignoreLineEndingDifferences: true); + } + + [Fact] + public void Execute_CannotRewriteHtml_CSharpInCode() + { + // Arrange + var document = CreateDocument(@" + + @if (some_bool) + { + + @hello + + } +"); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + Assert.Empty(documentNode.FindDescendantNodes()); + } + + [Fact] + public void Execute_CannotRewriteHtml_Script() + { + // Arrange + var document = CreateDocument(@" + + @if (some_bool) + { + + + + } +"); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + Assert.Empty(documentNode.FindDescendantNodes()); + } + + // The unclosed tag will have errors, so we won't rewrite it or its parent. + [Fact] + public void Execute_CannotRewriteHtml_Errors() + { + // Arrange + var document = CreateDocument(@" + + +"); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + Assert.Empty(documentNode.FindDescendantNodes()); + } + + [Fact] + public void Execute_RewritesHtml_MismatchedClosingTag() + { + // Arrange + var document = CreateDocument(@" + +
+
rewriteme
+ +"); + + var expected = NormalizeContent("
rewriteme
\n "); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + var block = documentNode.FindDescendantNodes().Single(); + Assert.Equal(expected, block.Content, ignoreLineEndingDifferences: true); + } + + private string NormalizeContent(string content) + { + // Test inputs frequently have leading space for readability. + content = content.TrimStart(); + + // Normalize newlines since we are testing lengths of things. + content = content.Replace("\r", ""); + content = content.Replace("\n", "\r\n"); + + return content; + } + + private RazorCodeDocument CreateDocument(string content) + { + // Normalize newlines since we are testing lengths of things. + content = content.Replace("\r", ""); + content = content.Replace("\n", "\r\n"); + + var source = RazorSourceDocument.Create(content, "test.cshtml"); + return ProjectEngine.CreateCodeDocumentCore(source, FileKinds.Component); + } + + private DocumentIntermediateNode Lower(RazorCodeDocument codeDocument) + { + for (var i = 0; i < Engine.Phases.Count; i++) + { + var phase = Engine.Phases[i]; + if (phase is IRazorCSharpLoweringPhase) + { + break; + } + + phase.Execute(codeDocument); + } + + var document = codeDocument.GetDocumentIntermediateNode(); + Engine.Features.OfType().Single().Execute(codeDocument, document); + return document; + } + + private class StaticTagHelperFeature : ITagHelperFeature + { + public RazorEngine Engine { get; set; } + + public List TagHelpers { get; set; } + + public IReadOnlyList GetDescriptors() + { + return TagHelpers; + } + } + } +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Components/ComponentMarkupEncodingPassTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Components/ComponentMarkupEncodingPassTest.cs new file mode 100644 index 0000000000..710d3d4457 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Components/ComponentMarkupEncodingPassTest.cs @@ -0,0 +1,221 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Linq; +using System.Text; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Components +{ + public class ComponentMarkupEncodingPassTest + { + public ComponentMarkupEncodingPassTest() + { + Pass = new ComponentMarkupEncodingPass(); + ProjectEngine = (DefaultRazorProjectEngine)RazorProjectEngine.Create( + RazorConfiguration.Default, + RazorProjectFileSystem.Create(Environment.CurrentDirectory), + b => + { + if (b.Features.OfType().Any()) + { + b.Features.Remove(b.Features.OfType().Single()); + } + }); + Engine = ProjectEngine.Engine; + + Pass.Engine = Engine; + } + + private DefaultRazorProjectEngine ProjectEngine { get; } + + private RazorEngine Engine { get; } + + private ComponentMarkupEncodingPass Pass { get; } + + [Fact] + public void Execute_StaticHtmlContent_RewrittenToBlock() + { + // Arrange + var document = CreateDocument(@" +
+  +
"); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + Assert.Empty(documentNode.FindDescendantNodes()); + Assert.Single(documentNode.FindDescendantNodes()); + } + + [Fact] + public void Execute_MixedHtmlContent_NoNewLineorSpecialCharacters_DoesNotSetEncoded() + { + // Arrange + var document = CreateDocument(@" +
The time is @DateTime.Now
"); + var expected = NormalizeContent("The time is "); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + var node = documentNode.FindDescendantNodes().Single(); + Assert.Equal(expected, GetHtmlContent(node)); + Assert.False(node.IsEncoded()); + } + + [Fact] + public void Execute_MixedHtmlContent_NewLine_SetsEncoded() + { + // Arrange + var document = CreateDocument(@" +
+The time is @DateTime.Now
"); + var expected = NormalizeContent(@" +The time is "); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + var node = documentNode.FindDescendantNodes().Single(); + Assert.Equal(expected, GetHtmlContent(node)); + Assert.True(node.IsEncoded()); + } + + [Fact] + public void Execute_MixedHtmlContent_Ampersand_SetsEncoded() + { + // Arrange + var document = CreateDocument(@" +
The time is & & @DateTime.Now
"); + var expected = NormalizeContent("The time is & & "); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + var node = documentNode.FindDescendantNodes().Single(); + Assert.Equal(expected, GetHtmlContent(node)); + Assert.True(node.IsEncoded()); + } + + [Fact] + public void Execute_MixedHtmlContent_NonAsciiCharacter_SetsEncoded() + { + // Arrange + var document = CreateDocument(@" +
ThĖ tĨme is @DateTime.Now
"); + var expected = NormalizeContent("ThĖ tĨme is "); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + var node = documentNode.FindDescendantNodes().Single(); + Assert.Equal(expected, GetHtmlContent(node)); + Assert.True(node.IsEncoded()); + } + + [Fact] + public void Execute_MixedHtmlContent_HTMLEntity_DoesNotSetEncoded() + { + // Arrange + var document = CreateDocument(@" +
The time = @DateTime.Now
"); + var expected = NormalizeContent("The time = "); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + var node = documentNode.FindDescendantNodes().Single(); + Assert.Equal(expected, GetHtmlContent(node)); + Assert.False(node.IsEncoded()); + } + + [Fact] + public void Execute_MixedHtmlContent_MultipleHTMLEntities_DoesNotSetEncoded() + { + // Arrange + var document = CreateDocument(@" +
The time = =�x003D; @DateTime.Now
"); + var expected = NormalizeContent("The time =\u00A0== "); + + var documentNode = Lower(document); + + // Act + Pass.Execute(document, documentNode); + + // Assert + var node = documentNode.FindDescendantNodes().Single(); + Assert.Equal(expected, GetHtmlContent(node)); + Assert.False(node.IsEncoded()); + } + + private string NormalizeContent(string content) + { + // Normalize newlines since we are testing lengths of things. + content = content.Replace("\r", ""); + content = content.Replace("\n", "\r\n"); + + return content; + } + + private RazorCodeDocument CreateDocument(string content) + { + // Normalize newlines since we are testing lengths of things. + content = content.Replace("\r", ""); + content = content.Replace("\n", "\r\n"); + + var source = RazorSourceDocument.Create(content, "test.cshtml"); + return ProjectEngine.CreateCodeDocumentCore(source, FileKinds.Component); + } + + private DocumentIntermediateNode Lower(RazorCodeDocument codeDocument) + { + for (var i = 0; i < Engine.Phases.Count; i++) + { + var phase = Engine.Phases[i]; + if (phase is IRazorCSharpLoweringPhase) + { + break; + } + + phase.Execute(codeDocument); + } + + var document = codeDocument.GetDocumentIntermediateNode(); + Engine.Features.OfType().Single().Execute(codeDocument, document); + return document; + } + + private static string GetHtmlContent(HtmlContentIntermediateNode node) + { + var builder = new StringBuilder(); + var htmlTokens = node.Children.OfType().Where(t => t.IsHtml); + foreach (var htmlToken in htmlTokens) + { + builder.Append(htmlToken.Content); + } + return builder.ToString(); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Components/NodeAssert.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Components/NodeAssert.cs new file mode 100644 index 0000000000..aae834c256 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Components/NodeAssert.cs @@ -0,0 +1,126 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Text; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Components +{ + internal static class NodeAssert + { + public static HtmlAttributeIntermediateNode Attribute(IntermediateNode node, string attributeName, string attributeValue) + { + Assert.NotNull(node); + + var attributeNode = Assert.IsType(node); + Assert.Equal(attributeName, attributeNode.AttributeName); + + var attributeValueNode = Assert.IsType(Assert.Single(attributeNode.Children)); + var actual = new StringBuilder(); + for (var i = 0; i < attributeValueNode.Children.Count; i++) + { + var token = Assert.IsType(attributeValueNode.Children[i]); + Assert.Equal(TokenKind.Html, token.Kind); + actual.Append(token.Content); + } + + Assert.Equal(attributeValue, actual.ToString()); + + return attributeNode; + } + + public static HtmlAttributeIntermediateNode Attribute(IntermediateNodeCollection nodes, string attributeName, string attributeValue) + { + Assert.NotNull(nodes); + return Attribute(Assert.Single(nodes), attributeName, attributeValue); + } + + public static HtmlContentIntermediateNode Content(IntermediateNode node, string content, bool trim = true) + { + Assert.NotNull(node); + + var contentNode = Assert.IsType(node); + + var actual = new StringBuilder(); + for (var i = 0; i < contentNode.Children.Count; i++) + { + var token = Assert.IsType(contentNode.Children[i]); + Assert.Equal(TokenKind.Html, token.Kind); + actual.Append(token.Content); + } + + Assert.Equal(content, trim ? actual.ToString().Trim() : actual.ToString()); + return contentNode; + } + + public static HtmlContentIntermediateNode Content(IntermediateNodeCollection nodes, string content, bool trim = true) + { + Assert.NotNull(nodes); + return Content(Assert.Single(nodes), content, trim); + } + + public static HtmlAttributeIntermediateNode CSharpAttribute(IntermediateNode node, string attributeName, string attributeValue) + { + Assert.NotNull(node); + + var attributeNode = Assert.IsType(node); + Assert.Equal(attributeName, attributeNode.AttributeName); + + var attributeValueNode = Assert.IsType(Assert.Single(attributeNode.Children)); + var actual = new StringBuilder(); + for (var i = 0; i < attributeValueNode.Children.Count; i++) + { + var token = Assert.IsType(attributeValueNode.Children[i]); + Assert.Equal(TokenKind.CSharp, token.Kind); + actual.Append(token.Content); + } + + Assert.Equal(attributeValue, actual.ToString()); + + return attributeNode; + } + + public static HtmlAttributeIntermediateNode CSharpAttribute(IntermediateNodeCollection nodes, string attributeName, string attributeValue) + { + Assert.NotNull(nodes); + return Attribute(Assert.Single(nodes), attributeName, attributeValue); + } + + public static MarkupElementIntermediateNode Element(IntermediateNode node, string tagName) + { + Assert.NotNull(node); + + var elementNode = Assert.IsType(node); + Assert.Equal(tagName, elementNode.TagName); + return elementNode; + } + + public static MarkupElementIntermediateNode Element(IntermediateNodeCollection nodes, string tagName) + { + Assert.NotNull(nodes); + return Element(Assert.Single(nodes), tagName); + } + + public static HtmlContentIntermediateNode Whitespace(IntermediateNode node) + { + Assert.NotNull(node); + + var contentNode = Assert.IsType(node); + for (var i = 0; i < contentNode.Children.Count; i++) + { + var token = Assert.IsType(contentNode.Children[i]); + Assert.Equal(TokenKind.Html, token.Kind); + Assert.True(string.IsNullOrWhiteSpace(token.Content)); + } + + return contentNode; + } + + public static HtmlContentIntermediateNode Whitespace(IntermediateNodeCollection nodes) + { + Assert.NotNull(nodes); + return Whitespace(Assert.Single(nodes)); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultAllowedChildTagDescriptorBuilderTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultAllowedChildTagDescriptorBuilderTest.cs new file mode 100644 index 0000000000..2a6b2a8198 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultAllowedChildTagDescriptorBuilderTest.cs @@ -0,0 +1,24 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultAllowedChildTagDescriptorBuilderTest + { + [Fact] + public void Build_DisplayNameIsName() + { + // Arrange + var builder = new DefaultAllowedChildTagDescriptorBuilder(null); + builder.Name = "foo"; + + // Act + var descriptor = builder.Build(); + + // Assert + Assert.Equal("foo", descriptor.DisplayName); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultBoundAttributeDescriptorBuilderTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultBoundAttributeDescriptorBuilderTest.cs new file mode 100644 index 0000000000..52317aa157 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultBoundAttributeDescriptorBuilderTest.cs @@ -0,0 +1,47 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultBoundAttributeDescriptorBuilderTest + { + [Fact] + public void DisplayName_SetsDescriptorsDisplayName() + { + // Arrange + var expectedDisplayName = "ExpectedDisplayName"; + + var tagHelperBuilder = new DefaultTagHelperDescriptorBuilder(TagHelperConventions.DefaultKind, "TestTagHelper", "Test"); + + var builder = new DefaultBoundAttributeDescriptorBuilder(tagHelperBuilder, TagHelperConventions.DefaultKind); + builder.DisplayName(expectedDisplayName); + + // Act + var descriptor = builder.Build(); + + // Assert + Assert.Equal(expectedDisplayName, descriptor.DisplayName); + } + + [Fact] + public void DisplayName_DefaultsToPropertyLookingDisplayName() + { + // Arrange + var tagHelperBuilder = new DefaultTagHelperDescriptorBuilder(TagHelperConventions.DefaultKind, "TestTagHelper", "Test"); + tagHelperBuilder.TypeName("TestTagHelper"); + + var builder = new DefaultBoundAttributeDescriptorBuilder(tagHelperBuilder, TagHelperConventions.DefaultKind); + builder + .TypeName(typeof(int).FullName) + .PropertyName("SomeProperty"); + + // Act + var descriptor = builder.Build(); + + // Assert + Assert.Equal("int TestTagHelper.SomeProperty", descriptor.DisplayName); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultDocumentClassifierPassTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultDocumentClassifierPassTest.cs new file mode 100644 index 0000000000..218d3da90d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultDocumentClassifierPassTest.cs @@ -0,0 +1,62 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + + +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; +using static Microsoft.AspNetCore.Razor.Language.Intermediate.IntermediateNodeAssert; + +namespace Microsoft.AspNetCore.Razor.Language +{ + // We're purposely lean on tests here because the functionality is well covered by + // integration tests, and is mostly implemented by the base class. + public class DefaultDocumentClassifierPassTest : RazorProjectEngineTestBase + { + protected override RazorLanguageVersion Version => RazorLanguageVersion.Latest; + + [Fact] + public void Execute_IgnoresDocumentsWithDocumentKind() + { + // Arrange + var documentNode = new DocumentIntermediateNode() + { + DocumentKind = "ignore", + Options = RazorCodeGenerationOptions.CreateDefault(), + }; + + var pass = new DefaultDocumentClassifierPass(); + pass.Engine = CreateProjectEngine().Engine; + + // Act + pass.Execute(TestRazorCodeDocument.CreateEmpty(), documentNode); + + // Assert + Assert.Equal("ignore", documentNode.DocumentKind); + NoChildren(documentNode); + } + + [Fact] + public void Execute_CreatesClassStructure() + { + // Arrange + var documentNode = new DocumentIntermediateNode() + { + Options = RazorCodeGenerationOptions.CreateDefault(), + }; + + var pass = new DefaultDocumentClassifierPass(); + pass.Engine = CreateProjectEngine().Engine; + + // Act + pass.Execute(TestRazorCodeDocument.CreateEmpty(), documentNode); + + // Assert + Assert.Equal("default", documentNode.DocumentKind); + + var @namespace = SingleChild(documentNode); + var @class = SingleChild(@namespace); + var method = SingleChild(@class); + NoChildren(method); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultItemCollectionTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultItemCollectionTest.cs new file mode 100644 index 0000000000..aee4d07fe0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultItemCollectionTest.cs @@ -0,0 +1,54 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class ItemCollectionTest + { + [Fact] + public void Get_MissingValueReturnsNull() + { + // Arrange + var items = new ItemCollection(); + + // Act + var value = items["foo"]; + + // Assert + Assert.Null(value); + } + + [Fact] + public void GetAndSet_ReturnsValue() + { + // Arrange + var items = new ItemCollection(); + + var expected = "bar"; + items["foo"] = expected; + + // Act + var value = items["foo"]; + + // Assert + Assert.Same(expected, value); + } + + [Fact] + public void Set_CanSetValueToNull() + { + // Arrange + var items = new ItemCollection(); + + items["foo"] = "bar"; + + // Act + items["foo"] = null; + + // Assert + Assert.Null(items["foo"]); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorCSharpLoweringPhaseTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorCSharpLoweringPhaseTest.cs new file mode 100644 index 0000000000..e76c97557f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorCSharpLoweringPhaseTest.cs @@ -0,0 +1,87 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Razor.Language.CodeGeneration; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Microsoft.AspNetCore.Testing; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorCSharpLoweringPhaseTest + { + [Fact] + public void Execute_ThrowsForMissingDependency_IRDocument() + { + // Arrange + var phase = new DefaultRazorCSharpLoweringPhase(); + + var engine = RazorProjectEngine.CreateEmpty(b => b.Phases.Add(phase)); + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + codeDocument.SetSyntaxTree(RazorSyntaxTree.Parse(codeDocument.Source)); + + // Act & Assert + ExceptionAssert.Throws( + () => phase.Execute(codeDocument), + $"The '{nameof(DefaultRazorCSharpLoweringPhase)}' phase requires a '{nameof(DocumentIntermediateNode)}' " + + $"provided by the '{nameof(RazorCodeDocument)}'."); + } + + [Fact] + public void Execute_ThrowsForMissingDependency_CodeTarget() + { + // Arrange + var phase = new DefaultRazorCSharpLoweringPhase(); + + var engine = RazorProjectEngine.CreateEmpty(b => b.Phases.Add(phase)); + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + codeDocument.SetSyntaxTree(RazorSyntaxTree.Parse(codeDocument.Source)); + + var irDocument = new DocumentIntermediateNode() + { + DocumentKind = "test", + }; + codeDocument.SetDocumentIntermediateNode(irDocument); + + // Act & Assert + ExceptionAssert.Throws( + () => phase.Execute(codeDocument), + $"The document of kind 'test' does not have a '{nameof(CodeTarget)}'. " + + $"The document classifier must set a value for '{nameof(DocumentIntermediateNode.Target)}'."); + } + + [Fact] + public void Execute_CollatesIRDocumentDiagnosticsFromSourceDocument() + { + // Arrange + var phase = new DefaultRazorCSharpLoweringPhase(); + var engine = RazorProjectEngine.CreateEmpty(b => b.Phases.Add(phase)); + var codeDocument = TestRazorCodeDocument.Create("

"I am an error.", RazorDiagnosticSeverity.Error), + new SourceSpan("SomeFile.cshtml", 11, 0, 11, 1)); + irDocument.Diagnostics.Add(expectedDiagnostic); + codeDocument.SetDocumentIntermediateNode(irDocument); + + // Act + phase.Execute(codeDocument); + + // Assert + var csharpDocument = codeDocument.GetCSharpDocument(); + var diagnostic = Assert.Single(csharpDocument.Diagnostics); + Assert.Same(expectedDiagnostic, diagnostic); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorCodeDocumentTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorCodeDocumentTest.cs new file mode 100644 index 0000000000..415dcadb3b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorCodeDocumentTest.cs @@ -0,0 +1,47 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorCodeDocumentTest + { + [Fact] + public void Ctor() + { + // Arrange + var source = TestRazorSourceDocument.Create(); + + var imports = new RazorSourceDocument[] + { + TestRazorSourceDocument.Create(), + }; + + // Act + var code = new DefaultRazorCodeDocument(source, imports); + + // Assert + Assert.Same(source, code.Source); + Assert.NotNull(code.Items); + + Assert.NotSame(imports, code.Imports); + Assert.Collection(imports, d => Assert.Same(imports[0], d)); + } + + [Fact] + public void Ctor_AllowsNullForImports() + { + // Arrange + var source = TestRazorSourceDocument.Create(); + + // Act + var code = new DefaultRazorCodeDocument(source, imports: null); + + // Assert + Assert.Same(source, code.Source); + Assert.NotNull(code.Items); + Assert.Empty(code.Imports); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorDiagnosticTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorDiagnosticTest.cs new file mode 100644 index 0000000000..bf8f3099ce --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorDiagnosticTest.cs @@ -0,0 +1,217 @@ +// Copyright(c) .NET Foundation.All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Globalization; +using Microsoft.AspNetCore.Razor.Language.Legacy; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorDiagnosticTest + { + [Fact] + public void DefaultRazorDiagnostic_Ctor() + { + // Arrange + var descriptor = new RazorDiagnosticDescriptor("RZ0000", () => "error", RazorDiagnosticSeverity.Error); + var span = new SourceSpan("test.cs", 15, 1, 8, 5); + + // Act + var diagnostic = new DefaultRazorDiagnostic(descriptor, span, new object[0]); + + // Assert + Assert.Equal("RZ0000", diagnostic.Id); + Assert.Equal(RazorDiagnosticSeverity.Error, diagnostic.Severity); + Assert.Equal(span, diagnostic.Span); + } + + [Fact] + public void DefaultRazorDiagnostic_GetMessage() + { + // Arrange + var descriptor = new RazorDiagnosticDescriptor("RZ0000", () => "error", RazorDiagnosticSeverity.Error); + var span = new SourceSpan("test.cs", 15, 1, 8, 5); + + var diagnostic = new DefaultRazorDiagnostic(descriptor, span, new object[0]); + + // Act + var result = diagnostic.GetMessage(); + + // Assert + Assert.Equal("error", result); + } + + + [Fact] + public void DefaultRazorDiagnostic_GetMessage_WithArgs() + { + // Arrange + var descriptor = new RazorDiagnosticDescriptor("RZ0000", () => "this is an {0}", RazorDiagnosticSeverity.Error); + var span = new SourceSpan("test.cs", 15, 1, 8, 5); + + var diagnostic = new DefaultRazorDiagnostic(descriptor, span, new[] { "error" }); + + // Act + var result = diagnostic.GetMessage(); + + // Assert + Assert.Equal("this is an error", result); + } + + [Fact] + public void DefaultRazorDiagnostic_GetMessage_WithArgs_FormatProvider() + { + // Arrange + var descriptor = new RazorDiagnosticDescriptor("RZ0000", () => "this is an {0}", RazorDiagnosticSeverity.Error); + var span = new SourceSpan("test.cs", 15, 1, 8, 5); + + var diagnostic = new DefaultRazorDiagnostic(descriptor, span, new object[] { 1.3m }); + + // Act + var result = diagnostic.GetMessage(new CultureInfo("fr-FR")); + + // Assert + Assert.Equal("this is an 1,3", result); + } + + + [Fact] + public void DefaultRazorDiagnostic_ToString() + { + // Arrange + var descriptor = new RazorDiagnosticDescriptor("RZ0000", () => "this is an error", RazorDiagnosticSeverity.Error); + var span = new SourceSpan("test.cs", 15, 1, 8, 5); + + var diagnostic = new DefaultRazorDiagnostic(descriptor, span, new object[0]); + + // Act + var result = diagnostic.ToString(); + + // Assert + Assert.Equal("test.cs(2,9): Error RZ0000: this is an error", result); + } + + [Fact] + public void DefaultRazorDiagnostic_ToString_FormatProvider() + { + // Arrange + var descriptor = new RazorDiagnosticDescriptor("RZ0000", () => "this is an {0}", RazorDiagnosticSeverity.Error); + var span = new SourceSpan("test.cs", 15, 1, 8, 5); + + var diagnostic = new DefaultRazorDiagnostic(descriptor, span, new object[] { 1.3m }); + + // Act + var result = ((IFormattable)diagnostic).ToString("ignored", new CultureInfo("fr-FR")); + + // Assert + Assert.Equal("test.cs(2,9): Error RZ0000: this is an 1,3", result); + } + + [Fact] + public void DefaultRazorDiagnostic_Equals() + { + // Arrange + var descriptor = new RazorDiagnosticDescriptor("RZ0000", () => "this is an {0}", RazorDiagnosticSeverity.Error); + var span = new SourceSpan("test.cs", 15, 1, 8, 5); + + var diagnostic1 = new DefaultRazorDiagnostic(descriptor, span, new object[0]); + var diagnostic2 = new DefaultRazorDiagnostic(descriptor, span, new object[0]); + + // Act + var result = diagnostic1.Equals(diagnostic2); + + // Assert + Assert.True(result); + } + + [Fact] + public void DefaultRazorDiagnostic_NotEquals_DifferentLocation() + { + // Arrange + var descriptor = new RazorDiagnosticDescriptor("RZ0000", () => "this is an {0}", RazorDiagnosticSeverity.Error); + var span1 = new SourceSpan("test.cs", 15, 1, 8, 5); + var span2 = new SourceSpan("test.cs", 15, 1, 8, 3); + + var diagnostic1 = new DefaultRazorDiagnostic(descriptor, span1, new object[0]); + var diagnostic2 = new DefaultRazorDiagnostic(descriptor, span2, new object[0]); + + // Act + var result = diagnostic1.Equals(diagnostic2); + + // Assert + Assert.False(result); + } + + [Fact] + public void DefaultRazorDiagnostic_NotEquals_DifferentId() + { + // Arrange + var descriptor1 = new RazorDiagnosticDescriptor("RZ0001", () => "this is an {0}", RazorDiagnosticSeverity.Error); + var descriptor2 = new RazorDiagnosticDescriptor("RZ0002", () => "this is an {0}", RazorDiagnosticSeverity.Error); + var span = new SourceSpan("test.cs", 15, 1, 8, 5); + + var diagnostic1 = new DefaultRazorDiagnostic(descriptor1, span, new object[0]); + var diagnostic2 = new DefaultRazorDiagnostic(descriptor2, span, new object[0]); + + // Act + var result = diagnostic1.Equals(diagnostic2); + + // Assert + Assert.False(result); + } + + [Fact] + public void DefaultRazorDiagnostic_HashCodesEqual() + { + // Arrange + var descriptor = new RazorDiagnosticDescriptor("RZ0000", () => "this is an {0}", RazorDiagnosticSeverity.Error); + var span = new SourceSpan("test.cs", 15, 1, 8, 5); + + var diagnostic1 = new DefaultRazorDiagnostic(descriptor, span, new object[0]); + var diagnostic2 = new DefaultRazorDiagnostic(descriptor, span, new object[0]); + + // Act + var result = diagnostic1.GetHashCode() == diagnostic2.GetHashCode(); + + // Assert + Assert.True(result); + } + + [Fact] + public void DefaultRazorDiagnostic_HashCodesNotEqual_DifferentLocation() + { + // Arrange + var descriptor = new RazorDiagnosticDescriptor("RZ0000", () => "this is an {0}", RazorDiagnosticSeverity.Error); + var span1 = new SourceSpan("test.cs", 15, 1, 8, 5); + var span2 = new SourceSpan("test.cs", 15, 1, 8, 3); + + var diagnostic1 = new DefaultRazorDiagnostic(descriptor, span1, new object[0]); + var diagnostic2 = new DefaultRazorDiagnostic(descriptor, span2, new object[0]); + + // Act + var result = diagnostic1.GetHashCode() == diagnostic2.GetHashCode(); + + // Assert + Assert.False(result); + } + + [Fact] + public void DefaultRazorDiagnostic_HashCodesNotEqual_DifferentId() + { + // Arrange + var descriptor1 = new RazorDiagnosticDescriptor("RZ0001", () => "this is an {0}", RazorDiagnosticSeverity.Error); + var descriptor2 = new RazorDiagnosticDescriptor("RZ0002", () => "this is an {0}", RazorDiagnosticSeverity.Error); + var span = new SourceSpan("test.cs", 15, 1, 8, 5); + + var diagnostic1 = new DefaultRazorDiagnostic(descriptor1, span, new object[0]); + var diagnostic2 = new DefaultRazorDiagnostic(descriptor2, span, new object[0]); + + // Act + var result = diagnostic1.GetHashCode() == diagnostic2.GetHashCode(); + + // Assert + Assert.False(result); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorDirectiveClassifierPhaseTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorDirectiveClassifierPhaseTest.cs new file mode 100644 index 0000000000..306be8c445 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorDirectiveClassifierPhaseTest.cs @@ -0,0 +1,102 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Microsoft.AspNetCore.Testing; +using Moq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorDirectiveClassifierPhaseTest + { + [Fact] + public void OnInitialized_OrdersPassesInAscendingOrder() + { + // Arrange & Act + var phase = new DefaultRazorDirectiveClassifierPhase(); + + var first = Mock.Of(p => p.Order == 15); + var second = Mock.Of(p => p.Order == 17); + + var engine = RazorProjectEngine.CreateEmpty(b => + { + b.Phases.Add(phase); + + b.Features.Add(second); + b.Features.Add(first); + }); + + // Assert + Assert.Collection( + phase.Passes, + p => Assert.Same(first, p), + p => Assert.Same(second, p)); + } + + [Fact] + public void Execute_ThrowsForMissingDependency() + { + // Arrange + var phase = new DefaultRazorDirectiveClassifierPhase(); + + var engine = RazorProjectEngine.CreateEmpty(b => b.Phases.Add(phase)); + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + // Act & Assert + ExceptionAssert.Throws( + () => phase.Execute(codeDocument), + $"The '{nameof(DefaultRazorDirectiveClassifierPhase)}' phase requires a '{nameof(DocumentIntermediateNode)}' " + + $"provided by the '{nameof(RazorCodeDocument)}'."); + } + + [Fact] + public void Execute_ExecutesPhasesInOrder() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + // We're going to set up mocks to simulate a sequence of passes. We don't care about + // what's in the nodes, we're just going to look at the identity via strict mocks. + var originalNode = new DocumentIntermediateNode(); + var firstPassNode = new DocumentIntermediateNode(); + var secondPassNode = new DocumentIntermediateNode(); + codeDocument.SetDocumentIntermediateNode(originalNode); + + var firstPass = new Mock(MockBehavior.Strict); + firstPass.SetupGet(m => m.Order).Returns(0); + firstPass.SetupProperty(m => m.Engine); + firstPass.Setup(m => m.Execute(codeDocument, originalNode)).Callback(() => + { + originalNode.Children.Add(firstPassNode); + }); + + var secondPass = new Mock(MockBehavior.Strict); + secondPass.SetupGet(m => m.Order).Returns(1); + secondPass.SetupProperty(m => m.Engine); + secondPass.Setup(m => m.Execute(codeDocument, originalNode)).Callback(() => + { + // Works only when the first pass has run before this. + originalNode.Children[0].Children.Add(secondPassNode); + }); + + var phase = new DefaultRazorDirectiveClassifierPhase(); + + var engine = RazorProjectEngine.CreateEmpty(b => + { + b.Phases.Add(phase); + + b.Features.Add(firstPass.Object); + b.Features.Add(secondPass.Object); + }); + + // Act + phase.Execute(codeDocument); + + // Assert + Assert.Same(secondPassNode, codeDocument.GetDocumentIntermediateNode().Children[0].Children[0]); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorDocumentClassifierPhaseTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorDocumentClassifierPhaseTest.cs new file mode 100644 index 0000000000..0f384b851e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorDocumentClassifierPhaseTest.cs @@ -0,0 +1,102 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Microsoft.AspNetCore.Testing; +using Moq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorDocumentClassifierPhaseTest + { + [Fact] + public void OnInitialized_OrdersPassesInAscendingOrder() + { + // Arrange & Act + var phase = new DefaultRazorDocumentClassifierPhase(); + + var first = Mock.Of(p => p.Order == 15); + var second = Mock.Of(p => p.Order == 17); + + var engine = RazorProjectEngine.CreateEmpty(b => + { + b.Phases.Add(phase); + + b.Features.Add(second); + b.Features.Add(first); + }); + + // Assert + Assert.Collection( + phase.Passes, + p => Assert.Same(first, p), + p => Assert.Same(second, p)); + } + + [Fact] + public void Execute_ThrowsForMissingDependency() + { + // Arrange + var phase = new DefaultRazorDocumentClassifierPhase(); + + var engine = RazorProjectEngine.CreateEmpty(b => b.Phases.Add(phase)); + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + // Act & Assert + ExceptionAssert.Throws( + () => phase.Execute(codeDocument), + $"The '{nameof(DefaultRazorDocumentClassifierPhase)}' phase requires a '{nameof(DocumentIntermediateNode)}' " + + $"provided by the '{nameof(RazorCodeDocument)}'."); + } + + [Fact] + public void Execute_ExecutesPhasesInOrder() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + // We're going to set up mocks to simulate a sequence of passes. We don't care about + // what's in the nodes, we're just going to look at the identity via strict mocks. + var originalNode = new DocumentIntermediateNode(); + var firstPassNode = new DocumentIntermediateNode(); + var secondPassNode = new DocumentIntermediateNode(); + codeDocument.SetDocumentIntermediateNode(originalNode); + + var firstPass = new Mock(MockBehavior.Strict); + firstPass.SetupGet(m => m.Order).Returns(0); + firstPass.SetupProperty(m => m.Engine); + firstPass.Setup(m => m.Execute(codeDocument, originalNode)).Callback(() => + { + originalNode.Children.Add(firstPassNode); + }); + + var secondPass = new Mock(MockBehavior.Strict); + secondPass.SetupGet(m => m.Order).Returns(1); + secondPass.SetupProperty(m => m.Engine); + secondPass.Setup(m => m.Execute(codeDocument, originalNode)).Callback(() => + { + // Works only when the first pass has run before this. + originalNode.Children[0].Children.Add(secondPassNode); + }); + + var phase = new DefaultRazorDocumentClassifierPhase(); + + var engine = RazorProjectEngine.CreateEmpty(b => + { + b.Phases.Add(phase); + + b.Features.Add(firstPass.Object); + b.Features.Add(secondPass.Object); + }); + + // Act + phase.Execute(codeDocument); + + // Assert + Assert.Same(secondPassNode, codeDocument.GetDocumentIntermediateNode().Children[0].Children[0]); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorEngineBuilderTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorEngineBuilderTest.cs new file mode 100644 index 0000000000..a1c804287a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorEngineBuilderTest.cs @@ -0,0 +1,42 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Linq; +using Moq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorEngineBuilderTest + { + [Fact] + public void Build_AddsFeaturesAndPhases() + { + // Arrange + var builder = new DefaultRazorEngineBuilder(designTime: false); + + builder.Features.Add(Mock.Of()); + builder.Features.Add(Mock.Of()); + + builder.Phases.Add(Mock.Of()); + builder.Phases.Add(Mock.Of()); + + var features = builder.Features.ToArray(); + var phases = builder.Phases.ToArray(); + + // Act + var engine = builder.Build(); + + // Assert + Assert.Collection( + engine.Features, + f => Assert.Same(features[0], f), + f => Assert.Same(features[1], f)); + + Assert.Collection( + engine.Phases, + p => Assert.Same(phases[0], p), + p => Assert.Same(phases[1], p)); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorEngineTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorEngineTest.cs new file mode 100644 index 0000000000..15b3122969 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorEngineTest.cs @@ -0,0 +1,72 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Moq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorEngineTest + { + [Fact] + public void Ctor_InitializesPhasesAndFeatures() + { + // Arrange + var features = new IRazorEngineFeature[] + { + Mock.Of(), + Mock.Of(), + }; + + var phases = new IRazorEnginePhase[] + { + Mock.Of(), + Mock.Of(), + }; + + // Act + var engine = new DefaultRazorEngine(features, phases); + + // Assert + for (var i = 0; i < features.Length; i++) + { + Assert.Same(engine, features[i].Engine); + } + + for (var i = 0; i < phases.Length; i++) + { + Assert.Same(engine, phases[i].Engine); + } + } + + [Fact] + public void Process_CallsAllPhases() + { + // Arrange + var features = new IRazorEngineFeature[] + { + Mock.Of(), + Mock.Of(), + }; + + var phases = new IRazorEnginePhase[] + { + Mock.Of(), + Mock.Of(), + }; + + var engine = new DefaultRazorEngine(features, phases); + var document = TestRazorCodeDocument.CreateEmpty(); + + // Act + engine.Process(document); + + // Assert + for (var i = 0; i < phases.Length; i++) + { + var mock = Mock.Get(phases[i]); + mock.Verify(p => p.Execute(document), Times.Once()); + } + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorIntermediateNodeLoweringPhaseIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorIntermediateNodeLoweringPhaseIntegrationTest.cs new file mode 100644 index 0000000000..4d008b89d9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorIntermediateNodeLoweringPhaseIntegrationTest.cs @@ -0,0 +1,541 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using Microsoft.AspNetCore.Razor.Language.Extensions; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Microsoft.AspNetCore.Razor.Language.Legacy; +using Moq; +using Xunit; +using static Microsoft.AspNetCore.Razor.Language.Intermediate.IntermediateNodeAssert; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorIntermediateNodeLoweringPhaseIntegrationTest + { + [Fact] + public void Lower_SetsOptions_Defaults() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + // Act + var documentNode = Lower(codeDocument); + + // Assert + Assert.NotNull(documentNode.Options); + Assert.False(documentNode.Options.DesignTime); + Assert.Equal(4, documentNode.Options.IndentSize); + Assert.False(documentNode.Options.IndentWithTabs); + } + + [Fact] + public void Lower_SetsOptions_RunsConfigureCallbacks() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + var callback = new Mock(); + callback + .Setup(c => c.Configure(It.IsAny())) + .Callback(o => + { + o.IndentSize = 17; + o.IndentWithTabs = true; + o.SuppressChecksum = true; + }); + + // Act + var documentNode = Lower( + codeDocument, + builder: b => + { + b.Features.Add(callback.Object); + }, + designTime: true); + + // Assert + Assert.NotNull(documentNode.Options); + Assert.True(documentNode.Options.DesignTime); + Assert.Equal(17, documentNode.Options.IndentSize); + Assert.True(documentNode.Options.IndentWithTabs); + Assert.True(documentNode.Options.SuppressChecksum); + } + + [Fact] + public void Lower_HelloWorld() + { + // Arrange + var codeDocument = TestRazorCodeDocument.Create("Hello, World!"); + + // Act + var documentNode = Lower(codeDocument); + + // Assert + Children(documentNode, + n => Html("Hello, World!", n)); + } + + [Fact] + public void Lower_HtmlWithDataDashAttributes() + { + // Arrange + var codeDocument = TestRazorCodeDocument.Create(@" + + + + +"); + + // Act + var documentNode = Lower(codeDocument); + + // Assert + Children(documentNode, + n => Html( +@" + + + CSharpExpression("Hello", n), + n => Html(@""" /> + +", n)); + } + + [Fact] + public void Lower_HtmlWithConditionalAttributes() + { + // Arrange + var codeDocument = TestRazorCodeDocument.Create(@" + + + + +"); + + // Act + var documentNode = Lower(codeDocument); + + // Assert + Children(documentNode, + n => Html( +@" + + + ConditionalAttribute( + prefix: " val=\"", + name: "val", + suffix: "\"", + node: n, + valueValidators: new Action[] + { + value => CSharpExpressionAttributeValue(string.Empty, "Hello", value), + value => LiteralAttributeValue(" ", "World", value) + }), + n => Html(@" /> + +", n)); + } + + [Fact] + public void Lower_WithFunctions() + { + // Arrange + var codeDocument = TestRazorCodeDocument.Create(@"@functions { public int Foo { get; set; }}"); + + // Act + var documentNode = Lower(codeDocument); + + // Assert + Children(documentNode, + n => Directive( + "functions", + n, + c => Assert.IsType(c))); + } + + [Fact] + public void Lower_WithUsing() + { + // Arrange + var codeDocument = TestRazorCodeDocument.Create(@"@using System"); + var expectedSourceLocation = new SourceSpan(codeDocument.Source.FilePath, 1, 0, 1, 12); + + // Act + var documentNode = Lower(codeDocument); + + // Assert + Children(documentNode, + n => + { + Using("System", n); + Assert.Equal(expectedSourceLocation, n.Source); + }); + } + + [Fact] + public void Lower_TagHelpers() + { + // Arrange + var codeDocument = TestRazorCodeDocument.Create(@"@addTagHelper *, TestAssembly +"); + var tagHelpers = new[] + { + CreateTagHelperDescriptor( + tagName: "span", + typeName: "SpanTagHelper", + assemblyName: "TestAssembly") + }; + + // Act + var documentNode = Lower(codeDocument, tagHelpers: tagHelpers); + + // Assert + Children(documentNode, + n => Directive( + SyntaxConstants.CSharp.AddTagHelperKeyword, + n, + v => DirectiveToken(DirectiveTokenKind.String, "*, TestAssembly", v)), + n => TagHelper( + "span", + TagMode.StartTagAndEndTag, + tagHelpers, + n, + c => Assert.IsType(c), + c => TagHelperHtmlAttribute( + "val", + AttributeStructure.DoubleQuotes, + c, + v => CSharpExpressionAttributeValue(string.Empty, "Hello", v), + v => LiteralAttributeValue(" ", "World", v)))); + } + + [Fact] + public void Lower_TagHelpers_WithPrefix() + { + // Arrange + var codeDocument = TestRazorCodeDocument.Create(@"@addTagHelper *, TestAssembly +@tagHelperPrefix cool: +"); + var tagHelpers = new[] + { + CreateTagHelperDescriptor( + tagName: "span", + typeName: "SpanTagHelper", + assemblyName: "TestAssembly") + }; + + // Act + var documentNode = Lower(codeDocument, tagHelpers: tagHelpers); + + // Assert + Children(documentNode, + n => Directive( + SyntaxConstants.CSharp.AddTagHelperKeyword, + n, + v => DirectiveToken(DirectiveTokenKind.String, "*, TestAssembly", v)), + n => Directive( + SyntaxConstants.CSharp.TagHelperPrefixKeyword, + n, + v => DirectiveToken(DirectiveTokenKind.String, "cool:", v)), + n => TagHelper( + "span", // Note: this is span not cool:span + TagMode.StartTagAndEndTag, + tagHelpers, + n, + c => Assert.IsType(c), + c => TagHelperHtmlAttribute( + "val", + AttributeStructure.DoubleQuotes, + c, + v => CSharpExpressionAttributeValue(string.Empty, "Hello", v), + v => LiteralAttributeValue(" ", "World", v)))); + } + + [Fact] + public void Lower_TagHelper_InSection() + { + // Arrange + var codeDocument = TestRazorCodeDocument.Create(@"@addTagHelper *, TestAssembly +@section test { + +}"); + var tagHelpers = new[] + { + CreateTagHelperDescriptor( + tagName: "span", + typeName: "SpanTagHelper", + assemblyName: "TestAssembly") + }; + + // Act + var documentNode = Lower(codeDocument, tagHelpers: tagHelpers); + + // Assert + Children( + documentNode, + n => Directive( + SyntaxConstants.CSharp.AddTagHelperKeyword, + n, + v => DirectiveToken(DirectiveTokenKind.String, "*, TestAssembly", v)), + n => Directive( + "section", + n, + c1 => DirectiveToken(DirectiveTokenKind.Member, "test", c1), + c1 => Html(Environment.NewLine, c1), + c1 => TagHelper( + "span", + TagMode.StartTagAndEndTag, + tagHelpers, + c1, + c2 => Assert.IsType(c2), + c2 => TagHelperHtmlAttribute( + "val", + AttributeStructure.DoubleQuotes, + c2, + v => CSharpExpressionAttributeValue(string.Empty, "Hello", v), + v => LiteralAttributeValue(" ", "World", v))), + c1 => Html(Environment.NewLine, c1))); + } + + [Fact] + public void Lower_TagHelpersWithBoundAttribute() + { + // Arrange + var codeDocument = TestRazorCodeDocument.Create(@"@addTagHelper *, TestAssembly +"); + var tagHelpers = new[] + { + CreateTagHelperDescriptor( + tagName: "input", + typeName: "InputTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("bound") + .PropertyName("FooProp") + .TypeName("System.String"), + }) + }; + + // Act + var documentNode = Lower(codeDocument, tagHelpers: tagHelpers); + + // Assert + Children( + documentNode, + n => Directive( + SyntaxConstants.CSharp.AddTagHelperKeyword, + n, + v => DirectiveToken(DirectiveTokenKind.String, "*, TestAssembly", v)), + n => TagHelper( + "input", + TagMode.SelfClosing, + tagHelpers, + n, + c => Assert.IsType(c), + c => SetTagHelperProperty( + "bound", + "FooProp", + AttributeStructure.SingleQuotes, + c, + v => Html("foo", v)))); + } + + [Fact] + public void Lower_WithImports_Using() + { + // Arrange + var source = TestRazorSourceDocument.Create(@"@using System.Threading.Tasks +

Hi!

"); + var imports = new[] + { + TestRazorSourceDocument.Create("@using System.Globalization"), + TestRazorSourceDocument.Create("@using System.Text"), + }; + + var codeDocument = TestRazorCodeDocument.Create(source, imports); + + // Act + var documentNode = Lower(codeDocument); + + // Assert + Children( + documentNode, + n => Using("System.Globalization", n), + n => Using("System.Text", n), + n => Using("System.Threading.Tasks", n), + n => Html("

Hi!

", n)); + } + + [Fact] + public void Lower_WithImports_AllowsIdenticalNamespacesInPrimaryDocument() + { + // Arrange + var source = TestRazorSourceDocument.Create(@"@using System.Threading.Tasks +@using System.Threading.Tasks"); + var imports = new[] + { + TestRazorSourceDocument.Create("@using System.Threading.Tasks"), + }; + + var codeDocument = TestRazorCodeDocument.Create(source, imports); + + // Act + var documentNode = Lower(codeDocument); + + // Assert + Children( + documentNode, + n => Using("System.Threading.Tasks", n), + n => Using("System.Threading.Tasks", n)); + } + + [Fact] + public void Lower_WithMultipleImports_SingleLineFileScopedSinglyOccurring() + { + // Arrange + var source = TestRazorSourceDocument.Create("

Hi!

"); + var imports = new[] + { + TestRazorSourceDocument.Create("@test value1"), + TestRazorSourceDocument.Create("@test value2"), + }; + + var codeDocument = TestRazorCodeDocument.Create(source, imports); + + // Act + var documentNode = Lower(codeDocument, b => + { + b.AddDirective(DirectiveDescriptor.CreateDirective( + "test", + DirectiveKind.SingleLine, + builder => + { + builder.AddMemberToken(); + builder.Usage = DirectiveUsage.FileScopedSinglyOccurring; + })); + }); + + // Assert + Children( + documentNode, + n => Directive("test", n, c => DirectiveToken(DirectiveTokenKind.Member, "value2", c)), + n => Html("

Hi!

", n)); + } + + [Fact] + public void Lower_WithImports_IgnoresBlockDirective() + { + // Arrange + var source = TestRazorSourceDocument.Create("

Hi!

"); + var imports = new[] + { + TestRazorSourceDocument.Create("@block token { }"), + }; + + var codeDocument = TestRazorCodeDocument.Create(source, imports); + + // Act + var documentNode = Lower(codeDocument, b => + { + b.AddDirective(DirectiveDescriptor.CreateDirective("block", DirectiveKind.RazorBlock, d => d.AddMemberToken())); + }); + + // Assert + Children( + documentNode, + n => Html("

Hi!

", n)); + } + + private DocumentIntermediateNode Lower( + RazorCodeDocument codeDocument, + Action builder = null, + IEnumerable tagHelpers = null, + bool designTime = false) + { + tagHelpers = tagHelpers ?? new TagHelperDescriptor[0]; + + Action configureEngine = b => + { + builder?.Invoke(b); + + SectionDirective.Register(b); + b.AddTagHelpers(tagHelpers); + + b.Features.Add(new DesignTimeOptionsFeature(designTime)); + }; + + var projectEngine = RazorProjectEngine.Create(configureEngine); + + for (var i = 0; i < projectEngine.Phases.Count; i++) + { + var phase = projectEngine.Phases[i]; + phase.Execute(codeDocument); + + if (phase is IRazorIntermediateNodeLoweringPhase) + { + break; + } + } + + var documentNode = codeDocument.GetDocumentIntermediateNode(); + Assert.NotNull(documentNode); + + return documentNode; + } + + private static TagHelperDescriptor CreateTagHelperDescriptor( + string tagName, + string typeName, + string assemblyName, + IEnumerable> attributes = null) + { + var builder = TagHelperDescriptorBuilder.Create(typeName, assemblyName); + builder.TypeName(typeName); + + if (attributes != null) + { + foreach (var attributeBuilder in attributes) + { + builder.BoundAttributeDescriptor(attributeBuilder); + } + } + + builder.TagMatchingRuleDescriptor(ruleBuilder => ruleBuilder.RequireTagName(tagName)); + + var descriptor = builder.Build(); + + return descriptor; + } + + private class DesignTimeOptionsFeature : IConfigureRazorParserOptionsFeature, IConfigureRazorCodeGenerationOptionsFeature + { + private bool _designTime; + + public DesignTimeOptionsFeature(bool designTime) + { + _designTime = designTime; + } + + public int Order { get; } + + public RazorEngine Engine { get; set; } + + public void Configure(RazorParserOptionsBuilder options) + { + options.SetDesignTime(_designTime); + } + + public void Configure(RazorCodeGenerationOptionsBuilder options) + { + options.SetDesignTime(_designTime); + } + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorIntermediateNodeLoweringPhaseTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorIntermediateNodeLoweringPhaseTest.cs new file mode 100644 index 0000000000..908983d50a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorIntermediateNodeLoweringPhaseTest.cs @@ -0,0 +1,298 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Microsoft.AspNetCore.Testing; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorIntermediateNodeLoweringPhaseTest + { + [Fact] + public void Execute_AutomaticallyImportsSingleLineSinglyOccurringDirective() + { + // Arrange + var directive = DirectiveDescriptor.CreateSingleLineDirective( + "custom", + builder => + { + builder.AddStringToken(); + builder.Usage = DirectiveUsage.FileScopedSinglyOccurring; + }); + var phase = new DefaultRazorIntermediateNodeLoweringPhase(); + var engine = RazorProjectEngine.CreateEmpty(b => + { + b.Phases.Add(phase); + b.Features.Add(new DefaultRazorCodeGenerationOptionsFeature(designTime: false)); + b.AddDirective(directive); + }); + var options = RazorParserOptions.Create(builder => builder.Directives.Add(directive)); + var importSource = TestRazorSourceDocument.Create("@custom \"hello\"", filePath: "import.cshtml"); + var codeDocument = TestRazorCodeDocument.Create("

NonDirective

"); + codeDocument.SetSyntaxTree(RazorSyntaxTree.Parse(codeDocument.Source, options)); + codeDocument.SetImportSyntaxTrees(new[] { RazorSyntaxTree.Parse(importSource, options) }); + + // Act + phase.Execute(codeDocument); + + // Assert + var documentNode = codeDocument.GetDocumentIntermediateNode(); + var customDirectives = documentNode.FindDirectiveReferences(directive); + var customDirective = (DirectiveIntermediateNode)Assert.Single(customDirectives).Node; + var stringToken = Assert.Single(customDirective.Tokens); + Assert.Equal("\"hello\"", stringToken.Content); + } + + [Fact] + public void Execute_AutomaticallyOverridesImportedSingleLineSinglyOccurringDirective_MainDocument() + { + // Arrange + var directive = DirectiveDescriptor.CreateSingleLineDirective( + "custom", + builder => + { + builder.AddStringToken(); + builder.Usage = DirectiveUsage.FileScopedSinglyOccurring; + }); + var phase = new DefaultRazorIntermediateNodeLoweringPhase(); + var engine = RazorProjectEngine.CreateEmpty(b => + { + b.Phases.Add(phase); + b.Features.Add(new DefaultRazorCodeGenerationOptionsFeature(designTime: false)); + b.AddDirective(directive); + }); + var options = RazorParserOptions.Create(builder => builder.Directives.Add(directive)); + var importSource = TestRazorSourceDocument.Create("@custom \"hello\"", filePath: "import.cshtml"); + var codeDocument = TestRazorCodeDocument.Create("@custom \"world\""); + codeDocument.SetSyntaxTree(RazorSyntaxTree.Parse(codeDocument.Source, options)); + codeDocument.SetImportSyntaxTrees(new[] { RazorSyntaxTree.Parse(importSource, options) }); + + // Act + phase.Execute(codeDocument); + + // Assert + var documentNode = codeDocument.GetDocumentIntermediateNode(); + var customDirectives = documentNode.FindDirectiveReferences(directive); + var customDirective = (DirectiveIntermediateNode)Assert.Single(customDirectives).Node; + var stringToken = Assert.Single(customDirective.Tokens); + Assert.Equal("\"world\"", stringToken.Content); + } + + [Fact] + public void Execute_AutomaticallyOverridesImportedSingleLineSinglyOccurringDirective_MultipleImports() + { + // Arrange + var directive = DirectiveDescriptor.CreateSingleLineDirective( + "custom", + builder => + { + builder.AddStringToken(); + builder.Usage = DirectiveUsage.FileScopedSinglyOccurring; + }); + var phase = new DefaultRazorIntermediateNodeLoweringPhase(); + var engine = RazorProjectEngine.CreateEmpty(b => + { + b.Phases.Add(phase); + b.Features.Add(new DefaultRazorCodeGenerationOptionsFeature(designTime: false)); + b.AddDirective(directive); + }); + var options = RazorParserOptions.Create(builder => builder.Directives.Add(directive)); + var importSource1 = TestRazorSourceDocument.Create("@custom \"hello\"", filePath: "import1.cshtml"); + var importSource2 = TestRazorSourceDocument.Create("@custom \"world\"", filePath: "import2.cshtml"); + var codeDocument = TestRazorCodeDocument.Create("

NonDirective

"); + codeDocument.SetSyntaxTree(RazorSyntaxTree.Parse(codeDocument.Source, options)); + codeDocument.SetImportSyntaxTrees(new[] { RazorSyntaxTree.Parse(importSource1, options), RazorSyntaxTree.Parse(importSource2, options) }); + + // Act + phase.Execute(codeDocument); + + // Assert + var documentNode = codeDocument.GetDocumentIntermediateNode(); + var customDirectives = documentNode.FindDirectiveReferences(directive); + var customDirective = (DirectiveIntermediateNode)Assert.Single(customDirectives).Node; + var stringToken = Assert.Single(customDirective.Tokens); + Assert.Equal("\"world\"", stringToken.Content); + } + + [Fact] + public void Execute_DoesNotImportNonFileScopedSinglyOccurringDirectives_Block() + { + // Arrange + var codeBlockDirective = DirectiveDescriptor.CreateCodeBlockDirective("code", b => b.AddStringToken()); + var razorBlockDirective = DirectiveDescriptor.CreateRazorBlockDirective("razor", b => b.AddStringToken()); + var phase = new DefaultRazorIntermediateNodeLoweringPhase(); + var engine = RazorProjectEngine.CreateEmpty(b => + { + b.Phases.Add(phase); + b.Features.Add(new DefaultRazorCodeGenerationOptionsFeature(designTime: false)); + b.AddDirective(codeBlockDirective); + b.AddDirective(razorBlockDirective); + }); + var options = RazorParserOptions.Create(builder => + { + builder.Directives.Add(codeBlockDirective); + builder.Directives.Add(razorBlockDirective); + }); + var importSource = TestRazorSourceDocument.Create( +@"@code ""code block"" { } +@razor ""razor block"" { }", + filePath: "testImports.cshtml"); + var codeDocument = TestRazorCodeDocument.Create("

NonDirective

"); + codeDocument.SetSyntaxTree(RazorSyntaxTree.Parse(codeDocument.Source, options)); + codeDocument.SetImportSyntaxTrees(new[] { RazorSyntaxTree.Parse(importSource, options) }); + + // Act + phase.Execute(codeDocument); + + // Assert + var documentNode = codeDocument.GetDocumentIntermediateNode(); + var directives = documentNode.Children.OfType(); + Assert.Empty(directives); + } + + [Fact] + public void Execute_ErrorsForCodeBlockFileScopedSinglyOccurringDirectives() + { + // Arrange + var directive = DirectiveDescriptor.CreateCodeBlockDirective("custom", b => b.Usage = DirectiveUsage.FileScopedSinglyOccurring); + var phase = new DefaultRazorIntermediateNodeLoweringPhase(); + var engine = RazorProjectEngine.CreateEmpty(b => + { + b.Phases.Add(phase); + b.Features.Add(new DefaultRazorCodeGenerationOptionsFeature(designTime: false)); + b.AddDirective(directive); + }); + var options = RazorParserOptions.Create(builder => builder.Directives.Add(directive)); + var importSource = TestRazorSourceDocument.Create("@custom { }", filePath: "import.cshtml"); + var codeDocument = TestRazorCodeDocument.Create("

NonDirective

"); + codeDocument.SetSyntaxTree(RazorSyntaxTree.Parse(codeDocument.Source, options)); + codeDocument.SetImportSyntaxTrees(new[] { RazorSyntaxTree.Parse(importSource, options) }); + var expectedDiagnostic = RazorDiagnosticFactory.CreateDirective_BlockDirectiveCannotBeImported("custom"); + + // Act + phase.Execute(codeDocument); + + // Assert + var documentNode = codeDocument.GetDocumentIntermediateNode(); + var directives = documentNode.Children.OfType(); + Assert.Empty(directives); + var diagnostic = Assert.Single(documentNode.GetAllDiagnostics()); + Assert.Equal(expectedDiagnostic, diagnostic); + } + + [Fact] + public void Execute_ErrorsForRazorBlockFileScopedSinglyOccurringDirectives() + { + // Arrange + var directive = DirectiveDescriptor.CreateRazorBlockDirective("custom", b => b.Usage = DirectiveUsage.FileScopedSinglyOccurring); + var phase = new DefaultRazorIntermediateNodeLoweringPhase(); + var engine = RazorProjectEngine.CreateEmpty(b => + { + b.Phases.Add(phase); + b.Features.Add(new DefaultRazorCodeGenerationOptionsFeature(designTime: false)); + b.AddDirective(directive); + }); + var options = RazorParserOptions.Create(builder => builder.Directives.Add(directive)); + var importSource = TestRazorSourceDocument.Create("@custom { }", filePath: "import.cshtml"); + var codeDocument = TestRazorCodeDocument.Create("

NonDirective

"); + codeDocument.SetSyntaxTree(RazorSyntaxTree.Parse(codeDocument.Source, options)); + codeDocument.SetImportSyntaxTrees(new[] { RazorSyntaxTree.Parse(importSource, options) }); + var expectedDiagnostic = RazorDiagnosticFactory.CreateDirective_BlockDirectiveCannotBeImported("custom"); + + // Act + phase.Execute(codeDocument); + + // Assert + var documentNode = codeDocument.GetDocumentIntermediateNode(); + var directives = documentNode.Children.OfType(); + Assert.Empty(directives); + var diagnostic = Assert.Single(documentNode.GetAllDiagnostics()); + Assert.Equal(expectedDiagnostic, diagnostic); + } + + [Fact] + public void Execute_ThrowsForMissingDependency_SyntaxTree() + { + // Arrange + var phase = new DefaultRazorIntermediateNodeLoweringPhase(); + + var engine = RazorProjectEngine.CreateEmpty(b => + { + b.Phases.Add(phase); + b.Features.Add(new DefaultRazorCodeGenerationOptionsFeature(designTime: false)); + }); + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + // Act & Assert + ExceptionAssert.Throws( + () => phase.Execute(codeDocument), + $"The '{nameof(DefaultRazorIntermediateNodeLoweringPhase)}' phase requires a '{nameof(RazorSyntaxTree)}' " + + $"provided by the '{nameof(RazorCodeDocument)}'."); + } + + [Fact] + public void Execute_CollatesSyntaxDiagnosticsFromSourceDocument() + { + // Arrange + var phase = new DefaultRazorIntermediateNodeLoweringPhase(); + var engine = RazorProjectEngine.CreateEmpty(b => + { + b.Phases.Add(phase); + b.Features.Add(new DefaultRazorCodeGenerationOptionsFeature(designTime: false)); + }); + var codeDocument = TestRazorCodeDocument.Create("

+ { + b.Phases.Add(phase); + b.Features.Add(new DefaultRazorCodeGenerationOptionsFeature(designTime: false)); + }); + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + codeDocument.SetSyntaxTree(RazorSyntaxTree.Parse(codeDocument.Source)); + codeDocument.SetImportSyntaxTrees(new[] + { + RazorSyntaxTree.Parse(TestRazorSourceDocument.Create("@ ")), + RazorSyntaxTree.Parse(TestRazorSourceDocument.Create("

+ { + Assert.Equal(@"A space or line break was encountered after the ""@"" character. Only valid identifiers, keywords, comments, ""("" and ""{"" are valid at the start of a code block and they must occur immediately following ""@"" with no space in between.", + diagnostic.GetMessage()); + }, + diagnostic => + { + Assert.Equal(@"The explicit expression block is missing a closing "")"" character. Make sure you have a matching "")"" character for all the ""("" characters within this block, and that none of the "")"" characters are being interpreted as markup.", + diagnostic.GetMessage()); + }); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorOptimizationPhaseTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorOptimizationPhaseTest.cs new file mode 100644 index 0000000000..5a1d6eb238 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorOptimizationPhaseTest.cs @@ -0,0 +1,102 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Microsoft.AspNetCore.Testing; +using Moq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorOptimizationPhaseTest + { + [Fact] + public void OnInitialized_OrdersPassesInAscendingOrder() + { + // Arrange & Act + var phase = new DefaultRazorOptimizationPhase(); + + var first = Mock.Of(p => p.Order == 15); + var second = Mock.Of(p => p.Order == 17); + + var engine = RazorProjectEngine.CreateEmpty(b => + { + b.Phases.Add(phase); + + b.Features.Add(second); + b.Features.Add(first); + }); + + // Assert + Assert.Collection( + phase.Passes, + p => Assert.Same(first, p), + p => Assert.Same(second, p)); + } + + [Fact] + public void Execute_ThrowsForMissingDependency() + { + // Arrange + var phase = new DefaultRazorOptimizationPhase(); + + var engine = RazorProjectEngine.CreateEmpty(b => b.Phases.Add(phase)); + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + // Act & Assert + ExceptionAssert.Throws( + () => phase.Execute(codeDocument), + $"The '{nameof(DefaultRazorOptimizationPhase)}' phase requires a '{nameof(DocumentIntermediateNode)}' " + + $"provided by the '{nameof(RazorCodeDocument)}'."); + } + + [Fact] + public void Execute_ExecutesPhasesInOrder() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + // We're going to set up mocks to simulate a sequence of passes. We don't care about + // what's in the nodes, we're just going to look at the identity via strict mocks. + var originalNode = new DocumentIntermediateNode(); + var firstPassNode = new DocumentIntermediateNode(); + var secondPassNode = new DocumentIntermediateNode(); + codeDocument.SetDocumentIntermediateNode(originalNode); + + var firstPass = new Mock(MockBehavior.Strict); + firstPass.SetupGet(m => m.Order).Returns(0); + firstPass.SetupProperty(m => m.Engine); + firstPass.Setup(m => m.Execute(codeDocument, originalNode)).Callback(() => + { + originalNode.Children.Add(firstPassNode); + }); + + var secondPass = new Mock(MockBehavior.Strict); + secondPass.SetupGet(m => m.Order).Returns(1); + secondPass.SetupProperty(m => m.Engine); + secondPass.Setup(m => m.Execute(codeDocument, originalNode)).Callback(() => + { + // Works only when the first pass has run before this. + originalNode.Children[0].Children.Add(secondPassNode); + }); + + var phase = new DefaultRazorOptimizationPhase(); + + var engine = RazorProjectEngine.CreateEmpty(b => + { + b.Phases.Add(phase); + + b.Features.Add(firstPass.Object); + b.Features.Add(secondPass.Object); + }); + + // Act + phase.Execute(codeDocument); + + // Assert + Assert.Same(secondPassNode, codeDocument.GetDocumentIntermediateNode().Children[0].Children[0]); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorParsingPhaseTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorParsingPhaseTest.cs new file mode 100644 index 0000000000..43fdf32031 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorParsingPhaseTest.cs @@ -0,0 +1,93 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorParsingPhaseTest + { + [Fact] + public void Execute_AddsSyntaxTree() + { + // Arrange + var phase = new DefaultRazorParsingPhase(); + var engine = RazorProjectEngine.CreateEmpty(builder => + { + builder.Phases.Add(phase); + builder.Features.Add(new DefaultRazorParserOptionsFeature(designTime: false, version: RazorLanguageVersion.Latest, fileKind: null)); + }); + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + // Act + phase.Execute(codeDocument); + + // Assert + Assert.NotNull(codeDocument.GetSyntaxTree()); + } + + [Fact] + public void Execute_UsesConfigureParserFeatures() + { + // Arrange + var phase = new DefaultRazorParsingPhase(); + var engine = RazorProjectEngine.CreateEmpty((builder) => + { + builder.Phases.Add(phase); + builder.Features.Add(new DefaultRazorParserOptionsFeature(designTime: false, version: RazorLanguageVersion.Latest, fileKind: null)); + builder.Features.Add(new MyParserOptionsFeature()); + }); + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + // Act + phase.Execute(codeDocument); + + // Assert + var syntaxTree = codeDocument.GetSyntaxTree(); + var directive = Assert.Single(syntaxTree.Options.Directives); + Assert.Equal("test", directive.Directive); + } + + [Fact] + public void Execute_ParsesImports() + { + // Arrange + var phase = new DefaultRazorParsingPhase(); + var engine = RazorProjectEngine.CreateEmpty((builder) => + { + builder.Phases.Add(phase); + builder.Features.Add(new DefaultRazorParserOptionsFeature(designTime: false, version: RazorLanguageVersion.Latest, fileKind: null)); + builder.Features.Add(new MyParserOptionsFeature()); + }); + + var imports = new[] + { + TestRazorSourceDocument.Create(), + TestRazorSourceDocument.Create(), + }; + + var codeDocument = TestRazorCodeDocument.Create(TestRazorSourceDocument.Create(), imports); + + // Act + phase.Execute(codeDocument); + + // Assert + Assert.Collection( + codeDocument.GetImportSyntaxTrees(), + t => { Assert.Same(t.Source, imports[0]); Assert.Equal("test", Assert.Single(t.Options.Directives).Directive); }, + t => { Assert.Same(t.Source, imports[1]); Assert.Equal("test", Assert.Single(t.Options.Directives).Directive); }); + } + + private class MyParserOptionsFeature : RazorEngineFeatureBase, IConfigureRazorParserOptionsFeature + { + public int Order { get; } + + public void Configure(RazorParserOptionsBuilder options) + { + options.Directives.Add(DirectiveDescriptor.CreateDirective("test", DirectiveKind.SingleLine)); + } + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectEngineBuilderTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectEngineBuilderTest.cs new file mode 100644 index 0000000000..5323ba3ffa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectEngineBuilderTest.cs @@ -0,0 +1,65 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Linq; +using Moq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorProjectEngineBuilderTest + { + [Fact] + public void Build_AddsFeaturesToRazorEngine() + { + // Arrange + var builder = new DefaultRazorProjectEngineBuilder(RazorConfiguration.Default, Mock.Of()); + builder.Features.Add(Mock.Of()); + builder.Features.Add(Mock.Of()); + builder.Features.Add(Mock.Of()); + + var features = builder.Features.ToArray(); + + // Act + var projectEngine = builder.Build(); + + // Assert + Assert.Collection(projectEngine.Engine.Features, + feature => Assert.Same(features[0], feature), + feature => Assert.Same(features[1], feature)); + } + + [Fact] + public void Build_AddsPhasesToRazorEngine() + { + // Arrange + var builder = new DefaultRazorProjectEngineBuilder(RazorConfiguration.Default, Mock.Of()); + builder.Phases.Add(Mock.Of()); + builder.Phases.Add(Mock.Of()); + + var phases = builder.Phases.ToArray(); + + // Act + var projectEngine = builder.Build(); + + // Assert + Assert.Collection(projectEngine.Engine.Phases, + phase => Assert.Same(phases[0], phase), + phase => Assert.Same(phases[1], phase)); + } + + [Fact] + public void Build_CreatesProjectEngineWithFileSystem() + { + // Arrange + var fileSystem = Mock.Of(); + var builder = new DefaultRazorProjectEngineBuilder(RazorConfiguration.Default, fileSystem); + + // Act + var projectEngine = builder.Build(); + + // Assert + Assert.Same(fileSystem, projectEngine.FileSystem); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectEngineIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectEngineIntegrationTest.cs new file mode 100644 index 0000000000..10cee4a70b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectEngineIntegrationTest.cs @@ -0,0 +1,351 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.IO; +using Moq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorProjectEngineIntegrationTest + { + [Fact] + public void Process_SetsOptions_Runtime() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.cshtml"); + + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty); + + // Act + var codeDocument = projectEngine.Process(projectItem); + + // Assert + var parserOptions = codeDocument.GetParserOptions(); + Assert.False(parserOptions.DesignTime); + + var codeGenerationOptions = codeDocument.GetCodeGenerationOptions(); + Assert.False(codeGenerationOptions.DesignTime); + Assert.False(codeGenerationOptions.SuppressChecksum); + Assert.False(codeGenerationOptions.SuppressMetadataAttributes); + } + + [Fact] + public void ProcessDesignTime_SetsOptions_DesignTime() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.cshtml"); + + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty); + + // Act + var codeDocument = projectEngine.ProcessDesignTime(projectItem); + + // Assert + var parserOptions = codeDocument.GetParserOptions(); + Assert.True(parserOptions.DesignTime); + + var codeGenerationOptions = codeDocument.GetCodeGenerationOptions(); + Assert.True(codeGenerationOptions.DesignTime); + Assert.True(codeGenerationOptions.SuppressChecksum); + Assert.True(codeGenerationOptions.SuppressMetadataAttributes); + } + + [Fact] + public void Process_GetsImportsFromFeature() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.cshtml"); + + var testImport = Mock.Of(i => i.Read() == new MemoryStream() && i.FilePath == "testvalue" && i.Exists == true); + var importFeature = new Mock(); + importFeature + .Setup(feature => feature.GetImports(It.IsAny())) + .Returns(new[] { testImport }); + + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty, builder => + { + builder.SetImportFeature(importFeature.Object); + }); + + // Act + var codeDocument = projectEngine.Process(projectItem); + + // Assert + var import = Assert.Single(codeDocument.Imports); + Assert.Equal("testvalue", import.FilePath); + } + + [Fact] + public void Process_GetsImportsFromFeature_MultipleFeatures() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.cshtml"); + + var testImport1 = Mock.Of(i => i.Read() == new MemoryStream() && i.FilePath == "testvalue1" && i.Exists == true); + var importFeature1 = new Mock(); + importFeature1 + .Setup(feature => feature.GetImports(It.IsAny())) + .Returns(new[] { testImport1 }); + + var testImport2 = Mock.Of(i => i.Read() == new MemoryStream() && i.FilePath == "testvalue2" && i.Exists == true); + var importFeature2 = new Mock(); + importFeature2 + .Setup(feature => feature.GetImports(It.IsAny())) + .Returns(new[] { testImport2 }); + + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty, builder => + { + builder.Features.Add(importFeature1.Object); + builder.Features.Add(importFeature2.Object); + }); + + // Act + var codeDocument = projectEngine.Process(projectItem); + + // Assert + Assert.Collection(codeDocument.Imports, + i => Assert.Equal("testvalue1", i.FilePath), + i => Assert.Equal("testvalue2", i.FilePath)); + } + + [Fact] + public void Process_GeneratesCodeDocumentWithValidCSharpDocument() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.cshtml"); + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty); + + // Act + var codeDocument = projectEngine.Process(projectItem); + + // Assert + var csharpDocument = codeDocument.GetCSharpDocument(); + Assert.NotNull(csharpDocument); + Assert.Empty(csharpDocument.Diagnostics); + } + + [Fact] + public void Process_WithImportsAndTagHelpers_SetsOnCodeDocument() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.cshtml"); + var importItem = new TestRazorProjectItem("_import.cshtml"); + var expectedImports = new[] { RazorSourceDocument.ReadFrom(importItem) }; + var expectedTagHelpers = new[] + { + TagHelperDescriptorBuilder.Create("TestTagHelper", "TestAssembly").Build(), + TagHelperDescriptorBuilder.Create("Test2TagHelper", "TestAssembly").Build(), + }; + + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty); + + // Act + var codeDocument = projectEngine.Process(RazorSourceDocument.ReadFrom(projectItem), "test", expectedImports, expectedTagHelpers); + + // Assert + var tagHelpers = codeDocument.GetTagHelpers(); + Assert.Same(expectedTagHelpers, tagHelpers); + Assert.Equal(expectedImports, codeDocument.Imports); + } + + [Fact] + public void Process_WithFileKind_SetsOnCodeDocument() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.cshtml"); + + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty); + + // Act + var codeDocument = projectEngine.Process(RazorSourceDocument.ReadFrom(projectItem), "test", Array.Empty(), tagHelpers: null); + + // Assert + var actual = codeDocument.GetFileKind(); + Assert.Equal("test", actual); + } + + [Fact] + public void Process_WithNullTagHelpers_SetsOnCodeDocument() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.cshtml"); + + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty); + + // Act + var codeDocument = projectEngine.Process(RazorSourceDocument.ReadFrom(projectItem), "test", Array.Empty(), tagHelpers: null); + + // Assert + var tagHelpers = codeDocument.GetTagHelpers(); + Assert.Null(tagHelpers); + } + + [Fact] + public void Process_SetsNullTagHelpersOnCodeDocument() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.cshtml"); + + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty); + + // Act + var codeDocument = projectEngine.Process(projectItem); + + // Assert + var tagHelpers = codeDocument.GetTagHelpers(); + Assert.Null(tagHelpers); + } + + [Fact] + public void Process_SetsInferredFileKindOnCodeDocument_MvcFile() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.cshtml"); + + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty); + + // Act + var codeDocument = projectEngine.Process(projectItem); + + // Assert + var actual = codeDocument.GetFileKind(); + Assert.Same(FileKinds.Legacy, actual); + } + + [Fact] + public void Process_SetsInferredFileKindOnCodeDocument_Component() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.razor"); + + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty); + + // Act + var codeDocument = projectEngine.Process(projectItem); + + // Assert + var actual = codeDocument.GetFileKind(); + Assert.Same(FileKinds.Component, actual); + } + + [Fact] + public void Process_WithNullImports_SetsEmptyListOnCodeDocument() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.cshtml"); + + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty); + + // Act + var codeDocument = projectEngine.Process(RazorSourceDocument.ReadFrom(projectItem), "test", importSources: null, tagHelpers: null); + + // Assert + Assert.Empty(codeDocument.Imports); + } + + [Fact] + public void ProcessDesignTime_WithImportsAndTagHelpers_SetsOnCodeDocument() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.cshtml"); + var importItem = new TestRazorProjectItem("_import.cshtml"); + var expectedImports = new[] { RazorSourceDocument.ReadFrom(importItem) }; + var expectedTagHelpers = new[] + { + TagHelperDescriptorBuilder.Create("TestTagHelper", "TestAssembly").Build(), + TagHelperDescriptorBuilder.Create("Test2TagHelper", "TestAssembly").Build(), + }; + + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty); + + // Act + var codeDocument = projectEngine.ProcessDesignTime(RazorSourceDocument.ReadFrom(projectItem), "test", expectedImports, expectedTagHelpers); + + // Assert + var tagHelpers = codeDocument.GetTagHelpers(); + Assert.Same(expectedTagHelpers, tagHelpers); + Assert.Equal(expectedImports, codeDocument.Imports); + } + + [Fact] + public void ProcessDesignTime_WithNullTagHelpers_SetsOnCodeDocument() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.cshtml"); + + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty); + + // Act + var codeDocument = projectEngine.ProcessDesignTime(RazorSourceDocument.ReadFrom(projectItem), "test", Array.Empty(), tagHelpers: null); + + // Assert + var tagHelpers = codeDocument.GetTagHelpers(); + Assert.Null(tagHelpers); + } + + [Fact] + public void ProcessDesignTime_SetsInferredFileKindOnCodeDocument_MvcFile() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.cshtml"); + + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty); + + // Act + var codeDocument = projectEngine.ProcessDesignTime(projectItem); + + // Assert + var actual = codeDocument.GetFileKind(); + Assert.Same(FileKinds.Legacy, actual); + } + + [Fact] + public void ProcessDesignTime_SetsInferredFileKindOnCodeDocument_Component() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.razor"); + + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty); + + // Act + var codeDocument = projectEngine.ProcessDesignTime(projectItem); + + // Assert + var actual = codeDocument.GetFileKind(); + Assert.Same(FileKinds.Component, actual); + } + + [Fact] + public void ProcessDesignTime_SetsNullTagHelpersOnCodeDocument() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.cshtml"); + + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty); + + // Act + var codeDocument = projectEngine.ProcessDesignTime(projectItem); + + // Assert + var tagHelpers = codeDocument.GetTagHelpers(); + Assert.Null(tagHelpers); + } + + [Fact] + public void ProcessDesignTime_WithNullImports_SetsEmptyListOnCodeDocument() + { + // Arrange + var projectItem = new TestRazorProjectItem("Index.cshtml"); + + var projectEngine = RazorProjectEngine.Create(RazorConfiguration.Default, TestRazorProjectFileSystem.Empty); + + // Act + var codeDocument = projectEngine.ProcessDesignTime(RazorSourceDocument.ReadFrom(projectItem), "test", importSources: null, tagHelpers: null); + + // Assert + Assert.Empty(codeDocument.Imports); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectEngineTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectEngineTest.cs new file mode 100644 index 0000000000..c70cdab663 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectEngineTest.cs @@ -0,0 +1,62 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.IO; +using Moq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorProjectEngineTest + { + [Fact] + public void GetImportSourceDocuments_DoesNotIncludeNonExistentItems() + { + // Arrange + var existingItem = new TestRazorProjectItem("Index.cshtml"); + var nonExistentItem = Mock.Of(item => item.Exists == false); + var items = new[] { existingItem, nonExistentItem }; + + // Act + var sourceDocuments = DefaultRazorProjectEngine.GetImportSourceDocuments(items); + + // Assert + var sourceDocument = Assert.Single(sourceDocuments); + Assert.Equal(existingItem.FilePath, sourceDocument.FilePath); + } + + [Fact] + public void GetImportSourceDocuments_UnreadableItem_Throws() + { + // Arrange + var projectItem = new Mock(MockBehavior.Strict); + projectItem.SetupGet(p => p.Exists).Returns(true); + projectItem.SetupGet(p => p.PhysicalPath).Returns("path/to/file.cshtml"); + projectItem.Setup(p => p.Read()).Throws(new IOException("Couldn't read file.")); + var items = new[] { projectItem.Object }; + + // Act & Assert + var exception = Assert.Throws(() => DefaultRazorProjectEngine.GetImportSourceDocuments(items)); + Assert.Equal("Couldn't read file.", exception.Message); + } + + [Fact] + public void GetImportSourceDocuments_WithSuppressExceptions_UnreadableItem_DoesNotThrow() + { + // Arrange + var projectItem = new Mock(MockBehavior.Strict); + projectItem.SetupGet(p => p.Exists).Returns(true); + projectItem.SetupGet(p => p.PhysicalPath).Returns("path/to/file.cshtml"); + projectItem.SetupGet(p => p.FilePath).Returns("path/to/file.cshtml"); + projectItem.SetupGet(p => p.RelativePhysicalPath).Returns("path/to/file.cshtml"); + projectItem.Setup(p => p.Read()).Throws(new IOException("Couldn't read file.")); + var items = new[] { projectItem.Object }; + + // Act + var sourceDocuments = DefaultRazorProjectEngine.GetImportSourceDocuments(items, suppressExceptions: true); + + // Assert - Does not throw + Assert.Empty(sourceDocuments); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectFileSystemTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectFileSystemTest.cs new file mode 100644 index 0000000000..6c92f7ddb7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectFileSystemTest.cs @@ -0,0 +1,298 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.IO; +using System.Linq; +using Microsoft.AspNetCore.Testing; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorProjectFileSystemTest + { + private static string TestFolder { get; } = Path.Combine( + TestProject.GetProjectDirectory(typeof(DefaultRazorProjectFileSystemTest)), + "TestFiles", + "DefaultRazorProjectFileSystem"); + + [Theory] + [InlineData(null)] + [InlineData("")] + public void NormalizeAndEnsureValidPath_ThrowsIfPathIsNullOrEmpty(string path) + { + // Arrange + var fileSystem = new TestRazorProjectFileSystem("C:/some/test/path/root"); + + // Act and Assert + ExceptionAssert.ThrowsArgumentNullOrEmptyString(() => fileSystem.NormalizeAndEnsureValidPath(path), "path"); + } + + [Fact] + public void NormalizeAndEnsureValidPath_NormalizesToAbsolutePath() + { + // Arrange + var fileSystem = new TestRazorProjectFileSystem("C:/some/test/path/root"); + + // Act + var absolutePath = fileSystem.NormalizeAndEnsureValidPath("file.cshtml"); + + // Assert + Assert.Equal("C:/some/test/path/root/file.cshtml", absolutePath); + } + + [Fact] + public void NormalizeAndEnsureValidPath_FileFromNetworkShare__WindowsStyle_NormalizesToAbsolutePath() + { + // Arrange + var fileSystem = new TestRazorProjectFileSystem("//some/network/share/root"); + + // Act + var absolutePath = fileSystem.NormalizeAndEnsureValidPath("\\\\some\\network\\share\\root\\file.cshtml"); + + // Assert + Assert.Equal("//some/network/share/root/file.cshtml", absolutePath); + } + + [Fact] + public void NormalizeAndEnsureValidPath_FileFromNetworkShare_UnixStyle_NormalizesToAbsolutePath() + { + // Arrange + var fileSystem = new TestRazorProjectFileSystem("//some/network/share/root"); + + // Act + var absolutePath = fileSystem.NormalizeAndEnsureValidPath("//some/network/share/root/file.cshtml"); + + // Assert + Assert.Equal("//some/network/share/root/file.cshtml", absolutePath); + } + + [Fact] + public void NormalizeAndEnsureValidPath_NormalizesToAbsolutePathWithoutForwardSlash() + { + // Arrange + var fileSystem = new TestRazorProjectFileSystem("C:/some/test/path/root"); + + // Act + var absolutePath = fileSystem.NormalizeAndEnsureValidPath("/file.cshtml"); + + // Assert + Assert.Equal("C:/some/test/path/root/file.cshtml", absolutePath); + } + + [Fact] + public void NormalizeAndEnsureValidPath_NormalizesToForwardSlashes() + { + // Arrange + var fileSystem = new TestRazorProjectFileSystem(@"C:\some\test\path\root"); + + // Act + var absolutePath = fileSystem.NormalizeAndEnsureValidPath(@"something\file.cshtml"); + + // Assert + Assert.Equal("C:/some/test/path/root/something/file.cshtml", absolutePath); + } + + [Fact] + public void EnumerateItems_DiscoversAllCshtmlFiles() + { + // Arrange + var fileSystem = new DefaultRazorProjectFileSystem(TestFolder); + + // Act + var items = fileSystem.EnumerateItems("/"); + + // Assert + Assert.Collection( + items.OrderBy(f => f.FilePath, StringComparer.Ordinal), + item => + { + Assert.Equal("/Home.cshtml", item.FilePath); + Assert.Equal("/", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "Home.cshtml"), item.PhysicalPath); + Assert.Equal("Home.cshtml", item.RelativePhysicalPath); + + }, + item => + { + Assert.Equal("/Views/About/About.cshtml", item.FilePath); + Assert.Equal("/", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "Views", "About", "About.cshtml"), item.PhysicalPath); + Assert.Equal(Path.Combine("Views", "About", "About.cshtml"), item.RelativePhysicalPath); + }, + item => + { + Assert.Equal("/Views/Home/Index.cshtml", item.FilePath); + Assert.Equal("/", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "Views", "Home", "Index.cshtml"), item.PhysicalPath); + Assert.Equal(Path.Combine("Views", "Home", "Index.cshtml"), item.RelativePhysicalPath); + }, + item => + { + Assert.Equal("/Views/Home/_ViewImports.cshtml", item.FilePath); + Assert.Equal("/", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "Views", "Home", "_ViewImports.cshtml"), item.PhysicalPath); + Assert.Equal(Path.Combine("Views", "Home", "_ViewImports.cshtml"), item.RelativePhysicalPath); + }, + item => + { + Assert.Equal("/Views/_ViewImports.cshtml", item.FilePath); + Assert.Equal("/", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "Views", "_ViewImports.cshtml"), item.PhysicalPath); + Assert.Equal(Path.Combine("Views", "_ViewImports.cshtml"), item.RelativePhysicalPath); + }, + item => + { + Assert.Equal("/_ViewImports.cshtml", item.FilePath); + Assert.Equal("/", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "_ViewImports.cshtml"), item.PhysicalPath); + Assert.Equal("_ViewImports.cshtml", item.RelativePhysicalPath); + }); + } + + [Fact] + public void EnumerateItems_DiscoversAllCshtmlFiles_UnderSpecifiedBasePath() + { + // Arrange + var fileSystem = new DefaultRazorProjectFileSystem(TestFolder); + + // Act + var items = fileSystem.EnumerateItems("/Views"); + + // Assert + Assert.Collection( + items.OrderBy(f => f.FilePath, StringComparer.Ordinal), + item => + { + Assert.Equal("/About/About.cshtml", item.FilePath); + Assert.Equal("/Views", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "Views", "About", "About.cshtml"), item.PhysicalPath); + Assert.Equal(Path.Combine("About", "About.cshtml"), item.RelativePhysicalPath); + }, + item => + { + Assert.Equal("/Home/Index.cshtml", item.FilePath); + Assert.Equal("/Views", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "Views", "Home", "Index.cshtml"), item.PhysicalPath); + Assert.Equal(Path.Combine("Home", "Index.cshtml"), item.RelativePhysicalPath); + }, + item => + { + Assert.Equal("/Home/_ViewImports.cshtml", item.FilePath); + Assert.Equal("/Views", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "Views", "Home", "_ViewImports.cshtml"), item.PhysicalPath); + Assert.Equal(Path.Combine("Home", "_ViewImports.cshtml"), item.RelativePhysicalPath); + }, + item => + { + Assert.Equal("/_ViewImports.cshtml", item.FilePath); + Assert.Equal("/Views", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "Views", "_ViewImports.cshtml"), item.PhysicalPath); + Assert.Equal(Path.Combine("_ViewImports.cshtml"), item.RelativePhysicalPath); + }); + } + + [Fact] + public void EnumerateItems_ReturnsEmptySequence_WhenBasePathDoesNotExist() + { + // Arrange + var fileSystem = new DefaultRazorProjectFileSystem(TestFolder); + + // Act + var items = fileSystem.EnumerateItems("/Does-Not-Exist"); + + // Assert + Assert.Empty(items); + } + + [Fact] + public void FindHierarchicalItems_FindsItemsWithMatchingNames() + { + // Arrange + var fileSystem = new DefaultRazorProjectFileSystem(TestFolder); + + // Act + var items = fileSystem.FindHierarchicalItems("/Views/Home/Index.cshtml", "_ViewImports.cshtml"); + + // Assert + Assert.Collection( + items, + item => + { + Assert.Equal("/Views/Home/_ViewImports.cshtml", item.FilePath); + Assert.Equal("/", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "Views", "Home", "_ViewImports.cshtml"), item.PhysicalPath); + Assert.Equal(Path.Combine("Views", "Home", "_ViewImports.cshtml"), item.RelativePhysicalPath); + }, + item => + { + Assert.Equal("/Views/_ViewImports.cshtml", item.FilePath); + Assert.Equal("/", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "Views", "_ViewImports.cshtml"), item.PhysicalPath); + Assert.Equal(Path.Combine("Views", "_ViewImports.cshtml"), item.RelativePhysicalPath); + }, + item => + { + Assert.Equal("/_ViewImports.cshtml", item.FilePath); + Assert.Equal("/", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "_ViewImports.cshtml"), item.PhysicalPath); + Assert.Equal("_ViewImports.cshtml", item.RelativePhysicalPath); + }); + } + + [Fact] + public void GetItem_ReturnsFileFromDisk() + { + // Arrange + var filePath = "/Views/About/About.cshtml"; + var fileSystem = new DefaultRazorProjectFileSystem(TestFolder); + + // Act + var item = fileSystem.GetItem(filePath, fileKind: null); + + // Assert + Assert.True(item.Exists); + Assert.Equal(filePath, item.FilePath); + Assert.Equal("/", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "Views", "About", "About.cshtml"), item.PhysicalPath); + Assert.Equal(Path.Combine("Views", "About", "About.cshtml"), item.RelativePhysicalPath); + } + + [Fact] + public void GetItem_ReturnsNotFoundResult() + { + // Arrange + var path = "/NotFound.cshtml"; + var fileSystem = new DefaultRazorProjectFileSystem(TestFolder); + + // Act + var item = fileSystem.GetItem(path, fileKind: null); + + // Assert + Assert.False(item.Exists); + } + + [Fact] + public void GetItem_MismatchedRootPath_Throws() + { + // Arrange + var rootPath = "//some/network/share/root"; + var fileSystem = new TestRazorProjectFileSystem(rootPath); + var path = "\\\\some\\other\\network\\share\\root\\file.cshtml"; + + // Act & Assert + ExceptionAssert.Throws( + () => fileSystem.GetItem(path, fileKind: null), + $"The file '{path.Replace('\\', '/')}' is not a descendent of the base path '{rootPath}'."); + } + + private class TestRazorProjectFileSystem : DefaultRazorProjectFileSystem + { + public TestRazorProjectFileSystem(string root) : base(root) + { + } + + public new string NormalizeAndEnsureValidPath(string path) => base.NormalizeAndEnsureValidPath(path); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectItemTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectItemTest.cs new file mode 100644 index 0000000000..f903b16f63 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorProjectItemTest.cs @@ -0,0 +1,101 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.IO; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorProjectItemTest + { + private static string TestFolder { get; } = Path.Combine( + TestProject.GetProjectDirectory(typeof(DefaultRazorProjectItemTest)), + "TestFiles", + "DefaultRazorProjectFileSystem"); + + [Fact] + public void DefaultRazorProjectItem_SetsProperties() + { + // Arrange + var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml")); + + // Act + var projectItem = new DefaultRazorProjectItem("/", "/Home.cshtml", "Home.cshtml", "test", fileInfo); + + // Assert + Assert.Equal("/Home.cshtml", projectItem.FilePath); + Assert.Equal("/", projectItem.BasePath); + Assert.True(projectItem.Exists); + Assert.Equal("Home.cshtml", projectItem.FileName); + Assert.Equal("test", projectItem.FileKind); + Assert.Equal(fileInfo.FullName, projectItem.PhysicalPath); + Assert.Equal("Home.cshtml", projectItem.RelativePhysicalPath); + } + + [Fact] + public void DefaultRazorProjectItem_InfersFileKind_Component() + { + // Arrange + var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml")); + + // Act + var projectItem = new DefaultRazorProjectItem("/", "/Home.razor", "Home.cshtml", fileKind: null, fileInfo); + + // Assert + Assert.Equal(FileKinds.Component, projectItem.FileKind); + } + + [Fact] + public void DefaultRazorProjectItem_InfersFileKind_Legacy() + { + // Arrange + var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml")); + + // Act + var projectItem = new DefaultRazorProjectItem("/", "/Home.cshtml", "Home.cshtml", fileKind: null, fileInfo); + + // Assert + Assert.Equal(FileKinds.Legacy, projectItem.FileKind); + } + + [Fact] + public void DefaultRazorProjectItem_InfersFileKind_Null() + { + // Arrange + var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml")); + + // Act + var projectItem = new DefaultRazorProjectItem("/", filePath: null, "Home.cshtml", fileKind: null, fileInfo); + + // Assert + Assert.Null(projectItem.FileKind); + } + + [Fact] + public void Exists_ReturnsFalseWhenFileDoesNotExist() + { + // Arrange + var fileInfo = new FileInfo(Path.Combine(TestFolder, "Views", "FileDoesNotExist.cshtml")); + + // Act + var projectItem = new DefaultRazorProjectItem("/Views", "/FileDoesNotExist.cshtml", Path.Combine("Views", "FileDoesNotExist.cshtml"), "test", fileInfo); + + // Assert + Assert.False(projectItem.Exists); + } + + [Fact] + public void Read_ReturnsReadStream() + { + // Arrange + var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml")); + var projectItem = new DefaultRazorProjectItem("/", "/Home.cshtml", "Home.cshtml", "test", fileInfo); + + // Act + var stream = projectItem.Read(); + + // Assert + Assert.Equal("home-content", new StreamReader(stream).ReadToEnd()); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorSyntaxTreePhaseTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorSyntaxTreePhaseTest.cs new file mode 100644 index 0000000000..d6dc0ac75a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorSyntaxTreePhaseTest.cs @@ -0,0 +1,94 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Testing; +using Moq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorSyntaxTreePhaseTest + { + [Fact] + public void OnInitialized_OrdersPassesInAscendingOrder() + { + // Arrange & Act + var phase = new DefaultRazorSyntaxTreePhase(); + + var first = Mock.Of(p => p.Order == 15); + var second = Mock.Of(p => p.Order == 17); + + var engine = RazorProjectEngine.CreateEmpty(b => + { + b.Phases.Add(phase); + + b.Features.Add(second); + b.Features.Add(first); + }); + + // Assert + Assert.Collection( + phase.Passes, + p => Assert.Same(first, p), + p => Assert.Same(second, p)); + } + + [Fact] + public void Execute_ThrowsForMissingDependency() + { + // Arrange + var phase = new DefaultRazorSyntaxTreePhase(); + + var engine = RazorProjectEngine.CreateEmpty(b => b.Phases.Add(phase)); + + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + // Act & Assert + ExceptionAssert.Throws( + () => phase.Execute(codeDocument), + $"The '{nameof(DefaultRazorSyntaxTreePhase)}' phase requires a '{nameof(RazorSyntaxTree)}' " + + $"provided by the '{nameof(RazorCodeDocument)}'."); + } + + [Fact] + public void Execute_ExecutesPhasesInOrder() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + // We're going to set up mocks to simulate a sequence of passes. We don't care about + // what's in the trees, we're just going to look at the identity via strict mocks. + var originalSyntaxTree = RazorSyntaxTree.Parse(codeDocument.Source); + var firstPassSyntaxTree = RazorSyntaxTree.Parse(codeDocument.Source); + var secondPassSyntaxTree = RazorSyntaxTree.Parse(codeDocument.Source); + codeDocument.SetSyntaxTree(originalSyntaxTree); + + var firstPass = new Mock(MockBehavior.Strict); + firstPass.SetupGet(m => m.Order).Returns(0); + firstPass.SetupProperty(m => m.Engine); + firstPass.Setup(m => m.Execute(codeDocument, originalSyntaxTree)).Returns(firstPassSyntaxTree); + + var secondPass = new Mock(MockBehavior.Strict); + secondPass.SetupGet(m => m.Order).Returns(1); + secondPass.SetupProperty(m => m.Engine); + secondPass.Setup(m => m.Execute(codeDocument, firstPassSyntaxTree)).Returns(secondPassSyntaxTree); + + var phase = new DefaultRazorSyntaxTreePhase(); + + var engine = RazorProjectEngine.CreateEmpty(b => + { + b.Phases.Add(phase); + + b.Features.Add(firstPass.Object); + b.Features.Add(secondPass.Object); + }); + + // Act + phase.Execute(codeDocument); + + // Assert + Assert.Same(secondPassSyntaxTree, codeDocument.GetSyntaxTree()); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorTagHelperBinderPhaseTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorTagHelperBinderPhaseTest.cs new file mode 100644 index 0000000000..41dedf836a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRazorTagHelperBinderPhaseTest.cs @@ -0,0 +1,1439 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Components; +using Microsoft.AspNetCore.Razor.Language.Legacy; +using Microsoft.AspNetCore.Razor.Language.Syntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRazorTagHelperBinderPhaseTest : RazorProjectEngineTestBase + { + protected override RazorLanguageVersion Version => RazorLanguageVersion.Latest; + +#region Legacy + [Fact] + public void Execute_CanHandleSingleLengthAddTagHelperDirective() + { + // Arrange + var projectEngine = RazorProjectEngine.Create(builder => + { + builder.AddTagHelpers(new TagHelperDescriptor[0]); + }); + + var phase = new DefaultRazorTagHelperBinderPhase() + { + Engine = projectEngine.Engine, + }; + var expectedDiagnostics = new[] + { + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(new SourceLocation(14 + Environment.NewLine.Length, 1, 14), contentLength: 1)), + RazorDiagnosticFactory.CreateParsing_InvalidTagHelperLookupText( + new SourceSpan(new SourceLocation(14 + Environment.NewLine.Length, 1, 14), contentLength: 1), "\"") + }; + + var content = + @" +@addTagHelper """; + var sourceDocument = TestRazorSourceDocument.Create(content, filePath: null); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var originalTree = RazorSyntaxTree.Parse(sourceDocument); + codeDocument.SetSyntaxTree(originalTree); + + // Act + phase.Execute(codeDocument); + + // Assert + var rewrittenTree = codeDocument.GetSyntaxTree(); + var erroredNode = rewrittenTree.Root.DescendantNodes().First(n => n.GetSpanContext()?.ChunkGenerator is AddTagHelperChunkGenerator); + var chunkGenerator = Assert.IsType(erroredNode.GetSpanContext().ChunkGenerator); + Assert.Equal(expectedDiagnostics, chunkGenerator.Diagnostics); + } + + [Fact] + public void Execute_CanHandleSingleLengthRemoveTagHelperDirective() + { + // Arrange + var projectEngine = RazorProjectEngine.Create(builder => + { + builder.AddTagHelpers(new TagHelperDescriptor[0]); + }); + + var phase = new DefaultRazorTagHelperBinderPhase() + { + Engine = projectEngine.Engine, + }; + var expectedDiagnostics = new[] + { + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(new SourceLocation(17 + Environment.NewLine.Length, 1, 17), contentLength: 1)), + RazorDiagnosticFactory.CreateParsing_InvalidTagHelperLookupText( + new SourceSpan(new SourceLocation(17 + Environment.NewLine.Length, 1, 17), contentLength: 1), "\"") + }; + + var content = + @" +@removeTagHelper """; + var sourceDocument = TestRazorSourceDocument.Create(content, filePath: null); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var originalTree = RazorSyntaxTree.Parse(sourceDocument); + codeDocument.SetSyntaxTree(originalTree); + + // Act + phase.Execute(codeDocument); + + // Assert + var rewrittenTree = codeDocument.GetSyntaxTree(); + var erroredNode = rewrittenTree.Root.DescendantNodes().First(n => n.GetSpanContext()?.ChunkGenerator is RemoveTagHelperChunkGenerator); + var chunkGenerator = Assert.IsType(erroredNode.GetSpanContext().ChunkGenerator); + Assert.Equal(expectedDiagnostics, chunkGenerator.Diagnostics); + } + + [Fact] + public void Execute_CanHandleSingleLengthTagHelperPrefix() + { + // Arrange + var projectEngine = RazorProjectEngine.Create(builder => + { + builder.AddTagHelpers(new TagHelperDescriptor[0]); + }); + + var phase = new DefaultRazorTagHelperBinderPhase() + { + Engine = projectEngine.Engine, + }; + var expectedDiagnostics = new[] + { + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(new SourceLocation(17 + Environment.NewLine.Length, 1, 17), contentLength: 1)), + RazorDiagnosticFactory.CreateParsing_InvalidTagHelperPrefixValue( + new SourceSpan(new SourceLocation(17 + Environment.NewLine.Length, 1, 17), contentLength: 1), "tagHelperPrefix", '\"', "\""), + }; + + var content = + @" +@tagHelperPrefix """; + var sourceDocument = TestRazorSourceDocument.Create(content, filePath: null); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var originalTree = RazorSyntaxTree.Parse(sourceDocument); + codeDocument.SetSyntaxTree(originalTree); + + // Act + phase.Execute(codeDocument); + + // Assert + var rewrittenTree = codeDocument.GetSyntaxTree(); + var erroredNode = rewrittenTree.Root.DescendantNodes().First(n => n.GetSpanContext()?.ChunkGenerator is TagHelperPrefixDirectiveChunkGenerator); + var chunkGenerator = Assert.IsType(erroredNode.GetSpanContext().ChunkGenerator); + Assert.Equal(expectedDiagnostics, chunkGenerator.Diagnostics); + } + + [Fact] + public void Execute_RewritesTagHelpers() + { + // Arrange + var projectEngine = RazorProjectEngine.Create(builder => + { + builder.AddTagHelpers(new[] + { + CreateTagHelperDescriptor( + tagName: "form", + typeName: "TestFormTagHelper", + assemblyName: "TestAssembly"), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestInputTagHelper", + assemblyName: "TestAssembly"), + }); + }); + + var phase = new DefaultRazorTagHelperBinderPhase() + { + Engine = projectEngine.Engine, + }; + + var sourceDocument = CreateTestSourceDocument(); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var originalTree = RazorSyntaxTree.Parse(sourceDocument); + codeDocument.SetSyntaxTree(originalTree); + + // Act + phase.Execute(codeDocument); + + // Assert + var rewrittenTree = codeDocument.GetSyntaxTree(); + var descendantNodes = rewrittenTree.Root.DescendantNodes(); + Assert.Empty(rewrittenTree.Diagnostics); + var tagHelperNodes = descendantNodes.Where(n => n is MarkupTagHelperElementSyntax tagHelper).Cast().ToArray(); + Assert.Equal("form", tagHelperNodes[0].TagHelperInfo.TagName); + Assert.Equal("input", tagHelperNodes[1].TagHelperInfo.TagName); + } + + [Fact] + public void Execute_WithTagHelperDescriptorsFromCodeDocument_RewritesTagHelpers() + { + // Arrange + var projectEngine = CreateProjectEngine(); + var tagHelpers = new[] + { + CreateTagHelperDescriptor( + tagName: "form", + typeName: "TestFormTagHelper", + assemblyName: "TestAssembly"), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestInputTagHelper", + assemblyName: "TestAssembly"), + }; + + var phase = new DefaultRazorTagHelperBinderPhase() + { + Engine = projectEngine.Engine, + }; + + var sourceDocument = CreateTestSourceDocument(); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var originalTree = RazorSyntaxTree.Parse(sourceDocument); + codeDocument.SetSyntaxTree(originalTree); + codeDocument.SetTagHelpers(tagHelpers); + + // Act + phase.Execute(codeDocument); + + // Assert + var rewrittenTree = codeDocument.GetSyntaxTree(); + var descendantNodes = rewrittenTree.Root.DescendantNodes(); + Assert.Empty(rewrittenTree.Diagnostics); + var tagHelperNodes = descendantNodes.Where(n => n is MarkupTagHelperElementSyntax tagHelper).Cast().ToArray(); + Assert.Equal("form", tagHelperNodes[0].TagHelperInfo.TagName); + Assert.Equal("input", tagHelperNodes[1].TagHelperInfo.TagName); + } + + [Fact] + public void Execute_NullTagHelperDescriptorsFromCodeDocument_FallsBackToTagHelperFeature() + { + // Arrange + var tagHelpers = new[] + { + CreateTagHelperDescriptor( + tagName: "form", + typeName: "TestFormTagHelper", + assemblyName: "TestAssembly"), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestInputTagHelper", + assemblyName: "TestAssembly"), + }; + var projectEngine = RazorProjectEngine.Create(builder => builder.AddTagHelpers(tagHelpers)); + + var phase = new DefaultRazorTagHelperBinderPhase() + { + Engine = projectEngine.Engine, + }; + + var sourceDocument = CreateTestSourceDocument(); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var originalTree = RazorSyntaxTree.Parse(sourceDocument); + codeDocument.SetSyntaxTree(originalTree); + codeDocument.SetTagHelpers(tagHelpers: null); + + // Act + phase.Execute(codeDocument); + + // Assert + var rewrittenTree = codeDocument.GetSyntaxTree(); + var descendantNodes = rewrittenTree.Root.DescendantNodes(); + Assert.Empty(rewrittenTree.Diagnostics); + var tagHelperNodes = descendantNodes.Where(n => n is MarkupTagHelperElementSyntax tagHelper).Cast().ToArray(); + Assert.Equal("form", tagHelperNodes[0].TagHelperInfo.TagName); + Assert.Equal("input", tagHelperNodes[1].TagHelperInfo.TagName); + } + + [Fact] + public void Execute_EmptyTagHelperDescriptorsFromCodeDocument_DoesNotFallbackToTagHelperFeature() + { + // Arrange + var tagHelpers = new[] + { + CreateTagHelperDescriptor( + tagName: "form", + typeName: "TestFormTagHelper", + assemblyName: "TestAssembly"), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestInputTagHelper", + assemblyName: "TestAssembly"), + }; + var projectEngine = RazorProjectEngine.Create(builder => builder.AddTagHelpers(tagHelpers)); + + var phase = new DefaultRazorTagHelperBinderPhase() + { + Engine = projectEngine.Engine, + }; + + var sourceDocument = CreateTestSourceDocument(); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var originalTree = RazorSyntaxTree.Parse(sourceDocument); + codeDocument.SetSyntaxTree(originalTree); + codeDocument.SetTagHelpers(tagHelpers: Array.Empty()); + + // Act + phase.Execute(codeDocument); + + // Assert + var rewrittenTree = codeDocument.GetSyntaxTree(); + var descendantNodes = rewrittenTree.Root.DescendantNodes(); + Assert.Empty(rewrittenTree.Diagnostics); + var tagHelperNodes = descendantNodes.Where(n => n is MarkupTagHelperElementSyntax tagHelper).Cast().ToArray(); + Assert.Empty(tagHelperNodes); + } + + [Fact] + public void Execute_DirectiveWithoutQuotes_RewritesTagHelpers_TagHelperMatchesElementTwice() + { + // Arrange + var descriptor = CreateTagHelperDescriptor( + tagName: "form", + typeName: "TestFormTagHelper", + assemblyName: "TestAssembly", + ruleBuilders: new Action[] + { + ruleBuilder => ruleBuilder + .RequireAttributeDescriptor(attribute => attribute + .Name("a") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch)), + ruleBuilder => ruleBuilder + .RequireAttributeDescriptor(attribute => attribute + .Name("b") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch)), + }); + + var projectEngine = RazorProjectEngine.Create(builder => + { + builder.AddTagHelpers(new[] { descriptor }); + }); + + var phase = new DefaultRazorTagHelperBinderPhase() + { + Engine = projectEngine.Engine, + }; + + var content = @" +@addTagHelper *, TestAssembly +

+
"; + + var sourceDocument = TestRazorSourceDocument.Create(content); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var originalTree = RazorSyntaxTree.Parse(sourceDocument); + codeDocument.SetSyntaxTree(originalTree); + + // Act + phase.Execute(codeDocument); + + // Assert + var rewrittenTree = codeDocument.GetSyntaxTree(); + var descendantNodes = rewrittenTree.Root.DescendantNodes(); + Assert.Empty(rewrittenTree.Diagnostics); + var tagHelperNodes = descendantNodes.Where(n => n is MarkupTagHelperElementSyntax tagHelper).Cast().ToArray(); + + var formTagHelper = Assert.Single(tagHelperNodes); + Assert.Equal("form", formTagHelper.TagHelperInfo.TagName); + Assert.Equal(2, formTagHelper.TagHelperInfo.BindingResult.Mappings[descriptor].Count()); + } + + [Fact] + public void Execute_DirectiveWithQuotes_RewritesTagHelpers_TagHelperMatchesElementTwice() + { + // Arrange + var descriptor = CreateTagHelperDescriptor( + tagName: "form", + typeName: "TestFormTagHelper", + assemblyName: "TestAssembly", + ruleBuilders: new Action[] + { + ruleBuilder => ruleBuilder + .RequireAttributeDescriptor(attribute => attribute + .Name("a") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch)), + ruleBuilder => ruleBuilder + .RequireAttributeDescriptor(attribute => attribute + .Name("b") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch)), + }); + + var projectEngine = RazorProjectEngine.Create(builder => + { + builder.AddTagHelpers(new[] { descriptor }); + }); + + var phase = new DefaultRazorTagHelperBinderPhase() + { + Engine = projectEngine.Engine, + }; + + var content = @" +@addTagHelper ""*, TestAssembly"" +
+
"; + + var sourceDocument = TestRazorSourceDocument.Create(content); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var originalTree = RazorSyntaxTree.Parse(sourceDocument); + codeDocument.SetSyntaxTree(originalTree); + + // Act + phase.Execute(codeDocument); + + // Assert + var rewrittenTree = codeDocument.GetSyntaxTree(); + var descendantNodes = rewrittenTree.Root.DescendantNodes(); + Assert.Empty(rewrittenTree.Diagnostics); + var tagHelperNodes = descendantNodes.Where(n => n is MarkupTagHelperElementSyntax tagHelper).Cast().ToArray(); + + var formTagHelper = Assert.Single(tagHelperNodes); + Assert.Equal("form", formTagHelper.TagHelperInfo.TagName); + Assert.Equal(2, formTagHelper.TagHelperInfo.BindingResult.Mappings[descriptor].Count()); + } + + [Fact] + public void Execute_TagHelpersFromCodeDocumentAndFeature_PrefersCodeDocument() + { + // Arrange + var featureTagHelpers = new[] + { + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestInputTagHelper", + assemblyName: "TestAssembly"), + }; + var projectEngine = RazorProjectEngine.Create(builder => builder.AddTagHelpers(featureTagHelpers)); + + var phase = new DefaultRazorTagHelperBinderPhase() + { + Engine = projectEngine.Engine, + }; + + var sourceDocument = CreateTestSourceDocument(); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var originalTree = RazorSyntaxTree.Parse(sourceDocument); + codeDocument.SetSyntaxTree(originalTree); + + var codeDocumentTagHelpers = new[] + { + CreateTagHelperDescriptor( + tagName: "form", + typeName: "TestFormTagHelper", + assemblyName: "TestAssembly"), + }; + codeDocument.SetTagHelpers(codeDocumentTagHelpers); + + // Act + phase.Execute(codeDocument); + + // Assert + var rewrittenTree = codeDocument.GetSyntaxTree(); + var descendantNodes = rewrittenTree.Root.DescendantNodes(); + Assert.Empty(rewrittenTree.Diagnostics); + var tagHelperNodes = descendantNodes.Where(n => n is MarkupTagHelperElementSyntax tagHelper).Cast().ToArray(); + + var formTagHelper = Assert.Single(tagHelperNodes); + Assert.Equal("form", formTagHelper.TagHelperInfo.TagName); + } + + [Fact] + public void Execute_NoopsWhenNoTagHelpersFromCodeDocumentOrFeature() + { + // Arrange + var projectEngine = CreateProjectEngine(); + var phase = new DefaultRazorTagHelperBinderPhase() + { + Engine = projectEngine.Engine, + }; + var sourceDocument = CreateTestSourceDocument(); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var originalTree = RazorSyntaxTree.Parse(sourceDocument); + codeDocument.SetSyntaxTree(originalTree); + + // Act + phase.Execute(codeDocument); + + // Assert + var outputTree = codeDocument.GetSyntaxTree(); + Assert.Empty(outputTree.Diagnostics); + Assert.Same(originalTree, outputTree); + } + + [Fact] + public void Execute_NoopsWhenNoTagHelperDescriptorsAreResolved() + { + // Arrange + var projectEngine = RazorProjectEngine.Create(builder => + { + builder.Features.Add(new TestTagHelperFeature()); + }); + + var phase = new DefaultRazorTagHelperBinderPhase() + { + Engine = projectEngine.Engine, + }; + + // No taghelper directives here so nothing is resolved. + var sourceDocument = TestRazorSourceDocument.Create("Hello, world"); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var originalTree = RazorSyntaxTree.Parse(sourceDocument); + codeDocument.SetSyntaxTree(originalTree); + + // Act + phase.Execute(codeDocument); + + // Assert + var outputTree = codeDocument.GetSyntaxTree(); + Assert.Empty(outputTree.Diagnostics); + Assert.Same(originalTree, outputTree); + } + + [Fact] + public void Execute_SetsTagHelperDocumentContext() + { + // Arrange + var projectEngine = RazorProjectEngine.Create(builder => + { + builder.Features.Add(new TestTagHelperFeature()); + }); + + var phase = new DefaultRazorTagHelperBinderPhase() + { + Engine = projectEngine.Engine, + }; + + // No taghelper directives here so nothing is resolved. + var sourceDocument = TestRazorSourceDocument.Create("Hello, world"); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var originalTree = RazorSyntaxTree.Parse(sourceDocument); + codeDocument.SetSyntaxTree(originalTree); + + // Act + phase.Execute(codeDocument); + + // Assert + var context = codeDocument.GetTagHelperContext(); + Assert.Null(context.Prefix); + Assert.Empty(context.TagHelpers); + } + + [Fact] + public void Execute_CombinesErrorsOnRewritingErrors() + { + // Arrange + var projectEngine = RazorProjectEngine.Create(builder => + { + builder.AddTagHelpers(new[] + { + CreateTagHelperDescriptor( + tagName: "form", + typeName: "TestFormTagHelper", + assemblyName: "TestAssembly"), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestInputTagHelper", + assemblyName: "TestAssembly"), + }); + }); + + var phase = new DefaultRazorTagHelperBinderPhase() + { + Engine = projectEngine.Engine, + }; + + var content = + @" +@addTagHelper *, TestAssembly +
+ "; + var sourceDocument = TestRazorSourceDocument.Create(content, filePath: null); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var originalTree = RazorSyntaxTree.Parse(sourceDocument); + + var initialError = RazorDiagnostic.Create( + new RazorDiagnosticDescriptor("RZ9999", () => "Initial test error", RazorDiagnosticSeverity.Error), + new SourceSpan(SourceLocation.Zero, contentLength: 1)); + var expectedRewritingError = RazorDiagnosticFactory.CreateParsing_TagHelperFoundMalformedTagHelper( + new SourceSpan(new SourceLocation(Environment.NewLine.Length * 2 + 30, 2, 1), contentLength: 4), "form"); + + var erroredOriginalTree = RazorSyntaxTree.Create(originalTree.Root, originalTree.Source, new[] { initialError }, originalTree.Options); + codeDocument.SetSyntaxTree(erroredOriginalTree); + + // Act + phase.Execute(codeDocument); + + // Assert + var outputTree = codeDocument.GetSyntaxTree(); + Assert.Empty(originalTree.Diagnostics); + Assert.NotSame(erroredOriginalTree, outputTree); + Assert.Equal(new[] { initialError, expectedRewritingError }, outputTree.Diagnostics); + } + + private static string AssemblyA => "TestAssembly"; + + private static string AssemblyB => "AnotherAssembly"; + + private static TagHelperDescriptor Valid_PlainTagHelperDescriptor + { + get + { + return CreateTagHelperDescriptor( + tagName: "valid_plain", + typeName: "Microsoft.AspNetCore.Razor.TagHelpers.ValidPlainTagHelper", + assemblyName: AssemblyA); + } + } + + private static TagHelperDescriptor Valid_InheritedTagHelperDescriptor + { + get + { + return CreateTagHelperDescriptor( + tagName: "valid_inherited", + typeName: "Microsoft.AspNetCore.Razor.TagHelpers.ValidInheritedTagHelper", + assemblyName: AssemblyA); + } + } + + private static TagHelperDescriptor String_TagHelperDescriptor + { + get + { + // We're treating 'string' as a TagHelper so we can test TagHelpers in multiple assemblies without + // building a separate assembly with a single TagHelper. + return CreateTagHelperDescriptor( + tagName: "string", + typeName: "System.String", + assemblyName: AssemblyB); + } + } + + public static TheoryData ProcessTagHelperPrefixData + { + get + { + // source, expected prefix + return new TheoryData + { + { + $@" +@tagHelperPrefix """" +@addTagHelper Microsoft.AspNetCore.Razor.TagHelpers.ValidPlain*, TestAssembly", + null + }, + { + $@" +@tagHelperPrefix th: +@addTagHelper Microsoft.AspNetCore.Razor.TagHelpers.ValidPlain*, {AssemblyA}", + "th:" + }, + { + $@" +@addTagHelper *, {AssemblyA} +@tagHelperPrefix th:", + "th:" + }, + { + $@" +@tagHelperPrefix th- +@addTagHelper Microsoft.AspNetCore.Razor.TagHelpers.ValidPlain*, {AssemblyA} +@addTagHelper Microsoft.AspNetCore.Razor.TagHelpers.ValidInherited*, {AssemblyA}", + "th-" + }, + { + $@" +@tagHelperPrefix +@addTagHelper Microsoft.AspNetCore.Razor.TagHelpers.ValidPlain*, {AssemblyA} +@addTagHelper Microsoft.AspNetCore.Razor.TagHelpers.ValidInherited*, {AssemblyA}", + null + }, + { + $@" +@tagHelperPrefix ""th"" +@addTagHelper *, {AssemblyA} +@addTagHelper *, {AssemblyB}", + "th" + }, + { + $@" +@addTagHelper *, {AssemblyA} +@tagHelperPrefix th:- +@addTagHelper *, {AssemblyB}", + "th:-" + }, + }; + } + } + + [Theory] + [MemberData(nameof(ProcessTagHelperPrefixData))] + public void DirectiveVisitor_ExtractsPrefixFromSyntaxTree( + string source, + string expectedPrefix) + { + // Arrange + var sourceDocument = TestRazorSourceDocument.Create(source, filePath: "TestFile"); + var parser = new RazorParser(); + var syntaxTree = parser.Parse(sourceDocument); + var visitor = new DefaultRazorTagHelperBinderPhase.TagHelperDirectiveVisitor(tagHelpers: new List()); + + // Act + visitor.Visit(syntaxTree.Root); + + // Assert + Assert.Equal(expectedPrefix, visitor.TagHelperPrefix); + } + + public static TheoryData ProcessTagHelperMatchesData + { + get + { + // source, taghelpers, expected descriptors + return new TheoryData + { + { + $@" +@addTagHelper *, {AssemblyA}", + new [] { Valid_PlainTagHelperDescriptor, }, + new [] { Valid_PlainTagHelperDescriptor } + }, + { + $@" +@addTagHelper *, {AssemblyA} +@addTagHelper *, {AssemblyB}", + new [] { Valid_PlainTagHelperDescriptor, String_TagHelperDescriptor }, + new [] { Valid_PlainTagHelperDescriptor, String_TagHelperDescriptor } + }, + { + $@" +@addTagHelper *, {AssemblyA} +@removeTagHelper *, {AssemblyB}", + new [] { Valid_PlainTagHelperDescriptor, String_TagHelperDescriptor }, + new [] { Valid_PlainTagHelperDescriptor } + }, + { + $@" +@addTagHelper *, {AssemblyA} +@addTagHelper *, {AssemblyB} +@removeTagHelper *, {AssemblyA}", + new [] { Valid_PlainTagHelperDescriptor, Valid_InheritedTagHelperDescriptor, String_TagHelperDescriptor }, + new [] { String_TagHelperDescriptor } + }, + { + $@" +@addTagHelper {Valid_PlainTagHelperDescriptor.Name}, {AssemblyA} +@addTagHelper *, {AssemblyA}", + new [] { Valid_PlainTagHelperDescriptor, Valid_InheritedTagHelperDescriptor, }, + new [] { Valid_PlainTagHelperDescriptor, Valid_InheritedTagHelperDescriptor } + }, + { + $@" +@addTagHelper *, {AssemblyA} +@removeTagHelper {Valid_PlainTagHelperDescriptor.Name}, {AssemblyA}", + new [] { Valid_PlainTagHelperDescriptor, Valid_InheritedTagHelperDescriptor, }, + new [] { Valid_InheritedTagHelperDescriptor } + }, + { + $@" +@addTagHelper *, {AssemblyA} +@removeTagHelper *, {AssemblyA} +@addTagHelper *, {AssemblyA}", + new [] { Valid_PlainTagHelperDescriptor, Valid_InheritedTagHelperDescriptor, }, + new [] { Valid_InheritedTagHelperDescriptor, Valid_PlainTagHelperDescriptor } + }, + { + $@" +@addTagHelper *, {AssemblyA} +@addTagHelper *, {AssemblyA}", + new [] { Valid_PlainTagHelperDescriptor, Valid_InheritedTagHelperDescriptor, }, + new [] { Valid_InheritedTagHelperDescriptor, Valid_PlainTagHelperDescriptor } + }, + { + $@" +@addTagHelper Microsoft.AspNetCore.Razor.TagHelpers.ValidPlain*, {AssemblyA}", + new [] { Valid_PlainTagHelperDescriptor, Valid_InheritedTagHelperDescriptor, }, + new [] { Valid_PlainTagHelperDescriptor } + }, + { + $@" +@addTagHelper Microsoft.AspNetCore.Razor.TagHelpers.*, {AssemblyA}", + new [] { Valid_PlainTagHelperDescriptor, Valid_InheritedTagHelperDescriptor, }, + new [] { Valid_PlainTagHelperDescriptor, Valid_PlainTagHelperDescriptor } + }, + { + $@" +@addTagHelper *, {AssemblyA} +@removeTagHelper Microsoft.AspNetCore.Razor.TagHelpers.ValidP*, {AssemblyA} +@addTagHelper *, {AssemblyA}", + new [] { Valid_PlainTagHelperDescriptor, Valid_InheritedTagHelperDescriptor, }, + new [] { Valid_InheritedTagHelperDescriptor, Valid_PlainTagHelperDescriptor } + }, + { + $@" +@addTagHelper *, {AssemblyA} +@removeTagHelper Str*, {AssemblyB}", + new [] { Valid_PlainTagHelperDescriptor, String_TagHelperDescriptor, }, + new [] { Valid_PlainTagHelperDescriptor } + }, + { + $@" +@addTagHelper *, {AssemblyA} +@removeTagHelper *, {AssemblyB}", + new [] { Valid_PlainTagHelperDescriptor, String_TagHelperDescriptor, }, + new [] { Valid_PlainTagHelperDescriptor } + }, + { + $@" +@addTagHelper *, {AssemblyA} +@addTagHelper System.{String_TagHelperDescriptor.Name}, {AssemblyB}", + new [] { Valid_PlainTagHelperDescriptor, String_TagHelperDescriptor, }, + new [] { Valid_PlainTagHelperDescriptor } + }, + { + $@" +@addTagHelper *, {AssemblyA} +@addTagHelper *, {AssemblyB} +@removeTagHelper Microsoft.*, {AssemblyA}", + new [] { Valid_PlainTagHelperDescriptor, Valid_InheritedTagHelperDescriptor, String_TagHelperDescriptor }, + new [] { String_TagHelperDescriptor } + }, + { + $@" +@addTagHelper *, {AssemblyA} +@addTagHelper *, {AssemblyB} +@removeTagHelper ?Microsoft*, {AssemblyA} +@removeTagHelper System.{String_TagHelperDescriptor.Name}, {AssemblyB}", + new [] { Valid_PlainTagHelperDescriptor, Valid_InheritedTagHelperDescriptor, String_TagHelperDescriptor }, + new [] + { + Valid_InheritedTagHelperDescriptor, + Valid_PlainTagHelperDescriptor, + String_TagHelperDescriptor + } + }, + { + $@" +@addTagHelper *, {AssemblyA} +@addTagHelper *, {AssemblyB} +@removeTagHelper TagHelper*, {AssemblyA} +@removeTagHelper System.{String_TagHelperDescriptor.Name}, {AssemblyB}", + new [] { Valid_PlainTagHelperDescriptor, Valid_InheritedTagHelperDescriptor, String_TagHelperDescriptor }, + new [] + { + Valid_InheritedTagHelperDescriptor, + Valid_PlainTagHelperDescriptor, + String_TagHelperDescriptor + } + }, + }; + } + } + + [Theory] + [MemberData(nameof(ProcessTagHelperMatchesData))] + public void DirectiveVisitor_FiltersTagHelpersByDirectives( + string source, + object tagHelpers, + object expectedDescriptors) + { + // Arrange + var expected = (TagHelperDescriptor[])expectedDescriptors; + var sourceDocument = TestRazorSourceDocument.Create(source, filePath: "TestFile"); + var parser = new RazorParser(); + var syntaxTree = parser.Parse(sourceDocument); + var visitor = new DefaultRazorTagHelperBinderPhase.TagHelperDirectiveVisitor((TagHelperDescriptor[])tagHelpers); + + // Act + visitor.Visit(syntaxTree.Root); + + // Assert + Assert.Equal(expected.Count(), visitor.Matches.Count()); + + foreach (var expectedDescriptor in expected) + { + Assert.Contains(expectedDescriptor, visitor.Matches, TagHelperDescriptorComparer.Default); + } + } + + public static TheoryData ProcessTagHelperMatches_EmptyResultData + { + get + { + // source, taghelpers + return new TheoryData> + { + { + $@" +@addTagHelper *, {AssemblyA} +@removeTagHelper *, {AssemblyA}", + new TagHelperDescriptor[] + { + Valid_PlainTagHelperDescriptor, + } + }, + { + $@" +@addTagHelper *, {AssemblyA} +@removeTagHelper {Valid_PlainTagHelperDescriptor.Name}, {AssemblyA} +@removeTagHelper {Valid_InheritedTagHelperDescriptor.Name}, {AssemblyA}", + new TagHelperDescriptor[] + { + Valid_PlainTagHelperDescriptor, + Valid_InheritedTagHelperDescriptor, + } + }, + { + $@" +@addTagHelper *, {AssemblyA} +@addTagHelper *, {AssemblyB} +@removeTagHelper *, {AssemblyA} +@removeTagHelper *, {AssemblyB}", + new TagHelperDescriptor[] + { + Valid_PlainTagHelperDescriptor, + Valid_InheritedTagHelperDescriptor, + String_TagHelperDescriptor, + } + }, + { + $@" +@addTagHelper *, {AssemblyA} +@addTagHelper *, {AssemblyB} +@removeTagHelper {Valid_PlainTagHelperDescriptor.Name}, {AssemblyA} +@removeTagHelper {Valid_InheritedTagHelperDescriptor.Name}, {AssemblyA} +@removeTagHelper {String_TagHelperDescriptor.Name}, {AssemblyB}", + new TagHelperDescriptor[] + { + Valid_PlainTagHelperDescriptor, + Valid_InheritedTagHelperDescriptor, + String_TagHelperDescriptor, + } + }, + { + $@" +@removeTagHelper *, {AssemblyA} +@removeTagHelper {Valid_PlainTagHelperDescriptor.Name}, {AssemblyA}", + new TagHelperDescriptor[0] + }, + { + $@" +@addTagHelper *, {AssemblyA} +@removeTagHelper Mic*, {AssemblyA}", + new TagHelperDescriptor[] + { + Valid_PlainTagHelperDescriptor, + } + }, + { + $@" +@addTagHelper Mic*, {AssemblyA} +@removeTagHelper {Valid_PlainTagHelperDescriptor.Name}, {AssemblyA} +@removeTagHelper {Valid_InheritedTagHelperDescriptor.Name}, {AssemblyA}", + new TagHelperDescriptor[] + { + Valid_PlainTagHelperDescriptor, Valid_InheritedTagHelperDescriptor + } + }, + { + $@" +@addTagHelper Microsoft.*, {AssemblyA} +@addTagHelper System.*, {AssemblyB} +@removeTagHelper Microsoft.AspNetCore.Razor.TagHelpers*, {AssemblyA} +@removeTagHelper System.*, {AssemblyB}", + new TagHelperDescriptor[] + { + Valid_PlainTagHelperDescriptor, + Valid_InheritedTagHelperDescriptor, + String_TagHelperDescriptor, + } + }, + { + $@" +@addTagHelper ?icrosoft.*, {AssemblyA} +@addTagHelper ?ystem.*, {AssemblyB} +@removeTagHelper *?????r, {AssemblyA} +@removeTagHelper Sy??em.*, {AssemblyB}", + new TagHelperDescriptor[] + { + Valid_PlainTagHelperDescriptor, + Valid_InheritedTagHelperDescriptor, + String_TagHelperDescriptor, + } + }, + { + $@" +@addTagHelper ?i?crosoft.*, {AssemblyA} +@addTagHelper ??ystem.*, {AssemblyB}", + new TagHelperDescriptor[] + { + Valid_PlainTagHelperDescriptor, + Valid_InheritedTagHelperDescriptor, + String_TagHelperDescriptor, + } + }, + }; + } + } + + [Theory] + [MemberData(nameof(ProcessTagHelperMatches_EmptyResultData))] + public void ProcessDirectives_CanReturnEmptyDescriptorsBasedOnDirectiveDescriptors( + string source, + object tagHelpers) + { + // Arrange + var sourceDocument = TestRazorSourceDocument.Create(source, filePath: "TestFile"); + var parser = new RazorParser(); + var syntaxTree = parser.Parse(sourceDocument); + var visitor = new DefaultRazorTagHelperBinderPhase.TagHelperDirectiveVisitor((TagHelperDescriptor[])tagHelpers); + + // Act + visitor.Visit(syntaxTree.Root); + + // Assert + Assert.Empty(visitor.Matches); + } + + [Fact] + public void TagHelperDirectiveVisitor_DoesNotMatch_Components() + { + // Arrange + var componentDescriptor = CreateComponentDescriptor("counter", "SomeProject.Counter", AssemblyA); + var legacyDescriptor = Valid_PlainTagHelperDescriptor; + var descriptors = new[] + { + legacyDescriptor, + componentDescriptor, + }; + var visitor = new DefaultRazorTagHelperBinderPhase.TagHelperDirectiveVisitor(descriptors); + var sourceDocument = CreateTestSourceDocument(); + var tree = RazorSyntaxTree.Parse(sourceDocument); + + // Act + visitor.Visit(tree); + + // Assert + var match = Assert.Single(visitor.Matches); + Assert.Same(legacyDescriptor, match); + } + + private static TagHelperDescriptor CreatePrefixedValidPlainDescriptor(string prefix) + { + return Valid_PlainTagHelperDescriptor; + } + + private static TagHelperDescriptor CreatePrefixedValidInheritedDescriptor(string prefix) + { + return Valid_InheritedTagHelperDescriptor; + } + + private static TagHelperDescriptor CreatePrefixedStringDescriptor(string prefix) + { + return String_TagHelperDescriptor; + } + + private static RazorSourceDocument CreateTestSourceDocument() + { + var content = + @" +@addTagHelper *, TestAssembly + + +"; + var sourceDocument = TestRazorSourceDocument.Create(content, filePath: null); + return sourceDocument; + } + + private static TagHelperDescriptor CreateTagHelperDescriptor( + string tagName, + string typeName, + string assemblyName, + IEnumerable> attributes = null, + IEnumerable> ruleBuilders = null) + { + return CreateDescriptor(TagHelperConventions.DefaultKind, tagName, typeName, assemblyName, attributes, ruleBuilders); + } +#endregion + +#region Components + [Fact] + public void ComponentDirectiveVisitor_DoesNotMatch_LegacyTagHelpers() + { + // Arrange + var currentNamespace = "SomeProject"; + var componentDescriptor = CreateComponentDescriptor("counter", "SomeProject.Counter", AssemblyA); + var legacyDescriptor = Valid_PlainTagHelperDescriptor; + var descriptors = new[] + { + legacyDescriptor, + componentDescriptor, + }; + var sourceDocument = CreateComponentTestSourceDocument(@"", "C:\\SomeFolder\\SomeProject\\Counter.cshtml"); + var tree = RazorSyntaxTree.Parse(sourceDocument); + var visitor = new DefaultRazorTagHelperBinderPhase.ComponentDirectiveVisitor(sourceDocument.FilePath, descriptors, currentNamespace); + + // Act + visitor.Visit(tree); + + // Assert + Assert.Null(visitor.TagHelperPrefix); + var match = Assert.Single(visitor.Matches); + Assert.Same(componentDescriptor, match); + } + + [Fact] + public void ComponentDirectiveVisitor_AddsErrorOnLegacyTagHelperDirectives() + { + // Arrange + var currentNamespace = "SomeProject"; + var componentDescriptor = CreateComponentDescriptor("counter", "SomeProject.Counter", AssemblyA); + var legacyDescriptor = Valid_PlainTagHelperDescriptor; + var descriptors = new[] + { + legacyDescriptor, + componentDescriptor, + }; + var filePath = "C:\\SomeFolder\\SomeProject\\Counter.cshtml"; + var content = @" +@tagHelperPrefix th: + + +"; + var sourceDocument = CreateComponentTestSourceDocument(content, filePath); + var tree = RazorSyntaxTree.Parse(sourceDocument); + var visitor = new DefaultRazorTagHelperBinderPhase.ComponentDirectiveVisitor(sourceDocument.FilePath, descriptors, currentNamespace); + + // Act + visitor.Visit(tree); + + // Assert + Assert.Null(visitor.TagHelperPrefix); + var match = Assert.Single(visitor.Matches); + Assert.Same(componentDescriptor, match); + var directiveChunkGenerator = (TagHelperPrefixDirectiveChunkGenerator)tree.Root.DescendantNodes().First(n => n is CSharpStatementLiteralSyntax).GetSpanContext().ChunkGenerator; + var diagnostic = Assert.Single(directiveChunkGenerator.Diagnostics); + Assert.Equal("RZ9978", diagnostic.Id); + } + + [Fact] + public void ComponentDirectiveVisitor_MatchesFullyQualifiedComponents() + { + // Arrange + var currentNamespace = "SomeProject"; + var componentDescriptor = CreateComponentDescriptor( + "SomeProject.SomeOtherFolder.Counter", + "SomeProject.SomeOtherFolder.Counter", + AssemblyA, + fullyQualified: true); + var descriptors = new[] + { + componentDescriptor, + }; + var filePath = "C:\\SomeFolder\\SomeProject\\Counter.cshtml"; + var content = @" +"; + var sourceDocument = CreateComponentTestSourceDocument(content, filePath); + var tree = RazorSyntaxTree.Parse(sourceDocument); + var visitor = new DefaultRazorTagHelperBinderPhase.ComponentDirectiveVisitor(sourceDocument.FilePath, descriptors, currentNamespace); + + // Act + visitor.Visit(tree); + + // Assert + var match = Assert.Single(visitor.Matches); + Assert.Same(componentDescriptor, match); + } + + [Fact] + public void ComponentDirectiveVisitor_ComponentInScope_MatchesChildContent() + { + // Arrange + var currentNamespace = "SomeProject"; + var componentDescriptor = CreateComponentDescriptor( + "Counter", + "SomeProject.Counter", + AssemblyA); + var childContentDescriptor = CreateComponentDescriptor( + "ChildContent", + "SomeProject.Counter.ChildContent", + AssemblyA, + childContent: true); + var descriptors = new[] + { + componentDescriptor, + childContentDescriptor, + }; + var filePath = "C:\\SomeFolder\\SomeProject\\Counter.cshtml"; + var content = @" +"; + var sourceDocument = CreateComponentTestSourceDocument(content, filePath); + var tree = RazorSyntaxTree.Parse(sourceDocument); + var visitor = new DefaultRazorTagHelperBinderPhase.ComponentDirectiveVisitor(sourceDocument.FilePath, descriptors, currentNamespace); + + // Act + visitor.Visit(tree); + + // Assert + Assert.Equal(2, visitor.Matches.Count); + } + + [Fact] + public void ComponentDirectiveVisitor_NullCurrentNamespace_MatchesOnlyFullyQualifiedComponents() + { + // Arrange + string currentNamespace = null; + var componentDescriptor = CreateComponentDescriptor( + "Counter", + "SomeProject.Counter", + AssemblyA); + var fullyQualifiedComponent = CreateComponentDescriptor( + "SomeProject.SomeOtherFolder.Counter", + "SomeProject.SomeOtherFolder.Counter", + AssemblyA, + fullyQualified: true); + var descriptors = new[] + { + componentDescriptor, + fullyQualifiedComponent, + }; + var filePath = "C:\\SomeFolder\\SomeProject\\Counter.cshtml"; + var content = @" +"; + var sourceDocument = CreateComponentTestSourceDocument(content, filePath); + var tree = RazorSyntaxTree.Parse(sourceDocument); + var visitor = new DefaultRazorTagHelperBinderPhase.ComponentDirectiveVisitor(sourceDocument.FilePath, descriptors, currentNamespace); + + // Act + visitor.Visit(tree); + + // Assert + var match = Assert.Single(visitor.Matches); + Assert.Same(fullyQualifiedComponent, match); + } + + [Fact] + public void ComponentDirectiveVisitor_MatchesIfNamespaceInUsing() + { + // Arrange + var currentNamespace = "SomeProject"; + var componentDescriptor = CreateComponentDescriptor( + "Counter", + "SomeProject.Counter", + AssemblyA); + var anotherComponentDescriptor = CreateComponentDescriptor( + "Foo", + "SomeProject.SomeOtherFolder.Foo", + AssemblyA); + var descriptors = new[] + { + componentDescriptor, + anotherComponentDescriptor, + }; + var filePath = "C:\\SomeFolder\\SomeProject\\Counter.cshtml"; + var content = @" +@using SomeProject.SomeOtherFolder +"; + var sourceDocument = CreateComponentTestSourceDocument(content, filePath); + var tree = RazorSyntaxTree.Parse(sourceDocument); + var visitor = new DefaultRazorTagHelperBinderPhase.ComponentDirectiveVisitor(sourceDocument.FilePath, descriptors, currentNamespace); + + // Act + visitor.Visit(tree); + + // Assert + Assert.Equal(2, visitor.Matches.Count); + } + + [Fact] + public void ComponentDirectiveVisitor_DoesNotMatchForUsingAliasAndStaticUsings() + { + // Arrange + var currentNamespace = "SomeProject"; + var componentDescriptor = CreateComponentDescriptor( + "Counter", + "SomeProject.Counter", + AssemblyA); + var anotherComponentDescriptor = CreateComponentDescriptor( + "Foo", + "SomeProject.SomeOtherFolder.Foo", + AssemblyA); + var descriptors = new[] + { + componentDescriptor, + anotherComponentDescriptor, + }; + var filePath = "C:\\SomeFolder\\SomeProject\\Counter.cshtml"; + var content = @" +@using Bar = SomeProject.SomeOtherFolder +@using static SomeProject.SomeOtherFolder.Foo +"; + var sourceDocument = CreateComponentTestSourceDocument(content, filePath); + var tree = RazorSyntaxTree.Parse(sourceDocument); + var visitor = new DefaultRazorTagHelperBinderPhase.ComponentDirectiveVisitor(sourceDocument.FilePath, descriptors, currentNamespace); + + // Act + visitor.Visit(tree); + + // Assert + var match = Assert.Single(visitor.Matches); + Assert.Same(componentDescriptor, match); + } + + [Theory] + [InlineData("", "", true)] + [InlineData("Foo", "Project", true)] + [InlineData("Project.Foo", "Project", true)] + [InlineData("Project.Bar.Foo", "Project.Bar", true)] + [InlineData("Project.Foo", "Project.Bar", false)] + [InlineData("Project.Bar.Foo", "Project", false)] + [InlineData("Bar.Foo", "Project", false)] + public void IsTypeInNamespace_WorksAsExpected(string typeName, string @namespace, bool expected) + { + // Arrange & Act + var result = DefaultRazorTagHelperBinderPhase.ComponentDirectiveVisitor.IsTypeInNamespace(typeName, @namespace); + + // Assert + Assert.Equal(expected, result); + } + + [Theory] + [InlineData("", "", true)] + [InlineData("Foo", "Project", true)] + [InlineData("Project.Foo", "Project", true)] + [InlineData("Project.Bar.Foo", "Project.Bar", true)] + [InlineData("Project.Foo", "Project.Bar", true)] + [InlineData("Project.Bar.Foo", "Project", false)] + [InlineData("Bar.Foo", "Project", false)] + public void IsTypeInScope_WorksAsExpected(string typeName, string currentNamespace, bool expected) + { + // Arrange & Act + var result = DefaultRazorTagHelperBinderPhase.ComponentDirectiveVisitor.IsTypeInScope(typeName, currentNamespace); + + // Assert + Assert.Equal(expected, result); + } + + [Fact] + public void IsTagHelperFromMangledClass_WorksAsExpected() + { + // Arrange + var className = "Counter"; + var typeName = $"SomeProject.SomeNamespace.{ComponentMetadata.MangleClassName(className)}"; + var descriptor = CreateComponentDescriptor( + tagName: "Counter", + typeName: typeName, + assemblyName: AssemblyA); + + // Act + var result = DefaultRazorTagHelperBinderPhase.ComponentDirectiveVisitor.IsTagHelperFromMangledClass(descriptor); + + // Assert + Assert.True(result); + } + + [Theory] + [InlineData("", false, "", "")] + [InlineData(".", true, "", "")] + [InlineData("Foo", true, "", "Foo")] + [InlineData("SomeProject.Foo", true, "SomeProject", "Foo")] + [InlineData("SomeProject.Foo", true, "SomeProject", "Foo")] + [InlineData("SomeProject.Foo", true, "SomeProject", "Foo")] + [InlineData("SomeProject.Foo>", true, "", "SomeProject.Foo>")] + [InlineData("SomeProject..Foo", true, "SomeProject.", "Foo")] + public void TrySplitNamespaceAndType_WorksAsExpected(string fullTypeName, bool expectedResult, string expectedNamespace, string expectedTypeName) + { + // Arrange & Act + var result = DefaultRazorTagHelperBinderPhase.ComponentDirectiveVisitor.TrySplitNamespaceAndType( + fullTypeName, out var @namespace, out var typeName); + + // Assert + Assert.Equal(expectedResult, result); + Assert.Equal(expectedNamespace, @namespace); + Assert.Equal(expectedTypeName, typeName); + } + + private static RazorSourceDocument CreateComponentTestSourceDocument(string content, string filePath = null) + { + var sourceDocument = TestRazorSourceDocument.Create(content, filePath: filePath); + return sourceDocument; + } + + private static TagHelperDescriptor CreateComponentDescriptor( + string tagName, + string typeName, + string assemblyName, + IEnumerable> attributes = null, + IEnumerable> ruleBuilders = null, + string kind = null, + bool fullyQualified = false, + bool childContent = false) + { + kind = kind ?? ComponentMetadata.Component.TagHelperKind; + return CreateDescriptor(kind, tagName, typeName, assemblyName, attributes, ruleBuilders, fullyQualified, childContent); + } +#endregion + + private static TagHelperDescriptor CreateDescriptor( + string kind, + string tagName, + string typeName, + string assemblyName, + IEnumerable> attributes = null, + IEnumerable> ruleBuilders = null, + bool componentFullyQualified = false, + bool componentChildContent = false) + { + var builder = TagHelperDescriptorBuilder.Create(kind, typeName, assemblyName); + builder.TypeName(typeName); + + if (attributes != null) + { + foreach (var attributeBuilder in attributes) + { + builder.BoundAttributeDescriptor(attributeBuilder); + } + } + + if (ruleBuilders != null) + { + foreach (var ruleBuilder in ruleBuilders) + { + builder.TagMatchingRuleDescriptor(innerRuleBuilder => + { + innerRuleBuilder.RequireTagName(tagName); + ruleBuilder(innerRuleBuilder); + }); + } + } + else + { + builder.TagMatchingRuleDescriptor(ruleBuilder => ruleBuilder.RequireTagName(tagName)); + } + + if (componentFullyQualified) + { + builder.Metadata[ComponentMetadata.Component.NameMatchKey] = ComponentMetadata.Component.FullyQualifiedNameMatch; + } + + if (componentChildContent) + { + builder.Metadata[ComponentMetadata.SpecialKindKey] = ComponentMetadata.ChildContent.TagHelperKind; + } + + var descriptor = builder.Build(); + + return descriptor; + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRequiredAttributeDescriptorBuilderTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRequiredAttributeDescriptorBuilderTest.cs new file mode 100644 index 0000000000..f847f6ae3c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DefaultRequiredAttributeDescriptorBuilderTest.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DefaultRequiredAttributeDescriptorBuilderTest + { + [Fact] + public void Build_DisplayNameIsName_NameComparisonFullMatch() + { + // Arrange + var builder = new DefaultRequiredAttributeDescriptorBuilder(); + + builder + .Name("asp-action") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch); + + // Act + var descriptor = builder.Build(); + + // Assert + Assert.Equal("asp-action", descriptor.DisplayName); + } + + [Fact] + public void Build_DisplayNameIsNameWithDots_NameComparisonPrefixMatch() + { + // Arrange + var builder = new DefaultRequiredAttributeDescriptorBuilder(); + + builder + .Name("asp-route-") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.PrefixMatch); + + // Act + var descriptor = builder.Build(); + + // Assert + Assert.Equal("asp-route-...", descriptor.DisplayName); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DirectiveDescriptorBuilderExtensionsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DirectiveDescriptorBuilderExtensionsTest.cs new file mode 100644 index 0000000000..ffcb4f8ba9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DirectiveDescriptorBuilderExtensionsTest.cs @@ -0,0 +1,122 @@ +// Copyright(c) .NET Foundation.All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DirectiveDescriptorBuilderExtensionsTest + { + [Fact] + public void AddMemberToken_AddsToken() + { + // Arrange & Act + var descriptor = DirectiveDescriptor.CreateDirective("custom", DirectiveKind.SingleLine, b => b.AddMemberToken()); + + // Assert + var token = Assert.Single(descriptor.Tokens); + Assert.Equal(DirectiveTokenKind.Member, token.Kind); + Assert.False(token.Optional); + Assert.Null(token.Name); + Assert.Null(token.Description); + } + + [Fact] + public void AddNamespaceToken_AddsToken() + { + // Arrange & Act + var descriptor = DirectiveDescriptor.CreateDirective("custom", DirectiveKind.SingleLine, b => b.AddNamespaceToken("Name", "Description")); + + // Assert + var token = Assert.Single(descriptor.Tokens); + Assert.Equal(DirectiveTokenKind.Namespace, token.Kind); + Assert.False(token.Optional); + Assert.Equal("Name", token.Name); + Assert.Equal("Description", token.Description); + } + + [Fact] + public void AddStringToken_AddsToken() + { + // Arrange & Act + var descriptor = DirectiveDescriptor.CreateDirective("custom", DirectiveKind.SingleLine, b => b.AddStringToken()); + + // Assert + var token = Assert.Single(descriptor.Tokens); + Assert.Equal(DirectiveTokenKind.String, token.Kind); + Assert.False(token.Optional); + Assert.Null(token.Name); + Assert.Null(token.Description); + } + + [Fact] + public void AddTypeToken_AddsToken() + { + // Arrange & Act + var descriptor = DirectiveDescriptor.CreateDirective("custom", DirectiveKind.SingleLine, b => b.AddTypeToken("Name", "Description")); + + // Assert + var token = Assert.Single(descriptor.Tokens); + Assert.Equal(DirectiveTokenKind.Type, token.Kind); + Assert.False(token.Optional); + Assert.Equal("Name", token.Name); + Assert.Equal("Description", token.Description); + } + + [Fact] + public void AddOptionalTypeToken_AddsToken() + { + // Arrange & Act + var descriptor = DirectiveDescriptor.CreateDirective("custom", DirectiveKind.SingleLine, b => b.AddOptionalTypeToken()); + + // Assert + var token = Assert.Single(descriptor.Tokens); + Assert.Equal(DirectiveTokenKind.Type, token.Kind); + Assert.True(token.Optional); + Assert.Null(token.Name); + Assert.Null(token.Description); + } + + [Fact] + public void AddOptionalMemberToken_AddsToken() + { + // Arrange & Act + var descriptor = DirectiveDescriptor.CreateDirective("custom", DirectiveKind.SingleLine, b => b.AddOptionalMemberToken("Name", "Description")); + + // Assert + var token = Assert.Single(descriptor.Tokens); + Assert.Equal(DirectiveTokenKind.Member, token.Kind); + Assert.True(token.Optional); + Assert.Equal("Name", token.Name); + Assert.Equal("Description", token.Description); + } + + [Fact] + public void AddOptionalNamespaceToken_AddsToken() + { + // Arrange & Act + var descriptor = DirectiveDescriptor.CreateDirective("custom", DirectiveKind.SingleLine, b => b.AddOptionalNamespaceToken()); + + // Assert + var token = Assert.Single(descriptor.Tokens); + Assert.Equal(DirectiveTokenKind.Namespace, token.Kind); + Assert.True(token.Optional); + Assert.Null(token.Name); + Assert.Null(token.Description); + } + + [Fact] + public void AddOptionalStringToken_AddsToken() + { + // Arrange & Act + var descriptor = DirectiveDescriptor.CreateDirective("custom", DirectiveKind.SingleLine, b => b.AddOptionalStringToken("Name", "Description")); + + // Assert + var token = Assert.Single(descriptor.Tokens); + Assert.Equal(DirectiveTokenKind.String, token.Kind); + Assert.True(token.Optional); + Assert.Equal("Name", token.Name); + Assert.Equal("Description", token.Description); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DirectiveDescriptorTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DirectiveDescriptorTest.cs new file mode 100644 index 0000000000..a5bb3c8434 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DirectiveDescriptorTest.cs @@ -0,0 +1,150 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DirectiveDescriptorTest + { + [Fact] + public void CreateDirective_CreatesDirective_WithProvidedKind() + { + // Arrange & Act + var directive = DirectiveDescriptor.CreateDirective("test", DirectiveKind.SingleLine); + + // Assert + Assert.Equal("test", directive.Directive); + Assert.Equal(DirectiveKind.SingleLine, directive.Kind); + } + + [Fact] + public void CreateDirective_WithConfigure_CreatesDirective_WithProvidedKind() + { + // Arrange + var called = false; + Action configure = b => { called = true; }; + + // Act + var directive = DirectiveDescriptor.CreateDirective("test", DirectiveKind.SingleLine, configure); + + // Assert + Assert.Equal("test", directive.Directive); + Assert.Equal(DirectiveKind.SingleLine, directive.Kind); + Assert.True(called); + } + + [Fact] + public void CreateSingleLineDirective_CreatesSingleLineDirective() + { + // Arrange & Act + var directive = DirectiveDescriptor.CreateSingleLineDirective("test"); + + // Assert + Assert.Equal("test", directive.Directive); + Assert.Equal(DirectiveKind.SingleLine, directive.Kind); + } + + [Fact] + public void CreateSingleLineDirective_WithConfigure_CreatesSingleLineDirective() + { + // Arrange + var called = false; + Action configure = b => { called = true; }; + + // Act + var directive = DirectiveDescriptor.CreateSingleLineDirective("test", configure); + + // Assert + Assert.Equal("test", directive.Directive); + Assert.Equal(DirectiveKind.SingleLine, directive.Kind); + Assert.True(called); + } + + [Fact] + public void CreateRazorBlockDirective_CreatesRazorBlockDirective() + { + // Arrange & Act + var directive = DirectiveDescriptor.CreateRazorBlockDirective("test"); + + // Assert + Assert.Equal("test", directive.Directive); + Assert.Equal(DirectiveKind.RazorBlock, directive.Kind); + } + + [Fact] + public void CreateRazorBlockDirective_WithConfigure_CreatesRazorBlockDirective() + { + // Arrange + var called = false; + Action configure = b => { called = true; }; + + // Act + var directive = DirectiveDescriptor.CreateRazorBlockDirective("test", configure); + + // Assert + Assert.Equal("test", directive.Directive); + Assert.Equal(DirectiveKind.RazorBlock, directive.Kind); + Assert.True(called); + } + + [Fact] + public void CreateCodeBlockDirective_CreatesCodeBlockDirective() + { + // Arrange & Act + var directive = DirectiveDescriptor.CreateCodeBlockDirective("test"); + + // Assert + Assert.Equal("test", directive.Directive); + Assert.Equal(DirectiveKind.CodeBlock, directive.Kind); + } + + [Fact] + public void CreateCodeBlockDirective_WithConfigure_CreatesCodeBlockDirective() + { + // Arrange + var called = false; + Action configure = b => { called = true; }; + + // Act + var directive = DirectiveDescriptor.CreateCodeBlockDirective("test", configure); + + // Assert + Assert.Equal("test", directive.Directive); + Assert.Equal(DirectiveKind.CodeBlock, directive.Kind); + Assert.True(called); + } + + [Fact] + public void Build_ValidatesDirectiveKeyword_EmptyIsInvalid() + { + // Arrange & Act + var ex = Assert.Throws(() => DirectiveDescriptor.CreateSingleLineDirective("")); + + // Assert + Assert.Equal("Invalid directive keyword ''. Directives must have a non-empty keyword that consists only of letters.", ex.Message); + } + + [Fact] + public void Build_ValidatesDirectiveKeyword_InvalidCharacter() + { + // Arrange & Act + var ex = Assert.Throws(() => DirectiveDescriptor.CreateSingleLineDirective("test_directive")); + + // Assert + Assert.Equal("Invalid directive keyword 'test_directive'. Directives must have a non-empty keyword that consists only of letters.", ex.Message); + } + + [Fact] + public void Build_ValidatesDirectiveName_NonOptionalTokenFollowsOptionalToken() + { + // Arrange & Act + var ex = Assert.Throws( + () => DirectiveDescriptor.CreateSingleLineDirective("test", b => { b.AddOptionalMemberToken(); b.AddMemberToken(); })); + + // Assert + Assert.Equal("A non-optional directive token cannot follow an optional directive token.", ex.Message); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DirectiveRemovalOptimizationPassTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DirectiveRemovalOptimizationPassTest.cs new file mode 100644 index 0000000000..3e831b7d23 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DirectiveRemovalOptimizationPassTest.cs @@ -0,0 +1,135 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; +using static Microsoft.AspNetCore.Razor.Language.Intermediate.IntermediateNodeAssert; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DirectiveRemovalOptimizationPassTest + { + [Fact] + public void Execute_Custom_RemovesDirectiveNodeFromDocument() + { + // Arrange + var content = "@custom \"Hello\""; + var sourceDocument = TestRazorSourceDocument.Create(content); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var defaultEngine = RazorProjectEngine.Create(b => + { + b.AddDirective(DirectiveDescriptor.CreateDirective("custom", DirectiveKind.SingleLine, d => d.AddStringToken())); + }).Engine; + var documentNode = Lower(codeDocument, defaultEngine); + var pass = new DirectiveRemovalOptimizationPass() + { + Engine = defaultEngine, + }; + + // Act + pass.Execute(codeDocument, documentNode); + + // Assert + Children(documentNode, + node => Assert.IsType(node)); + var @namespace = documentNode.Children[0]; + Children(@namespace, + node => Assert.IsType(node)); + var @class = @namespace.Children[0]; + var method = SingleChild(@class); + Assert.Empty(method.Children); + } + + [Fact] + public void Execute_MultipleCustomDirectives_RemovesDirectiveNodesFromDocument() + { + // Arrange + var content = "@custom \"Hello\"" + Environment.NewLine + "@custom \"World\""; + var sourceDocument = TestRazorSourceDocument.Create(content); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var defaultEngine = RazorProjectEngine.Create(b => + { + b.AddDirective(DirectiveDescriptor.CreateDirective("custom", DirectiveKind.SingleLine, d => d.AddStringToken())); + }).Engine; + var documentNode = Lower(codeDocument, defaultEngine); + var pass = new DirectiveRemovalOptimizationPass() + { + Engine = defaultEngine, + }; + + // Act + pass.Execute(codeDocument, documentNode); + + // Assert + Children(documentNode, + node => Assert.IsType(node)); + var @namespace = documentNode.Children[0]; + Children(@namespace, + node => Assert.IsType(node)); + var @class = @namespace.Children[0]; + var method = SingleChild(@class); + Assert.Empty(method.Children); + } + + [Fact] + public void Execute_DirectiveWithError_PreservesDiagnosticsAndRemovesDirectiveNodeFromDocument() + { + // Arrange + var content = "@custom \"Hello\""; + var expectedDiagnostic = RazorDiagnostic.Create(new RazorDiagnosticDescriptor("RZ9999", () => "Some diagnostic message.", RazorDiagnosticSeverity.Error), SourceSpan.Undefined); + var sourceDocument = TestRazorSourceDocument.Create(content); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + var defaultEngine = RazorProjectEngine.Create(b => + { + b.AddDirective(DirectiveDescriptor.CreateDirective("custom", DirectiveKind.SingleLine, d => d.AddStringToken())); + }).Engine; + var documentNode = Lower(codeDocument, defaultEngine); + + // Add the diagnostic to the directive node. + var directiveNode = documentNode.FindDescendantNodes().Single(); + directiveNode.Diagnostics.Add(expectedDiagnostic); + + var pass = new DirectiveRemovalOptimizationPass() + { + Engine = defaultEngine, + }; + + // Act + pass.Execute(codeDocument, documentNode); + + // Assert + var diagnostic = Assert.Single(documentNode.Diagnostics); + Assert.Equal(expectedDiagnostic, diagnostic); + + Children(documentNode, + node => Assert.IsType(node)); + var @namespace = documentNode.Children[0]; + Children(@namespace, + node => Assert.IsType(node)); + var @class = @namespace.Children[0]; + var method = SingleChild(@class); + Assert.Empty(method.Children); + } + + private static DocumentIntermediateNode Lower(RazorCodeDocument codeDocument, RazorEngine engine) + { + for (var i = 0; i < engine.Phases.Count; i++) + { + var phase = engine.Phases[i]; + phase.Execute(codeDocument); + + if (phase is IRazorDirectiveClassifierPhase) + { + break; + } + } + + var documentNode = codeDocument.GetDocumentIntermediateNode(); + Assert.NotNull(documentNode); + + return documentNode; + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DirectiveTokenEditHandlerTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DirectiveTokenEditHandlerTest.cs new file mode 100644 index 0000000000..1f0336d008 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DirectiveTokenEditHandlerTest.cs @@ -0,0 +1,86 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Collections.Generic; +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Legacy; +using Microsoft.AspNetCore.Razor.Language.Syntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Test +{ + public class DirectiveTokenEditHandlerTest + { + [Theory] + [InlineData(0, 4, "")] // "Namespace" + [InlineData(4, 0, "Other")] // "SomeOtherNamespace" + [InlineData(0, 4, "Other")] // "OtherNamespace" + public void CanAcceptChange_ProvisionallyAcceptsNonWhitespaceChanges(int index, int length, string newText) + { + // Arrange + var directiveTokenHandler = new TestDirectiveTokenEditHandler(); + directiveTokenHandler.AcceptedCharacters = AcceptedCharactersInternal.NonWhitespace; + + var target = GetSyntaxNode(directiveTokenHandler, "SomeNamespace"); + + var sourceChange = new SourceChange(index, length, newText); + + // Act + var result = directiveTokenHandler.CanAcceptChange(target, sourceChange); + + // Assert + Assert.Equal(PartialParseResultInternal.Accepted | PartialParseResultInternal.Provisional, result); + } + + [Theory] + [InlineData(4, 1, "")] // "SomeNamespace" + [InlineData(9, 0, " ")] // "Some Name space" + [InlineData(9, 5, " Space")] // "Some Name Space" + public void CanAcceptChange_RejectsWhitespaceChanges(int index, int length, string newText) + { + // Arrange + var directiveTokenHandler = new TestDirectiveTokenEditHandler(); + directiveTokenHandler.AcceptedCharacters = AcceptedCharactersInternal.NonWhitespace; + + var target = GetSyntaxNode(directiveTokenHandler, "Some Namespace"); + + var sourceChange = new SourceChange(index, length, newText); + + // Act + var result = directiveTokenHandler.CanAcceptChange(target, sourceChange); + + // Assert + Assert.Equal(PartialParseResultInternal.Rejected, result); + } + + private static CSharpStatementLiteralSyntax GetSyntaxNode(DirectiveTokenEditHandler editHandler, string content) + { + var builder = SyntaxListBuilder.Create(); + var tokens = CSharpLanguageCharacteristics.Instance.TokenizeString(content).ToArray(); + foreach (var token in tokens) + { + builder.Add((SyntaxToken)token.CreateRed()); + } + var node = SyntaxFactory.CSharpStatementLiteral(builder.ToList()); + + var context = new SpanContext(SpanChunkGenerator.Null, editHandler); + + return node.WithSpanContext(context); + } + + private class TestDirectiveTokenEditHandler : DirectiveTokenEditHandler + { + public TestDirectiveTokenEditHandler() : base(content => TestTokenizer(content)) + { + } + + public new PartialParseResultInternal CanAcceptChange(SyntaxNode target, SourceChange change) + => base.CanAcceptChange(target, change); + + internal static IEnumerable TestTokenizer(string str) + { + yield return Syntax.InternalSyntax.SyntaxFactory.Token(SyntaxKind.Marker, str); + } + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DocumentClassifierPassBaseTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DocumentClassifierPassBaseTest.cs new file mode 100644 index 0000000000..e63768bf54 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/DocumentClassifierPassBaseTest.cs @@ -0,0 +1,295 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + + +using System; +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.CodeGeneration; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; +using static Microsoft.AspNetCore.Razor.Language.Intermediate.IntermediateNodeAssert; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class DocumentClassifierPassBaseTest : RazorProjectEngineTestBase + { + protected override RazorLanguageVersion Version => RazorLanguageVersion.Latest; + + public RazorEngine Engine => CreateProjectEngine().Engine; + + [Fact] + public void Execute_HasDocumentKind_IgnoresDocument() + { + // Arrange + var documentNode = new DocumentIntermediateNode() + { + DocumentKind = "ignore", + Options = RazorCodeGenerationOptions.CreateDefault(), + }; + + var pass = new TestDocumentClassifierPass(); + pass.Engine = Engine; + + // Act + pass.Execute(TestRazorCodeDocument.CreateEmpty(), documentNode); + + // Assert + Assert.Equal("ignore", documentNode.DocumentKind); + NoChildren(documentNode); + } + + [Fact] + public void Execute_NoMatch_IgnoresDocument() + { + // Arrange + var documentNode = new DocumentIntermediateNode() + { + Options = RazorCodeGenerationOptions.CreateDefault(), + }; + + var pass = new TestDocumentClassifierPass() + { + Engine = Engine, + ShouldMatch = false, + }; + + // Act + pass.Execute(TestRazorCodeDocument.CreateEmpty(), documentNode); + + // Assert + Assert.Null(documentNode.DocumentKind); + NoChildren(documentNode); + } + + [Fact] + public void Execute_Match_AddsGlobalTargetExtensions() + { + // Arrange + var documentNode = new DocumentIntermediateNode() + { + Options = RazorCodeGenerationOptions.CreateDefault(), + }; + + var expected = new ICodeTargetExtension[] + { + new MyExtension1(), + new MyExtension2(), + }; + + var pass = new TestDocumentClassifierPass(); + pass.Engine = RazorProjectEngine.CreateEmpty(b => + { + for (var i = 0; i < expected.Length; i++) + { + b.AddTargetExtension(expected[i]); + } + }).Engine; + + ICodeTargetExtension[] extensions = null; + + pass.CodeTargetCallback = (builder) => extensions = builder.TargetExtensions.ToArray(); + + // Act + pass.Execute(TestRazorCodeDocument.CreateEmpty(), documentNode); + + // Assert + Assert.Equal(expected, extensions); + } + + [Fact] + public void Execute_Match_SetsDocumentType_AndCreatesStructure() + { + // Arrange + var documentNode = new DocumentIntermediateNode() + { + Options = RazorCodeGenerationOptions.CreateDefault(), + }; + + var pass = new TestDocumentClassifierPass(); + pass.Engine = Engine; + + // Act + pass.Execute(TestRazorCodeDocument.CreateEmpty(), documentNode); + + // Assert + Assert.Equal("test", documentNode.DocumentKind); + Assert.NotNull(documentNode.Target); + + var @namespace = SingleChild(documentNode); + var @class = SingleChild(@namespace); + var method = SingleChild(@class); + NoChildren(method); + } + + [Fact] + public void Execute_AddsUsingsToNamespace() + { + // Arrange + var documentNode = new DocumentIntermediateNode() + { + Options = RazorCodeGenerationOptions.CreateDefault(), + }; + + var builder = IntermediateNodeBuilder.Create(documentNode); + builder.Add(new UsingDirectiveIntermediateNode()); + + var pass = new TestDocumentClassifierPass(); + pass.Engine = Engine; + + // Act + pass.Execute(TestRazorCodeDocument.CreateEmpty(), documentNode); + + // Assert + var @namespace = SingleChild(documentNode); + Children( + @namespace, + n => Assert.IsType(n), + n => Assert.IsType(n)); + } + + [Fact] + public void Execute_AddsTheRestToMethod() + { + // Arrange + var documentNode = new DocumentIntermediateNode() + { + Options = RazorCodeGenerationOptions.CreateDefault(), + }; + + var builder = IntermediateNodeBuilder.Create(documentNode); + builder.Add(new HtmlContentIntermediateNode()); + builder.Add(new CSharpCodeIntermediateNode()); + + var pass = new TestDocumentClassifierPass(); + pass.Engine = Engine; + + // Act + pass.Execute(TestRazorCodeDocument.CreateEmpty(), documentNode); + + // Assert + var @namespace = SingleChild(documentNode); + var @class = SingleChild(@namespace); + var method = SingleChild(@class); + Children( + method, + n => Assert.IsType(n), + n => Assert.IsType(n)); + } + + [Fact] + public void Execute_CanInitializeDefaults() + { + // Arrange + var documentNode = new DocumentIntermediateNode() + { + Options = RazorCodeGenerationOptions.CreateDefault(), + }; + + var builder = IntermediateNodeBuilder.Create(documentNode); + builder.Add(new HtmlContentIntermediateNode()); + builder.Add(new CSharpCodeIntermediateNode()); + + var pass = new TestDocumentClassifierPass() + { + Engine = Engine, + Namespace = "TestNamespace", + Class = "TestClass", + Method = "TestMethod", + }; + + // Act + pass.Execute(TestRazorCodeDocument.CreateEmpty(), documentNode); + + // Assert + var @namespace = SingleChild(documentNode); + Assert.Equal("TestNamespace", @namespace.Content); + + var @class = SingleChild(@namespace); + Assert.Equal("TestClass", @class.ClassName); + + var method = SingleChild(@class); + Assert.Equal("TestMethod", method.MethodName); + } + + [Fact] + public void Execute_AddsPrimaryAnnotations() + { + // Arrange + var documentNode = new DocumentIntermediateNode() + { + Options = RazorCodeGenerationOptions.CreateDefault(), + }; + + var builder = IntermediateNodeBuilder.Create(documentNode); + builder.Add(new HtmlContentIntermediateNode()); + builder.Add(new CSharpCodeIntermediateNode()); + + var pass = new TestDocumentClassifierPass() + { + Engine = Engine, + Namespace = "TestNamespace", + Class = "TestClass", + Method = "TestMethod", + }; + + // Act + pass.Execute(TestRazorCodeDocument.CreateEmpty(), documentNode); + + // Assert + var @namespace = SingleChild(documentNode); + AnnotationEquals(@namespace, CommonAnnotations.PrimaryNamespace); + + var @class = SingleChild(@namespace); + AnnotationEquals(@class, CommonAnnotations.PrimaryClass); + + var method = SingleChild(@class); + AnnotationEquals(method, CommonAnnotations.PrimaryMethod); + } + + private class TestDocumentClassifierPass : DocumentClassifierPassBase + { + public override int Order => IntermediateNodePassBase.DefaultFeatureOrder; + + public bool ShouldMatch { get; set; } = true; + + public Action CodeTargetCallback { get; set; } + + public string Namespace { get; set; } + + public string Class { get; set; } + + public string Method { get; set; } + + protected override string DocumentKind => "test"; + + protected override bool IsMatch(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode) + { + return ShouldMatch; + } + + protected override void OnDocumentStructureCreated( + RazorCodeDocument codeDocument, + NamespaceDeclarationIntermediateNode @namespace, + ClassDeclarationIntermediateNode @class, + MethodDeclarationIntermediateNode method) + { + @namespace.Content = Namespace; + @class.ClassName = Class; + @method.MethodName = Method; + } + + protected override void ConfigureTarget(CodeTargetBuilder builder) + { + CodeTargetCallback?.Invoke(builder); + } + } + + private class MyExtension1 : ICodeTargetExtension + { + } + + private class MyExtension2 : ICodeTargetExtension + { + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/DefaultMetadataIdentifierFeatureTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/DefaultMetadataIdentifierFeatureTest.cs new file mode 100644 index 0000000000..fec5a77cc1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/DefaultMetadataIdentifierFeatureTest.cs @@ -0,0 +1,74 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Extensions +{ + public class DefaultMetadataIdentifierFeatureTest : RazorProjectEngineTestBase + { + protected override RazorLanguageVersion Version => RazorLanguageVersion.Latest; + + [Fact] + public void GetIdentifier_ReturnsNull_ForNullRelativePath() + { + // Arrange + var sourceDocument = RazorSourceDocument.Create("content", new RazorSourceDocumentProperties("Test.cshtml", null)); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var feature = new DefaultMetadataIdentifierFeature() + { + Engine = CreateProjectEngine().Engine, + }; + + // Act + var result = feature.GetIdentifier(codeDocument, sourceDocument); + + // Assert + Assert.Null(result); + } + + [Fact] + public void GetIdentifier_ReturnsNull_ForEmptyRelativePath() + { + // Arrange + var sourceDocument = RazorSourceDocument.Create("content", new RazorSourceDocumentProperties("Test.cshtml", string.Empty)); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var feature = new DefaultMetadataIdentifierFeature() + { + Engine = CreateProjectEngine().Engine, + }; + + // Act + var result = feature.GetIdentifier(codeDocument, sourceDocument); + + // Assert + Assert.Null(result); + } + + [Theory] + [InlineData("Test.cshtml", "/Test.cshtml")] + [InlineData("/Test.cshtml", "/Test.cshtml")] + [InlineData("\\Test.cshtml", "/Test.cshtml")] + [InlineData("\\About\\Test.cshtml", "/About/Test.cshtml")] + [InlineData("\\About\\Test\\cshtml", "/About/Test/cshtml")] + public void GetIdentifier_SanitizesRelativePath(string relativePath, string expected) + { + // Arrange + var sourceDocument = RazorSourceDocument.Create("content", new RazorSourceDocumentProperties("Test.cshtml", relativePath)); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var feature = new DefaultMetadataIdentifierFeature() + { + Engine = CreateProjectEngine().Engine, + }; + + // Act + var result = feature.GetIdentifier(codeDocument, sourceDocument); + + // Assert + Assert.Equal(expected, result); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/DefaultTagHelperOptimizationPassTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/DefaultTagHelperOptimizationPassTest.cs new file mode 100644 index 0000000000..7321c473cb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/DefaultTagHelperOptimizationPassTest.cs @@ -0,0 +1,128 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Extensions +{ + public class DefaultTagHelperOptimizationPassTest + { + [Fact] + public void DefaultTagHelperOptimizationPass_Execute_ReplacesChildren() + { + // Arrange + var codeDocument = CreateDocument(@" +@addTagHelper TestTagHelper, TestAssembly +

"); + + var tagHelpers = new[] + { + TagHelperDescriptorBuilder.Create("TestTagHelper", "TestAssembly") + .TypeName("TestTagHelper") + .BoundAttributeDescriptor(attribute => attribute + .Name("Foo") + .TypeName("System.Int32") + .PropertyName("FooProp")) + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")) + .Build() + }; + + var engine = CreateEngine(tagHelpers); + var pass = new DefaultTagHelperOptimizationPass() + { + Engine = engine + }; + + var irDocument = CreateIRDocument(engine, codeDocument); + + // Act + pass.Execute(codeDocument, irDocument); + + // Assert + var @class = irDocument.FindPrimaryClass(); + Assert.IsType(@class.Children[0]); + + var fieldDeclaration = Assert.IsType(@class.Children[1]); + Assert.Equal(bool.TrueString, fieldDeclaration.Annotations[CommonAnnotations.DefaultTagHelperExtension.TagHelperField]); + Assert.Equal("__TestTagHelper", fieldDeclaration.FieldName); + Assert.Equal("global::TestTagHelper", fieldDeclaration.FieldType); + Assert.Equal("private", fieldDeclaration.Modifiers.First()); + + var tagHelper = FindTagHelperNode(irDocument); + Assert.Equal(5, tagHelper.Children.Count); + + var body = Assert.IsType(tagHelper.Children[0]); + Assert.Equal("p", body.TagName); + Assert.Equal(TagMode.StartTagAndEndTag, body.TagMode); + + var create = Assert.IsType(tagHelper.Children[1]); + Assert.Equal("__TestTagHelper", create.FieldName); + Assert.Equal("TestTagHelper", create.TypeName); + Assert.Equal(tagHelpers[0], create.TagHelper, TagHelperDescriptorComparer.CaseSensitive); + + var property = Assert.IsType(tagHelper.Children[2]); + Assert.Equal("foo", property.AttributeName); + Assert.Equal(AttributeStructure.DoubleQuotes, property.AttributeStructure); + Assert.Equal(tagHelpers[0].BoundAttributes[0], property.BoundAttribute, BoundAttributeDescriptorComparer.CaseSensitive); + Assert.Equal("__TestTagHelper", property.FieldName); + Assert.False(property.IsIndexerNameMatch); + Assert.Equal("FooProp", property.PropertyName); + Assert.Equal(tagHelpers[0], property.TagHelper, TagHelperDescriptorComparer.CaseSensitive); + + var htmlAttribute = Assert.IsType(tagHelper.Children[3]); + Assert.Equal("attr", htmlAttribute.AttributeName); + Assert.Equal(AttributeStructure.DoubleQuotes, htmlAttribute.AttributeStructure); + + Assert.IsType(tagHelper.Children[4]); + } + + private RazorCodeDocument CreateDocument(string content) + { + var source = RazorSourceDocument.Create(content, "test.cshtml"); + return RazorCodeDocument.Create(source); + } + + private RazorEngine CreateEngine(params TagHelperDescriptor[] tagHelpers) + { + return RazorProjectEngine.Create(b => + { + b.Features.Add(new TestTagHelperFeature(tagHelpers)); + }).Engine; + } + + private DocumentIntermediateNode CreateIRDocument(RazorEngine engine, RazorCodeDocument codeDocument) + { + for (var i = 0; i < engine.Phases.Count; i++) + { + var phase = engine.Phases[i]; + phase.Execute(codeDocument); + + if (phase is IRazorDirectiveClassifierPhase) + { + break; + } + } + + return codeDocument.GetDocumentIntermediateNode(); + } + + private TagHelperIntermediateNode FindTagHelperNode(IntermediateNode node) + { + var visitor = new TagHelperNodeVisitor(); + visitor.Visit(node); + return visitor.Node; + } + + private class TagHelperNodeVisitor : IntermediateNodeWalker + { + public TagHelperIntermediateNode Node { get; set; } + + public override void VisitTagHelper(TagHelperIntermediateNode node) + { + Node = node; + } + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/DefaultTagHelperTargetExtensionTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/DefaultTagHelperTargetExtensionTest.cs new file mode 100644 index 0000000000..f8d21edfca --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/DefaultTagHelperTargetExtensionTest.cs @@ -0,0 +1,1239 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.CodeGeneration; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Extensions +{ + public class DefaultTagHelperTargetExtensionTest : RazorProjectEngineTestBase + { + protected override RazorLanguageVersion Version => RazorLanguageVersion.Latest; + + private static readonly TagHelperDescriptor StringPropertyTagHelper = CreateTagHelperDescriptor( + tagName: "input", + typeName: "InputTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("bound") + .PropertyName("StringProp") + .TypeName("System.String"), + }); + + private static readonly TagHelperDescriptor IntPropertyTagHelper = CreateTagHelperDescriptor( + tagName: "input", + typeName: "InputTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("bound") + .PropertyName("IntProp") + .TypeName("System.Int32"), + }); + + private static readonly TagHelperDescriptor StringIndexerTagHelper = CreateTagHelperDescriptor( + tagName: "input", + typeName: "InputTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("bound") + .PropertyName("StringIndexer") + .TypeName("System.Collections.Generic.Dictionary") + .AsDictionary("foo-", "System.String"), + }); + + private static readonly TagHelperDescriptor IntIndexerTagHelper = CreateTagHelperDescriptor( + tagName: "input", + typeName: "InputTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("bound") + .PropertyName("IntIndexer") + .TypeName("System.Collections.Generic.Dictionary") + .AsDictionary("foo-", "System.Int32"), + }); + + private static readonly SourceSpan Span = new SourceSpan("test.cshtml", 15, 2, 5, 2); + + [Fact] + public void WriteTagHelperBody_DesignTime_WritesChildren() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperBodyIntermediateNode() + { + Children = + { + new CSharpExpressionIntermediateNode(), + } + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperBody(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"Render Children +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperBody_Runtime_RendersCorrectly_UsesTagNameAndModeFromContext() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperBodyIntermediateNode() + { + Children = + { + new CSharpExpressionIntermediateNode(), + }, + TagMode = TagMode.SelfClosing, + TagName = "p", + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperBody(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"__tagHelperExecutionContext = __tagHelperScopeManager.Begin(""p"", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, ""test"", async() => { + Render Children +} +); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperCreate_DesignTime_RendersCorrectly_UsesSpecifiedTagHelperType() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperCreateIntermediateNode() + { + FieldName = "__TestNamespace_MyTagHelper", + TypeName = "TestNamespace.MyTagHelper", + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperCreate(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"__TestNamespace_MyTagHelper = CreateTagHelper(); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperCreate_Runtime_RendersCorrectly_UsesSpecifiedTagHelperType() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperCreateIntermediateNode() + { + FieldName = "__TestNamespace_MyTagHelper", + TypeName = "TestNamespace.MyTagHelper", + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperCreate(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"__TestNamespace_MyTagHelper = CreateTagHelper(); +__tagHelperExecutionContext.Add(__TestNamespace_MyTagHelper); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperExecute_DesignTime_WritesNothing() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperExecuteIntermediateNode(); + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperExecute(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( + @"", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperExecute_Runtime_RendersCorrectly() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperExecuteIntermediateNode(); + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperExecute(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); +if (!__tagHelperExecutionContext.Output.IsContentModified) +{ + await __tagHelperExecutionContext.SetOutputContentAsync(); +} +Write(__tagHelperExecutionContext.Output); +__tagHelperExecutionContext = __tagHelperScopeManager.End(); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperHtmlAttribute_DesignTime_WritesNothing() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperHtmlAttributeIntermediateNode() + { + AttributeName = "name", + AttributeStructure = AttributeStructure.DoubleQuotes, + Children = + { + new HtmlAttributeValueIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.Html, Content = "Blah-" } } + }, + new CSharpCodeAttributeValueIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.CSharp, Content = "\"Foo\"", } }, + } + } + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperHtmlAttribute(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"Render Children +Render Children +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperHtmlAttribute_Runtime_SimpleAttribute_RendersCorrectly() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperHtmlAttributeIntermediateNode() + { + AttributeName = "name", + AttributeStructure = AttributeStructure.DoubleQuotes, + Children = + { + new HtmlAttributeIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.Html, Content = "\"value\"", } }, + } + } + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperHtmlAttribute(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"BeginWriteTagHelperAttribute(); +Render Children +__tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); +__tagHelperExecutionContext.AddHtmlAttribute(""name"", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperHtmlAttribute_Runtime_DynamicAttribute_RendersCorrectly() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperHtmlAttributeIntermediateNode() + { + AttributeName = "name", + AttributeStructure = AttributeStructure.DoubleQuotes, + Children = + { + new HtmlAttributeValueIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.Html, Content = "Blah-" } } + }, + new CSharpCodeAttributeValueIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.CSharp, Content = "\"Foo\"", } }, + } + } + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperHtmlAttribute(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"BeginAddHtmlAttributeValues(__tagHelperExecutionContext, ""name"", 2, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); +Render Children +Render Children +EndAddHtmlAttributeValues(__tagHelperExecutionContext); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void RenderTagHelperAttributeInline_NonString_StatementInAttribute_Errors() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + var node = new DefaultTagHelperPropertyIntermediateNode() + { + BoundAttribute = IntPropertyTagHelper.BoundAttributes.Single(), + IsIndexerNameMatch = false, + }; + var expectedLocation = new SourceSpan(100, 10); + var expectedDiagnostic = RazorDiagnosticFactory.CreateTagHelper_CodeBlocksNotSupportedInAttributes(expectedLocation); + + // Act + extension.RenderTagHelperAttributeInline(context, node, new CSharpCodeIntermediateNode(), expectedLocation); + + // Assert + var diagnostic = Assert.Single(context.Diagnostics); + Assert.Equal(expectedDiagnostic, diagnostic); + } + + [Fact] + public void RenderTagHelperAttributeInline_NonStringIndexerMatch_TemplateInAttribute_Errors() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + var node = new DefaultTagHelperPropertyIntermediateNode() + { + BoundAttribute = IntIndexerTagHelper.BoundAttributes.Single(), + IsIndexerNameMatch = true, + }; + var expectedLocation = new SourceSpan(100, 10); + var expectedDiagnostic = RazorDiagnosticFactory.CreateTagHelper_InlineMarkupBlocksNotSupportedInAttributes(expectedLocation, "System.Int32"); + + // Act + extension.RenderTagHelperAttributeInline(context, node, new TemplateIntermediateNode(), expectedLocation); + + // Assert + var diagnostic = Assert.Single(context.Diagnostics); + Assert.Equal(expectedDiagnostic, diagnostic); + } + + [Fact] + public void RenderTagHelperAttributeInline_NonString_TemplateInAttribute_Errors() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + var node = new DefaultTagHelperPropertyIntermediateNode() + { + BoundAttribute = IntIndexerTagHelper.BoundAttributes.Single(), + IsIndexerNameMatch = false, + }; + var expectedLocation = new SourceSpan(100, 10); + var expectedDiagnostic = RazorDiagnosticFactory.CreateTagHelper_InlineMarkupBlocksNotSupportedInAttributes( + expectedLocation, + "System.Collections.Generic.Dictionary"); + + // Act + extension.RenderTagHelperAttributeInline(context, node, new TemplateIntermediateNode(), expectedLocation); + + // Assert + var diagnostic = Assert.Single(context.Diagnostics); + Assert.Equal(expectedDiagnostic, diagnostic); + } + + [Fact] + public void WriteTagHelperProperty_DesignTime_StringProperty_HtmlContent_RendersCorrectly() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperPropertyIntermediateNode() + { + AttributeName = "bound", + AttributeStructure = AttributeStructure.DoubleQuotes, + BoundAttribute = StringPropertyTagHelper.BoundAttributes.Single(), + FieldName = "__InputTagHelper", + IsIndexerNameMatch = false, + PropertyName = "StringProp", + TagHelper = StringPropertyTagHelper, + Children = + { + new HtmlContentIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.Html, Content = "value", } }, + } + } + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperProperty(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"Render Children +__InputTagHelper.StringProp = ""value""; +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] // We don't actually assign the expression result at design time, we just use string.Empty as a placeholder. + public void WriteTagHelperProperty_DesignTime_StringProperty_NonHtmlContent_RendersCorrectly() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperPropertyIntermediateNode() + { + AttributeName = "bound", + AttributeStructure = AttributeStructure.DoubleQuotes, + BoundAttribute = StringPropertyTagHelper.BoundAttributes.Single(), + FieldName = "__InputTagHelper", + IsIndexerNameMatch = false, + PropertyName = "StringProp", + TagHelper = StringPropertyTagHelper, + Children = + { + new CSharpExpressionIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.CSharp, Content = "\"3+5\"", } }, + } + } + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperProperty(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"Render Children +__InputTagHelper.StringProp = string.Empty; +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperProperty_DesignTime_NonStringProperty_RendersCorrectly() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperPropertyIntermediateNode() + { + AttributeName = "bound", + AttributeStructure = AttributeStructure.DoubleQuotes, + BoundAttribute = IntPropertyTagHelper.BoundAttributes.Single(), + FieldName = "__InputTagHelper", + IsIndexerNameMatch = false, + PropertyName = "IntProp", + TagHelper = IntPropertyTagHelper, + Source = Span, + Children = + { + new CSharpExpressionIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.CSharp, Content = "32", } }, + } + } + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperProperty(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 3 ""test.cshtml"" +__InputTagHelper.IntProp = 32; + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + // If a value is bound to multiple tag helpers, we want to make sure to only render the first + // occurrence of the expression due to side-effects. + [Fact] + public void WriteTagHelperProperty_DesignTime_NonStringProperty_SecondUseOfAttribute() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node1 = new DefaultTagHelperPropertyIntermediateNode() + { + // We only look at the attribute name here. + AttributeName = "bound", + FieldName = "__OtherTagHelper", + PropertyName = "IntProp", + }; + var node2 = new DefaultTagHelperPropertyIntermediateNode() + { + AttributeName = "bound", + AttributeStructure = AttributeStructure.DoubleQuotes, + BoundAttribute = IntPropertyTagHelper.BoundAttributes.Single(), + FieldName = "__InputTagHelper", + IsIndexerNameMatch = false, + PropertyName = "IntProp", + TagHelper = IntPropertyTagHelper, + Source = Span, + }; + tagHelperNode.Children.Add(node1); + tagHelperNode.Children.Add(node2); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperProperty(context, node2); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"__InputTagHelper.IntProp = __OtherTagHelper.IntProp; +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperProperty_DesignTime_NonStringProperty_RendersCorrectly_WithoutLocation() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperPropertyIntermediateNode() + { + AttributeName = "bound", + AttributeStructure = AttributeStructure.DoubleQuotes, + BoundAttribute = IntPropertyTagHelper.BoundAttributes.Single(), + FieldName = "__InputTagHelper", + IsIndexerNameMatch = false, + PropertyName = "IntProp", + TagHelper = IntPropertyTagHelper, + Children = + { + new CSharpExpressionIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.CSharp, Content = "32", } }, + } + } + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperProperty(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"__InputTagHelper.IntProp = 32; +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperProperty_DesignTime_NonStringIndexer_RendersCorrectly() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperPropertyIntermediateNode() + { + AttributeName = "foo-bound", + AttributeStructure = AttributeStructure.DoubleQuotes, + BoundAttribute = IntIndexerTagHelper.BoundAttributes.Single(), + FieldName = "__InputTagHelper", + IsIndexerNameMatch = true, + PropertyName = "IntIndexer", + TagHelper = IntIndexerTagHelper, + Source = Span, + Children = + { + new CSharpExpressionIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.CSharp, Content = "32", } }, + } + } + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperProperty(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 3 ""test.cshtml"" +__InputTagHelper.IntIndexer[""bound""] = 32; + +#line default +#line hidden +#nullable disable +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperProperty_DesignTime_NonStringIndexer_RendersCorrectly_WithoutLocation() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperPropertyIntermediateNode() + { + AttributeName = "foo-bound", + AttributeStructure = AttributeStructure.DoubleQuotes, + BoundAttribute = IntIndexerTagHelper.BoundAttributes.Single(), + FieldName = "__InputTagHelper", + IsIndexerNameMatch = true, + PropertyName = "IntIndexer", + TagHelper = IntIndexerTagHelper, + Children = + { + new CSharpExpressionIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.CSharp, Content = "32", } }, + } + } + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperProperty(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"__InputTagHelper.IntIndexer[""bound""] = 32; +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperProperty_Runtime_StringProperty_HtmlContent_RendersCorrectly() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperPropertyIntermediateNode() + { + AttributeName = "bound", + AttributeStructure = AttributeStructure.DoubleQuotes, + BoundAttribute = StringPropertyTagHelper.BoundAttributes.Single(), + FieldName = "__InputTagHelper", + IsIndexerNameMatch = false, + PropertyName = "StringProp", + TagHelper = StringPropertyTagHelper, + Children = + { + new HtmlContentIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.Html, Content = "\"value\"", } }, + } + } + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperProperty(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + + // The attribute value is not rendered inline because we are not using the preallocated writer. + Assert.Equal( +@"BeginWriteTagHelperAttribute(); +Render Children +__tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); +__InputTagHelper.StringProp = __tagHelperStringValueBuffer; +__tagHelperExecutionContext.AddTagHelperAttribute(""bound"", __InputTagHelper.StringProp, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperProperty_Runtime_NonStringProperty_RendersCorrectly() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperPropertyIntermediateNode() + { + AttributeName = "bound", + AttributeStructure = AttributeStructure.DoubleQuotes, + BoundAttribute = IntPropertyTagHelper.BoundAttributes.Single(), + FieldName = "__InputTagHelper", + IsIndexerNameMatch = false, + PropertyName = "IntProp", + TagHelper = IntPropertyTagHelper, + Source = Span, + Children = + { + new CSharpExpressionIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.CSharp, Content = "32", } }, + } + }, + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperProperty(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 3 ""test.cshtml"" +__InputTagHelper.IntProp = 32; + +#line default +#line hidden +#nullable disable +__tagHelperExecutionContext.AddTagHelperAttribute(""bound"", __InputTagHelper.IntProp, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); +", + csharp, + ignoreLineEndingDifferences: true); + } + + // If a value is bound to multiple tag helpers, we want to make sure to only render the first + // occurrence of the expression due to side-effects. + [Fact] + public void WriteTagHelperProperty_Runtime_NonStringProperty_SecondUseOfAttribute() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node1 = new DefaultTagHelperPropertyIntermediateNode() + { + // We only look at the attribute name here. + AttributeName = "bound", + FieldName = "__OtherTagHelper", + PropertyName = "IntProp", + }; + var node2 = new DefaultTagHelperPropertyIntermediateNode() + { + AttributeName = "bound", + AttributeStructure = AttributeStructure.DoubleQuotes, + BoundAttribute = IntPropertyTagHelper.BoundAttributes.Single(), + FieldName = "__InputTagHelper", + IsIndexerNameMatch = false, + PropertyName = "IntProp", + TagHelper = IntPropertyTagHelper, + Source = Span, + }; + tagHelperNode.Children.Add(node1); + tagHelperNode.Children.Add(node2); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperProperty(context, node2); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"__InputTagHelper.IntProp = __OtherTagHelper.IntProp; +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperProperty_Runtime_NonStringProperty_RendersCorrectly_WithoutLocation() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperPropertyIntermediateNode() + { + AttributeName = "bound", + AttributeStructure = AttributeStructure.DoubleQuotes, + BoundAttribute = IntPropertyTagHelper.BoundAttributes.Single(), + FieldName = "__InputTagHelper", + IsIndexerNameMatch = false, + PropertyName = "IntProp", + TagHelper = IntPropertyTagHelper, + Children = + { + new CSharpExpressionIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.CSharp, Content = "32", } }, + } + } + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperProperty(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"__InputTagHelper.IntProp = 32; +__tagHelperExecutionContext.AddTagHelperAttribute(""bound"", __InputTagHelper.IntProp, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperProperty_Runtime_NonStringIndexer_RendersCorrectly() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperPropertyIntermediateNode() + { + AttributeName = "foo-bound", + AttributeStructure = AttributeStructure.DoubleQuotes, + BoundAttribute = IntIndexerTagHelper.BoundAttributes.Single(), + FieldName = "__InputTagHelper", + IsIndexerNameMatch = true, + PropertyName = "IntIndexer", + TagHelper = IntIndexerTagHelper, + Source = Span, + Children = + { + new CSharpExpressionIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.CSharp, Content = "32", } }, + } + } + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperProperty(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"if (__InputTagHelper.IntIndexer == null) +{ + throw new InvalidOperationException(InvalidTagHelperIndexerAssignment(""foo-bound"", ""InputTagHelper"", ""IntIndexer"")); +} +#nullable restore +#line 3 ""test.cshtml"" +__InputTagHelper.IntIndexer[""bound""] = 32; + +#line default +#line hidden +#nullable disable +__tagHelperExecutionContext.AddTagHelperAttribute(""foo-bound"", __InputTagHelper.IntIndexer[""bound""], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] // We should only emit the validation code for the first use of an indexer property. + public void WriteTagHelperProperty_Runtime_NonStringIndexer_MultipleValues() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node1 = new DefaultTagHelperPropertyIntermediateNode() + { + AttributeName = "foo-first", + AttributeStructure = AttributeStructure.DoubleQuotes, + BoundAttribute = IntIndexerTagHelper.BoundAttributes.Single(), + FieldName = "__InputTagHelper", + IsIndexerNameMatch = true, + PropertyName = "IntIndexer", + TagHelper = IntIndexerTagHelper, + Source = Span, + Children = + { + new CSharpExpressionIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.CSharp, Content = "17", } }, + } + } + }; + var node2 = new DefaultTagHelperPropertyIntermediateNode() + { + AttributeName = "foo-bound", + AttributeStructure = AttributeStructure.DoubleQuotes, + BoundAttribute = IntIndexerTagHelper.BoundAttributes.Single(), + FieldName = "__InputTagHelper", + IsIndexerNameMatch = true, + PropertyName = "IntIndexer", + TagHelper = IntIndexerTagHelper, + Source = Span, + Children = + { + new CSharpExpressionIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.CSharp, Content = "32", } }, + } + } + }; + tagHelperNode.Children.Add(node1); + tagHelperNode.Children.Add(node2); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperProperty(context, node2); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@" +#nullable restore +#line 3 ""test.cshtml"" +__InputTagHelper.IntIndexer[""bound""] = 32; + +#line default +#line hidden +#nullable disable +__tagHelperExecutionContext.AddTagHelperAttribute(""foo-bound"", __InputTagHelper.IntIndexer[""bound""], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperProperty_Runtime_NonStringIndexer_RendersCorrectly_WithoutLocation() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new DefaultTagHelperPropertyIntermediateNode() + { + AttributeName = "foo-bound", + AttributeStructure = AttributeStructure.DoubleQuotes, + BoundAttribute = IntIndexerTagHelper.BoundAttributes.Single(), + FieldName = "__InputTagHelper", + IsIndexerNameMatch = true, + PropertyName = "IntIndexer", + TagHelper = IntIndexerTagHelper, + Children = + { + new CSharpExpressionIntermediateNode() + { + Children = { new IntermediateToken { Kind = TokenKind.CSharp, Content = "32", } }, + } + } + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperProperty(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"if (__InputTagHelper.IntIndexer == null) +{ + throw new InvalidOperationException(InvalidTagHelperIndexerAssignment(""foo-bound"", ""InputTagHelper"", ""IntIndexer"")); +} +__InputTagHelper.IntIndexer[""bound""] = 32; +__tagHelperExecutionContext.AddTagHelperAttribute(""foo-bound"", __InputTagHelper.IntIndexer[""bound""], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperRuntime_DesignTime_WritesNothing() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var node = new DefaultTagHelperRuntimeIntermediateNode(); + + // Act + extension.WriteTagHelperRuntime(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( + @"", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperRuntime_Runtime_DeclaresRequiredFields() + { + // Arrange + var extension = new DefaultTagHelperTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new DefaultTagHelperRuntimeIntermediateNode(); + + // Act + extension.WriteTagHelperRuntime(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"#line hidden +#pragma warning disable 0169 +private string __tagHelperStringValueBuffer; +#pragma warning restore 0169 +private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; +private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); +private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; +private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager +{ + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } +} +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void GetDeterministicId_IsDeterministic() + { + // Arrange + var context = TestCodeRenderingContext.CreateRuntime(suppressUniqueIds: null); + + // Act + var firstId = DefaultTagHelperTargetExtension.GetDeterministicId(context); + var secondId = DefaultTagHelperTargetExtension.GetDeterministicId(context); + + // Assert + Assert.Equal(firstId, secondId); + } + + private static void Push(CodeRenderingContext context, TagHelperIntermediateNode node) + { + ((DefaultCodeRenderingContext)context).AncestorsInternal.Push(node); + } + + private DocumentIntermediateNode Lower(RazorCodeDocument codeDocument) + { + var projectEngine = CreateProjectEngine(); + return Lower(codeDocument, projectEngine); + } + + private DocumentIntermediateNode LowerDesignTime(RazorCodeDocument codeDocument) + { + var projectEngine = RazorProjectEngine.Create(b => + { + b.Features.Add(new DesignTimeOptionsFeature(designTime: true)); + }); + + return Lower(codeDocument, projectEngine); + } + + private static DocumentIntermediateNode Lower(RazorCodeDocument codeDocument, RazorProjectEngine engine) + { + for (var i = 0; i < engine.Phases.Count; i++) + { + var phase = engine.Phases[i]; + phase.Execute(codeDocument); + + if (phase is IRazorIntermediateNodeLoweringPhase) + { + break; + } + } + + var irDocument = codeDocument.GetDocumentIntermediateNode(); + Assert.NotNull(irDocument); + + return irDocument; + } + + private static TagHelperDescriptor CreateTagHelperDescriptor( + string tagName, + string typeName, + string assemblyName, + IEnumerable> attributes = null) + { + var builder = TagHelperDescriptorBuilder.Create(typeName, assemblyName); + builder.TypeName(typeName); + + if (attributes != null) + { + foreach (var attributeBuilder in attributes) + { + builder.BindAttribute(attributeBuilder); + } + } + + builder.TagMatchingRule(ruleBuilder => ruleBuilder.RequireTagName(tagName)); + + var descriptor = builder.Build(); + + return descriptor; + } + + private class DesignTimeOptionsFeature : IConfigureRazorParserOptionsFeature, IConfigureRazorCodeGenerationOptionsFeature + { + private bool _designTime; + + public DesignTimeOptionsFeature(bool designTime) + { + _designTime = designTime; + } + + public int Order { get; } + + public RazorEngine Engine { get; set; } + + public void Configure(RazorParserOptionsBuilder options) + { + options.SetDesignTime(_designTime); + } + + public void Configure(RazorCodeGenerationOptionsBuilder options) + { + options.SetDesignTime(_designTime); + } + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/DesignTimeDirectiveTargetExtensionTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/DesignTimeDirectiveTargetExtensionTest.cs new file mode 100644 index 0000000000..9dd60c6a4d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/DesignTimeDirectiveTargetExtensionTest.cs @@ -0,0 +1,247 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Microsoft.AspNetCore.Razor.Language.CodeGeneration; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Extensions +{ + public class DesignTimeDirectiveTargetExtensionTest + { + [Fact] + public void WriteDesignTimeDirective_NoChildren_WritesEmptyMethod_WithPragma() + { + // Arrange + var extension = new DesignTimeDirectiveTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var node = new DesignTimeDirectiveIntermediateNode(); + + // Act + extension.WriteDesignTimeDirective(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"#pragma warning disable 219 +private void __RazorDirectiveTokenHelpers__() { +} +#pragma warning restore 219 +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteDesignTimeDirective_WithTypeToken_WritesLambda() + { + // Arrange + var extension = new DesignTimeDirectiveTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var node = new DesignTimeDirectiveIntermediateNode(); + var token = new DirectiveTokenIntermediateNode() + { + Source = new SourceSpan("test.cshtml", 0, 0, 0, 5), + Content = "System.String", + DirectiveToken = DirectiveTokenDescriptor.CreateToken(DirectiveTokenKind.Type), + }; + node.Children.Add(token); + + // Act + extension.WriteDesignTimeDirective(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"#pragma warning disable 219 +private void __RazorDirectiveTokenHelpers__() { +((System.Action)(() => { +#nullable restore +#line 1 ""test.cshtml"" +System.String __typeHelper = default(System.String); + +#line default +#line hidden +#nullable disable +} +))(); +} +#pragma warning restore 219 +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteDesignTimeDirective_WithNamespaceToken_WritesLambda() + { + // Arrange + var extension = new DesignTimeDirectiveTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var node = new DesignTimeDirectiveIntermediateNode(); + var token = new DirectiveTokenIntermediateNode() + { + Source = new SourceSpan("test.cshtml", 0, 0, 0, 5), + Content = "System.Collections.Generic", + DirectiveToken = DirectiveTokenDescriptor.CreateToken(DirectiveTokenKind.Namespace), + }; + node.Children.Add(token); + + // Act + extension.WriteDesignTimeDirective(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"#pragma warning disable 219 +private void __RazorDirectiveTokenHelpers__() { +((System.Action)(() => { +#nullable restore +#line 1 ""test.cshtml"" +global::System.Object __typeHelper = nameof(System.Collections.Generic); + +#line default +#line hidden +#nullable disable +} +))(); +} +#pragma warning restore 219 +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteDesignTimeDirective_WithMemberToken_WritesLambda() + { + // Arrange + var extension = new DesignTimeDirectiveTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var node = new DesignTimeDirectiveIntermediateNode(); + var token = new DirectiveTokenIntermediateNode() + { + Source = new SourceSpan("test.cshtml", 0, 0, 0, 5), + Content = "Foo", + DirectiveToken = DirectiveTokenDescriptor.CreateToken(DirectiveTokenKind.Member), + }; + node.Children.Add(token); + + // Act + extension.WriteDesignTimeDirective(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"#pragma warning disable 219 +private void __RazorDirectiveTokenHelpers__() { +((System.Action)(() => { +#nullable restore +#line 1 ""test.cshtml"" +global::System.Object Foo = null; + +#line default +#line hidden +#nullable disable +} +))(); +} +#pragma warning restore 219 +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteDesignTimeDirective_WithStringToken_WritesLambda() + { + // Arrange + var extension = new DesignTimeDirectiveTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var node = new DesignTimeDirectiveIntermediateNode(); + var token = new DirectiveTokenIntermediateNode() + { + Source = new SourceSpan("test.cshtml", 0, 0, 0, 5), + Content = "Value", + DirectiveToken = DirectiveTokenDescriptor.CreateToken(DirectiveTokenKind.String), + }; + var tokenWithQuotedContent = new DirectiveTokenIntermediateNode() + { + Source = new SourceSpan("test.cshtml", 0, 0, 0, 5), + Content = "\"Value\"", + DirectiveToken = DirectiveTokenDescriptor.CreateToken(DirectiveTokenKind.String), + }; + node.Children.Add(token); + node.Children.Add(tokenWithQuotedContent); + + // Act + extension.WriteDesignTimeDirective(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"#pragma warning disable 219 +private void __RazorDirectiveTokenHelpers__() { +((System.Action)(() => { +#nullable restore +#line 1 ""test.cshtml"" +global::System.Object __typeHelper = ""Value""; + +#line default +#line hidden +#nullable disable +} +))(); +((System.Action)(() => { +#nullable restore +#line 1 ""test.cshtml"" +global::System.Object __typeHelper = ""Value""; + +#line default +#line hidden +#nullable disable +} +))(); +} +#pragma warning restore 219 +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteDesignTimeDirective_ChildrenWithNoSource_WritesEmptyMethod_WithPragma() + { + // Arrange + var extension = new DesignTimeDirectiveTargetExtension(); + var context = TestCodeRenderingContext.CreateDesignTime(); + + var node = new DesignTimeDirectiveIntermediateNode(); + var token = new DirectiveTokenIntermediateNode() + { + Content = "Value", + DirectiveToken = DirectiveTokenDescriptor.CreateToken(DirectiveTokenKind.String), + }; + node.Children.Add(token); + + // Act + extension.WriteDesignTimeDirective(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"#pragma warning disable 219 +private void __RazorDirectiveTokenHelpers__() { +} +#pragma warning restore 219 +", + csharp, + ignoreLineEndingDifferences: true); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/FunctionsDirectivePassTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/FunctionsDirectivePassTest.cs new file mode 100644 index 0000000000..712766a5f1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/FunctionsDirectivePassTest.cs @@ -0,0 +1,98 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; +using static Microsoft.AspNetCore.Razor.Language.Intermediate.IntermediateNodeAssert; + +namespace Microsoft.AspNetCore.Razor.Language.Extensions +{ + public class FunctionsDirectivePassTest : RazorProjectEngineTestBase + { + protected override RazorLanguageVersion Version => RazorLanguageVersion.Latest; + + [Fact] + public void Execute_SkipsDocumentWithNoClassNode() + { + // Arrange + var projectEngine = CreateProjectEngine(); + var pass = new FunctionsDirectivePass() + { + Engine = projectEngine.Engine, + }; + + var sourceDocument = TestRazorSourceDocument.Create("@functions { var value = true; }"); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var irDocument = new DocumentIntermediateNode(); + irDocument.Children.Add(new DirectiveIntermediateNode() { Directive = FunctionsDirective.Directive, }); + + // Act + pass.Execute(codeDocument, irDocument); + + // Assert + Children( + irDocument, + node => Assert.IsType(node)); + } + + [Fact] + public void Execute_AddsStatementsToClassLevel() + { + // Arrange + var projectEngine = CreateProjectEngine(); + var pass = new FunctionsDirectivePass() + { + Engine = projectEngine.Engine, + }; + + var sourceDocument = TestRazorSourceDocument.Create("@functions { var value = true; }"); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var irDocument = Lower(codeDocument, projectEngine); + + // Act + pass.Execute(codeDocument, irDocument); + + // Assert + Children( + irDocument, + node => Assert.IsType(node)); + + var @namespace = irDocument.Children[0]; + Children( + @namespace, + node => Assert.IsType(node)); + + var @class = @namespace.Children[0]; + Children( + @class, + node => Assert.IsType(node), + node => CSharpCode(" var value = true; ", node)); + + var method = @class.Children[0]; + Children( + method, + node => Assert.IsType(node)); + } + + private static DocumentIntermediateNode Lower(RazorCodeDocument codeDocument, RazorProjectEngine projectEngine) + { + for (var i = 0; i < projectEngine.Phases.Count; i++) + { + var phase = projectEngine.Phases[i]; + phase.Execute(codeDocument); + + if (phase is IRazorDocumentClassifierPhase) + { + break; + } + } + + var irDocument = codeDocument.GetDocumentIntermediateNode(); + Assert.NotNull(irDocument); + + return irDocument; + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/InheritsDirectivePassTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/InheritsDirectivePassTest.cs new file mode 100644 index 0000000000..e851990b80 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/InheritsDirectivePassTest.cs @@ -0,0 +1,91 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; +using static Microsoft.AspNetCore.Razor.Language.Intermediate.IntermediateNodeAssert; + +namespace Microsoft.AspNetCore.Razor.Language.Extensions +{ + public class InheritsDirectivePassTest : RazorProjectEngineTestBase + { + protected override RazorLanguageVersion Version => RazorLanguageVersion.Latest; + + [Fact] + public void Execute_SkipsDocumentWithNoClassNode() + { + // Arrange + var engine = CreateEngine(); + var pass = new InheritsDirectivePass() + { + Engine = engine, + }; + + var sourceDocument = TestRazorSourceDocument.Create("@inherits Hello"); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var irDocument = new DocumentIntermediateNode(); + irDocument.Children.Add(new DirectiveIntermediateNode() { Directive = FunctionsDirective.Directive, }); + + // Act + pass.Execute(codeDocument, irDocument); + + // Assert + Children( + irDocument, + node => Assert.IsType(node)); + } + + [Fact] + public void Execute_Inherits_SetsClassDeclarationBaseType() + { + // Arrange + var engine = CreateEngine(); + var pass = new InheritsDirectivePass() + { + Engine = engine, + }; + + var content = "@inherits Hello"; + var sourceDocument = TestRazorSourceDocument.Create(content); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var irDocument = Lower(codeDocument, engine); + + // Act + pass.Execute(codeDocument, irDocument); + + // Assert + Children( + irDocument, + node => Assert.IsType(node)); + + var @namespace = irDocument.Children[0]; + Children( + @namespace, + node => Assert.IsType(node)); + + var @class = (ClassDeclarationIntermediateNode)@namespace.Children[0]; + Assert.Equal("Hello", @class.BaseType); + } + + private static DocumentIntermediateNode Lower(RazorCodeDocument codeDocument, RazorEngine engine) + { + for (var i = 0; i < engine.Phases.Count; i++) + { + var phase = engine.Phases[i]; + phase.Execute(codeDocument); + + if (phase is IRazorDocumentClassifierPhase) + { + break; + } + } + + var irDocument = codeDocument.GetDocumentIntermediateNode(); + Assert.NotNull(irDocument); + + return irDocument; + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/MetadataAttributePassTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/MetadataAttributePassTest.cs new file mode 100644 index 0000000000..db50c00268 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/MetadataAttributePassTest.cs @@ -0,0 +1,392 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Components; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; +using static Microsoft.AspNetCore.Razor.Language.Intermediate.IntermediateNodeAssert; + +namespace Microsoft.AspNetCore.Razor.Language.Extensions +{ + public class MetadataAttributePassTest + { + [Fact] + public void Execute_NullCodeGenerationOptions_Noops() + { + // Arrange + var engine = CreateEngine(); + var pass = new MetadataAttributePass() + { + Engine = engine, + }; + + var sourceDocument = TestRazorSourceDocument.Create(); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var irDocument = new DocumentIntermediateNode(); + + // Act + pass.Execute(codeDocument, irDocument); + + // Assert + NoChildren(irDocument); + } + + [Fact] + public void Execute_SuppressMetadataAttributes_Noops() + { + // Arrange + var engine = CreateEngine(); + var pass = new MetadataAttributePass() + { + Engine = engine, + }; + + var sourceDocument = TestRazorSourceDocument.Create(); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var irDocument = new DocumentIntermediateNode() + { + Options = RazorCodeGenerationOptions.Create(o => + { + o.SuppressMetadataAttributes = true; + }), + }; + + // Act + pass.Execute(codeDocument, irDocument); + + // Assert + NoChildren(irDocument); + } + + [Fact] + public void Execute_ComponentDocumentKind_Noops() + { + // Arrange + var engine = CreateEngine(); + var pass = new MetadataAttributePass() + { + Engine = engine, + }; + + var sourceDocument = TestRazorSourceDocument.Create(); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var irDocument = new DocumentIntermediateNode() + { + DocumentKind = ComponentDocumentClassifierPass.ComponentDocumentKind, + Options = RazorCodeGenerationOptions.Create(o => + { + o.SuppressMetadataAttributes = true; + }), + }; + + // Act + pass.Execute(codeDocument, irDocument); + + // Assert + NoChildren(irDocument); + } + + [Fact] + public void Execute_NoNamespaceSet_Noops() + { + // Arrange + var engine = CreateEngine(); + var pass = new MetadataAttributePass() + { + Engine = engine, + }; + + var sourceDocument = TestRazorSourceDocument.Create(); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var irDocument = new DocumentIntermediateNode() + { + DocumentKind = "test", + Options = RazorCodeGenerationOptions.Create((o) => { }), + }; + var builder = IntermediateNodeBuilder.Create(irDocument); + var @namespace = new NamespaceDeclarationIntermediateNode + { + Annotations = + { + [CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace, + }, + }; + builder.Push(@namespace); + var @class = new ClassDeclarationIntermediateNode + { + Annotations = + { + [CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass, + }, + ClassName = "Test", + }; + builder.Add(@class); + + // Act + pass.Execute(codeDocument, irDocument); + + // Assert + SingleChild(irDocument); + } + + [Fact] + public void Execute_NoClassNameSet_Noops() + { + // Arrange + var engine = CreateEngine(); + var pass = new MetadataAttributePass() + { + Engine = engine, + }; + + var sourceDocument = TestRazorSourceDocument.Create(); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var irDocument = new DocumentIntermediateNode() + { + DocumentKind = "test", + Options = RazorCodeGenerationOptions.Create((o) => { }), + }; + var builder = IntermediateNodeBuilder.Create(irDocument); + var @namespace = new NamespaceDeclarationIntermediateNode + { + Annotations = + { + [CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace, + }, + Content = "Some.Namespace" + }; + builder.Push(@namespace); + var @class = new ClassDeclarationIntermediateNode + { + Annotations = + { + [CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass, + }, + }; + builder.Add(@class); + + // Act + pass.Execute(codeDocument, irDocument); + + // Assert + SingleChild(irDocument); + } + + [Fact] + public void Execute_NoDocumentKind_Noops() + { + // Arrange + var engine = CreateEngine(); + var pass = new MetadataAttributePass() + { + Engine = engine, + }; + + var sourceDocument = TestRazorSourceDocument.Create(); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var irDocument = new DocumentIntermediateNode(); + var builder = IntermediateNodeBuilder.Create(irDocument); + var @namespace = new NamespaceDeclarationIntermediateNode + { + Annotations = + { + [CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace, + }, + Content = "Some.Namespace" + }; + builder.Push(@namespace); + var @class = new ClassDeclarationIntermediateNode + { + Annotations = + { + [CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass, + }, + ClassName = "Test", + }; + builder.Add(@class); + + // Act + pass.Execute(codeDocument, irDocument); + + // Assert + SingleChild(irDocument); + } + + [Fact] + public void Execute_NoIdentifier_Noops() + { + // Arrange + var engine = CreateEngine(); + var pass = new MetadataAttributePass() + { + Engine = engine, + }; + + var sourceDocument = TestRazorSourceDocument.Create("", new RazorSourceDocumentProperties(null, null)); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var irDocument = new DocumentIntermediateNode() + { + DocumentKind = "test", + Options = RazorCodeGenerationOptions.Create((o) => { }), + }; + var builder = IntermediateNodeBuilder.Create(irDocument); + var @namespace = new NamespaceDeclarationIntermediateNode + { + Annotations = + { + [CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace, + }, + Content = "Some.Namespace" + }; + builder.Push(@namespace); + var @class = new ClassDeclarationIntermediateNode + { + Annotations = + { + [CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass, + }, + ClassName = "Test", + }; + builder.Add(@class); + + // Act + pass.Execute(codeDocument, irDocument); + + // Assert + SingleChild(irDocument); + } + + [Fact] + public void Execute_HasRequiredInfo_AddsItemAndSourceChecksum() + { + // Arrange + var engine = CreateEngine(); + var pass = new MetadataAttributePass() + { + Engine = engine, + }; + + var sourceDocument = TestRazorSourceDocument.Create("", new RazorSourceDocumentProperties(null, "Foo\\Bar.cshtml")); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var irDocument = new DocumentIntermediateNode() + { + DocumentKind = "test", + Options = RazorCodeGenerationOptions.Create((o) => { }), + }; + var builder = IntermediateNodeBuilder.Create(irDocument); + var @namespace = new NamespaceDeclarationIntermediateNode + { + Annotations = + { + [CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace, + }, + Content = "Some.Namespace" + }; + builder.Push(@namespace); + var @class = new ClassDeclarationIntermediateNode + { + Annotations = + { + [CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass, + }, + ClassName = "Test", + }; + builder.Add(@class); + + // Act + pass.Execute(codeDocument, irDocument); + + // Assert + Assert.Equal(2, irDocument.Children.Count); + + var item = Assert.IsType(irDocument.Children[0]); + Assert.Equal("/Foo/Bar.cshtml", item.Identifier); + Assert.Equal("test", item.Kind); + Assert.Equal("Some.Namespace.Test", item.TypeName); + + Assert.Equal(2, @namespace.Children.Count); + var checksum = Assert.IsType(@namespace.Children[0]); + Assert.NotNull(checksum.Checksum); // Not verifying the checksum here + Assert.Equal("SHA1", checksum.ChecksumAlgorithm); + Assert.Equal("/Foo/Bar.cshtml", checksum.Identifier); + } + + [Fact] + public void Execute_HasRequiredInfo_AndImport_AddsItemAndSourceChecksum() + { + // Arrange + var engine = CreateEngine(); + var pass = new MetadataAttributePass() + { + Engine = engine, + }; + + var sourceDocument = TestRazorSourceDocument.Create("", new RazorSourceDocumentProperties(null, "Foo\\Bar.cshtml")); + var import = TestRazorSourceDocument.Create("@using System", new RazorSourceDocumentProperties(null, "Foo\\Import.cshtml")); + var codeDocument = RazorCodeDocument.Create(sourceDocument, new[] { import, }); + + var irDocument = new DocumentIntermediateNode() + { + DocumentKind = "test", + Options = RazorCodeGenerationOptions.Create((o) => { }), + }; + var builder = IntermediateNodeBuilder.Create(irDocument); + var @namespace = new NamespaceDeclarationIntermediateNode + { + Annotations = + { + [CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace, + }, + Content = "Some.Namespace" + }; + builder.Push(@namespace); + var @class = new ClassDeclarationIntermediateNode + { + Annotations = + { + [CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass, + }, + ClassName = "Test", + }; + builder.Add(@class); + + // Act + pass.Execute(codeDocument, irDocument); + + // Assert + Assert.Equal(2, irDocument.Children.Count); + + var item = Assert.IsType(irDocument.Children[0]); + Assert.Equal("/Foo/Bar.cshtml", item.Identifier); + Assert.Equal("test", item.Kind); + Assert.Equal("Some.Namespace.Test", item.TypeName); + + Assert.Equal(3, @namespace.Children.Count); + var checksum = Assert.IsType(@namespace.Children[0]); + Assert.NotNull(checksum.Checksum); // Not verifying the checksum here + Assert.Equal("SHA1", checksum.ChecksumAlgorithm); + Assert.Equal("/Foo/Bar.cshtml", checksum.Identifier); + + checksum = Assert.IsType(@namespace.Children[1]); + Assert.NotNull(checksum.Checksum); // Not verifying the checksum here + Assert.Equal("SHA1", checksum.ChecksumAlgorithm); + Assert.Equal("/Foo/Import.cshtml", checksum.Identifier); + } + + private static RazorEngine CreateEngine() + { + return RazorProjectEngine.Create(b => + { + b.Features.Add(new DefaultMetadataIdentifierFeature()); + }).Engine; + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/MetadataAttributeTargetExtensionTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/MetadataAttributeTargetExtensionTest.cs new file mode 100644 index 0000000000..faeaf4d662 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/MetadataAttributeTargetExtensionTest.cs @@ -0,0 +1,123 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.CodeGeneration; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Extensions +{ + public class MetadataAttributeTargetExtensionTest + { + [Fact] + public void WriteRazorCompiledItemAttribute_RendersCorrectly() + { + // Arrange + var extension = new MetadataAttributeTargetExtension() + { + CompiledItemAttributeName = "global::TestItem", + }; + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new RazorCompiledItemAttributeIntermediateNode() + { + TypeName = "Foo.Bar", + Kind = "test", + Identifier = "Foo/Bar", + }; + + // Act + extension.WriteRazorCompiledItemAttribute(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"[assembly: global::TestItem(typeof(Foo.Bar), @""test"", @""Foo/Bar"")] +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteRazorSourceChecksumAttribute_RendersCorrectly() + { + // Arrange + var extension = new MetadataAttributeTargetExtension() + { + SourceChecksumAttributeName = "global::TestChecksum", + }; + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new RazorSourceChecksumAttributeIntermediateNode() + { + ChecksumAlgorithm = "SHA1", + Checksum = new byte[] { (byte)'t', (byte)'e', (byte)'s', (byte)'t', }, + Identifier = "Foo/Bar", + }; + + // Act + extension.WriteRazorSourceChecksumAttribute(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"[global::TestChecksum(@""SHA1"", @""74657374"", @""Foo/Bar"")] +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteRazorCompiledItemAttributeMetadata_RendersCorrectly() + { + // Arrange + var extension = new MetadataAttributeTargetExtension() + { + CompiledItemMetadataAttributeName = "global::TestItemMetadata", + }; + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new RazorCompiledItemMetadataAttributeIntermediateNode + { + Key = "key", + Value = "value", + }; + + // Act + extension.WriteRazorCompiledItemMetadataAttribute(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode().Trim(); + Assert.Equal( +"[global::TestItemMetadata(\"key\", \"value\")]", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteRazorCompiledItemAttributeMetadata_EscapesKeysAndValuesCorrectly() + { + // Arrange + var extension = new MetadataAttributeTargetExtension() + { + CompiledItemMetadataAttributeName = "global::TestItemMetadata", + }; + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new RazorCompiledItemMetadataAttributeIntermediateNode + { + Key = "\"test\" key", + Value = @"""test"" value", + }; + + // Act + extension.WriteRazorCompiledItemMetadataAttribute(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode().Trim(); + Assert.Equal( +"[global::TestItemMetadata(\"\\\"test\\\" key\", \"\\\"test\\\" value\")]", + csharp, + ignoreLineEndingDifferences: true); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/PreallocatedAttributeTargetExtensionTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/PreallocatedAttributeTargetExtensionTest.cs new file mode 100644 index 0000000000..da2f960847 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/PreallocatedAttributeTargetExtensionTest.cs @@ -0,0 +1,276 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.CodeGeneration; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Extensions +{ + public class PreallocatedAttributeTargetExtensionTest + { + [Fact] + public void WriteTagHelperHtmlAttributeValue_RendersCorrectly() + { + // Arrange + var extension = new PreallocatedAttributeTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new PreallocatedTagHelperHtmlAttributeValueIntermediateNode() + { + AttributeName = "Foo", + Value = "Bar", + AttributeStructure = AttributeStructure.DoubleQuotes, + VariableName = "MyProp" + }; + + // Act + extension.WriteTagHelperHtmlAttributeValue(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute MyProp = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute(""Foo"", new global::Microsoft.AspNetCore.Html.HtmlString(""Bar""), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperHtmlAttributeValue_Minimized_RendersCorrectly() + { + // Arrange + var extension = new PreallocatedAttributeTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new PreallocatedTagHelperHtmlAttributeValueIntermediateNode() + { + AttributeName = "Foo", + Value = "Bar", + AttributeStructure = AttributeStructure.Minimized, + VariableName = "_tagHelper1" + }; + + // Act + extension.WriteTagHelperHtmlAttributeValue(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute _tagHelper1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute(""Foo""); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperHtmlAttribute_RendersCorrectly() + { + // Arrange + var extension = new PreallocatedAttributeTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new PreallocatedTagHelperHtmlAttributeIntermediateNode() + { + VariableName = "_tagHelper1" + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperHtmlAttribute(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"__tagHelperExecutionContext.AddHtmlAttribute(_tagHelper1); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperPropertyValue_RendersCorrectly() + { + // Arrange + var extension = new PreallocatedAttributeTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var node = new PreallocatedTagHelperPropertyValueIntermediateNode() + { + AttributeName = "Foo", + Value = "Bar", + AttributeStructure = AttributeStructure.DoubleQuotes, + VariableName = "_tagHelper1", + }; + + // Act + extension.WriteTagHelperPropertyValue(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute _tagHelper1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute(""Foo"", ""Bar"", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteTagHelperProperty_RendersCorrectly() + { + // Arrange + var extension = new PreallocatedAttributeTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var tagHelperBuilder = new DefaultTagHelperDescriptorBuilder(TagHelperConventions.DefaultKind, "FooTagHelper", "Test"); + tagHelperBuilder.TypeName("FooTagHelper"); + + var builder = new DefaultBoundAttributeDescriptorBuilder(tagHelperBuilder, TagHelperConventions.DefaultKind); + builder + .Name("Foo") + .TypeName("System.String") + .PropertyName("FooProp"); + + var descriptor = builder.Build(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new PreallocatedTagHelperPropertyIntermediateNode() + { + AttributeName = descriptor.Name, + BoundAttribute = descriptor, + FieldName = "__FooTagHelper", + PropertyName = "FooProp", + VariableName = "_tagHelper1", + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperProperty(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"__FooTagHelper.FooProp = (string)_tagHelper1.Value; +__tagHelperExecutionContext.AddTagHelperAttribute(_tagHelper1); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteSetPreallocatedTagHelperProperty_IndexerAttribute_RendersCorrectly() + { + // Arrange + var extension = new PreallocatedAttributeTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var tagHelperBuilder = new DefaultTagHelperDescriptorBuilder(TagHelperConventions.DefaultKind, "FooTagHelper", "Test"); + tagHelperBuilder.TypeName("FooTagHelper"); + + var builder = new DefaultBoundAttributeDescriptorBuilder(tagHelperBuilder, TagHelperConventions.DefaultKind); + builder + .Name("Foo") + .TypeName("System.Collections.Generic.Dictionary") + .AsDictionaryAttribute("pre-", "System.String") + .PropertyName("FooProp"); + + var descriptor = builder.Build(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node = new PreallocatedTagHelperPropertyIntermediateNode() + { + AttributeName = "pre-Foo", + FieldName = "__FooTagHelper", + VariableName = "_tagHelper1", + BoundAttribute = descriptor, + IsIndexerNameMatch = true, + PropertyName = "FooProp", + TagHelper = tagHelperBuilder.Build(), + }; + tagHelperNode.Children.Add(node); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperProperty(context, node); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"if (__FooTagHelper.FooProp == null) +{ + throw new InvalidOperationException(InvalidTagHelperIndexerAssignment(""pre-Foo"", ""FooTagHelper"", ""FooProp"")); +} +__FooTagHelper.FooProp[""Foo""] = (string)_tagHelper1.Value; +__tagHelperExecutionContext.AddTagHelperAttribute(_tagHelper1); +", + csharp, + ignoreLineEndingDifferences: true); + } + + [Fact] + public void WriteSetPreallocatedTagHelperProperty_IndexerAttribute_MultipleValues() + { + // Arrange + var extension = new PreallocatedAttributeTargetExtension(); + var context = TestCodeRenderingContext.CreateRuntime(); + + var tagHelperBuilder = new DefaultTagHelperDescriptorBuilder(TagHelperConventions.DefaultKind, "FooTagHelper", "Test"); + tagHelperBuilder.TypeName("FooTagHelper"); + + var builder = new DefaultBoundAttributeDescriptorBuilder(tagHelperBuilder, TagHelperConventions.DefaultKind); + builder + .Name("Foo") + .TypeName("System.Collections.Generic.Dictionary") + .AsDictionaryAttribute("pre-", "System.String") + .PropertyName("FooProp"); + + var boundAttribute = builder.Build(); + var tagHelper = tagHelperBuilder.Build(); + + var tagHelperNode = new TagHelperIntermediateNode(); + var node1 = new PreallocatedTagHelperPropertyIntermediateNode() + { + AttributeName = "pre-Bar", + FieldName = "__FooTagHelper", + VariableName = "_tagHelper0s", + BoundAttribute = boundAttribute, + IsIndexerNameMatch = true, + PropertyName = "FooProp", + TagHelper = tagHelper, + }; + var node2 = new PreallocatedTagHelperPropertyIntermediateNode() + { + AttributeName = "pre-Foo", + FieldName = "__FooTagHelper", + VariableName = "_tagHelper1", + BoundAttribute = boundAttribute, + IsIndexerNameMatch = true, + PropertyName = "FooProp", + TagHelper = tagHelper, + }; + tagHelperNode.Children.Add(node1); + tagHelperNode.Children.Add(node2); + Push(context, tagHelperNode); + + // Act + extension.WriteTagHelperProperty(context, node2); + + // Assert + var csharp = context.CodeWriter.GenerateCode(); + Assert.Equal( +@"__FooTagHelper.FooProp[""Foo""] = (string)_tagHelper1.Value; +__tagHelperExecutionContext.AddTagHelperAttribute(_tagHelper1); +", + csharp, + ignoreLineEndingDifferences: true); + } + + private static void Push(CodeRenderingContext context, TagHelperIntermediateNode node) + { + ((DefaultCodeRenderingContext)context).AncestorsInternal.Push(node); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/SectionDirectivePassTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/SectionDirectivePassTest.cs new file mode 100644 index 0000000000..a2f747e7a9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/SectionDirectivePassTest.cs @@ -0,0 +1,106 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; +using static Microsoft.AspNetCore.Razor.Language.Intermediate.IntermediateNodeAssert; + +namespace Microsoft.AspNetCore.Razor.Language.Extensions +{ + public class SectionDirectivePassTest + { + [Fact] + public void Execute_SkipsDocumentWithNoClassNode() + { + // Arrange + var projectEngine = CreateProjectEngine(); + var pass = new SectionDirectivePass() + { + Engine = projectEngine.Engine, + }; + + var sourceDocument = TestRazorSourceDocument.Create("@section Header {

Hello World

}"); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var irDocument = new DocumentIntermediateNode(); + irDocument.Children.Add(new DirectiveIntermediateNode() { Directive = SectionDirective.Directive, }); + + // Act + pass.Execute(codeDocument, irDocument); + + // Assert + Children( + irDocument, + node => Assert.IsType(node)); + } + + [Fact] + public void Execute_WrapsStatementInSectionNode() + { + // Arrange + var projectEngine = CreateProjectEngine(); + var pass = new SectionDirectivePass() + { + Engine = projectEngine.Engine, + }; + + var content = "@section Header {

Hello World

}"; + var sourceDocument = TestRazorSourceDocument.Create(content); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + var irDocument = Lower(codeDocument, projectEngine); + + // Act + pass.Execute(codeDocument, irDocument); + + // Assert + Children( + irDocument, + node => Assert.IsType(node)); + + var @namespace = irDocument.Children[0]; + Children( + @namespace, + node => Assert.IsType(node)); + + var @class = @namespace.Children[0]; + var method = SingleChild(@class); + + Children( + method, + node => Assert.IsType(node), + node => Assert.IsType(node)); + + var section = method.Children[1] as SectionIntermediateNode; + Assert.Equal("Header", section.SectionName); + Children(section, c => Html("

Hello World

", c)); + } + + private static RazorProjectEngine CreateProjectEngine() + { + return RazorProjectEngine.Create(b => + { + SectionDirective.Register(b); + }); + } + + private static DocumentIntermediateNode Lower(RazorCodeDocument codeDocument, RazorProjectEngine projectEngine) + { + for (var i = 0; i < projectEngine.Phases.Count; i++) + { + var phase = projectEngine.Phases[i]; + phase.Execute(codeDocument); + + if (phase is IRazorDocumentClassifierPhase) + { + break; + } + } + + var irDocument = codeDocument.GetDocumentIntermediateNode(); + Assert.NotNull(irDocument); + + return irDocument; + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/SectionTargetExtensionTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/SectionTargetExtensionTest.cs new file mode 100644 index 0000000000..16288b3117 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/SectionTargetExtensionTest.cs @@ -0,0 +1,80 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.CodeGeneration; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Extensions +{ + public class SectionTargetExtensionTest + { + [Fact] + public void WriteSection_WritesSectionCode() + { + // Arrange + var node = new SectionIntermediateNode() + { + Children = + { + new CSharpExpressionIntermediateNode(), + }, + SectionName = "MySection" + }; + + var extension = new SectionTargetExtension() + { + SectionMethodName = "CreateSection" + }; + + var context = TestCodeRenderingContext.CreateRuntime(); + + // Act + extension.WriteSection(context, node); + + // Assert + var expected = @"CreateSection(""MySection"", async() => { + Render Children +} +); +"; + + var output = context.CodeWriter.GenerateCode(); + Assert.Equal(expected, output); + } + + [Fact] + public void WriteSection_WritesSectionCode_DesignTime() + { + // Arrange + var node = new SectionIntermediateNode() + { + Children = + { + new CSharpExpressionIntermediateNode(), + }, + SectionName = "MySection" + }; + + var extension = new SectionTargetExtension() + { + SectionMethodName = "CreateSection" + }; + + var context = TestCodeRenderingContext.CreateDesignTime(); + + // Act + extension.WriteSection(context, node); + + // Assert + var expected = @"CreateSection(""MySection"", async(__razor_section_writer) => { + Render Children +} +); +"; + + var output = context.CodeWriter.GenerateCode(); + Assert.Equal(expected, output); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/TemplateTargetExtensionTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/TemplateTargetExtensionTest.cs new file mode 100644 index 0000000000..b24d6f5174 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Extensions/TemplateTargetExtensionTest.cs @@ -0,0 +1,51 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.CodeGeneration; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Extensions +{ + public class TemplateTargetExtensionTest + { + [Fact] + public void WriteTemplate_WritesTemplateCode() + { + // Arrange + var node = new TemplateIntermediateNode() + { + Children = + { + new CSharpExpressionIntermediateNode() + } + }; + var extension = new TemplateTargetExtension() + { + TemplateTypeName = "global::TestTemplate" + }; + + var nodeWriter = new RuntimeNodeWriter() + { + PushWriterMethod = "TestPushWriter", + PopWriterMethod = "TestPopWriter" + }; + + var context = TestCodeRenderingContext.CreateRuntime(nodeWriter: nodeWriter); + + // Act + extension.WriteTemplate(context, node); + + // Assert + var expected = @"item => new global::TestTemplate(async(__razor_template_writer) => { + TestPushWriter(__razor_template_writer); + Render Children + TestPopWriter(); +} +)"; + + var output = context.CodeWriter.GenerateCode(); + Assert.Equal(expected, output); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/HtmlConventionsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/HtmlConventionsTest.cs new file mode 100644 index 0000000000..e1020bb81c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/HtmlConventionsTest.cs @@ -0,0 +1,39 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class HtmlConventionsTest + { + public static TheoryData HtmlConversionData + { + get + { + return new TheoryData + { + { "SomeThing", "some-thing" }, + { "someOtherThing", "some-other-thing" }, + { "capsONInside", "caps-on-inside" }, + { "CAPSOnOUTSIDE", "caps-on-outside" }, + { "ALLCAPS", "allcaps" }, + { "One1Two2Three3", "one1-two2-three3" }, + { "ONE1TWO2THREE3", "one1two2three3" }, + { "First_Second_ThirdHi", "first_second_third-hi" } + }; + } + } + + [Theory] + [MemberData(nameof(HtmlConversionData))] + public void ToHtmlCase_ReturnsExpectedConversions(string input, string expectedOutput) + { + // Arrange, Act + var output = HtmlConventions.ToHtmlCase(input); + + // Assert + Assert.Equal(output, expectedOutput); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/HtmlNodeOptimizationPassTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/HtmlNodeOptimizationPassTest.cs new file mode 100644 index 0000000000..bf08903e5a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/HtmlNodeOptimizationPassTest.cs @@ -0,0 +1,35 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Legacy; +using Microsoft.AspNetCore.Razor.Language.Syntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class HtmlNodeOptimizationPassTest + { + [Fact] + public void Execute_RewritesWhitespace() + { + // Assert + var content = Environment.NewLine + " @true"; + var sourceDocument = TestRazorSourceDocument.Create(content); + var originalTree = RazorSyntaxTree.Parse(sourceDocument); + var pass = new HtmlNodeOptimizationPass(); + var codeDocument = RazorCodeDocument.Create(sourceDocument); + + // Act + var outputTree = pass.Execute(codeDocument, originalTree); + + // Assert + var document = Assert.IsType(outputTree.Root); + var block = Assert.IsType(document.Document); + Assert.Equal(4, block.Children.Count); + var whitespace = Assert.IsType(block.Children[1]); + Assert.True(whitespace.GetContent().All(char.IsWhiteSpace)); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/BasicIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/BasicIntegrationTest.cs new file mode 100644 index 0000000000..9ae793d5a1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/BasicIntegrationTest.cs @@ -0,0 +1,57 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Legacy; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + public class BasicIntegrationTest : IntegrationTestBase + { + [Fact] + public void Empty() + { + // Arrange + var projectEngine = CreateProjectEngine(); + var projectItem = CreateProjectItemFromFile(); + + // Act + var codeDocument = projectEngine.Process(projectItem); + + // Assert + AssertDocumentNodeMatchesBaseline(codeDocument.GetDocumentIntermediateNode()); + } + + [Fact] + public void HelloWorld() + { + // Arrange + var projectEngine = CreateProjectEngine(); + var projectItem = CreateProjectItemFromFile(); + + // Act + var codeDocument = projectEngine.Process(projectItem); + + // Assert + AssertDocumentNodeMatchesBaseline(codeDocument.GetDocumentIntermediateNode()); + } + + [Fact] + public void CustomDirective() + { + // Arrange + var projectEngine = CreateProjectEngine(b => + { + b.AddDirective(DirectiveDescriptor.CreateDirective("test", DirectiveKind.SingleLine)); + }); + + var projectItem = CreateProjectItemFromFile(); + + // Act + var codeDocument = projectEngine.Process(projectItem); + + // Assert + AssertDocumentNodeMatchesBaseline(codeDocument.GetDocumentIntermediateNode()); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/CodeGenerationIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/CodeGenerationIntegrationTest.cs new file mode 100644 index 0000000000..5faa8cfbbc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/CodeGenerationIntegrationTest.cs @@ -0,0 +1,1065 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Collections.Generic; +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Extensions; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + public class CodeGenerationIntegrationTest : IntegrationTestBase + { + public CodeGenerationIntegrationTest() + : base(generateBaselines: null) + { + } + + #region Runtime + [Fact] + public void CSharp8_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void IncompleteDirectives_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void CSharp7_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void UnfinishedExpressionInCode_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void Templates_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void Markup_InCodeBlocks_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void Markup_InCodeBlocksWithTagHelper_Runtime() + { + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.SimpleTagHelperDescriptors); + } + + [Fact] + public void StringLiterals_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void SimpleUnspacedIf_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void Sections_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void RazorComments_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void ParserError_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void OpenedIf_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void NullConditionalExpressions_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void NoLinePragmas_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void NestedCSharp_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void NestedCodeBlocks_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void MarkupInCodeBlock_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void Instrumented_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void InlineBlocks_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void Inherits_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void Usings_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void ImplicitExpressionAtEOF_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void ImplicitExpression_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void HtmlCommentWithQuote_Double_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void HtmlCommentWithQuote_Single_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void HiddenSpansInCode_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void FunctionsBlock_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void FunctionsBlockMinimal_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void ExpressionsInCode_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void ExplicitExpressionWithMarkup_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void ExplicitExpressionAtEOF_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void ExplicitExpression_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void EmptyImplicitExpressionInCode_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void EmptyImplicitExpression_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void EmptyExplicitExpression_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void EmptyCodeBlock_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void ConditionalAttributes_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void CodeBlockWithTextElement_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void CodeBlockAtEOF_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void CodeBlock_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void Blocks_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void Await_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void Tags_Runtime() + { + RunTimeTest(); + } + + [Fact] + public void SimpleTagHelpers_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.SimpleTagHelperDescriptors); + } + + [Fact] + public void TagHelpersWithBoundAttributes_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.SimpleTagHelperDescriptors); + } + + [Fact] + public void TagHelpersWithPrefix_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.SimpleTagHelperDescriptors); + } + + [Fact] + public void NestedTagHelpers_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.SimpleTagHelperDescriptors); + } + + [Fact] + public void SingleTagHelper_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void SingleTagHelperWithNewlineBeforeAttributes_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void TagHelpersWithWeirdlySpacedAttributes_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void IncompleteTagHelper_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void BasicTagHelpers_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void BasicTagHelpers_Prefixed_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void BasicTagHelpers_RemoveTagHelper_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void CssSelectorTagHelperAttributes_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.CssSelectorTagHelperDescriptors); + } + + [Fact] + public void ComplexTagHelpers_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void EmptyAttributeTagHelpers_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void EscapedTagHelpers_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void DuplicateTargetTagHelper_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.DuplicateTargetTagHelperDescriptors); + } + + [Fact] + public void AttributeTargetingTagHelpers_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.AttributeTargetingTagHelperDescriptors); + } + + [Fact] + public void PrefixedAttributeTagHelpers_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.PrefixedAttributeTagHelperDescriptors); + } + + [Fact] + public void DuplicateAttributeTagHelpers_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void DynamicAttributeTagHelpers_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.DynamicAttributeTagHelpers_Descriptors); + } + + [Fact] + public void TransitionsInTagHelperAttributes_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void MinimizedTagHelpers_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.MinimizedTagHelpers_Descriptors); + } + + [Fact] + public void NestedScriptTagTagHelpers_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void SymbolBoundAttributes_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.SymbolBoundTagHelperDescriptors); + } + + [Fact] + public void EnumTagHelpers_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.EnumTagHelperDescriptors); + } + + [Fact] + public void TagHelpersInSection_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.TagHelpersInSectionDescriptors); + } + + [Fact] + public void TagHelpersWithTemplate_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.SimpleTagHelperDescriptors); + } + + [Fact] + public void TagHelpersWithDataDashAttributes_Runtime() + { + // Arrange, Act & Assert + RunRuntimeTagHelpersTest(TestTagHelperDescriptors.SimpleTagHelperDescriptors); + } + + [Fact] + public void Implements_Runtime() + { + RunTimeTest(); + } + + #endregion + + #region DesignTime + [Fact] + public void CSharp8_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void IncompleteDirectives_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void CSharp7_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void UnfinishedExpressionInCode_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void Templates_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void Markup_InCodeBlocks_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void Markup_InCodeBlocksWithTagHelper_DesignTime() + { + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.SimpleTagHelperDescriptors); + } + + [Fact] + public void StringLiterals_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void SimpleUnspacedIf_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void Sections_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void RazorComments_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void ParserError_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void OpenedIf_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void NullConditionalExpressions_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void NoLinePragmas_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void NestedCSharp_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void NestedCodeBlocks_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void MarkupInCodeBlock_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void Instrumented_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void InlineBlocks_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void Inherits_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void Usings_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void ImplicitExpressionAtEOF_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void ImplicitExpression_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void HtmlCommentWithQuote_Double_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void HtmlCommentWithQuote_Single_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void HiddenSpansInCode_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void FunctionsBlock_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void FunctionsBlockMinimal_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void ExpressionsInCode_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void ExplicitExpressionWithMarkup_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void ExplicitExpressionAtEOF_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void ExplicitExpression_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void EmptyImplicitExpressionInCode_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void EmptyImplicitExpression_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void EmptyExplicitExpression_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void EmptyCodeBlock_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void DesignTime_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void ConditionalAttributes_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void CodeBlockWithTextElement_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void CodeBlockAtEOF_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void CodeBlock_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void Blocks_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void Await_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void Tags_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void AddTagHelperDirective_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void RemoveTagHelperDirective_DesignTime() + { + DesignTimeTest(); + } + + [Fact] + public void SimpleTagHelpers_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.SimpleTagHelperDescriptors); + } + + [Fact] + public void TagHelpersWithBoundAttributes_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.SimpleTagHelperDescriptors); + } + + [Fact] + public void TagHelpersWithPrefix_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.SimpleTagHelperDescriptors); + } + + [Fact] + public void NestedTagHelpers_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.SimpleTagHelperDescriptors); + } + + [Fact] + public void SingleTagHelper_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void SingleTagHelperWithNewlineBeforeAttributes_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void TagHelpersWithWeirdlySpacedAttributes_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void IncompleteTagHelper_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void BasicTagHelpers_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void BasicTagHelpers_Prefixed_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void ComplexTagHelpers_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void EmptyAttributeTagHelpers_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void EscapedTagHelpers_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void DuplicateTargetTagHelper_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.DuplicateTargetTagHelperDescriptors); + } + + [Fact] + public void AttributeTargetingTagHelpers_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.AttributeTargetingTagHelperDescriptors); + } + + [Fact] + public void PrefixedAttributeTagHelpers_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.PrefixedAttributeTagHelperDescriptors); + } + + [Fact] + public void DuplicateAttributeTagHelpers_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void DynamicAttributeTagHelpers_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.DynamicAttributeTagHelpers_Descriptors); + } + + [Fact] + public void TransitionsInTagHelperAttributes_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void MinimizedTagHelpers_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.MinimizedTagHelpers_Descriptors); + } + + [Fact] + public void NestedScriptTagTagHelpers_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.DefaultPAndInputTagHelperDescriptors); + } + + [Fact] + public void SymbolBoundAttributes_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.SymbolBoundTagHelperDescriptors); + } + + [Fact] + public void EnumTagHelpers_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.EnumTagHelperDescriptors); + } + + [Fact] + public void TagHelpersInSection_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.TagHelpersInSectionDescriptors); + } + + [Fact] + public void TagHelpersWithTemplate_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.SimpleTagHelperDescriptors); + } + + [Fact] + public void TagHelpersWithDataDashAttributes_DesignTime() + { + // Arrange, Act & Assert + RunDesignTimeTagHelpersTest(TestTagHelperDescriptors.SimpleTagHelperDescriptors); + } + + [Fact] + public void Implements_DesignTime() + { + DesignTimeTest(); + } + + #endregion + + private void DesignTimeTest() + { + // Arrange + var projectEngine = CreateProjectEngine(builder => + { + builder.ConfigureDocumentClassifier(); + + // Some of these tests use templates + builder.AddTargetExtension(new TemplateTargetExtension()); + + SectionDirective.Register(builder); + }); + + var projectItem = CreateProjectItemFromFile(); + + // Act + var codeDocument = projectEngine.ProcessDesignTime(projectItem); + + // Assert + AssertDocumentNodeMatchesBaseline(codeDocument.GetDocumentIntermediateNode()); + AssertCSharpDocumentMatchesBaseline(codeDocument.GetCSharpDocument()); + AssertSourceMappingsMatchBaseline(codeDocument); + } + + private void RunTimeTest() + { + // Arrange + var projectEngine = CreateProjectEngine(builder => + { + builder.ConfigureDocumentClassifier(); + + // Some of these tests use templates + builder.AddTargetExtension(new TemplateTargetExtension()); + + SectionDirective.Register(builder); + }); + + var projectItem = CreateProjectItemFromFile(); + + // Act + var codeDocument = projectEngine.Process(projectItem); + + // Assert + AssertDocumentNodeMatchesBaseline(codeDocument.GetDocumentIntermediateNode()); + AssertCSharpDocumentMatchesBaseline(codeDocument.GetCSharpDocument()); + } + + private void RunRuntimeTagHelpersTest(IEnumerable descriptors) + { + // Arrange + var projectEngine = CreateProjectEngine(builder => + { + builder.ConfigureDocumentClassifier(); + + // Some of these tests use templates + builder.AddTargetExtension(new TemplateTargetExtension()); + + SectionDirective.Register(builder); + }); + + var projectItem = CreateProjectItemFromFile(); + var imports = GetImports(projectEngine, projectItem); + + // Act + var codeDocument = projectEngine.Process(RazorSourceDocument.ReadFrom(projectItem), FileKinds.Legacy, imports, descriptors.ToList()); + + // Assert + AssertDocumentNodeMatchesBaseline(codeDocument.GetDocumentIntermediateNode()); + AssertCSharpDocumentMatchesBaseline(codeDocument.GetCSharpDocument()); + } + + private void RunDesignTimeTagHelpersTest(IEnumerable descriptors) + { + // Arrange + var projectEngine = CreateProjectEngine(builder => + { + builder.ConfigureDocumentClassifier(); + + // Some of these tests use templates + builder.AddTargetExtension(new TemplateTargetExtension()); + + SectionDirective.Register(builder); + }); + + var projectItem = CreateProjectItemFromFile(); + var imports = GetImports(projectEngine, projectItem); + + // Act + var codeDocument = projectEngine.ProcessDesignTime(RazorSourceDocument.ReadFrom(projectItem), FileKinds.Legacy, imports, descriptors.ToList()); + + // Assert + AssertDocumentNodeMatchesBaseline(codeDocument.GetDocumentIntermediateNode()); + AssertCSharpDocumentMatchesBaseline(codeDocument.GetCSharpDocument()); + AssertSourceMappingsMatchBaseline(codeDocument); + } + + private static IReadOnlyList GetImports(RazorProjectEngine projectEngine, RazorProjectItem projectItem) + { + var importFeatures = projectEngine.ProjectFeatures.OfType(); + var importItems = importFeatures.SelectMany(f => f.GetImports(projectItem)); + var importSourceDocuments = importItems.Where(i => i.Exists).Select(i => RazorSourceDocument.ReadFrom(i)).ToList(); + + return importSourceDocuments; + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentBindIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentBindIntegrationTest.cs new file mode 100644 index 0000000000..bfbda33a7a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentBindIntegrationTest.cs @@ -0,0 +1,96 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Components; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + public class ComponentBindIntegrationTest : RazorIntegrationTestBase + { + internal override string FileKind => FileKinds.Component; + + internal override bool UseTwoPhaseCompilation => true; + + [Fact] + public void BindDuplicates_ReportsDiagnostic() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + [BindElement(""div"", ""value"", ""myvalue2"", ""myevent2"")] + [BindElement(""div"", ""value"", ""myvalue"", ""myevent"")] + public static class BindAttributes + { + } +}")); + + // Act + var result = CompileToCSharp(@" +
+@functions { + public string ParentValue { get; set; } = ""hi""; +}"); + + // Assert + var diagnostic = Assert.Single(result.Diagnostics); + Assert.Equal("RZ9989", diagnostic.Id); + Assert.Equal( + "The attribute 'bind-value' was matched by multiple bind attributes. Duplicates:" + Environment.NewLine + + "Test.BindAttributes" + Environment.NewLine + + "Test.BindAttributes", + diagnostic.GetMessage()); + } + + [Fact] + public void BindFallback_InvalidSyntax_TooManyParts() + { + // Arrange & Act + var generated = CompileToCSharp(@" + +@functions { + public string Text { get; set; } = ""text""; +}"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Equal("RZ9991", diagnostic.Id); + } + + [Fact] + public void BindFallback_InvalidSyntax_TrailingDash() + { + // Arrange & Act + var generated = CompileToCSharp(@" + +@functions { + public string Text { get; set; } = ""text""; +}"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Equal("RZ9991", diagnostic.Id); + } + + [Fact] + public void Bind_InvalidUseOfDirective_DoesNotThrow() + { + var generated = CompileToCSharp(@" + +@functions { + public string page { get; set; } = ""text""; +}"); + + // Assert + Assert.Collection( + generated.Diagnostics, + d => Assert.Equal("RZ2005", d.Id), + d => Assert.Equal("RZ1011", d.Id)); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentChildContentIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentChildContentIntegrationTest.cs new file mode 100644 index 0000000000..7a3c4c098d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentChildContentIntegrationTest.cs @@ -0,0 +1,249 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Razor.Language.Components; +using Microsoft.CodeAnalysis.CSharp; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + public class ComponentChildContentIntegrationTest : RazorIntegrationTestBase + { + private readonly CSharpSyntaxTree RenderChildContentComponent = Parse(@" +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.RenderTree; +namespace Test +{ + public class RenderChildContent : ComponentBase + { + protected override void BuildRenderTree(RenderTreeBuilder builder) + { + builder.AddContent(0, ChildContent); + } + + [Parameter] + RenderFragment ChildContent { get; set; } + } +} +"); + + private readonly CSharpSyntaxTree RenderChildContentStringComponent = Parse(@" +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.RenderTree; +namespace Test +{ + public class RenderChildContentString : ComponentBase + { + protected override void BuildRenderTree(RenderTreeBuilder builder) + { + builder.AddContent(0, ChildContent, Value); + } + + [Parameter] + RenderFragment ChildContent { get; set; } + + [Parameter] + string Value { get; set; } + } +} +"); + + private readonly CSharpSyntaxTree RenderMultipleChildContent = Parse(@" +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.RenderTree; +namespace Test +{ + public class RenderMultipleChildContent : ComponentBase + { + protected override void BuildRenderTree(RenderTreeBuilder builder) + { + builder.AddContent(0, Header, Name); + builder.AddContent(1, ChildContent, Value); + builder.AddContent(2, Footer); + } + + [Parameter] + string Name { get; set; } + + [Parameter] + RenderFragment Header { get; set; } + + [Parameter] + RenderFragment ChildContent { get; set; } + + [Parameter] + RenderFragment Footer { get; set; } + + [Parameter] + string Value { get; set; } + } +} +"); + + internal override string FileKind => FileKinds.Component; + + internal override bool UseTwoPhaseCompilation => true; + + [Fact] + public void ChildContent_AttributeAndBody_ProducesDiagnostic() + { + // Arrange + AdditionalSyntaxTrees.Add(RenderChildContentComponent); + + // Act + var generated = CompileToCSharp(@" +@{ RenderFragment template = @
@context.ToLowerInvariant()
; } + +Some Content +"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Same(ComponentDiagnosticFactory.ChildContentSetByAttributeAndBody.Id, diagnostic.Id); + } + + [Fact] + public void ChildContent_AttributeAndExplicitChildContent_ProducesDiagnostic() + { + // Arrange + AdditionalSyntaxTrees.Add(RenderChildContentComponent); + + // Act + var generated = CompileToCSharp(@" +@{ RenderFragment template = @
@context.ToLowerInvariant()
; } + + +Some Content + +"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Same(ComponentDiagnosticFactory.ChildContentSetByAttributeAndBody.Id, diagnostic.Id); + } + + [Fact] + public void ChildContent_ExplicitChildContent_UnrecogizedContent_ProducesDiagnostic() + { + // Arrange + AdditionalSyntaxTrees.Add(RenderChildContentComponent); + + // Act + var generated = CompileToCSharp(@" + + + +@somethingElse +"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Same(ComponentDiagnosticFactory.ChildContentMixedWithExplicitChildContent.Id, diagnostic.Id); + Assert.Equal( + "Unrecognized child content inside component 'RenderChildContent'. The component 'RenderChildContent' accepts " + + "child content through the following top-level items: 'ChildContent'.", + diagnostic.GetMessage()); + } + + [Fact] + public void ChildContent_ExplicitChildContent_UnrecogizedElement_ProducesDiagnostic() + { + // Arrange + AdditionalSyntaxTrees.Add(RenderChildContentComponent); + + // Act + var generated = CompileToCSharp(@" + + + + +"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Same(ComponentDiagnosticFactory.ChildContentMixedWithExplicitChildContent.Id, diagnostic.Id); + } + + [Fact] + public void ChildContent_ExplicitChildContent_UnrecogizedAttribute_ProducesDiagnostic() + { + // Arrange + AdditionalSyntaxTrees.Add(RenderChildContentComponent); + + // Act + var generated = CompileToCSharp(@" + + + +"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Same(ComponentDiagnosticFactory.ChildContentHasInvalidAttribute.Id, diagnostic.Id); + } + + [Fact] + public void ChildContent_ExplicitChildContent_InvalidParameterName_ProducesDiagnostic() + { + // Arrange + AdditionalSyntaxTrees.Add(RenderChildContentStringComponent); + + // Act + var generated = CompileToCSharp(@" + + + +"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Same(ComponentDiagnosticFactory.ChildContentHasInvalidParameter.Id, diagnostic.Id); + } + + [Fact] + public void ChildContent_ExplicitChildContent_RepeatedParameterName_GeneratesDiagnostic() + { + // Arrange + AdditionalSyntaxTrees.Add(RenderChildContentStringComponent); + + // Act + var generated = CompileToCSharp(@" + + + + + + + +"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Same(ComponentDiagnosticFactory.ChildContentRepeatedParameterName.Id, diagnostic.Id); + Assert.Equal( + "The child content element 'ChildContent' of component 'RenderChildContentString' uses the same parameter name ('context') as enclosing child content " + + "element 'ChildContent' of component 'RenderChildContentString'. Specify the parameter name like: ' to resolve the ambiguity", + diagnostic.GetMessage()); + } + + [Fact] + public void ChildContent_ContextParameterNameOnComponent_Invalid_ProducesDiagnostic() + { + // Arrange + AdditionalSyntaxTrees.Add(RenderChildContentStringComponent); + + // Act + var generated = CompileToCSharp(@" + +"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Same(ComponentDiagnosticFactory.ChildContentHasInvalidParameterOnComponent.Id, diagnostic.Id); + Assert.Equal( + "Invalid parameter name. The parameter name attribute 'Context' on component 'RenderChildContentString' can only include literal text.", + diagnostic.GetMessage()); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs new file mode 100644 index 0000000000..41e534523a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentCodeGenerationTestBase.cs @@ -0,0 +1,3608 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Linq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + public abstract class ComponentCodeGenerationTestBase : RazorBaselineIntegrationTestBase + { + internal override string FileKind => FileKinds.Component; + + internal override bool UseTwoPhaseCompilation => true; + + protected ComponentCodeGenerationTestBase() + : base(generateBaselines: null) + { + } + + #region Basics + + [Fact] + public void ChildComponent_InFunctionsDirective() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + } +} +")); + + // Act + var generated = CompileToCSharp(@" +@using Microsoft.AspNetCore.Components.RenderTree; + +@{ RenderChildComponent(builder); } + +@functions { + void RenderChildComponent(RenderTreeBuilder builder) + { + + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_InLocalFunction() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + } +} +")); + + // Act + var generated = CompileToCSharp(@" +@using Microsoft.AspNetCore.Components.RenderTree; +@{ + void RenderChildComponent() + { + + } +} + +@{ RenderChildComponent(); } +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_Simple() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + } +} +")); + + // Act + var generated = CompileToCSharp(@" +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_WithParameters() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class SomeType + { + } + + public class MyComponent : ComponentBase + { + [Parameter] int IntProperty { get; set; } + [Parameter] bool BoolProperty { get; set; } + [Parameter] string StringProperty { get; set; } + [Parameter] SomeType ObjectProperty { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ComponentWithTypeParameters() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" +@using Microsoft.AspNetCore.Components; +@typeparam TItem1 +@typeparam TItem2 + +

Item1

+@foreach (var item2 in Items2) +{ +

+ @ChildContent(item2); +

+} +@functions { + [Parameter] TItem1 Item1 { get; set; } + [Parameter] List Items2 { get; set; } + [Parameter] RenderFragment ChildContent { get; set; } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_WithExplicitStringParameter() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + string StringProperty { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_WithNonPropertyAttributes() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + } +} +")); + + // Act + var generated = CompileToCSharp(@" +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ComponentParameter_TypeMismatch_ReportsDiagnostic() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class CoolnessMeter : ComponentBase + { + [Parameter] private int Coolness { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + + var assembly = CompileToAssembly(generated, throwOnFailure: false); + // This has some errors + Assert.Collection( + assembly.Diagnostics.OrderBy(d => d.Id), + d => Assert.Equal("CS1503", d.Id)); + } + + [Fact] + public void DataDashAttribute_ImplicitExpression() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" +@{ + var myValue = ""Expression value""; +} +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void DataDashAttribute_ExplicitExpression() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" +@{ + var myValue = ""Expression value""; +} +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void MarkupComment_IsNotIncluded() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" +@{ + var myValue = ""Expression value""; +} +
@myValue
"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void Component_WithFullyQualifiedTagNames() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + } +} + +namespace Test2 +{ + public class MyComponent2 : ComponentBase + { + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + #endregion + + #region Bind + + [Fact] + public void BindToComponent_SpecifiesValue_WithMatchingProperties() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + int Value { get; set; } + + [Parameter] + Action ValueChanged { get; set; } + } +}")); + + // Act + var generated = CompileToCSharp(@" + +@functions { + public int ParentValue { get; set; } = 42; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BindToComponent_WithStringAttribute_DoesNotUseStringSyntax() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class InputText : ComponentBase + { + [Parameter] + string Value { get; set; } + + [Parameter] + Action ValueChanged { get; set; } + } +}")); + + AdditionalSyntaxTrees.Add(Parse(@" +using System; + +namespace Test +{ + public class Person + { + public string Name { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +@functions +{ + Person person = new Person(); +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BindToComponent_TypeChecked_WithMatchingProperties() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + int Value { get; set; } + + [Parameter] + Action ValueChanged { get; set; } + } +}")); + + // Act + var generated = CompileToCSharp(@" + +@functions { + public string ParentValue { get; set; } = ""42""; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + + var assembly = CompileToAssembly(generated, throwOnFailure: false); + // This has some errors + Assert.Collection( + assembly.Diagnostics.OrderBy(d => d.Id), + d => Assert.Equal("CS0029", d.Id), + d => Assert.Equal("CS1503", d.Id)); + } + + [Fact] + public void BindToComponent_EventCallback_SpecifiesValue_WithMatchingProperties() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + int Value { get; set; } + + [Parameter] + EventCallback ValueChanged { get; set; } + } +}")); + + // Act + var generated = CompileToCSharp(@" + +@functions { + public int ParentValue { get; set; } = 42; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BindToComponent_EventCallback_TypeChecked_WithMatchingProperties() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + int Value { get; set; } + + [Parameter] + EventCallback ValueChanged { get; set; } + } +}")); + + // Act + var generated = CompileToCSharp(@" + +@functions { + public string ParentValue { get; set; } = ""42""; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + + var assembly = CompileToAssembly(generated, throwOnFailure: false); + // This has some errors + Assert.Collection( + assembly.Diagnostics.OrderBy(d => d.Id), + d => Assert.Equal("CS1503", d.Id), + d => Assert.Equal("CS1503", d.Id)); + } + + [Fact] + public void BindToComponent_SpecifiesValue_WithoutMatchingProperties() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase, IComponent + { + void IComponent.SetParameters(ParameterCollection parameters) + { + } + } +}")); + + // Act + var generated = CompileToCSharp(@" + +@functions { + public int ParentValue { get; set; } = 42; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + int Value { get; set; } + + [Parameter] + Action OnChanged { get; set; } + } +}")); + // Act + var generated = CompileToCSharp(@" + +@functions { + public int ParentValue { get; set; } = 42; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase, IComponent + { + void IComponent.SetParameters(ParameterCollection parameters) + { + } + } +}")); + + var generated = CompileToCSharp(@" + +@functions { + public int ParentValue { get; set; } = 42; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BindToComponent_SpecifiesValueAndExpression() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using System.Linq.Expressions; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + int Value { get; set; } + + [Parameter] + Action ValueChanged { get; set; } + + [Parameter] + Expression> ValueExpression { get; set; } + } +}")); + + // Act + var generated = CompileToCSharp(@" + +@functions { + public int ParentValue { get; set; } = 42; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BindToComponent_EventCallback_SpecifiesValueAndExpression() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using System.Linq.Expressions; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + int Value { get; set; } + + [Parameter] + EventCallback ValueChanged { get; set; } + + [Parameter] + Expression> ValueExpression { get; set; } + } +}")); + + // Act + var generated = CompileToCSharp(@" + +@functions { + public int ParentValue { get; set; } = 42; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BindToComponent_SpecifiesValueAndExpression_TypeChecked() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using System.Linq.Expressions; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + int Value { get; set; } + + [Parameter] + Action ValueChanged { get; set; } + + [Parameter] + Expression> ValueExpression { get; set; } + } +}")); + + // Act + var generated = CompileToCSharp(@" + +@functions { + public int ParentValue { get; set; } = 42; +}"); + + var assembly = CompileToAssembly(generated, throwOnFailure: false); + // This has some errors + Assert.Collection( + assembly.Diagnostics.OrderBy(d => d.Id), + d => Assert.Equal("CS0029", d.Id), + d => Assert.Equal("CS1662", d.Id)); + } + + [Fact] + public void BindToComponent_SpecifiesValueAndExpression_Generic() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using System.Linq.Expressions; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + T SomeParam { get; set; } + + [Parameter] + Action SomeParamChanged { get; set; } + + [Parameter] + Expression> SomeParamExpression { get; set; } + } +}")); + + // Act + var generated = CompileToCSharp(@" + +@functions { + public DateTime ParentValue { get; set; } = DateTime.Now; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BindToComponent_EventCallback_SpecifiesValueAndExpression_Generic() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using System.Linq.Expressions; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + T SomeParam { get; set; } + + [Parameter] + EventCallback SomeParamChanged { get; set; } + + [Parameter] + Expression> SomeParamExpression { get; set; } + } +}")); + + // Act + var generated = CompileToCSharp(@" + +@functions { + public DateTime ParentValue { get; set; } = DateTime.Now; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BindToElement_WritesAttributes() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + [BindElement(""div"", null, ""myvalue"", ""myevent"")] + public static class BindAttributes + { + } +}")); + + // Act + var generated = CompileToCSharp(@" +
+@functions { + public string ParentValue { get; set; } = ""hi""; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BindToElement_WithStringAttribute_WritesAttributes() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + [BindElement(""div"", ""value"", ""myvalue"", ""myevent"")] + public static class BindAttributes + { + } +}")); + // Act + var generated = CompileToCSharp(@" +
+@functions { + public string ParentValue { get; set; } = ""hi""; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BindToElementWithSuffix_WritesAttributes() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + [BindElement(""div"", ""value"", ""myvalue"", ""myevent"")] + public static class BindAttributes + { + } +}")); + // Act + var generated = CompileToCSharp(@" +
+@functions { + public string ParentValue { get; set; } = ""hi""; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BuiltIn_BindToInputWithoutType_WritesAttributes() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" + +@functions { + public int ParentValue { get; set; } = 42; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BuiltIn_BindToInputText_WithFormat_WritesAttributes() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" + +@functions { + public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" + +@functions { + public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); + + public string Format { get; set; } = ""MM/dd/yyyy""; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BuiltIn_BindToInputText_WritesAttributes() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" + +@functions { + public int ParentValue { get; set; } = 42; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BuiltIn_BindToInputCheckbox_WritesAttributes() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" + +@functions { + public bool Enabled { get; set; } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BindToElementFallback_WritesAttributes() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" + +@functions { + public int ParentValue { get; set; } = 42; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BindToElementFallback_WithFormat_WritesAttributes() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" + +@functions { + public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1); +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + #endregion + + #region Child Content + + [Fact] + public void ChildComponent_WithChildContent() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + string MyAttr { get; set; } + + [Parameter] + RenderFragment ChildContent { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +Some textNested text"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_WithGenericChildContent() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + string MyAttr { get; set; } + + [Parameter] + RenderFragment ChildContent { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +Some text@context.ToLowerInvariant()"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + + [Fact] + public void ChildComponent_WithGenericChildContent_SetsParameterName() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + string MyAttr { get; set; } + + [Parameter] + RenderFragment ChildContent { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + + Some text@item.ToLowerInvariant() + +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_WithGenericChildContent_SetsParameterNameOnComponent() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + string MyAttr { get; set; } + + [Parameter] + RenderFragment ChildContent { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + + Some text@item.ToLowerInvariant() + +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_WithElementOnlyChildContent() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + RenderFragment ChildContent { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +hello"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_WithExplicitChildContent() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + RenderFragment ChildContent { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +hello"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_WithExplicitGenericChildContent() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + RenderFragment ChildContent { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +@context"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void MultipleExplictChildContent() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + RenderFragment Header { get; set; } + + [Parameter] + RenderFragment Footer { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + +
Hi!
+
@(""bye!"")
+
"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BodyAndAttributeChildContent() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + RenderFragment Header { get; set; } + + RenderFragment ChildContent { get; set; } + + [Parameter] + RenderFragment Footer { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +@{ RenderFragment header = (context) => @
@context.ToLowerInvariant()
; } + + Some Content +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void BodyAndExplicitChildContent() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + RenderFragment Header { get; set; } + + [Parameter] + RenderFragment ChildContent { get; set; } + + [Parameter] + RenderFragment Footer { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +@{ RenderFragment header = (context) => @
@context.ToLowerInvariant()
; } + + Some Content +
Bye!
+
"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + #endregion + + #region Directives + + [Fact] + public void ChildComponent_WithPageDirective() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + } +} +")); + + // Act + var generated = CompileToCSharp(@" +@page ""/MyPage"" +@page ""/AnotherRoute/{id}"" +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void Component_WithUsingDirectives() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + } +} + +namespace Test2 +{ + public class MyComponent2 : ComponentBase + { + } +} +")); + + // Act + var generated = CompileToCSharp(@" +@page ""/MyPage"" +@page ""/AnotherRoute/{id}"" +@using Test2 + +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void Component_WithUsingDirectives_AmbiguousImport() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + } +} + +namespace Test2 +{ + public class SomeComponent : ComponentBase + { + } +} + +namespace Test3 +{ + public class SomeComponent : ComponentBase + { + } +} +")); + + // Act + var generated = CompileToCSharp(@" +@using Test2 +@using Test3 + +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + var result = CompileToAssembly(generated, throwOnFailure: !DesignTime); + + if (DesignTime) + { + Assert.Collection(result.Diagnostics, d => + { + Assert.Equal("CS0104", d.Id); + Assert.Equal(CodeAnalysis.DiagnosticSeverity.Error, d.Severity); + Assert.Equal("'SomeComponent' is an ambiguous reference between 'Test2.SomeComponent' and 'Test3.SomeComponent'", d.GetMessage()); + }); + } + } + + [Fact] + public void Component_IgnoresStaticAndAliasUsings() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + } +} + +namespace Test2 +{ + public class SomeComponent : ComponentBase + { + } +} + +namespace Test3 +{ + public class SomeComponent : ComponentBase + { + } +} +")); + + // Act + var generated = CompileToCSharp(@" +@using static Test2.SomeComponent +@using Foo = Test3 + + "); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + var result = CompileToAssembly(generated); + } + + [Fact] + public void ChildContent_FromAnotherNamespace() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class HeaderComponent : ComponentBase + { + [Parameter] + RenderFragment Header { get; set; } + } +} + +namespace AnotherTest +{ + public class FooterComponent : ComponentBase + { + [Parameter] + RenderFragment Footer { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +@using AnotherTest + + +
Hi!
+
+ +
@context
+
+ +
Hi!
+
+ +
@context
+
+"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + #endregion + + #region EventCallback + + [Fact] + public void EventCallback_CanPassEventCallback_Explicitly() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + EventCallback OnClick { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +@functions { + private int counter; + private void Increment() { + counter++; + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventCallback_CanPassEventCallbackOfT_Explicitly() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + EventCallback OnClick { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +(this, Increment))""/> + +@functions { + private int counter; + private void Increment() { + counter++; + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventCallback_CanPassEventCallback_Implicitly_Action() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + EventCallback OnClick { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +@functions { + private int counter; + private void Increment() { + counter++; + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventCallback_CanPassEventCallback_Implicitly_ActionOfObject() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + EventCallback OnClick { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +@functions { + private int counter; + private void Increment(object e) { + counter++; + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventCallback_CanPassEventCallback_Implicitly_FuncOfTask() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + EventCallback OnClick { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +@functions { + private int counter; + private Task Increment() { + counter++; + return Task.CompletedTask; + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventCallback_CanPassEventCallback_Implicitly_FuncOfobjectTask() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + EventCallback OnClick { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +@functions { + private int counter; + private Task Increment(object e) { + counter++; + return Task.CompletedTask; + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventCallback_CanPassEventCallbackOfT_Implicitly_Action() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + EventCallback OnClick { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +@functions { + private int counter; + private void Increment() { + counter++; + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventCallback_CanPassEventCallbackOfT_Implicitly_ActionOfT() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + EventCallback OnClick { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +@functions { + private int counter; + private void Increment(UIMouseEventArgs e) { + counter++; + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTask() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + EventCallback OnClick { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +@functions { + private int counter; + private Task Increment() { + counter++; + return Task.CompletedTask; + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventCallback_CanPassEventCallbackOfT_Implicitly_FuncOfTTask() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + EventCallback OnClick { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +@functions { + private int counter; + private Task Increment(UIMouseEventArgs e) { + counter++; + return Task.CompletedTask; + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventCallback_CanPassEventCallbackOfT_Implicitly_TypeMismatch() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + EventCallback OnClick { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +@functions { + private int counter; + private void Increment(UIChangeEventArgs e) { + counter++; + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + + var result = CompileToAssembly(generated, throwOnFailure: false); + + // Cannot convert from method group to Action - this isn't a great error message, but it's + // what the compiler gives us. + Assert.Collection(result.Diagnostics, d => { Assert.Equal("CS1503", d.Id); }); + } + + #endregion + + #region Event Handlers + + [Fact] + public void ChildComponent_WithLambdaEventHandler() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + Action OnClick { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + { Increment(); })""/> + +@functions { + private int counter; + private void Increment() { + counter++; + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + // Regression test for #954 - we need to allow arbitrary event handler + // attributes with weak typing. + [Fact] + public void ChildComponent_WithWeaklyTypeEventHandler() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class DynamicElement : ComponentBase + { + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +@functions { + private Action OnClick { get; set; } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_WithExplicitEventHandler() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + Action OnClick { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +@functions { + private int counter; + private void Increment(UIEventArgs e) { + counter++; + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventHandler_OnElement_WithString() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventHandler_OnElement_WithNoArgsLambdaDelegate() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" + { })"" />"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventHandler_OnElement_WithEventArgsLambdaDelegate() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" + { })"" />"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventHandler_OnElement_WithNoArgMethodGroup() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" + +@functions { + void OnClick() { + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventHandler_OnElement_WithEventArgsMethodGroup() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" + +@functions { + void OnClick(UIMouseEventArgs e) { + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" + +@functions { + void OnClick(UIEventArgs e) { + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void AsyncEventHandler_OnElement_Action_MethodGroup() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" +@using System.Threading.Tasks + +@functions { + Task OnClick() + { + return Task.CompletedTask; + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" +@using System.Threading.Tasks + +@functions { + Task OnClick(UIMouseEventArgs e) + { + return Task.CompletedTask; + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void AsyncEventHandler_OnElement_Action_Lambda() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" +@using System.Threading.Tasks + await Task.Delay(10))"" /> +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void AsyncEventHandler_OnElement_ActionEventArgs_Lambda() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" +@using System.Threading.Tasks + await Task.Delay(10))"" /> +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventHandler_OnElement_WithLambdaDelegate() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" + { })"" />"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventHandler_OnElement_WithDelegate() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" + +@functions { + void OnClick(UIMouseEventArgs e) { + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + #endregion + + #region Generics + + [Fact] + public void ChildComponent_Generic() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] TItem Item { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_Generic_TypeInference() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] TItem Item { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_Generic_TypeInference_Multiple() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] TItem Item { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_GenericWeaklyTypedAttribute() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] TItem Item { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_GenericWeaklyTypedAttribute_TypeInference() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] TItem Item { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_GenericBind() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + TItem Item { get; set; } + + [Parameter] + Action ItemChanged { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + +@functions { + string Value; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_GenericBind_TypeInference() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] + TItem Item { get; set; } + + [Parameter] + Action ItemChanged { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + +@functions { + string Value; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_GenericBindWeaklyTyped() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + } +} +")); + + // Act + var generated = CompileToCSharp(@" + +@functions { + string Value; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_GenericBindWeaklyTyped_TypeInference() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] TItem Value { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + +@functions { + string Value; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_GenericChildContent() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] TItem Item { get; set; } + + [Parameter] RenderFragment ChildContent { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + +
@context.ToLower()
+
"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_GenericChildContent_TypeInference() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] TItem Item { get; set; } + + [Parameter] RenderFragment ChildContent { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + +
@context.ToLower()
+
"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void GenericComponent_WithFullyQualifiedTagName() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] TItem Item { get; set; } + + [Parameter] RenderFragment ChildContent { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + +
@context.ToLower()
+
"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_MultipleGenerics() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] TItem1 Item { get; set; } + + [Parameter] RenderFragment ChildContent { get; set; } + + [Parameter] RenderFragment AnotherChildContent { get; set; } + + public class Context + { + public TItem2 Item { get; set; } + } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + +
@context.ToLower()
+ + @System.Math.Max(0, item.Item); + +
"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ChildComponent_MultipleGenerics_TypeInference() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System.Collections.Generic; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] TItem1 Item { get; set; } + + [Parameter] List Items { get; set; } + + [Parameter] RenderFragment ChildContent { get; set; } + + [Parameter] RenderFragment AnotherChildContent { get; set; } + + public class Context + { + public TItem2 Item { get; set; } + } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +())> +
@context.ToLower()
+ + @System.Math.Max(0, item.Item); + +
"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void GenericComponent_WithComponentRef() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] TItem Item { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +@functions { + private MyComponent _my; + public void Foo() { System.GC.KeepAlive(_my); } +} +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void GenericComponent_WithComponentRef_TypeInference() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] TItem Item { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +@functions { + private MyComponent _my; + public void Foo() { System.GC.KeepAlive(_my); } +} +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + #endregion + + #region Ref + + [Fact] + public void Element_WithRef() + { + // Arrange/Act + var generated = CompileToCSharp(@" +Hello + +@functions { + private Microsoft.AspNetCore.Components.ElementRef myElem; + public void Foo() { System.GC.KeepAlive(myElem); } +} +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void Component_WithRef() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + } +} +")); + + // Arrange/Act + var generated = CompileToCSharp(@" + + +@functions { + private Test.MyComponent myInstance; + public void Foo() { System.GC.KeepAlive(myInstance); } +} +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void Component_WithRef_WithChildContent() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + } +} +")); + + // Arrange/Act + var generated = CompileToCSharp(@" + + Some further content + + +@functions { + private Test.MyComponent myInstance; + public void Foo() { System.GC.KeepAlive(myInstance); } +} +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + #endregion + + #region Templates + + [Fact] + public void RazorTemplate_InCodeBlock() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" +@{ + RenderFragment p = (person) => @
@person.Name
; +} +@functions { + class Person + { + public string Name { get; set; } + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void RazorTemplate_InExplicitExpression() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" +@(RenderPerson((person) => @
@person.Name
)) +@functions { + class Person + { + public string Name { get; set; } + } + + object RenderPerson(RenderFragment p) => null; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void RazorTemplate_NonGeneric_InImplicitExpression() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" +@RenderPerson(@
HI
) +@functions { + object RenderPerson(RenderFragment p) => null; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void RazorTemplate_Generic_InImplicitExpression() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" +@RenderPerson((person) => @
@person.Name
) +@functions { + class Person + { + public string Name { get; set; } + } + + object RenderPerson(RenderFragment p) => null; +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void RazorTemplate_ContainsComponent() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] string Name { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +@{ + RenderFragment p = (person) => @
; +} +@functions { + class Person + { + public string Name { get; set; } + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + // Targeted at the logic that assigns 'builder' names + [Fact] + public void RazorTemplate_FollowedByComponent() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] string Name { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +@{ + RenderFragment p = (person) => @
; +} + +@(""hello, world!"") + + +@functions { + class Person + { + public string Name { get; set; } + } +}"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void RazorTemplate_NonGeneric_AsComponentParameter() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] RenderFragment Template { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +@{ RenderFragment template = @
Joey
; } + +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void RazorTemplate_Generic_AsComponentParameter() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] RenderFragment PersonTemplate { get; set; } + } + + public class Person + { + public string Name { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +@{ RenderFragment template = (person) => @
@person.Name
; } + +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void RazorTemplate_AsComponentParameter_MixedContent() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] RenderFragment Template { get; set; } + } + + public class Context + { + public int Index { get; set; } + public string Item { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +@{ RenderFragment template = (context) => @
  • #@context.Index - @context.Item.ToLower()
  • ; } + +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + #endregion + + #region Whitespace + + [Fact] + public void LeadingWhiteSpace_WithDirective() + { + // Arrange/Act + var generated = CompileToCSharp(@" + +@using System + +

    Hello

    "); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void LeadingWhiteSpace_WithCSharpExpression() + { + // Arrange/Act + var generated = CompileToCSharp(@" + +@(""My value"") + +

    Hello

    "); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void LeadingWhiteSpace_WithComponent() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class SomeOtherComponent : ComponentBase + { + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +

    Hello

    "); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void TrailingWhiteSpace_WithDirective() + { + // Arrange/Act + var generated = CompileToCSharp(@" +

    Hello

    + +@page ""/my/url"" + +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void TrailingWhiteSpace_WithCSharpExpression() + { + // Arrange/Act + var generated = CompileToCSharp(@" +

    Hello

    + +@(""My value"") + +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void TrailingWhiteSpace_WithComponent() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class SomeOtherComponent : ComponentBase + { + } +} +")); + + // Act + var generated = CompileToCSharp(@" +

    Hello

    + + + +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void Whitespace_BetweenElementAndFunctions() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" + + @functions { + int Foo = 18; + } +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void WhiteSpace_InsideAttribute_InMarkupBlock() + { + // Arrange + + // Act + var generated = CompileToCSharp(@"
    Hello
    "); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + #endregion + + #region Imports + [Fact] + public void Component_WithImportsFile() + { + // Arrange + var importContent = @" +@using System.Text +@using System.Reflection +"; + var importItem = CreateProjectItem("_Imports.razor", importContent, FileKinds.ComponentImport); + ImportItems.Add(importItem); + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class Counter : ComponentBase + { + public int Count { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ComponentImports() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +namespace Test +{ + public class MainLayout : ComponentBase, ILayoutComponent + { + public RenderFragment Body { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp("_Imports.razor", @" +@using System.Text +@using System.Reflection + +@layout MainLayout +@Foo +
    Hello
    +", throwOnFailure: false, fileKind: FileKinds.ComponentImport); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated, throwOnFailure: false); + } + #endregion + + #region Misc + + [Fact] // We don't process - we just skip them + public void Component_WithDocType() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" + +
    +
    "); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void ScriptTag_WithErrorSuppressed() + { + // Arrange/Act + var generated = CompileToCSharp(@" +
    + +
    +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] // https://github.com/aspnet/Blazor/issues/597 + public void Regression_597() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class Counter : ComponentBase + { + public int Count { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + +@functions { + string y = null; +} +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void Regression_609() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class User : ComponentBase + { + public string Name { get; set; } + public Action NameChanged { get; set; } + public bool IsActive { get; set; } + public Action IsActiveChanged { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + + +@functions { + public string UserName { get; set; } + public bool UserIsActive { get; set; } +} +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] // https://github.com/aspnet/Blazor/issues/772 + public void Regression_772() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class SurveyPrompt : ComponentBase + { + [Parameter] private string Title { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +@page ""/"" + +

    Hello, world!

    + +Welcome to your new app. + + d.Id), + d => Assert.Equal("RZ1034", d.Id), + d => Assert.Equal("RZ1035", d.Id)); + } + + [Fact] // https://github.com/aspnet/Blazor/issues/773 + public void Regression_773() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class SurveyPrompt : ComponentBase + { + [Parameter] private string Title { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" +@page ""/"" + +

    Hello, world!

    + +Welcome to your new app. + +Test!
    "" /> +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void Regression_784() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" +

    +@functions { + public string ParentBgColor { get; set; } = ""#FFFFFF""; + + public void OnComponentHover(UIMouseEventArgs e) + { + } +} +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void EventHandlerTagHelper_EscapeQuotes() + { + // Act + var generated = CompileToCSharp(@" + +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + [Fact] + public void Component_TextTagsAreNotRendered() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class Counter : ComponentBase + { + public int Count { get; set; } + } +} +")); + + // Act + var generated = CompileToCSharp(@" + +@if (true) +{ + This text is rendered +} +"); + + // Assert + AssertDocumentNodeMatchesBaseline(generated.CodeDocument); + AssertCSharpDocumentMatchesBaseline(generated.CodeDocument); + CompileToAssembly(generated); + } + + #endregion + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDeclarationIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDeclarationIntegrationTest.cs new file mode 100644 index 0000000000..0ac00af80f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDeclarationIntegrationTest.cs @@ -0,0 +1,175 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Reflection; +using System.Text; +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.RenderTree; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + public class ComponentDeclarationRazorIntegrationTest : RazorIntegrationTestBase + { + public ComponentDeclarationRazorIntegrationTest() + { + // Include this assembly to use types defined in tests. + BaseCompilation = DefaultBaseCompilation.AddReferences(MetadataReference.CreateFromFile(GetType().Assembly.Location)); + } + + internal override CSharpCompilation BaseCompilation { get; } + + internal override string FileKind => FileKinds.Component; + + internal override bool DeclarationOnly => true; + + [Fact] + public void DeclarationConfiguration_IncludesFunctions() + { + // Arrange & Act + var component = CompileToComponent(@" +@functions { + public string Value { get; set; } +}"); + + // Assert + var property = component.GetType().GetProperty("Value"); + Assert.NotNull(property); + Assert.Same(typeof(string), property.PropertyType); + } + + [Fact] + public void DeclarationConfiguration_IncludesInject() + { + // Arrange & Act + var component = CompileToComponent(@" +@inject string Value +"); + + // Assert + var property = component.GetType().GetProperty("Value", BindingFlags.NonPublic | BindingFlags.Instance); + Assert.NotNull(property); + Assert.Same(typeof(string), property.PropertyType); + } + + [Fact] + public void DeclarationConfiguration_IncludesUsings() + { + // Arrange & Act + var component = CompileToComponent(@" +@using System.Text +@inject StringBuilder Value +"); + + // Assert + var property = component.GetType().GetProperty("Value", BindingFlags.NonPublic | BindingFlags.Instance); + Assert.NotNull(property); + Assert.Same(typeof(StringBuilder), property.PropertyType); + } + + [Fact] + public void DeclarationConfiguration_IncludesInherits() + { + // Arrange & Act + var component = CompileToComponent($@" +@inherits {FullTypeName()} +"); + + // Assert + Assert.Same(typeof(BaseClass), component.GetType().BaseType); + } + + [Fact] + public void DeclarationConfiguration_IncludesImplements() + { + // Arrange & Act + var component = CompileToComponent($@" +@implements {FullTypeName()} +"); + + // Assert + var type = component.GetType(); + Assert.Contains(typeof(IDoCoolThings), component.GetType().GetInterfaces()); + } + + [Fact] // Regression test for https://github.com/aspnet/Blazor/issues/453 + public void DeclarationConfiguration_FunctionsBlockHasLineMappings_MappingsApplyToError() + { + // Arrange & Act 1 + var generated = CompileToCSharp(@" +@functions { + public StringBuilder Builder { get; set; } +} +"); + + // Assert 1 + AssertSourceEquals(@" +// +#pragma warning disable 1591 +#pragma warning disable 0414 +#pragma warning disable 0649 +#pragma warning disable 0169 + +namespace Test +{ + #line hidden + using System; + using System.Collections.Generic; + using System.Linq; + using System.Threading.Tasks; + using Microsoft.AspNetCore.Components; + public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase + { + #pragma warning disable 1998 + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) + { + } + #pragma warning restore 1998 +#nullable restore +#line 1 ""x:\dir\subdir\Test\TestComponent.cshtml"" + + public StringBuilder Builder { get; set; } + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 +", generated); + + // Act 2 + var assembly = CompileToAssembly(generated, throwOnFailure: false); + + // Assert 2 + var diagnostic = Assert.Single(assembly.Diagnostics); + + // This error should map to line 2 of the generated file, the test + // says 1 because Roslyn's line/column data structures are 0-based. + var position = diagnostic.Location.GetMappedLineSpan(); + Assert.EndsWith(".cshtml", position.Path); + Assert.Equal(1, position.StartLinePosition.Line); + } + + public class BaseClass : IComponent + { + public void Init(RenderHandle renderHandle) + { + } + + protected virtual void BuildRenderTree(RenderTreeBuilder builder) + { + } + + public void SetParameters(ParameterCollection parameters) + { + } + } + + public interface IDoCoolThings + { + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDesignTimeCodeGenerationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDesignTimeCodeGenerationTest.cs new file mode 100644 index 0000000000..f86a7d8d23 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDesignTimeCodeGenerationTest.cs @@ -0,0 +1,10 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + public class ComponentDesignTimeCodeGenerationTest : ComponentCodeGenerationTestBase + { + internal override bool DesignTime => true; + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDiagnosticRazorIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDiagnosticRazorIntegrationTest.cs new file mode 100644 index 0000000000..1a193ca547 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDiagnosticRazorIntegrationTest.cs @@ -0,0 +1,111 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + public class ComponentDiagnosticRazorIntegrationTest : RazorIntegrationTestBase + { + internal override string FileKind => FileKinds.Component; + + [Fact] + public void RejectsEndTagWithNoStartTag() + { + // Arrange/Act + var result = CompileToCSharp( + "Line1\nLine2\nLine3"); + + // Assert + Assert.Collection(result.Diagnostics, + item => + { + Assert.Equal("RZ9981", item.Id); + Assert.Equal("Unexpected closing tag 'mytag' with no matching start tag.", item.GetMessage()); + }); + } + + // This used to be a sugar syntax for lambdas, but we don't support that anymore + [Fact] + public void OldCodeBlockAttributeSyntax_ReportsError() + { + // Arrange/Act + var generated = CompileToCSharp(@" + +@functions { + public bool DidInvokeCode { get; set; } = false; +}"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Equal("RZ9979", diagnostic.Id); + Assert.NotNull(diagnostic.GetMessage()); + + } + + [Fact] + public void RejectsScriptTag() + { + // Arrange/Act + var result = CompileToCSharp(@"Hello +

    + +
    +Goodbye"); + + // Assert + Assert.Collection(result.Diagnostics, + item => + { + Assert.Equal("RZ9992", item.Id); + Assert.Equal("Script tags should not be placed inside components because they cannot be updated dynamically. To fix this, move the script tag to the 'index.html' file or another static location. For more information see https://go.microsoft.com/fwlink/?linkid=872131", item.GetMessage()); + Assert.Equal(2, item.Span.LineIndex); + Assert.Equal(4, item.Span.CharacterIndex); + }); + } + + [Fact] + public void RejectsTagHelperDirectives() + { + // Arrange/Act + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + } +} +")); + + var result = CompileToCSharp(@" +@addTagHelper *, TestAssembly +@tagHelperPrefix th + + +"); + + // Assert + Assert.Collection(result.Diagnostics, + item => + { + Assert.Equal("RZ9978", item.Id); + Assert.Equal("The directives @addTagHelper, @removeTagHelper and @tagHelperPrefix are not valid in a component document. " + + "Use '@using ' directive instead.", item.GetMessage()); + Assert.Equal(0, item.Span.LineIndex); + Assert.Equal(0, item.Span.CharacterIndex); + }, + item => + { + Assert.Equal("RZ9978", item.Id); + Assert.Equal("The directives @addTagHelper, @removeTagHelper and @tagHelperPrefix are not valid in a component document. " + + "Use '@using ' directive instead.", item.GetMessage()); + Assert.Equal(1, item.Span.LineIndex); + Assert.Equal(0, item.Span.CharacterIndex); + }); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDirectiveIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDirectiveIntegrationTest.cs new file mode 100644 index 0000000000..4e5fe27b4c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDirectiveIntegrationTest.cs @@ -0,0 +1,150 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Linq; +using System.Reflection; +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Layouts; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + // Integration tests for component directives + public class ComponentDirectiveIntegrationTest : RazorIntegrationTestBase + { + public ComponentDirectiveIntegrationTest() + { + // Include this assembly to use types defined in tests. + BaseCompilation = DefaultBaseCompilation.AddReferences(MetadataReference.CreateFromFile(GetType().Assembly.Location)); + } + + internal override CSharpCompilation BaseCompilation { get; } + + internal override string FileKind => FileKinds.Component; + + [Fact] + public void ComponentsDoNotHaveLayoutAttributeByDefault() + { + // Arrange/Act + var component = CompileToComponent($"Hello"); + + // Assert + Assert.Null(component.GetType().GetCustomAttribute()); + } + + [Fact] + public void SupportsLayoutDeclarations() + { + // Arrange/Act + var testComponentTypeName = FullTypeName(); + var component = CompileToComponent( + $"@layout {testComponentTypeName}\n" + + $"Hello"); + + // Assert + var layoutAttribute = component.GetType().GetCustomAttribute(); + Assert.NotNull(layoutAttribute); + Assert.Equal(typeof(TestLayout), layoutAttribute.LayoutType); + } + + [Fact] + public void SupportsImplementsDeclarations() + { + // Arrange/Act + var testInterfaceTypeName = FullTypeName(); + var component = CompileToComponent( + $"@implements {testInterfaceTypeName}\n" + + $"Hello"); + + // Assert + Assert.IsAssignableFrom(component); + } + + [Fact] + public void SupportsMultipleImplementsDeclarations() + { + // Arrange/Act + var testInterfaceTypeName = FullTypeName(); + var testInterfaceTypeName2 = FullTypeName(); + var component = CompileToComponent( + $"@implements {testInterfaceTypeName}\n" + + $"@implements {testInterfaceTypeName2}\n" + + $"Hello"); + + // Assert + Assert.IsAssignableFrom(component); + Assert.IsAssignableFrom(component); + } + + [Fact] + public void SupportsInheritsDirective() + { + // Arrange/Act + var testBaseClassTypeName = FullTypeName(); + var component = CompileToComponent( + $"@inherits {testBaseClassTypeName}" + Environment.NewLine + + $"Hello"); + + // Assert + Assert.IsAssignableFrom(component); + } + + [Fact] + public void SupportsInjectDirective() + { + // Arrange/Act 1: Compilation + var componentType = CompileToComponent( + $"@inject {FullTypeName()} MyService1\n" + + $"@inject {FullTypeName()} MyService2\n" + + $"Hello from @MyService1 and @MyService2").GetType(); + + // Assert 1: Compiled type has correct properties + var propertyFlags = BindingFlags.Instance | BindingFlags.NonPublic; + var injectableProperties = componentType.GetProperties(propertyFlags) + .Where(p => p.GetCustomAttribute() != null); + Assert.Collection(injectableProperties.OrderBy(p => p.Name), + property => + { + Assert.Equal("MyService1", property.Name); + Assert.Equal(typeof(IMyService1), property.PropertyType); + Assert.False(property.GetMethod.IsPublic); + Assert.False(property.SetMethod.IsPublic); + }, + property => + { + Assert.Equal("MyService2", property.Name); + Assert.Equal(typeof(IMyService2), property.PropertyType); + Assert.False(property.GetMethod.IsPublic); + Assert.False(property.SetMethod.IsPublic); + }); + } + + public class TestLayout : IComponent + { + [Parameter] + RenderFragment Body { get; set; } + + public void Init(RenderHandle renderHandle) + { + } + + public void SetParameters(ParameterCollection parameters) + { + } + } + + public interface ITestInterface { } + + public interface ITestInterface2 { } + + public class TestBaseClass : ComponentBase { } + + public interface IMyService1 { } + public interface IMyService2 { } + public class MyService1Impl : IMyService1 { } + public class MyService2Impl : IMyService2 { } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDiscoveryIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDiscoveryIntegrationTest.cs new file mode 100644 index 0000000000..cbabebaade --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDiscoveryIntegrationTest.cs @@ -0,0 +1,121 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Components; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + public class ComponentDiscoveryIntegrationTest : RazorIntegrationTestBase + { + internal override string FileKind => FileKinds.Component; + + internal override bool UseTwoPhaseCompilation => true; + + [Fact] + public void ComponentDiscovery_CanFindComponent_DefinedinCSharp() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + } +} +")); + + // Act + var result = CompileToCSharp(string.Empty); + + // Assert + var bindings = result.CodeDocument.GetTagHelperContext(); + Assert.Contains(bindings.TagHelpers, t => t.Name == "Test.MyComponent"); + } + + [Fact] + public void ComponentDiscovery_CanFindComponent_WithNamespace_DefinedinCSharp() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test.AnotherNamespace +{ + public class MyComponent : ComponentBase + { + } +} +")); + + // Act + var result = CompileToCSharp(string.Empty); + + // Assert + var bindings = result.CodeDocument.GetTagHelperContext(); + + Assert.Contains(bindings.TagHelpers, t => + { + return t.Name == "Test.AnotherNamespace.MyComponent" && + t.IsComponentFullyQualifiedNameMatch(); + }); + + Assert.DoesNotContain(bindings.TagHelpers, t => + { + return t.Name == "Test.AnotherNamespace.MyComponent" && + !t.IsComponentFullyQualifiedNameMatch(); + }); + } + + [Fact] + public void ComponentDiscovery_CanFindComponent_DefinedinCshtml() + { + // Arrange + + // Act + var result = CompileToCSharp("UniqueName.cshtml", string.Empty); + + // Assert + var bindings = result.CodeDocument.GetTagHelperContext(); + Assert.Contains(bindings.TagHelpers, t => t.Name == "Test.UniqueName"); + } + + [Fact] + public void ComponentDiscovery_CanFindComponent_WithTypeParameter() + { + // Arrange + + // Act + var result = CompileToCSharp("UniqueName.cshtml", @" +@typeparam TItem +@functions { + [Parameter] TItem Item { get; set; } +}"); + + // Assert + var bindings = result.CodeDocument.GetTagHelperContext(); + Assert.Contains(bindings.TagHelpers, t => t.Name == "Test.UniqueName"); + } + + [Fact] + public void ComponentDiscovery_CanFindComponent_WithMultipleTypeParameters() + { + // Arrange + + // Act + var result = CompileToCSharp("UniqueName.cshtml", @" +@typeparam TItem1 +@typeparam TItem2 +@typeparam TItem3 +@functions { + [Parameter] TItem1 Item { get; set; } +}"); + + // Assert + var bindings = result.CodeDocument.GetTagHelperContext(); + Assert.Contains(bindings.TagHelpers, t => t.Name == "Test.UniqueName"); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentFilePathIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentFilePathIntegrationTest.cs new file mode 100644 index 0000000000..2b3a60c2a6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentFilePathIntegrationTest.cs @@ -0,0 +1,50 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.IO; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + // Integration tests focused on file path handling for class/namespace names + public class ComponentFilePathIntegrationTest : RazorIntegrationTestBase + { + internal override string FileKind => FileKinds.Component; + + [Fact] + public void FileNameIsInvalidClassName_SanitizesInvalidClassName() + { + // Arrange + + // Act + var result = CompileToAssembly("Filename with spaces.cshtml", ""); + + // Assert + Assert.Empty(result.Diagnostics); + + var type = Assert.Single(result.Assembly.GetTypes()); + Assert.Equal(DefaultRootNamespace, type.Namespace); + Assert.Equal("Filename_with_spaces", type.Name); + } + + [Theory] + [InlineData("ItemAtRoot.cs", "Test", "ItemAtRoot")] + [InlineData("Dir1\\MyFile.cs", "Test.Dir1", "MyFile")] + [InlineData("Dir1\\Dir2\\MyFile.cs", "Test.Dir1.Dir2", "MyFile")] + public void CreatesClassWithCorrectNameAndNamespace(string relativePath, string expectedNamespace, string expectedClassName) + { + // Arrange + relativePath = relativePath.Replace('\\', Path.DirectorySeparatorChar); + + // Act + var result = CompileToAssembly(relativePath, ""); + + // Assert + Assert.Empty(result.Diagnostics); + + var type = Assert.Single(result.Assembly.GetTypes()); + Assert.Equal(expectedNamespace, type.Namespace); + Assert.Equal(expectedClassName, type.Name); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentGenericTypeIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentGenericTypeIntegrationTest.cs new file mode 100644 index 0000000000..bb73fe42be --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentGenericTypeIntegrationTest.cs @@ -0,0 +1,124 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Razor.Language.Components; +using Microsoft.CodeAnalysis.CSharp; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + public class ComponentGenericTypeIntegrationTest : RazorIntegrationTestBase + { + private readonly CSharpSyntaxTree GenericContextComponent = Parse(@" +using System; +using System.Collections.Generic; +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.RenderTree; +namespace Test +{ + public class GenericContext : ComponentBase + { + protected override void BuildRenderTree(RenderTreeBuilder builder) + { + var items = (IReadOnlyList)Items ?? Array.Empty(); + for (var i = 0; i < items.Count; i++) + { + if (ChildContent == null) + { + builder.AddContent(i, Items[i]); + } + else + { + builder.AddContent(i, ChildContent, new Context() { Index = i, Item = items[i], }); + } + } + } + + [Parameter] + List Items { get; set; } + + [Parameter] + RenderFragment ChildContent { get; set; } + + public class Context + { + public int Index { get; set; } + public TItem Item { get; set; } + } + } +} +"); + + private readonly CSharpSyntaxTree MultipleGenericParameterComponent = Parse(@" +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.RenderTree; +namespace Test +{ + public class MultipleGenericParameter : ComponentBase + { + protected override void BuildRenderTree(RenderTreeBuilder builder) + { + builder.AddContent(0, Item1); + builder.AddContent(1, Item2); + builder.AddContent(2, Item3); + } + + [Parameter] + TItem1 Item1 { get; set; } + + [Parameter] + TItem2 Item2 { get; set; } + + [Parameter] + TItem3 Item3 { get; set; } + } +} +"); + + internal override string FileKind => FileKinds.Component; + + internal override bool UseTwoPhaseCompilation => true; + + [Fact] + public void GenericComponent_WithoutAnyTypeParameters_TriggersDiagnostic() + { + // Arrange + AdditionalSyntaxTrees.Add(GenericContextComponent); + + // Act + var generated = CompileToCSharp(@" +"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Same(ComponentDiagnosticFactory.GenericComponentTypeInferenceUnderspecified.Id, diagnostic.Id); + Assert.Equal( + "The type of component 'GenericContext' cannot be inferred based on the values provided. Consider " + + "specifying the type arguments directly using the following attributes: 'TItem'.", + diagnostic.GetMessage()); + } + + [Fact] + public void GenericComponent_WithMissingTypeParameters_TriggersDiagnostic() + { + // Arrange + AdditionalSyntaxTrees.Add(MultipleGenericParameterComponent); + + // Act + var generated = CompileToCSharp(@" +"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Same(ComponentDiagnosticFactory.GenericComponentMissingTypeArgument.Id, diagnostic.Id); + Assert.Equal( + "The component 'MultipleGenericParameter' is missing required type arguments. " + + "Specify the missing types using the attributes: 'TItem2', 'TItem3'.", + diagnostic.GetMessage()); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentImportsIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentImportsIntegrationTest.cs new file mode 100644 index 0000000000..a4241730fe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentImportsIntegrationTest.cs @@ -0,0 +1,191 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + public class ComponentImportsIntegrationTest : RazorIntegrationTestBase + { + internal override string FileKind => FileKinds.ComponentImport; + + [Fact] + public void NoErrorsForUsingStatements() + { + // Arrange/Act + var result = CompileToCSharp("_Imports.razor", @" +@using System.Text +@using System.Reflection +@* This is allowed in imports *@ +"); + + // Assert + Assert.Empty(result.Diagnostics); + } + + [Fact] + public void NoErrorsForRazorComments() + { + // Arrange/Act + var result = CompileToCSharp("_Imports.razor", @" +@* This is allowed in imports *@ +"); + + // Assert + Assert.Empty(result.Diagnostics); + } + + [Fact] + public void NoErrorsForSupportedDirectives() + { + // Arrange/Act + var result = CompileToCSharp("_Imports.razor", @" +@inject FooService Foo +@typeparam TItem +@implements ISomeInterface +@inherits SomeNamespace.SomeBaseType +"); + + // Assert + Assert.Empty(result.Diagnostics); + } + + [Fact] + public void ErrorsForPageDirective() + { + // Arrange/Act + var result = CompileToCSharp("_Imports.razor", @" +@page ""/"" +"); + + // Assert + Assert.Collection(result.Diagnostics, + item => + { + Assert.Equal("RZ9987", item.Id); + Assert.Equal(@"The '@page' directive specified in _Imports.razor file will not be imported. The directive must appear at the top of each Razor file", item.GetMessage()); + }); + } + + [Fact] + public void ErrorsForTagHelperDirectives() + { + // Arrange/Act + var result = CompileToCSharp("_Imports.razor", @" +@addTagHelper *, TestAssembly +@removeTagHelper *, TestAssembly +@tagHelperPrefix th: +"); + + // Assert + Assert.Collection(result.Diagnostics, + item => + { + Assert.Equal("RZ9978", item.Id); + Assert.Equal(0, item.Span.LineIndex); + Assert.Equal(@"The directives @addTagHelper, @removeTagHelper and @tagHelperPrefix are not valid in a component document. Use '@using ' directive instead.", item.GetMessage()); + }, + item => + { + Assert.Equal("RZ9978", item.Id); + Assert.Equal(1, item.Span.LineIndex); + Assert.Equal(@"The directives @addTagHelper, @removeTagHelper and @tagHelperPrefix are not valid in a component document. Use '@using ' directive instead.", item.GetMessage()); + }, + item => + { + Assert.Equal("RZ9978", item.Id); + Assert.Equal(2, item.Span.LineIndex); + Assert.Equal(@"The directives @addTagHelper, @removeTagHelper and @tagHelperPrefix are not valid in a component document. Use '@using ' directive instead.", item.GetMessage()); + }); + } + + [Fact] + public void ErrorsForFunctionsDirective() + { + // Arrange/Act + var result = CompileToCSharp("_Imports.razor", @" +@functions { + public class Test + { + } +} +"); + + // Assert + Assert.Collection(result.Diagnostics, + item => + { + Assert.Equal("RZ10003", item.Id); + Assert.Equal(@"Markup, code and block directives are not valid in component imports.", item.GetMessage()); + }); + } + + [Fact] + public void ErrorsForSectionDirective() + { + // Arrange/Act + var result = CompileToCSharp("_Imports.razor", @" +@section Foo { +} +"); + + // Assert + Assert.Collection(result.Diagnostics, + item => + { + Assert.Equal("RZ10003", item.Id); + Assert.Equal(@"Markup, code and block directives are not valid in component imports.", item.GetMessage()); + }); + } + + [Fact] + public void ErrorsForMarkup() + { + // Arrange/Act + var result = CompileToCSharp("_Imports.razor", @" +
    asdf
    +"); + + // Assert + Assert.Collection(result.Diagnostics, + item => + { + Assert.Equal("RZ10003", item.Id); + Assert.Equal(@"Markup, code and block directives are not valid in component imports.", item.GetMessage()); + }); + } + + [Fact] + public void ErrorsForCode() + { + // Arrange/Act + var result = CompileToCSharp("_Imports.razor", @" +@Foo +@(Bar) +@{ + var x = Foo; +}"); + + // Assert + Assert.Collection(result.Diagnostics, + item => + { + Assert.Equal("RZ10003", item.Id); + Assert.Equal(0, item.Span.LineIndex); + Assert.Equal(@"Markup, code and block directives are not valid in component imports.", item.GetMessage()); + }, + item => + { + Assert.Equal("RZ10003", item.Id); + Assert.Equal(1, item.Span.LineIndex); + Assert.Equal(@"Markup, code and block directives are not valid in component imports.", item.GetMessage()); + }, + item => + { + Assert.Equal("RZ10003", item.Id); + Assert.Equal(2, item.Span.LineIndex); + Assert.Equal(@"Markup, code and block directives are not valid in component imports.", item.GetMessage()); + }); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentRuntimeCodeGenerationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentRuntimeCodeGenerationTest.cs new file mode 100644 index 0000000000..dd49348086 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentRuntimeCodeGenerationTest.cs @@ -0,0 +1,9 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + public class ComponentRuntimeCodeGenerationTest : ComponentCodeGenerationTestBase + { + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentTemplateIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentTemplateIntegrationTest.cs new file mode 100644 index 0000000000..9a73796a2e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentTemplateIntegrationTest.cs @@ -0,0 +1,127 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + public class ComponentTemplateIntegrationTest : RazorIntegrationTestBase + { + internal override string FileKind => FileKinds.Component; + + // Razor doesn't parse this as a template, we don't need much special handling for + // it because it will just be invalid in general. + [Fact] + public void Template_ImplicitExpressionInMarkupAttribute_CreatesDiagnostic() + { + // Arrange + + // Act + var generated = CompileToCSharp(@"
    "" />"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Equal("RZ1005", diagnostic.Id); + } + + [Fact] + public void Template_ExplicitExpressionInMarkupAttribute_CreatesDiagnostic() + { + // Arrange + + // Act + var generated = CompileToCSharp(@"
    )"" />"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Equal("RZ9994", diagnostic.Id); + } + + // Razor doesn't parse this as a template, we don't need much special handling for + // it because it will just be invalid in general. + [Fact] + public void Template_ImplicitExpressionInComponentAttribute_CreatesDiagnostic() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + } +} +")); + + // Act + var generated = CompileToCSharp(@"
    "" />"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Equal("RZ1005", diagnostic.Id); + } + + [Fact] + public void Template_ExplicitExpressionInComponentAttribute_CreatesDiagnostic() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + } +} +")); + // Act + var generated = CompileToCSharp(@"
    )"" />"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Equal("RZ9994", diagnostic.Id); + } + + [Fact] + public void Template_ExplicitExpressionInRef_CreatesDiagnostic() + { + // Arrange + + // Act + var generated = CompileToCSharp(@"
    )"" />"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Equal("RZ9994", diagnostic.Id); + } + + + [Fact] + public void Template_ExplicitExpressionInBind_CreatesDiagnostic() + { + // Arrange + + // Act + var generated = CompileToCSharp(@"
    )"" />"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Equal("RZ9994", diagnostic.Id); + } + + [Fact] + public void Template_ExplicitExpressionInEventHandler_CreatesDiagnostic() + { + // Arrange + + // Act + var generated = CompileToCSharp(@"
    )"" />"); + + // Assert + var diagnostic = Assert.Single(generated.Diagnostics); + Assert.Equal("RZ9994", diagnostic.Id); + } + } +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentTypingTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentTypingTest.cs new file mode 100644 index 0000000000..092d6e7595 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentTypingTest.cs @@ -0,0 +1,130 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Linq; +using Xunit; +using Xunit.Sdk; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + // Similar to design time code generation tests, but goes a character at a time. + // Don't add many of these since they are slow - instead add features to existing + // tests here, and use these as smoke tests, not for detailed regression testing. + public class ComponentTypingTest : RazorIntegrationTestBase + { + internal override bool DesignTime => true; + + internal override string FileKind => FileKinds.Component; + + internal override bool UseTwoPhaseCompilation => true; + + [Fact] + public void DoSomeTyping() + { + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] int Value { get; set; } + [Parameter] Action ValueChanged { get; set; } + [Parameter] string AnotherValue { get; set; } + } + + public class ModelState + { + public Action Bind(Func func) => throw null; + } +} +")); + var text = @" +
    + + x)"" /> + +
    + +@functions { + Test.ModelState ModelState { get; set; } +}"; + + for (var i = 0; i <= text.Length; i++) + { + try + { + CompileToCSharp(text.Substring(0, i), throwOnFailure: false); + } + catch (Exception ex) + { + throw new XunitException($@" +Code generation failed on iteration {i} with source text: +{text.Substring(0, i)} + +Exception: +{ex} +"); + } + } + } + + [Fact] // Regression test for #1068 + public void Regression_1068() + { + // Arrange + + // Act + var generated = CompileToCSharp(@" + +@functions { + Test.ModelState ModelState { get; set; } +} +", throwOnFailure: false); + + // Assert + } + + [Fact] + public void MalformedAttributeContent() + { + // Act + // Arrange + AdditionalSyntaxTrees.Add(Parse(@" +using System; +using Microsoft.AspNetCore.Components; + +namespace Test +{ + public class MyComponent : ComponentBase + { + [Parameter] int Value { get; set; } + [Parameter] Action ValueChanged { get; set; } + [Parameter] string AnotherValue { get; set; } + } + + public class ModelState + { + public Action Bind(Func func) => throw null; + } +} +")); + var generated = CompileToCSharp(@" + await SaveAsync(false))> +@functions { + Test.ModelState ModelState { get; set; } +}", throwOnFailure: false); + + // Assert - does not throw + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ExtensibleDirectiveTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ExtensibleDirectiveTest.cs new file mode 100644 index 0000000000..11bfe9793e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ExtensibleDirectiveTest.cs @@ -0,0 +1,38 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + // Extensible directives only have codegen for design time, so we're only testing that. + public class ExtensibleDirectiveTest : IntegrationTestBase + { + public ExtensibleDirectiveTest() + : base(generateBaselines: null) + { + } + + [Fact] + public void NamespaceToken() + { + // Arrange + var engine = CreateProjectEngine(builder => + { + builder.ConfigureDocumentClassifier(); + + builder.AddDirective(DirectiveDescriptor.CreateDirective("custom", DirectiveKind.SingleLine, b => b.AddNamespaceToken())); + }); + + var projectItem = CreateProjectItemFromFile(); + + // Act + var codeDocument = engine.ProcessDesignTime(projectItem); + + // Assert + AssertDocumentNodeMatchesBaseline(codeDocument.GetDocumentIntermediateNode()); + AssertCSharpDocumentMatchesBaseline(codeDocument.GetCSharpDocument()); + AssertSourceMappingsMatchBaseline(codeDocument); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/HtmlAttributeIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/HtmlAttributeIntegrationTest.cs new file mode 100644 index 0000000000..7fd26ffd80 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/HtmlAttributeIntegrationTest.cs @@ -0,0 +1,36 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + public class HtmlAttributeIntegrationTest : IntegrationTestBase + { + [Fact] + public void HtmlWithDataDashAttribute() + { + // Arrange + var projectItem = CreateProjectItemFromFile(); + + // Act + var compiled = CompileToCSharp(projectItem); + + // Assert + AssertDocumentNodeMatchesBaseline(compiled.CodeDocument.GetDocumentIntermediateNode()); + } + + [Fact] + public void HtmlWithConditionalAttribute() + { + // Arrange + var projectItem = CreateProjectItemFromFile(); + + // Act + var compiled = CompileToCSharp(projectItem); + + // Assert + AssertDocumentNodeMatchesBaseline(compiled.CodeDocument.GetDocumentIntermediateNode()); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/TagHelpersIntegrationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/TagHelpersIntegrationTest.cs new file mode 100644 index 0000000000..c5c9810e76 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/TagHelpersIntegrationTest.cs @@ -0,0 +1,126 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + public class TagHelpersIntegrationTest : IntegrationTestBase + { + [Fact] + public void SimpleTagHelpers() + { + // Arrange + var descriptors = new[] + { + CreateTagHelperDescriptor( + tagName: "input", + typeName: "InputTagHelper", + assemblyName: "TestAssembly") + }; + + var projectEngine = CreateProjectEngine(builder => builder.AddTagHelpers(descriptors)); + var projectItem = CreateProjectItemFromFile(); + + // Act + var codeDocument = projectEngine.Process(projectItem); + + // Assert + AssertDocumentNodeMatchesBaseline(codeDocument.GetDocumentIntermediateNode()); + } + + [Fact] + public void TagHelpersWithBoundAttributes() + { + // Arrange + var descriptors = new[] + { + CreateTagHelperDescriptor( + tagName: "input", + typeName: "InputTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("bound") + .PropertyName("FooProp") + .TypeName("System.String"), + }) + }; + + var projectEngine = CreateProjectEngine(builder => builder.AddTagHelpers(descriptors)); + var projectItem = CreateProjectItemFromFile(); + + // Act + var codeDocument = projectEngine.Process(projectItem); + + // Assert + AssertDocumentNodeMatchesBaseline(codeDocument.GetDocumentIntermediateNode()); + } + + [Fact] + public void NestedTagHelpers() + { + // Arrange + var descriptors = new[] + { + CreateTagHelperDescriptor( + tagName: "p", + typeName: "PTagHelper", + assemblyName: "TestAssembly"), + CreateTagHelperDescriptor( + tagName: "form", + typeName: "FormTagHelper", + assemblyName: "TestAssembly"), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "InputTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("value") + .PropertyName("FooProp") + .TypeName("System.String"), + }) + }; + + var projectEngine = CreateProjectEngine(builder => builder.AddTagHelpers(descriptors)); + var projectItem = CreateProjectItemFromFile(); + + // Act + var codeDocument = projectEngine.Process(projectItem); + + // Assert + var syntaxTree = codeDocument.GetSyntaxTree(); + var irTree = codeDocument.GetDocumentIntermediateNode(); + AssertDocumentNodeMatchesBaseline(codeDocument.GetDocumentIntermediateNode()); + } + + private static TagHelperDescriptor CreateTagHelperDescriptor( + string tagName, + string typeName, + string assemblyName, + IEnumerable> attributes = null) + { + var builder = TagHelperDescriptorBuilder.Create(typeName, assemblyName); + builder.TypeName(typeName); + + if (attributes != null) + { + foreach (var attributeBuilder in attributes) + { + builder.BoundAttributeDescriptor(attributeBuilder); + } + } + + builder.TagMatchingRuleDescriptor(ruleBuilder => ruleBuilder.RequireTagName(tagName)); + + var descriptor = builder.Build(); + + return descriptor; + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/TestTagHelperDescriptors.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/TestTagHelperDescriptors.cs new file mode 100644 index 0000000000..d2034b18e0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/TestTagHelperDescriptors.cs @@ -0,0 +1,637 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Reflection; + +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests +{ + public class TestTagHelperDescriptors + { + public static IEnumerable SimpleTagHelperDescriptors + { + get + { + return new[] + { + CreateTagHelperDescriptor( + tagName: "span", + typeName: "SpanTagHelper", + assemblyName: "TestAssembly"), + CreateTagHelperDescriptor( + tagName: "div", + typeName: "DivTagHelper", + assemblyName: "TestAssembly"), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "InputTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("value") + .PropertyName("FooProp") + .TypeName("System.String"), + builder => builder + .Name("bound") + .PropertyName("BoundProp") + .TypeName("System.String"), + builder => builder + .Name("age") + .PropertyName("AgeProp") + .TypeName("System.Int32"), + }) + }; + } + } + + public static IEnumerable MinimizedBooleanTagHelperDescriptors + { + get + { + return new[] + { + CreateTagHelperDescriptor( + tagName: "span", + typeName: "SpanTagHelper", + assemblyName: "TestAssembly"), + CreateTagHelperDescriptor( + tagName: "div", + typeName: "DivTagHelper", + assemblyName: "TestAssembly"), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "InputTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("value") + .PropertyName("FooProp") + .TypeName("System.String"), + builder => builder + .Name("bound") + .PropertyName("BoundProp") + .TypeName("System.Boolean"), + builder => builder + .Name("age") + .PropertyName("AgeProp") + .TypeName("System.Int32"), + }) + }; + } + } + + public static IEnumerable CssSelectorTagHelperDescriptors + { + get + { + var inputTypePropertyInfo = typeof(TestType).GetRuntimeProperty("Type"); + var inputCheckedPropertyInfo = typeof(TestType).GetRuntimeProperty("Checked"); + + return new[] + { + CreateTagHelperDescriptor( + tagName: "a", + typeName: "TestNamespace.ATagHelper", + assemblyName: "TestAssembly", + ruleBuilders: new Action[] + { + builder => builder + .RequireAttributeDescriptor(attribute => attribute + .Name("href") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch) + .Value("~/") + .ValueComparisonMode(RequiredAttributeDescriptor.ValueComparisonMode.FullMatch)), + }), + CreateTagHelperDescriptor( + tagName: "a", + typeName: "TestNamespace.ATagHelperMultipleSelectors", + assemblyName: "TestAssembly", + ruleBuilders: new Action[] + { + builder => builder + .RequireAttributeDescriptor(attribute => attribute + .Name("href") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch) + .Value("~/") + .ValueComparisonMode(RequiredAttributeDescriptor.ValueComparisonMode.PrefixMatch)) + .RequireAttributeDescriptor(attribute => attribute + .Name("href") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch) + .Value("?hello=world") + .ValueComparisonMode(RequiredAttributeDescriptor.ValueComparisonMode.SuffixMatch)), + }), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestNamespace.InputTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "type", inputTypePropertyInfo), + }, + ruleBuilders: new Action[] + { + builder => builder + .RequireAttributeDescriptor(attribute => attribute + .Name("type") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch) + .Value("text") + .ValueComparisonMode(RequiredAttributeDescriptor.ValueComparisonMode.FullMatch)), + }), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestNamespace.InputTagHelper2", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "type", inputTypePropertyInfo), + }, + ruleBuilders: new Action[] + { + builder => builder + .RequireAttributeDescriptor(attribute => attribute + .Name("ty") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.PrefixMatch)), + }), + CreateTagHelperDescriptor( + tagName: "*", + typeName: "TestNamespace.CatchAllTagHelper", + assemblyName: "TestAssembly", + ruleBuilders: new Action[] + { + builder => builder + .RequireAttributeDescriptor(attribute => attribute + .Name("href") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch) + .Value("~/") + .ValueComparisonMode(RequiredAttributeDescriptor.ValueComparisonMode.PrefixMatch)), + }), + CreateTagHelperDescriptor( + tagName: "*", + typeName: "TestNamespace.CatchAllTagHelper2", + assemblyName: "TestAssembly", + ruleBuilders: new Action[] + { + builder => builder + .RequireAttributeDescriptor(attribute => attribute + .Name("type") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch)), + }), + }; + } + } + + public static IEnumerable EnumTagHelperDescriptors + { + get + { + return new[] + { + CreateTagHelperDescriptor( + tagName: "*", + typeName: "TestNamespace.CatchAllTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("catch-all") + .PropertyName("CatchAll") + .AsEnum() + .TypeName($"{typeof(TestTagHelperDescriptors).FullName}.{nameof(MyEnum)}"), + }), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestNamespace.InputTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("value") + .PropertyName("Value") + .AsEnum() + .TypeName($"{typeof(TestTagHelperDescriptors).FullName}.{nameof(MyEnum)}"), + }), + }; + } + } + + public static IEnumerable SymbolBoundTagHelperDescriptors + { + get + { + return new[] + { + CreateTagHelperDescriptor( + tagName: "*", + typeName: "TestNamespace.CatchAllTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("[item]") + .PropertyName("ListItems") + .TypeName("System.Collections.Generic.List"), + builder => builder + .Name("[(item)]") + .PropertyName("ArrayItems") + .TypeName(typeof(string[]).FullName), + builder => builder + .Name("(click)") + .PropertyName("Event1") + .TypeName(typeof(Action).FullName), + builder => builder + .Name("(^click)") + .PropertyName("Event2") + .TypeName(typeof(Action).FullName), + builder => builder + .Name("*something") + .PropertyName("StringProperty1") + .TypeName(typeof(string).FullName), + builder => builder + .Name("#local") + .PropertyName("StringProperty2") + .TypeName(typeof(string).FullName), + }, + ruleBuilders: new Action[] + { + builder => builder.RequireAttributeDescriptor(attribute => attribute.Name("bound")), + }), + }; + } + } + + public static IEnumerable MinimizedTagHelpers_Descriptors + { + get + { + return new[] + { + CreateTagHelperDescriptor( + tagName: "*", + typeName: "TestNamespace.CatchAllTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("catchall-bound-string") + .PropertyName("BoundRequiredString") + .TypeName(typeof(string).FullName), + }, + ruleBuilders: new Action[] + { + builder => builder.RequireAttributeDescriptor(attribute => attribute.Name("catchall-unbound-required")), + }), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestNamespace.InputTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("input-bound-required-string") + .PropertyName("BoundRequiredString") + .TypeName(typeof(string).FullName), + builder => builder + .Name("input-bound-string") + .PropertyName("BoundString") + .TypeName(typeof(string).FullName), + }, + ruleBuilders: new Action[] + { + builder => builder + .RequireAttributeDescriptor(attribute => attribute.Name("input-bound-required-string")) + .RequireAttributeDescriptor(attribute => attribute.Name("input-unbound-required")), + }), + CreateTagHelperDescriptor( + tagName: "div", + typeName: "DivTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("boundbool") + .PropertyName("BoundBoolProp") + .TypeName(typeof(bool).FullName), + builder => builder + .Name("booldict") + .PropertyName("BoolDictProp") + .TypeName("System.Collections.Generic.IDictionary") + .AsDictionaryAttribute("booldict-prefix-", typeof(bool).FullName), + }), + }; + } + } + + public static IEnumerable DynamicAttributeTagHelpers_Descriptors + { + get + { + return new[] + { + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestNamespace.InputTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("bound") + .PropertyName("Bound") + .TypeName(typeof(string).FullName) + }), + }; + } + } + + public static IEnumerable DuplicateTargetTagHelperDescriptors + { + get + { + var typePropertyInfo = typeof(TestType).GetRuntimeProperty("Type"); + var checkedPropertyInfo = typeof(TestType).GetRuntimeProperty("Checked"); + return new[] + { + CreateTagHelperDescriptor( + tagName: "*", + typeName: "TestNamespace.CatchAllTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "type", typePropertyInfo), + builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "checked", checkedPropertyInfo), + }, + ruleBuilders: new Action[] + { + builder => builder.RequireAttributeDescriptor(attribute => attribute.Name("type")), + builder => builder.RequireAttributeDescriptor(attribute => attribute.Name("checked")) + }), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestNamespace.InputTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "type", typePropertyInfo), + builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "checked", checkedPropertyInfo), + }, + ruleBuilders: new Action[] + { + builder => builder.RequireAttributeDescriptor(attribute => attribute.Name("type")), + builder => builder.RequireAttributeDescriptor(attribute => attribute.Name("checked")) + }) + }; + } + } + + public static IEnumerable AttributeTargetingTagHelperDescriptors + { + get + { + var inputTypePropertyInfo = typeof(TestType).GetRuntimeProperty("Type"); + var inputCheckedPropertyInfo = typeof(TestType).GetRuntimeProperty("Checked"); + return new[] + { + CreateTagHelperDescriptor( + tagName: "p", + typeName: "TestNamespace.PTagHelper", + assemblyName: "TestAssembly", + ruleBuilders: new Action[] + { + builder => builder.RequireAttributeDescriptor(attribute => attribute.Name("class")), + }), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestNamespace.InputTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "type", inputTypePropertyInfo), + }, + ruleBuilders: new Action[] + { + builder => builder.RequireAttributeDescriptor(attribute => attribute.Name("type")), + }), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestNamespace.InputTagHelper2", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "type", inputTypePropertyInfo), + builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "checked", inputCheckedPropertyInfo), + }, + ruleBuilders: new Action[] + { + builder => builder + .RequireAttributeDescriptor(attribute => attribute.Name("type")) + .RequireAttributeDescriptor(attribute => attribute.Name("checked")), + }), + CreateTagHelperDescriptor( + tagName: "*", + typeName: "TestNamespace.CatchAllTagHelper", + assemblyName: "TestAssembly", + ruleBuilders: new Action[] + { + builder => builder.RequireAttributeDescriptor(attribute => attribute.Name("catchAll")), + }), + }; + } + } + + public static IEnumerable PrefixedAttributeTagHelperDescriptors + { + get + { + return new[] + { + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestNamespace.InputTagHelper1", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("int-prefix-grabber") + .PropertyName("IntProperty") + .TypeName(typeof(int).FullName), + builder => builder + .Name("int-dictionary") + .PropertyName("IntDictionaryProperty") + .TypeName("System.Collections.Generic.IDictionary") + .AsDictionaryAttribute("int-prefix-", typeof(int).FullName), + builder => builder + .Name("string-prefix-grabber") + .PropertyName("StringProperty") + .TypeName(typeof(string).FullName), + builder => builder + .Name("string-dictionary") + .PropertyName("StringDictionaryProperty") + .TypeName("Namespace.DictionaryWithoutParameterlessConstructor") + .AsDictionaryAttribute("string-prefix-", typeof(string).FullName), + }), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestNamespace.InputTagHelper2", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => builder + .Name("int-dictionary") + .PropertyName("IntDictionaryProperty") + .TypeName(typeof(int).FullName) + .AsDictionaryAttribute("int-prefix-", typeof(int).FullName), + builder => builder + .Name("string-dictionary") + .PropertyName("StringDictionaryProperty") + .TypeName("Namespace.DictionaryWithoutParameterlessConstructor") + .AsDictionaryAttribute("string-prefix-", typeof(string).FullName), + }), + }; + } + } + + public static IEnumerable TagHelpersInSectionDescriptors + { + get + { + var propertyInfo = typeof(TestType).GetRuntimeProperty("BoundProperty"); + return new[] + { + CreateTagHelperDescriptor( + tagName: "MyTagHelper", + typeName: "TestNamespace.MyTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "BoundProperty", propertyInfo), + }), + CreateTagHelperDescriptor( + tagName: "NestedTagHelper", + typeName: "TestNamespace.NestedTagHelper", + assemblyName: "TestAssembly"), + }; + } + } + + public static IEnumerable DefaultPAndInputTagHelperDescriptors + { + get + { + var pAgePropertyInfo = typeof(TestType).GetRuntimeProperty("Age"); + var inputTypePropertyInfo = typeof(TestType).GetRuntimeProperty("Type"); + var checkedPropertyInfo = typeof(TestType).GetRuntimeProperty("Checked"); + + return new[] + { + CreateTagHelperDescriptor( + tagName: "p", + typeName: "TestNamespace.PTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "age", pAgePropertyInfo), + }, + ruleBuilders: new Action[] + { + builder => builder.RequireTagStructure(TagStructure.NormalOrSelfClosing) + }), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestNamespace.InputTagHelper", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "type", inputTypePropertyInfo), + }, + ruleBuilders: new Action[] + { + builder => builder.RequireTagStructure(TagStructure.WithoutEndTag) + }), + CreateTagHelperDescriptor( + tagName: "input", + typeName: "TestNamespace.InputTagHelper2", + assemblyName: "TestAssembly", + attributes: new Action[] + { + builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "type", inputTypePropertyInfo), + builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "checked", checkedPropertyInfo), + }), + }; + } + } + + private static TagHelperDescriptor CreateTagHelperDescriptor( + string tagName, + string typeName, + string assemblyName, + IEnumerable> attributes = null, + IEnumerable> ruleBuilders = null) + { + var builder = TagHelperDescriptorBuilder.Create(typeName, assemblyName); + builder.TypeName(typeName); + + if (attributes != null) + { + foreach (var attributeBuilder in attributes) + { + builder.BoundAttributeDescriptor(attributeBuilder); + } + } + + if (ruleBuilders != null) + { + foreach (var ruleBuilder in ruleBuilders) + { + builder.TagMatchingRuleDescriptor(innerRuleBuilder => + { + innerRuleBuilder.RequireTagName(tagName); + ruleBuilder(innerRuleBuilder); + }); + } + } + else + { + builder.TagMatchingRuleDescriptor(ruleBuilder => ruleBuilder.RequireTagName(tagName)); + } + + var descriptor = builder.Build(); + + return descriptor; + } + + private static void BuildBoundAttributeDescriptorFromPropertyInfo( + BoundAttributeDescriptorBuilder builder, + string name, + PropertyInfo propertyInfo) + { + builder + .Name(name) + .PropertyName(propertyInfo.Name) + .TypeName(propertyInfo.PropertyType.FullName); + + if (propertyInfo.PropertyType.GetTypeInfo().IsEnum) + { + builder.AsEnum(); + } + } + + private class TestType + { + public int Age { get; set; } + + public string Type { get; set; } + + public bool Checked { get; set; } + + public string BoundProperty { get; set; } + } + + public enum MyEnum + { + MyValue, + MySecondValue + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/DefaultRazorIntermediateNodeBuilderTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/DefaultRazorIntermediateNodeBuilderTest.cs new file mode 100644 index 0000000000..f4813684e1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/DefaultRazorIntermediateNodeBuilderTest.cs @@ -0,0 +1,217 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Testing; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Intermediate +{ + public class DefaultRazorIntermediateNodeBuilderTest + { + [Fact] + public void Ctor_CreatesEmptyBuilder() + { + // Arrange & Act + var builder = new DefaultRazorIntermediateNodeBuilder(); + var current = builder.Current; + + // Assert + Assert.Null(current); + } + + [Fact] + public void Push_WhenEmpty_AddsNode() + { + // Arrange + var builder = new DefaultRazorIntermediateNodeBuilder(); + var node = new BasicIntermediateNode(); + + // Act + builder.Push(node); + + // Assert + Assert.Same(node, builder.Current); + } + + [Fact] + public void Push_WhenNonEmpty_SetsUpChild() + { + // Arrange + var builder = new DefaultRazorIntermediateNodeBuilder(); + + var parent = new BasicIntermediateNode(); + builder.Push(parent); + + var node = new BasicIntermediateNode(); + + // Act + builder.Push(node); + + // Assert + Assert.Same(node, builder.Current); + Assert.Collection(parent.Children, n => Assert.Same(node, n)); + } + + [Fact] + public void Pop_ThrowsWhenEmpty() + { + // Arrange + var builder = new DefaultRazorIntermediateNodeBuilder(); + + // Act & Assert + ExceptionAssert.Throws( + () => builder.Pop(), + "The 'Pop' operation is not valid when the builder is empty."); + } + + [Fact] + public void Pop_SingleNodeDepth_RemovesAndReturnsNode() + { + // Arrange + var builder = new DefaultRazorIntermediateNodeBuilder(); + + var node = new BasicIntermediateNode(); + builder.Push(node); + + // Act + var result = builder.Pop(); + + // Assert + Assert.Same(node, result); + Assert.Null(builder.Current); + } + + [Fact] + public void Pop_MultipleNodeDepth_RemovesAndReturnsNode() + { + // Arrange + var builder = new DefaultRazorIntermediateNodeBuilder(); + + var parent = new BasicIntermediateNode(); + builder.Push(parent); + + var node = new BasicIntermediateNode(); + builder.Push(node); + + // Act + var result = builder.Pop(); + + // Assert + Assert.Same(node, result); + Assert.Same(parent, builder.Current); + } + + [Fact] + public void Add_AddsToChildrenAndSetsParent() + { + // Arrange + var builder = new DefaultRazorIntermediateNodeBuilder(); + + var parent = new BasicIntermediateNode(); + builder.Push(parent); + + var node = new BasicIntermediateNode(); + + // Act + builder.Add(node); + + // Assert + Assert.Same(parent, builder.Current); + Assert.Collection(parent.Children, n => Assert.Same(node, n)); + } + + [Fact] + public void Insert_AddsToChildren_EmptyCollection() + { + // Arrange + var builder = new DefaultRazorIntermediateNodeBuilder(); + + var parent = new BasicIntermediateNode(); + builder.Push(parent); + + var node = new BasicIntermediateNode(); + + // Act + builder.Insert(0, node); + + // Assert + Assert.Same(parent, builder.Current); + Assert.Collection(parent.Children, n => Assert.Same(node, n)); + } + + [Fact] + public void Insert_AddsToChildren_NonEmpyCollection() + { + // Arrange + var builder = new DefaultRazorIntermediateNodeBuilder(); + + var parent = new BasicIntermediateNode(); + builder.Push(parent); + + var child = new BasicIntermediateNode(); + builder.Add(child); + + var node = new BasicIntermediateNode(); + + // Act + builder.Insert(0, node); + + // Assert + Assert.Same(parent, builder.Current); + Assert.Collection(parent.Children, n => Assert.Same(node, n), n => Assert.Same(child, n)); + } + + [Fact] + public void Insert_AddsToChildren_NonEmpyCollection_AtEnd() + { + // Arrange + var builder = new DefaultRazorIntermediateNodeBuilder(); + + var parent = new BasicIntermediateNode(); + builder.Push(parent); + + var child = new BasicIntermediateNode(); + builder.Add(child); + + var node = new BasicIntermediateNode(); + + // Act + builder.Insert(1, node); + + // Assert + Assert.Same(parent, builder.Current); + Assert.Collection(parent.Children, n => Assert.Same(child, n), n => Assert.Same(node, n)); + } + + [Fact] + public void Build_PopsMultipleLevels() + { + // Arrange + var builder = new DefaultRazorIntermediateNodeBuilder(); + + var document = new DocumentIntermediateNode(); + builder.Push(document); + + var node = new BasicIntermediateNode(); + builder.Push(node); + + // Act + var result = builder.Build(); + + // Assert + Assert.Same(document, result); + Assert.Null(builder.Current); + } + + private class BasicIntermediateNode : IntermediateNode + { + public override IntermediateNodeCollection Children { get; } = new IntermediateNodeCollection(); + + public override void Accept(IntermediateNodeVisitor visitor) + { + throw new NotImplementedException(); + } + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/DocumentIntermediateNodeExtensionsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/DocumentIntermediateNodeExtensionsTest.cs new file mode 100644 index 0000000000..8def071acc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/DocumentIntermediateNodeExtensionsTest.cs @@ -0,0 +1,113 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Intermediate +{ + public class DocumentIntermediateNodeExtensionsTest + { + [Fact] + public void FindPrimaryClass_FindsClassWithAnnotation() + { + // Arrange + var document = new DocumentIntermediateNode(); + var @class = new ClassDeclarationIntermediateNode(); + @class.Annotations[CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass; + + var builder = IntermediateNodeBuilder.Create(document); + builder.Add(@class); + + // Act + var result = document.FindPrimaryClass(); + + // Assert + Assert.Same(@class, result); + } + + [Fact] + public void FindPrimaryMethod_FindsMethodWithAnnotation() + { + // Arrange + var document = new DocumentIntermediateNode(); + var method = new MethodDeclarationIntermediateNode(); + method.Annotations[CommonAnnotations.PrimaryMethod] = CommonAnnotations.PrimaryMethod; + + var builder = IntermediateNodeBuilder.Create(document); + builder.Add(method); + + // Act + var result = document.FindPrimaryMethod(); + + // Assert + Assert.Same(method, result); + } + + [Fact] + public void FindPrimaryNamespace_FindsNamespaceWithAnnotation() + { + // Arrange + var document = new DocumentIntermediateNode(); + var @namespace = new NamespaceDeclarationIntermediateNode(); + @namespace.Annotations[CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace; + + var builder = IntermediateNodeBuilder.Create(document); + builder.Add(@namespace); + + // Act + var result = document.FindPrimaryNamespace(); + + // Assert + Assert.Same(@namespace, result); + } + + [Fact] + public void FindDirectiveReferences_FindsMatchingDirectives() + { + // Arrange + var directive = DirectiveDescriptor.CreateSingleLineDirective("test"); + var directive2 = DirectiveDescriptor.CreateSingleLineDirective("test"); + + var document = new DocumentIntermediateNode(); + var @namespace = new NamespaceDeclarationIntermediateNode(); + + var builder = IntermediateNodeBuilder.Create(document); + builder.Push(@namespace); + + var match1 = new DirectiveIntermediateNode() + { + Directive = directive, + }; + builder.Add(match1); + + var nonMatch = new DirectiveIntermediateNode() + { + Directive = directive2, + }; + builder.Add(nonMatch); + + var match2 = new DirectiveIntermediateNode() + { + Directive = directive, + }; + builder.Add(match2); + + // Act + var results = document.FindDirectiveReferences(directive); + + // Assert + Assert.Collection( + results, + r => + { + Assert.Same(@namespace, r.Parent); + Assert.Same(match1, r.Node); + }, + r => + { + Assert.Same(@namespace, r.Parent); + Assert.Same(match2, r.Node); + }); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/ExtensionIntermediateNodeTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/ExtensionIntermediateNodeTest.cs new file mode 100644 index 0000000000..a4bf7950ae --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/ExtensionIntermediateNodeTest.cs @@ -0,0 +1,92 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Razor.Language.CodeGeneration; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Intermediate +{ + // These tests cover the methods on ExtensionIntermediateNode that are used to implement visitors + // that special case an extension node. + public class ExtensionIntermediateNodeTest + { + [Fact] + public void Accept_CallsStandardVisitExtension_ForStandardVisitor() + { + // Arrange + var node = new TestExtensionIntermediateNode(); + var visitor = new StandardVisitor(); + + // Act + node.Accept(visitor); + + // Assert + Assert.True(visitor.WasStandardMethodCalled); + Assert.False(visitor.WasSpecificMethodCalled); + } + + [Fact] + public void Accept_CallsSpecialVisitExtension_ForSpecialVisitor() + { + // Arrange + var node = new TestExtensionIntermediateNode(); + var visitor = new SpecialVisitor(); + + // Act + node.Accept(visitor); + + // Assert + Assert.False(visitor.WasStandardMethodCalled); + Assert.True(visitor.WasSpecificMethodCalled); + } + + private class TestExtensionIntermediateNode : ExtensionIntermediateNode + { + public override IntermediateNodeCollection Children => IntermediateNodeCollection.ReadOnly; + + public override void Accept(IntermediateNodeVisitor visitor) + { + // This is the standard visitor boilerplate for an extension node. + AcceptExtensionNode(this, visitor); + } + + public override void WriteNode(CodeTarget target, CodeRenderingContext context) + { + throw new NotImplementedException(); + } + } + + private class StandardVisitor : IntermediateNodeVisitor + { + public bool WasStandardMethodCalled { get; private set; } + public bool WasSpecificMethodCalled { get; private set; } + + public override void VisitExtension(ExtensionIntermediateNode node) + { + WasStandardMethodCalled = true; + } + + public void VisitExtension(TestExtensionIntermediateNode node) + { + WasSpecificMethodCalled = true; + } + } + + private class SpecialVisitor : IntermediateNodeVisitor, IExtensionIntermediateNodeVisitor + { + public bool WasStandardMethodCalled { get; private set; } + public bool WasSpecificMethodCalled { get; private set; } + + public override void VisitExtension(ExtensionIntermediateNode node) + { + WasStandardMethodCalled = true; + } + + public void VisitExtension(TestExtensionIntermediateNode node) + { + WasSpecificMethodCalled = true; + } + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/IntermediateNodeReferenceTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/IntermediateNodeReferenceTest.cs new file mode 100644 index 0000000000..2adbe06a4f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/IntermediateNodeReferenceTest.cs @@ -0,0 +1,510 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Intermediate +{ + public class IntermediateNodeReferenceTest + { + [Fact] + public void InsertAfter_SingleNode_AddsNodeAfterNode() + { + // Arrange + var parent = new BasicIntermediateNode("Parent"); + + var node1 = new BasicIntermediateNode("Node1"); + var node2 = new BasicIntermediateNode("Node2"); + var node3 = new BasicIntermediateNode("Node3"); + + parent.Children.Add(node1); + parent.Children.Add(node3); + + var reference = new IntermediateNodeReference(parent, node1); + + // Act + reference.InsertAfter(node2); + + // Assert + Assert.Equal(new[] { node1, node2, node3, }, parent.Children); + } + + [Fact] + public void InsertAfter_SingleNode_AddsNodeAfterNode_AtEnd() + { + // Arrange + var parent = new BasicIntermediateNode("Parent"); + + var node1 = new BasicIntermediateNode("Node1"); + var node2 = new BasicIntermediateNode("Node2"); + var node3 = new BasicIntermediateNode("Node3"); + + parent.Children.Add(node1); + parent.Children.Add(node2); + + var reference = new IntermediateNodeReference(parent, node2); + + // Act + reference.InsertAfter(node3); + + // Assert + Assert.Equal(new[] { node1, node2, node3, }, parent.Children); + } + + [Fact] + public void InsertAfter_MultipleNodes_AddsNodesAfterNode() + { + // Arrange + var parent = new BasicIntermediateNode("Parent"); + + var node1 = new BasicIntermediateNode("Node1"); + var node2 = new BasicIntermediateNode("Node2"); + var node3 = new BasicIntermediateNode("Node3"); + var node4 = new BasicIntermediateNode("Node4"); + + parent.Children.Add(node1); + parent.Children.Add(node4); + + var reference = new IntermediateNodeReference(parent, node1); + + // Act + reference.InsertAfter(new[] { node2, node3 }); + + // Assert + Assert.Equal(new[] { node1, node2, node3, node4, }, parent.Children); + } + + [Fact] + public void InsertAfter_MultipleNodes_AddsNodesAfterNode_AtEnd() + { + // Arrange + var parent = new BasicIntermediateNode("Parent"); + + var node1 = new BasicIntermediateNode("Node1"); + var node2 = new BasicIntermediateNode("Node2"); + var node3 = new BasicIntermediateNode("Node3"); + var node4 = new BasicIntermediateNode("Node4"); + + parent.Children.Add(node1); + parent.Children.Add(node2); + + var reference = new IntermediateNodeReference(parent, node2); + + // Act + reference.InsertAfter(new[] { node3, node4 }); + + // Assert + Assert.Equal(new[] { node1, node2, node3, node4, }, parent.Children); + } + + [Fact] + public void InsertBefore_SingleNode_AddsNodeBeforeNode() + { + // Arrange + var parent = new BasicIntermediateNode("Parent"); + + var node1 = new BasicIntermediateNode("Node1"); + var node2 = new BasicIntermediateNode("Node2"); + var node3 = new BasicIntermediateNode("Node3"); + + parent.Children.Add(node1); + parent.Children.Add(node3); + + var reference = new IntermediateNodeReference(parent, node3); + + // Act + reference.InsertBefore(node2); + + // Assert + Assert.Equal(new[] { node1, node2, node3, }, parent.Children); + } + + [Fact] + public void InsertBefore_SingleNode_AddsNodeBeforeNode_AtBeginning() + { + // Arrange + var parent = new BasicIntermediateNode("Parent"); + + var node1 = new BasicIntermediateNode("Node1"); + var node2 = new BasicIntermediateNode("Node2"); + var node3 = new BasicIntermediateNode("Node3"); + + parent.Children.Add(node2); + parent.Children.Add(node3); + + var reference = new IntermediateNodeReference(parent, node2); + + // Act + reference.InsertBefore(node1); + + // Assert + Assert.Equal(new[] { node1, node2, node3, }, parent.Children); + } + + [Fact] + public void InsertBefore_MultipleNodes_AddsNodesBeforeNode() + { + // Arrange + var parent = new BasicIntermediateNode("Parent"); + + var node1 = new BasicIntermediateNode("Node1"); + var node2 = new BasicIntermediateNode("Node2"); + var node3 = new BasicIntermediateNode("Node3"); + var node4 = new BasicIntermediateNode("Node4"); + + parent.Children.Add(node1); + parent.Children.Add(node4); + + var reference = new IntermediateNodeReference(parent, node4); + + // Act + reference.InsertBefore(new[] { node2, node3 }); + + // Assert + Assert.Equal(new[] { node1, node2, node3, node4, }, parent.Children); + } + + [Fact] + public void InsertAfter_MultipleNodes_AddsNodesBeforeNode_AtBeginning() + { + // Arrange + var parent = new BasicIntermediateNode("Parent"); + + var node1 = new BasicIntermediateNode("Node1"); + var node2 = new BasicIntermediateNode("Node2"); + var node3 = new BasicIntermediateNode("Node3"); + var node4 = new BasicIntermediateNode("Node4"); + + parent.Children.Add(node3); + parent.Children.Add(node4); + + var reference = new IntermediateNodeReference(parent, node3); + + // Act + reference.InsertBefore(new[] { node1, node2 }); + + // Assert + Assert.Equal(new[] { node1, node2, node3, node4, }, parent.Children); + } + + [Fact] + public void Remove_RemovesNode() + { + // Arrange + var parent = new BasicIntermediateNode("Parent"); + + var node1 = new BasicIntermediateNode("Node1"); + var node2 = new BasicIntermediateNode("Node2"); + var node3 = new BasicIntermediateNode("Node3"); + + parent.Children.Add(node1); + parent.Children.Add(node3); + parent.Children.Add(node2); + + var reference = new IntermediateNodeReference(parent, node3); + + // Act + reference.Remove(); + + // Assert + Assert.Equal(new[] { node1, node2,}, parent.Children); + } + + [Fact] + public void Replace_ReplacesNode() + { + // Arrange + var parent = new BasicIntermediateNode("Parent"); + + var node1 = new BasicIntermediateNode("Node1"); + var node2 = new BasicIntermediateNode("Node2"); + var node3 = new BasicIntermediateNode("Node3"); + var node4 = new BasicIntermediateNode("Node4"); + + parent.Children.Add(node1); + parent.Children.Add(node4); + parent.Children.Add(node3); + + var reference = new IntermediateNodeReference(parent, node4); + + // Act + reference.Replace(node2); + + // Assert + Assert.Equal(new[] { node1, node2, node3, }, parent.Children); + } + + [Fact] + public void InsertAfter_SingleNode_ThrowsForReferenceNotInitialized() + { + // Arrange + var reference = new IntermediateNodeReference(); + + // Act & Assert + var exception = Assert.Throws(() => reference.InsertAfter(new BasicIntermediateNode("_"))); + Assert.Equal("The reference is invalid. References initialized with the default constructor cannot modify nodes.", exception.Message); + } + + [Fact] + public void InsertAfter_MulipleNodes_ThrowsForReferenceNotInitialized() + { + // Arrange + var reference = new IntermediateNodeReference(); + + // Act & Assert + var exception = Assert.Throws(() => reference.InsertAfter(new[] { new BasicIntermediateNode("_") })); + Assert.Equal("The reference is invalid. References initialized with the default constructor cannot modify nodes.", exception.Message); + } + + [Fact] + public void InsertBefore_SingleNode_ThrowsForReferenceNotInitialized() + { + // Arrange + var reference = new IntermediateNodeReference(); + + // Act & Assert + var exception = Assert.Throws(() => reference.InsertBefore(new BasicIntermediateNode("_"))); + Assert.Equal("The reference is invalid. References initialized with the default constructor cannot modify nodes.", exception.Message); + } + + [Fact] + public void InsertBefore_MulipleNodes_ThrowsForReferenceNotInitialized() + { + // Arrange + var reference = new IntermediateNodeReference(); + + // Act & Assert + var exception = Assert.Throws(() => reference.InsertBefore(new[] { new BasicIntermediateNode("_") })); + Assert.Equal("The reference is invalid. References initialized with the default constructor cannot modify nodes.", exception.Message); + } + + [Fact] + public void Remove_ThrowsForReferenceNotInitialized() + { + // Arrange + var reference = new IntermediateNodeReference(); + + // Act & Assert + var exception = Assert.Throws(() => reference.Remove()); + Assert.Equal("The reference is invalid. References initialized with the default constructor cannot modify nodes.", exception.Message); + } + + [Fact] + public void Replace_ThrowsForReferenceNotInitialized() + { + // Arrange + var reference = new IntermediateNodeReference(); + + // Act & Assert + var exception = Assert.Throws(() => reference.Replace(new BasicIntermediateNode("_"))); + Assert.Equal("The reference is invalid. References initialized with the default constructor cannot modify nodes.", exception.Message); + } + + [Fact] + public void InsertAfter_SingleNode_ThrowsForReadOnlyCollection() + { + // Arrange + var parent = new BasicIntermediateNode("Parent", IntermediateNodeCollection.ReadOnly); + + var node1 = new BasicIntermediateNode("Node1"); + + var reference = new IntermediateNodeReference(parent, node1); + + // Act & Assert + var exception = Assert.Throws(() => reference.InsertAfter(new BasicIntermediateNode("_"))); + Assert.Equal("The node 'Parent' has a read-only child collection and cannot be modified.", exception.Message); + } + + [Fact] + public void InsertAfter_MulipleNodes_ThrowsForReadOnlyCollection() + { + // Arrange + var parent = new BasicIntermediateNode("Parent", IntermediateNodeCollection.ReadOnly); + + var node1 = new BasicIntermediateNode("Node1"); + + var reference = new IntermediateNodeReference(parent, node1); + + // Act & Assert + var exception = Assert.Throws(() => reference.InsertAfter(new[] { new BasicIntermediateNode("_") })); + Assert.Equal("The node 'Parent' has a read-only child collection and cannot be modified.", exception.Message); + } + + [Fact] + public void InsertBefore_SingleNode_ThrowsForReadOnlyCollection() + { + // Arrange + var parent = new BasicIntermediateNode("Parent", IntermediateNodeCollection.ReadOnly); + + var node1 = new BasicIntermediateNode("Node1"); + + var reference = new IntermediateNodeReference(parent, node1); + + // Act & Assert + var exception = Assert.Throws(() => reference.InsertBefore(new BasicIntermediateNode("_"))); + Assert.Equal("The node 'Parent' has a read-only child collection and cannot be modified.", exception.Message); + } + + [Fact] + public void InsertBefore_MulipleNodes_ThrowsForReadOnlyCollection() + { + // Arrange + var parent = new BasicIntermediateNode("Parent", IntermediateNodeCollection.ReadOnly); + + var node1 = new BasicIntermediateNode("Node1"); + + var reference = new IntermediateNodeReference(parent, node1); + + // Act & Assert + var exception = Assert.Throws(() => reference.InsertBefore(new[] { new BasicIntermediateNode("_") })); + Assert.Equal("The node 'Parent' has a read-only child collection and cannot be modified.", exception.Message); + } + + [Fact] + public void Remove_ThrowsForReadOnlyCollection() + { + // Arrange + var parent = new BasicIntermediateNode("Parent", IntermediateNodeCollection.ReadOnly); + + var node1 = new BasicIntermediateNode("Node1"); + + var reference = new IntermediateNodeReference(parent, node1); + + // Act & Assert + var exception = Assert.Throws(() => reference.Remove()); + Assert.Equal("The node 'Parent' has a read-only child collection and cannot be modified.", exception.Message); + } + + [Fact] + public void Replace_ThrowsForReadOnlyCollection() + { + // Arrange + var parent = new BasicIntermediateNode("Parent", IntermediateNodeCollection.ReadOnly); + + var node1 = new BasicIntermediateNode("Node1"); + + var reference = new IntermediateNodeReference(parent, node1); + + // Act & Assert + var exception = Assert.Throws(() => reference.Replace(new BasicIntermediateNode("_"))); + Assert.Equal("The node 'Parent' has a read-only child collection and cannot be modified.", exception.Message); + } + + [Fact] + public void InsertAfter_SingleNode_ThrowsForNodeNotFound() + { + // Arrange + var parent = new BasicIntermediateNode("Parent"); + + var node1 = new BasicIntermediateNode("Node1"); + + var reference = new IntermediateNodeReference(parent, node1); + + // Act & Assert + var exception = Assert.Throws(() => reference.InsertAfter(new BasicIntermediateNode("_"))); + Assert.Equal("The reference is invalid. The node 'Node1' could not be found as a child of 'Parent'.", exception.Message); + } + + [Fact] + public void InsertAfter_MulipleNodes_ThrowsForNodeNotFound() + { + // Arrange + var parent = new BasicIntermediateNode("Parent"); + + var node1 = new BasicIntermediateNode("Node1"); + + var reference = new IntermediateNodeReference(parent, node1); + + // Act & Assert + var exception = Assert.Throws(() => reference.InsertAfter(new[] { new BasicIntermediateNode("_") })); + Assert.Equal("The reference is invalid. The node 'Node1' could not be found as a child of 'Parent'.", exception.Message); + } + + [Fact] + public void InsertBefore_SingleNode_ThrowsForNodeNotFound() + { + // Arrange + var parent = new BasicIntermediateNode("Parent"); + + var node1 = new BasicIntermediateNode("Node1"); + + var reference = new IntermediateNodeReference(parent, node1); + + // Act & Assert + var exception = Assert.Throws(() => reference.InsertBefore(new BasicIntermediateNode("_"))); + Assert.Equal("The reference is invalid. The node 'Node1' could not be found as a child of 'Parent'.", exception.Message); + } + + [Fact] + public void InsertBefore_MulipleNodes_ThrowsForNodeNotFound() + { + // Arrange + var parent = new BasicIntermediateNode("Parent"); + + var node1 = new BasicIntermediateNode("Node1"); + + var reference = new IntermediateNodeReference(parent, node1); + + // Act & Assert + var exception = Assert.Throws(() => reference.InsertBefore(new[] { new BasicIntermediateNode("_") })); + Assert.Equal("The reference is invalid. The node 'Node1' could not be found as a child of 'Parent'.", exception.Message); + } + + [Fact] + public void Remove_ThrowsForNodeNotFound() + { + // Arrange + var parent = new BasicIntermediateNode("Parent"); + + var node1 = new BasicIntermediateNode("Node1"); + + var reference = new IntermediateNodeReference(parent, node1); + + // Act & Assert + var exception = Assert.Throws(() => reference.Remove()); + Assert.Equal("The reference is invalid. The node 'Node1' could not be found as a child of 'Parent'.", exception.Message); + } + + [Fact] + public void Replace_ThrowsForNodeNotFound() + { + // Arrange + var parent = new BasicIntermediateNode("Parent"); + + var node1 = new BasicIntermediateNode("Node1"); + + var reference = new IntermediateNodeReference(parent, node1); + + // Act & Assert + var exception = Assert.Throws(() => reference.Replace(new BasicIntermediateNode("_"))); + Assert.Equal("The reference is invalid. The node 'Node1' could not be found as a child of 'Parent'.", exception.Message); + } + + private class BasicIntermediateNode : IntermediateNode + { + public BasicIntermediateNode(string name) + : this(name, new IntermediateNodeCollection()) + { + Name = name; + } + + public BasicIntermediateNode(string name, IntermediateNodeCollection children) + { + Name = name; + Children = children; + } + + public string Name { get; } + + public override IntermediateNodeCollection Children { get; } + + public override void Accept(IntermediateNodeVisitor visitor) + { + throw new System.NotImplementedException(); + } + + public override string ToString() => Name; + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/IntermediateNodeWalkerTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/IntermediateNodeWalkerTest.cs new file mode 100644 index 0000000000..f91735f9c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Intermediate/IntermediateNodeWalkerTest.cs @@ -0,0 +1,140 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Intermediate +{ + public class IntermediateNodeWalkerTest + { + [Fact] + public void IntermediateNodeWalker_Visit_TraversesEntireGraph() + { + // Arrange + var walker = new DerivedIntermediateNodeWalker(); + + var nodes = new IntermediateNode[] + { + new BasicIntermediateNode("Root"), + new BasicIntermediateNode("Root->A"), + new BasicIntermediateNode("Root->B"), + new BasicIntermediateNode("Root->B->1"), + new BasicIntermediateNode("Root->B->2"), + new BasicIntermediateNode("Root->C"), + }; + + var builder = new DefaultRazorIntermediateNodeBuilder(); + builder.Push(nodes[0]); + builder.Add(nodes[1]); + builder.Push(nodes[2]); + builder.Add(nodes[3]); + builder.Add(nodes[4]); + builder.Pop(); + builder.Add(nodes[5]); + + var root = builder.Pop(); + + // Act + walker.Visit(root); + + // Assert + Assert.Equal(nodes, walker.Visited.ToArray()); + } + + [Fact] + public void IntermediateNodeWalker_Visit_SetsParentAndAncestors() + { + // Arrange + var walker = new DerivedIntermediateNodeWalker(); + + var nodes = new IntermediateNode[] + { + new BasicIntermediateNode("Root"), + new BasicIntermediateNode("Root->A"), + new BasicIntermediateNode("Root->B"), + new BasicIntermediateNode("Root->B->1"), + new BasicIntermediateNode("Root->B->2"), + new BasicIntermediateNode("Root->C"), + }; + + var ancestors = new Dictionary() + { + { "Root", new string[]{ } }, + { "Root->A", new string[] { "Root" } }, + { "Root->B", new string[] { "Root" } }, + { "Root->B->1", new string[] { "Root->B", "Root" } }, + { "Root->B->2", new string[] { "Root->B", "Root" } }, + { "Root->C", new string[] { "Root" } }, + }; + + walker.OnVisiting = (n) => + { + Assert.Equal(ancestors[((BasicIntermediateNode)n).Name], walker.Ancestors.Cast().Select(b => b.Name)); + Assert.Equal(ancestors[((BasicIntermediateNode)n).Name].FirstOrDefault(), ((BasicIntermediateNode)walker.Parent)?.Name); + }; + + var builder = new DefaultRazorIntermediateNodeBuilder(); + builder.Push(nodes[0]); + builder.Add(nodes[1]); + builder.Push(nodes[2]); + builder.Add(nodes[3]); + builder.Add(nodes[4]); + builder.Pop(); + builder.Add(nodes[5]); + + var root = builder.Pop(); + + // Act & Assert + walker.Visit(root); + } + + private class DerivedIntermediateNodeWalker : IntermediateNodeWalker + { + public new IReadOnlyList Ancestors => base.Ancestors; + + public new IntermediateNode Parent => base.Parent; + + public List Visited { get; } = new List(); + + public Action OnVisiting { get; set; } + + public override void VisitDefault(IntermediateNode node) + { + Visited.Add(node); + + OnVisiting?.Invoke(node); + base.VisitDefault(node); + } + + public virtual void VisitBasic(BasicIntermediateNode node) + { + VisitDefault(node); + } + } + + private class BasicIntermediateNode : IntermediateNode + { + public BasicIntermediateNode(string name) + { + Name = name; + } + + public string Name { get; } + + public override IntermediateNodeCollection Children { get; } = new IntermediateNodeCollection(); + + public override void Accept(IntermediateNodeVisitor visitor) + { + ((DerivedIntermediateNodeWalker)visitor).VisitBasic(this); + } + + public override string ToString() + { + return Name; + } + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/LargeTextSourceDocumentTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/LargeTextSourceDocumentTest.cs new file mode 100644 index 0000000000..fb47799b23 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/LargeTextSourceDocumentTest.cs @@ -0,0 +1,172 @@ +using System.IO; +using System.Text; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Test +{ + public class LargeTextSourceDocumentTest + { + private const int ChunkTestLength = 10; + + [Fact] + public void GetChecksum_ReturnsCopiedChecksum() + { + // Arrange + var contentString = "Hello World"; + var stream = TestRazorSourceDocument.CreateStreamContent(contentString); + var reader = new StreamReader(stream, detectEncodingFromByteOrderMarks: true); + var document = new LargeTextSourceDocument(reader, 5, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var firstChecksum = document.GetChecksum(); + var secondChecksum = document.GetChecksum(); + + // Assert + Assert.Equal(firstChecksum, secondChecksum); + Assert.NotSame(firstChecksum, secondChecksum); + } + + [Fact] + public void GetChecksum_ComputesCorrectChecksum_UTF8() + { + // Arrange + var contentString = "Hello World"; + var stream = TestRazorSourceDocument.CreateStreamContent(contentString); + var reader = new StreamReader(stream, detectEncodingFromByteOrderMarks: true); + var document = new LargeTextSourceDocument(reader, 5, Encoding.UTF8, RazorSourceDocumentProperties.Default); + var expectedChecksum = new byte[] { 10, 77, 85, 168, 215, 120, 229, 2, 47, 171, 112, 25, 119, 197, 216, 64, 187, 196, 134, 208 }; + + // Act + var checksum = document.GetChecksum(); + + // Assert + Assert.Equal(expectedChecksum, checksum); + } + + [Fact] + public void GetChecksum_ComputesCorrectChecksum_UTF32() + { + // Arrange + var contentString = "Hello World"; + var stream = TestRazorSourceDocument.CreateStreamContent(contentString, Encoding.UTF32); + var reader = new StreamReader(stream, detectEncodingFromByteOrderMarks: true); + var document = new LargeTextSourceDocument(reader, 5, Encoding.UTF32, RazorSourceDocumentProperties.Default); + var expectedChecksum = new byte[] { 108, 172, 130, 171, 42, 19, 155, 176, 211, 80, 224, 121, 169, 133, 25, 134, 48, 228, 199, 141 }; + + // Act + var checksum = document.GetChecksum(); + + // Assert + Assert.Equal(expectedChecksum, checksum); + } + + [Theory] + [InlineData(ChunkTestLength - 1)] + [InlineData(ChunkTestLength)] + [InlineData(ChunkTestLength + 1)] + [InlineData(ChunkTestLength * 2 - 1)] + [InlineData(ChunkTestLength * 2)] + [InlineData(ChunkTestLength * 2 + 1)] + public void Indexer_ProvidesCharacterAccessToContent(int contentLength) + { + // Arrange + var content = new char[contentLength]; + + for (var i = 0; i < contentLength - 1; i++) + { + content[i] = 'a'; + } + content[contentLength - 1] = 'b'; + var contentString = new string(content); + + var stream = TestRazorSourceDocument.CreateStreamContent(new string(content)); + var reader = new StreamReader(stream, true); + var document = new LargeTextSourceDocument(reader, ChunkTestLength, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var output = new char[contentLength]; + for (var i = 0; i < document.Length; i++) + { + output[i] = document[i]; + } + var outputString = new string(output); + + // Assert + Assert.Equal(contentLength, document.Length); + Assert.Equal(contentString, outputString); + } + + [Theory] + [InlineData("test.cshtml")] + [InlineData(null)] + public void FilePath(string filePath) + { + // Arrange + var stream = TestRazorSourceDocument.CreateStreamContent("abc"); + var reader = new StreamReader(stream, true); + + // Act + var document = new LargeTextSourceDocument(reader, ChunkTestLength, Encoding.UTF8, new RazorSourceDocumentProperties(filePath: filePath, relativePath: null)); + + // Assert + Assert.Equal(filePath, document.FilePath); + } + + [Theory] + [InlineData("test.cshtml")] + [InlineData(null)] + public void RelativePath(string relativePath) + { + // Arrange + var stream = TestRazorSourceDocument.CreateStreamContent("abc"); + var reader = new StreamReader(stream, true); + + // Act + var document = new LargeTextSourceDocument(reader, ChunkTestLength, Encoding.UTF8, new RazorSourceDocumentProperties(filePath: null, relativePath: relativePath)); + + // Assert + Assert.Equal(relativePath, document.RelativePath); + } + + [Fact] + public void Lines() + { + // Arrange + var stream = TestRazorSourceDocument.CreateStreamContent("abc\ndef\nghi"); + var reader = new StreamReader(stream, true); + + // Act + var document = new LargeTextSourceDocument(reader, ChunkTestLength, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Assert + Assert.Equal(3, document.Lines.Count); + } + + [Theory] + [InlineData("", 0, 0, 0)] // Nothing to copy + [InlineData("a", 0, 100, 1)] // Destination index different from start + [InlineData("j", ChunkTestLength - 1, 0, 1)] // One char just before the chunk limit + [InlineData("k", ChunkTestLength, 0, 1)] // One char one the chunk limit + [InlineData("l", ChunkTestLength + 1, 0, 1)] // One char just after the chunk limit + [InlineData("jk", ChunkTestLength - 1, 0, 2)] // Two char that are on both chunk sides + [InlineData("abcdefghijklmnopqrstuvwxy", 0, 100, 25)] // Everything except the last + [InlineData("abcdefghijklmnopqrstuvwxyz", 0, 0, 26)] // Copy all + [InlineData("xyz", 23, 0, 3)] // The last chars + public void CopyTo(string expected, int sourceIndex, int destinationIndex, int count) + { + // Arrange + var stream = TestRazorSourceDocument.CreateStreamContent("abcdefghijklmnopqrstuvwxyz"); + + var reader = new StreamReader(stream, true); + var document = new LargeTextSourceDocument(reader, ChunkTestLength, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var destination = new char[1000]; + document.CopyTo(sourceIndex, destination, destinationIndex, count); + + // Assert + var copy = new string(destination, destinationIndex, count); + Assert.Equal(expected, copy); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/BaselineWriter.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/BaselineWriter.cs new file mode 100644 index 0000000000..eee1a8fd58 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/BaselineWriter.cs @@ -0,0 +1,46 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Diagnostics; +using System.IO; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public static class BaselineWriter + { + private static object baselineLock = new object(); + + [Conditional("GENERATE_BASELINES")] + public static void WriteBaseline(string baselineFile, string output) + { + var root = RecursiveFind("Razor.sln", Path.GetFullPath(".")); + var baselinePath = Path.Combine(root, baselineFile); + + // Serialize writes to minimize contention for file handles and directory access. + lock (baselineLock) + { + // Update baseline + using (var stream = File.Open(baselinePath, FileMode.Create, FileAccess.Write)) + { + using (var writer = new StreamWriter(stream)) + { + writer.Write(output); + } + } + } + } + + private static string RecursiveFind(string path, string start) + { + var test = Path.Combine(start, path); + if (File.Exists(test)) + { + return start; + } + else + { + return RecursiveFind(path, new DirectoryInfo(start).Parent.FullName); + } + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpAutoCompleteTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpAutoCompleteTest.cs new file mode 100644 index 0000000000..7e4ae9cf5a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpAutoCompleteTest.cs @@ -0,0 +1,53 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Extensions; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpAutoCompleteTest : ParserTestBase + { + [Fact] + public void FunctionsDirectiveAutoCompleteAtEOF() + { + // Arrange, Act & Assert + ParseDocumentTest("@functions{", new[] { FunctionsDirective.Directive }); + } + + [Fact] + public void SectionDirectiveAutoCompleteAtEOF() + { + // Arrange, Act & Assert + ParseDocumentTest("@section Header {", new[] { SectionDirective.Directive }); + } + + [Fact] + public void VerbatimBlockAutoCompleteAtEOF() + { + ParseDocumentTest("@{"); + } + + [Fact] + public void FunctionsDirectiveAutoCompleteAtStartOfFile() + { + // Arrange, Act & Assert + ParseDocumentTest("@functions{" + Environment.NewLine + "foo", new[] { FunctionsDirective.Directive }); + } + + [Fact] + public void SectionDirectiveAutoCompleteAtStartOfFile() + { + // Arrange, Act & Assert + ParseDocumentTest("@section Header {" + Environment.NewLine + "

    Foo

    ", new[] { SectionDirective.Directive }); + } + + [Fact] + public void VerbatimBlockAutoCompleteAtStartOfFile() + { + ParseDocumentTest("@{" + Environment.NewLine + "

    "); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpBlockTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpBlockTest.cs new file mode 100644 index 0000000000..7c66f7e2d6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpBlockTest.cs @@ -0,0 +1,719 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpBlockTest : ParserTestBase + { + [Fact] + public void LocalFunctionsWithRazor() + { + ParseDocumentTest( +@"@{ + void Foo() + { + var time = DateTime.Now + Hello the time is @time + } +}"); + } + + [Fact] + public void LocalFunctionsWithGenerics() + { + ParseDocumentTest( +@"@{ + void Foo() + { + Hello the time is @{ DisplayCount(new List()); } + } + + void DisplayCount(List something) + { + The count is something.Count + } +}"); + } + + [Fact] + public void NestedCodeBlockWithCSharpAt() + { + ParseDocumentTest("@{ if (true) { var val = @x; if (val != 3) { } } }"); + } + + [Fact] + public void NestedCodeBlockWithMarkupSetsDotAsMarkup() + { + ParseDocumentTest("@if (true) { @if(false) {
    @something.
    } }"); + } + + [Fact] + public void BalancingBracketsIgnoresStringLiteralCharactersAndBrackets() + { + // BalancingBracketsIgnoresStringLiteralCharactersAndBracketsInsideSingleLineComments + ParseDocumentTest(@"@if(foo) { + // bar } "" baz ' + zoop(); +}"); + } + + [Fact] + public void NestedCodeBlockWithAtDoesntCauseError() + { + ParseDocumentTest("@if (true) { @if(false) { } }"); + } + + [Fact] + public void BalancingBracketsIgnoresStringLiteralCharactersAndBracketsInsideBlockComments() + { + ParseDocumentTest( + @"@if(foo) { + /* bar } "" */ ' baz } ' + zoop(); +}"); + } + + [Fact] + public void SkipsExprThenBalancesBracesIfFirstIdentifierIsForKeyword() + { + // ParseBlockSkipsParenthesisedExpressionAndThenBalancesBracesIfFirstIdentifierIsForKeyword + ParseDocumentTest( + "@for(int i = 0; i < 10; new Foo { Bar = \"baz\" }) { Debug.WriteLine(@\"foo } bar\"); }"); + } + + [Fact] + public void SkipsExprThenBalancesBracesIfFirstIdentifierIsForeachKeyword() + { + // ParseBlockSkipsParenthesisedExpressionAndThenBalancesBracesIfFirstIdentifierIsForeachKeyword + ParseDocumentTest( + "@foreach(int i = 0; i < 10; new Foo { Bar = \"baz\" }) { Debug.WriteLine(@\"foo } bar\"); }"); + } + + [Fact] + public void SkipsExprThenBalancesBracesIfFirstIdentifierIsWhileKeyword() + { + // ParseBlockSkipsParenthesisedExpressionAndThenBalancesBracesIfFirstIdentifierIsWhileKeyword + ParseDocumentTest( + "@while(int i = 0; i < 10; new Foo { Bar = \"baz\" }) { Debug.WriteLine(@\"foo } bar\"); }"); + } + + [Fact] + public void SkipsExprThenBalancesIfFirstIdentifierIsUsingFollowedByParen() + { + // ParseBlockSkipsParenthesisedExpressionAndThenBalancesBracesIfFirstIdentifierIsUsingKeywordFollowedByParen + ParseDocumentTest( + "@using(int i = 0; i < 10; new Foo { Bar = \"baz\" }) { Debug.WriteLine(@\"foo } bar\"); }"); + } + + [Fact] + public void SupportsUsingsNestedWithinOtherBlocks() + { + ParseDocumentTest( + "@if(foo) { using(int i = 0; i < 10; new Foo { Bar = \"baz\" }) { Debug.WriteLine(@\"foo } bar\"); } }"); + } + + [Fact] + public void SkipsExprThenBalancesBracesIfFirstIdentifierIsIfKeywordWithNoElseBranches() + { + // ParseBlockSkipsParenthesisedExpressionAndThenBalancesBracesIfFirstIdentifierIsIfKeywordWithNoElseBranches + ParseDocumentTest( + "@if(int i = 0; i < 10; new Foo { Bar = \"baz\" }) { Debug.WriteLine(@\"foo } bar\"); }"); + } + + [Fact] + public void AllowsEmptyBlockStatement() + { + ParseDocumentTest("@if(false) { }"); + } + + [Fact] + public void TerminatesParenBalancingAtEOF() + { + ParseDocumentTest("@Html.En(code()"); + } + + [Fact] + public void SupportsBlockCommentBetweenIfAndElseClause() + { + ParseDocumentTest( + "@if(foo) { bar(); } /* Foo */ /* Bar */ else { baz(); }"); + } + + [Fact] + public void SupportsRazorCommentBetweenIfAndElseClause() + { + RunRazorCommentBetweenClausesTest( + "@if(foo) { bar(); } ", " else { baz(); }"); + } + + [Fact] + public void SupportsBlockCommentBetweenElseIfAndElseClause() + { + ParseDocumentTest( + "@if(foo) { bar(); } else if(bar) { baz(); } /* Foo */ /* Bar */ else { biz(); }"); + } + + [Fact] + public void SupportsRazorCommentBetweenElseIfAndElseClause() + { + RunRazorCommentBetweenClausesTest( + "@if(foo) { bar(); } else if(bar) { baz(); } ", " else { baz(); }"); + } + + [Fact] + public void SupportsBlockCommentBetweenIfAndElseIfClause() + { + ParseDocumentTest( + "if(foo) { bar(); } /* Foo */ /* Bar */ else if(bar) { baz(); }"); + } + + [Fact] + public void SupportsRazorCommentBetweenIfAndElseIfClause() + { + RunRazorCommentBetweenClausesTest("@if(foo) { bar(); } ", " else if(bar) { baz(); }"); + } + + [Fact] + public void SupportsLineCommentBetweenIfAndElseClause() + { + ParseDocumentTest(@"@if(foo) { bar(); } +// Foo +// Bar +else { baz(); }"); + } + + [Fact] + public void SupportsLineCommentBetweenElseIfAndElseClause() + { + ParseDocumentTest(@"@if(foo) { bar(); } else if(bar) { baz(); } +// Foo +// Bar +else { biz(); }"); + } + + [Fact] + public void SupportsLineCommentBetweenIfAndElseIfClause() + { + ParseDocumentTest(@"@if(foo) { bar(); } +// Foo +// Bar +else if(bar) { baz(); }"); + } + + [Fact] + public void ParsesElseIfBranchesOfIfStatement() + { + const string ifStatement = @"@if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { + Debug.WriteLine(@""foo } bar""); +}"; + const string elseIfBranch = @" else if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { + Debug.WriteLine(@""bar } baz""); +}"; + const string document = ifStatement + elseIfBranch; + + ParseDocumentTest(document); + } + + [Fact] + public void ParsesMultipleElseIfBranchesOfIfStatement() + { + const string ifStatement = @"@if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { + Debug.WriteLine(@""foo } bar""); +}"; + const string elseIfBranch = @" else if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { + Debug.WriteLine(@""bar } baz""); +}"; + const string document = ifStatement + elseIfBranch + elseIfBranch + elseIfBranch + elseIfBranch; + ParseDocumentTest(document); + } + + [Fact] + public void ParsesMultipleElseIfBranchesOfIfStatementFollowedByOneElseBranch() + { + const string ifStatement = @"@if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { + Debug.WriteLine(@""foo } bar""); +}"; + const string elseIfBranch = @" else if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { + Debug.WriteLine(@""bar } baz""); +}"; + const string elseBranch = @" else { Debug.WriteLine(@""bar } baz""); }"; + const string document = ifStatement + elseIfBranch + elseIfBranch + elseBranch; + + ParseDocumentTest(document); + } + + [Fact] + public void StopsParsingCodeAfterElseBranch() + { + const string ifStatement = @"@if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { + Debug.WriteLine(@""foo } bar""); +}"; + const string elseIfBranch = @" else if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { + Debug.WriteLine(@""bar } baz""); +}"; + const string elseBranch = @" else { Debug.WriteLine(@""bar } baz""); }"; + const string document = ifStatement + elseIfBranch + elseBranch + elseIfBranch; + + ParseDocumentTest(document); + } + + [Fact] + public void StopsParsingIfIfStatementNotFollowedByElse() + { + const string document = @"@if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { + Debug.WriteLine(@""foo } bar""); +}"; + + ParseDocumentTest(document); + } + + [Fact] + public void AcceptsElseIfWithNoCondition() + { + // We don't want to be a full C# parser - If the else if is missing it's condition, the C# compiler + // can handle that, we have all the info we need to keep parsing + const string ifBranch = @"@if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { + Debug.WriteLine(@""foo } bar""); +}"; + const string elseIfBranch = @" else if { foo(); }"; + const string document = ifBranch + elseIfBranch; + + ParseDocumentTest(document); + } + + [Fact] + public void CorrectlyParsesDoWhileBlock() + { + ParseDocumentTest( + "@do { var foo = bar; } while(foo != bar);"); + } + + [Fact] + public void CorrectlyParsesDoWhileBlockMissingSemicolon() + { + ParseDocumentTest("@do { var foo = bar; } while(foo != bar)"); + } + + [Fact] + public void CorrectlyParsesDoWhileBlockMissingWhileCondition() + { + ParseDocumentTest("@do { var foo = bar; } while"); + } + + [Fact] + public void CorrectlyParsesDoWhileBlockMissingWhileConditionWithSemicolon() + { + ParseDocumentTest( + "@do { var foo = bar; } while;"); + } + + [Fact] + public void CorrectlyParsesDoWhileBlockMissingWhileClauseEntirely() + { + ParseDocumentTest("@do { var foo = bar; } narf;"); + } + + [Fact] + public void SupportsBlockCommentBetweenDoAndWhileClause() + { + ParseDocumentTest( + "@do { var foo = bar; } /* Foo */ /* Bar */ while(true);"); + } + + [Fact] + public void SupportsLineCommentBetweenDoAndWhileClause() + { + ParseDocumentTest(@"@do { var foo = bar; } +// Foo +// Bar +while(true);"); + } + + [Fact] + public void SupportsRazorCommentBetweenDoAndWhileClause() + { + RunRazorCommentBetweenClausesTest( + "@do { var foo = bar; } ", " while(true);"); + } + + [Fact] + public void CorrectlyParsesMarkupInDoWhileBlock() + { + ParseDocumentTest("@do { var foo = bar;

    Foo

    foo++; } while (foo);"); + } + + [Fact] + public void SkipsExprThenBalancesBracesIfFirstIdentifierIsSwitchKeyword() + { + // ParseBlockSkipsParenthesisedExpressionAndThenBalancesBracesIfFirstIdentifierIsSwitchKeyword + ParseDocumentTest(@"@switch(foo) { + case 0: + break; + case 1: + { + break; + } + case 2: + return; + default: + return; +}"); + } + + [Fact] + public void ThenBalancesBracesIfFirstIdentifierIsLockKeyword() + { + // ParseBlockSkipsParenthesisedExpressionAndThenBalancesBracesIfFirstIdentifierIsLockKeyword + ParseDocumentTest( + "@lock(foo) { Debug.WriteLine(@\"foo } bar\"); }"); + } + + [Fact] + public void HasErrorsIfNamespaceImportMissingSemicolon() + { + ParseDocumentTest( + "@using Foo.Bar.Baz"); + } + + [Fact] + public void HasErrorsIfNamespaceAliasMissingSemicolon() + { + ParseDocumentTest( + "@using Foo.Bar.Baz = FooBarBaz"); + } + + [Fact] + public void ParsesNamespaceImportWithSemicolonForUsingKeywordIfIsInValidFormat() + { + ParseDocumentTest( + "@using Foo.Bar.Baz;"); + } + + [Fact] + public void DoesntCaptureWhitespaceAfterUsing() + { + ParseDocumentTest("@using Foo "); + } + + [Fact] + public void CapturesNewlineAfterUsing() + { + ParseDocumentTest($"@using Foo{Environment.NewLine}"); + } + + [Fact] + public void ParsesNamespaceAliasWithSemicolonForUsingKeywordIfIsInValidFormat() + { + ParseDocumentTest( + "@using FooBarBaz = FooBarBaz;"); + } + + [Fact] + public void TerminatesUsingKeywordAtEOFAndOutputsFileCodeBlock() + { + ParseDocumentTest("@using "); + } + + [Fact] + public void TerminatesSingleLineCommentAtEndOfFile() + { + const string document = "@foreach(var f in Foo) { // foo bar baz"; + ParseDocumentTest(document); + } + + [Fact] + public void TerminatesBlockCommentAtEndOfFile() + { + const string document = "@foreach(var f in Foo) { /* foo bar baz"; + ParseDocumentTest(document); + } + + [Fact] + public void TerminatesSingleSlashAtEndOfFile() + { + const string document = "@foreach(var f in Foo) { / foo bar baz"; + ParseDocumentTest(document); + } + + [Fact] + public void SupportsBlockCommentBetweenTryAndFinallyClause() + { + ParseDocumentTest("@try { bar(); } /* Foo */ /* Bar */ finally { baz(); }"); + } + + [Fact] + public void SupportsRazorCommentBetweenTryAndFinallyClause() + { + RunRazorCommentBetweenClausesTest("@try { bar(); } ", " finally { biz(); }"); + } + + [Fact] + public void SupportsBlockCommentBetweenCatchAndFinallyClause() + { + ParseDocumentTest( + "@try { bar(); } catch(bar) { baz(); } /* Foo */ /* Bar */ finally { biz(); }"); + } + + [Fact] + public void SupportsRazorCommentBetweenCatchAndFinallyClause() + { + RunRazorCommentBetweenClausesTest( + "@try { bar(); } catch(bar) { baz(); } ", " finally { biz(); }"); + } + + [Fact] + public void SupportsBlockCommentBetweenTryAndCatchClause() + { + ParseDocumentTest("@try { bar(); } /* Foo */ /* Bar */ catch(bar) { baz(); }"); + } + + [Fact] + public void SupportsRazorCommentBetweenTryAndCatchClause() + { + RunRazorCommentBetweenClausesTest("@try { bar(); }", " catch(bar) { baz(); }"); + } + + [Fact] + public void SupportsLineCommentBetweenTryAndFinallyClause() + { + ParseDocumentTest(@"@try { bar(); } +// Foo +// Bar +finally { baz(); }"); + } + + [Fact] + public void SupportsLineCommentBetweenCatchAndFinallyClause() + { + ParseDocumentTest(@"@try { bar(); } catch(bar) { baz(); } +// Foo +// Bar +finally { biz(); }"); + } + + [Fact] + public void SupportsLineCommentBetweenTryAndCatchClause() + { + ParseDocumentTest(@"@try { bar(); } +// Foo +// Bar +catch(bar) { baz(); }"); + } + + [Fact] + public void SupportsTryStatementWithNoAdditionalClauses() + { + ParseDocumentTest("@try { var foo = new { } }"); + } + + [Fact] + public void SupportsMarkupWithinTryClause() + { + RunSimpleWrappedMarkupTest( + prefix: "@try {", + markup: "

    Foo

    ", + suffix: "}"); + } + + [Fact] + public void SupportsTryStatementWithOneCatchClause() + { + ParseDocumentTest("@try { var foo = new { } } catch(Foo Bar Baz) { var foo = new { } }"); + } + + [Fact] + public void SupportsMarkupWithinCatchClause() + { + RunSimpleWrappedMarkupTest( + prefix: "@try { var foo = new { } } catch(Foo Bar Baz) {", + markup: "

    Foo

    ", + suffix: "}"); + } + + [Fact] + public void SupportsTryStatementWithMultipleCatchClause() + { + ParseDocumentTest( + "@try { var foo = new { } } catch(Foo Bar Baz) { var foo = new { } } catch(Foo Bar Baz) " + + "{ var foo = new { } } catch(Foo Bar Baz) { var foo = new { } }"); + } + + [Fact] + public void SupportsExceptionLessCatchClauses() + { + ParseDocumentTest("@try { var foo = new { } } catch { var foo = new { } }"); + } + + [Fact] + public void SupportsMarkupWithinAdditionalCatchClauses() + { + RunSimpleWrappedMarkupTest( + prefix: "@try { var foo = new { } } catch(Foo Bar Baz) { var foo = new { } } catch(Foo Bar Baz) " + + "{ var foo = new { } } catch(Foo Bar Baz) {", + markup: "

    Foo

    ", + suffix: "}"); + } + + [Fact] + public void SupportsTryStatementWithFinallyClause() + { + ParseDocumentTest("@try { var foo = new { } } finally { var foo = new { } }"); + } + + [Fact] + public void SupportsMarkupWithinFinallyClause() + { + RunSimpleWrappedMarkupTest( + prefix: "@try { var foo = new { } } finally {", + markup: "

    Foo

    ", + suffix: "}"); + } + + [Fact] + public void StopsParsingCatchClausesAfterFinallyBlock() + { + var content = "@try { var foo = new { } } finally { var foo = new { } }"; + ParseDocumentTest(content + " catch(Foo Bar Baz) { }"); + } + + [Fact] + public void DoesNotAllowMultipleFinallyBlocks() + { + var content = "@try { var foo = new { } } finally { var foo = new { } }"; + ParseDocumentTest(content + " finally { }"); + } + + [Fact] + public void AcceptsTrailingDotIntoImplicitExpressionWhenEmbeddedInCode() + { + // Arrange + ParseDocumentTest("@if(foo) { @foo. }"); + } + + [Fact] + public void ParsesExpressionOnSwitchCharacterFollowedByOpenParen() + { + // Arrange + ParseDocumentTest("@if(foo) { @(foo + bar) }"); + } + + [Fact] + public void ParsesExpressionOnSwitchCharacterFollowedByIdentifierStart() + { + // Arrange + ParseDocumentTest("@if(foo) { @foo[4].bar() }"); + } + + [Fact] + public void TreatsDoubleAtSignAsEscapeSequenceIfAtStatementStart() + { + // Arrange + ParseDocumentTest("@if(foo) { @@class.Foo() }"); + } + + [Fact] + public void TreatsAtSignsAfterFirstPairAsPartOfCSharpStatement() + { + // Arrange + ParseDocumentTest("@if(foo) { @@@@class.Foo() }"); + } + + [Fact] + public void DoesNotParseOnSwitchCharacterNotFollowedByOpenAngleOrColon() + { + // ParseBlockDoesNotParseMarkupStatementOrExpressionOnSwitchCharacterNotFollowedByOpenAngleOrColon + // Arrange + ParseDocumentTest("@if(foo) { @\"Foo\".ToString(); }"); + } + + [Fact] + public void ParsersCanNestRecursively() + { + // Arrange + ParseDocumentTest("@foreach(var c in db.Categories) {" + Environment.NewLine + + "
    " + Environment.NewLine + + " }"); + } + + [Fact] + public void WithDoubleTransitionInAttributeValue_DoesNotThrow() + { + var input = "@{}"; + ParseDocumentTest(input); + } + + [Fact] + public void WithDoubleTransitionAtEndOfAttributeValue_DoesNotThrow() + { + var input = "@{}"; + ParseDocumentTest(input); + } + + [Fact] + public void WithDoubleTransitionAtBeginningOfAttributeValue_DoesNotThrow() + { + var input = "@{}"; + ParseDocumentTest(input); + } + + [Fact] + public void WithDoubleTransitionBetweenAttributeValue_DoesNotThrow() + { + var input = "@{}"; + ParseDocumentTest(input); + } + + [Fact] + public void WithDoubleTransitionWithExpressionBlock_DoesNotThrow() + { + var input = "@{}"; + ParseDocumentTest(input); + } + + [Fact] + public void WithDoubleTransitionInEmail_DoesNotThrow() + { + var input = "@{}"; + ParseDocumentTest(input); + } + + [Fact] + public void WithDoubleTransitionInRegex_DoesNotThrow() + { + var input = @"@{}"; + ParseDocumentTest(input); + } + + [Fact] + public void WithDoubleTransition_EndOfFile_Throws() + { + ParseDocumentTest("@{}"); + } + + private void RunRazorCommentBetweenClausesTest(string preComment, string postComment, AcceptedCharactersInternal acceptedCharacters = AcceptedCharactersInternal.Any) + { + ParseDocumentTest(preComment + "@* Foo *@ @* Bar *@" + postComment); + } + + private void RunSimpleWrappedMarkupTest(string prefix, string markup, string suffix) + { + ParseDocumentTest(prefix + markup + suffix); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpCodeParserTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpCodeParserTest.cs new file mode 100644 index 0000000000..250eff4f40 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpCodeParserTest.cs @@ -0,0 +1,215 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Legacy; +using Microsoft.AspNetCore.Razor.Language.Syntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Test.Legacy +{ + public class CSharpCodeParserTest + { + public static TheoryData InvalidTagHelperPrefixData + { + get + { + var directiveLocation = new SourceLocation(1, 2, 3); + + RazorDiagnostic InvalidPrefixError(int length, char character, string prefix) + { + return RazorDiagnosticFactory.CreateParsing_InvalidTagHelperPrefixValue( + new SourceSpan(directiveLocation, length), SyntaxConstants.CSharp.TagHelperPrefixKeyword, character, prefix); + } + + return new TheoryData> + { + { + "th ", + directiveLocation, + new[] + { + InvalidPrefixError(3, ' ', "th "), + } + }, + { + "th\t", + directiveLocation, + new[] + { + InvalidPrefixError(3, '\t', "th\t"), + } + }, + { + "th" + Environment.NewLine, + directiveLocation, + new[] + { + InvalidPrefixError(2 + Environment.NewLine.Length, Environment.NewLine[0], "th" + Environment.NewLine), + } + }, + { + " th ", + directiveLocation, + new[] + { + InvalidPrefixError(4, ' ', " th "), + } + }, + { + "@", + directiveLocation, + new[] + { + InvalidPrefixError(1, '@', "@"), + } + }, + { + "t@h", + directiveLocation, + new[] + { + InvalidPrefixError(3, '@', "t@h"), + } + }, + { + "!", + directiveLocation, + new[] + { + InvalidPrefixError(1, '!', "!"), + } + }, + { + "!th", + directiveLocation, + new[] + { + InvalidPrefixError(3, '!', "!th"), + } + }, + }; + } + } + + [Theory] + [MemberData(nameof(InvalidTagHelperPrefixData))] + public void ValidateTagHelperPrefix_ValidatesPrefix( + string directiveText, + SourceLocation directiveLocation, + object expectedErrors) + { + // Arrange + var expectedDiagnostics = (IEnumerable)expectedErrors; + var source = TestRazorSourceDocument.Create(); + var options = RazorParserOptions.CreateDefault(); + var context = new ParserContext(source, options); + + var parser = new CSharpCodeParser(context); + var diagnostics = new List(); + + // Act + parser.ValidateTagHelperPrefix(directiveText, directiveLocation, diagnostics); + + // Assert + Assert.Equal(expectedDiagnostics, diagnostics); + } + + [Theory] + [InlineData("foo,assemblyName", 4)] + [InlineData("foo, assemblyName", 5)] + [InlineData(" foo, assemblyName", 8)] + [InlineData(" foo , assemblyName", 11)] + [InlineData("foo, assemblyName", 8)] + [InlineData(" foo , assemblyName ", 14)] + public void ParseAddOrRemoveDirective_CalculatesAssemblyLocationInLookupText(string text, int assemblyLocation) + { + // Arrange + var source = TestRazorSourceDocument.Create(); + var options = RazorParserOptions.CreateDefault(); + var context = new ParserContext(source, options); + + var parser = new CSharpCodeParser(context); + + var directive = new CSharpCodeParser.ParsedDirective() + { + DirectiveText = text, + }; + + var diagnostics = new List(); + var expected = new SourceLocation(assemblyLocation, 0, assemblyLocation); + + // Act + var result = parser.ParseAddOrRemoveDirective(directive, SourceLocation.Zero, diagnostics); + + // Assert + Assert.Empty(diagnostics); + Assert.Equal("foo", result.TypePattern); + Assert.Equal("assemblyName", result.AssemblyName); + } + + [Theory] + [InlineData("", 1)] + [InlineData("*,", 2)] + [InlineData("?,", 2)] + [InlineData(",", 1)] + [InlineData(",,,", 3)] + [InlineData("First, ", 7)] + [InlineData("First , ", 8)] + [InlineData(" ,Second", 8)] + [InlineData(" , Second", 9)] + [InlineData("SomeType,", 9)] + [InlineData("SomeAssembly", 12)] + [InlineData("First,Second,Third", 18)] + public void ParseAddOrRemoveDirective_CreatesErrorIfInvalidLookupText_DoesNotThrow(string directiveText, int errorLength) + { + // Arrange + var source = TestRazorSourceDocument.Create(); + var options = RazorParserOptions.CreateDefault(); + var context = new ParserContext(source, options); + + var parser = new CSharpCodeParser(context); + + var directive = new CSharpCodeParser.ParsedDirective() + { + DirectiveText = directiveText + }; + + var diagnostics = new List(); + var expectedError = RazorDiagnosticFactory.CreateParsing_InvalidTagHelperLookupText( + new SourceSpan(new SourceLocation(1, 2, 3), errorLength), directiveText); + + // Act + var result = parser.ParseAddOrRemoveDirective(directive, new SourceLocation(1, 2, 3), diagnostics); + + // Assert + Assert.Same(directive, result); + + var error = Assert.Single(diagnostics); + Assert.Equal(expectedError, error); + } + + [Fact] + public void TagHelperPrefixDirective_DuplicatesCauseError() + { + // Arrange + var expectedDiagnostic = RazorDiagnosticFactory.CreateParsing_DuplicateDirective( + new SourceSpan(null, 22 + Environment.NewLine.Length, 1, 0, 16), "tagHelperPrefix"); + var source = TestRazorSourceDocument.Create( + @"@tagHelperPrefix ""th:"" +@tagHelperPrefix ""th""", + filePath: null); + + // Act + var document = RazorSyntaxTree.Parse(source); + + // Assert + var erroredNode = document.Root.DescendantNodes().Last(n => n.GetSpanContext()?.ChunkGenerator is TagHelperPrefixDirectiveChunkGenerator); + var chunkGenerator = Assert.IsType(erroredNode.GetSpanContext().ChunkGenerator); + var diagnostic = Assert.Single(chunkGenerator.Diagnostics); + Assert.Equal(expectedDiagnostic, diagnostic); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpErrorTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpErrorTest.cs new file mode 100644 index 0000000000..bc3284ee23 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpErrorTest.cs @@ -0,0 +1,345 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Razor.Language.Extensions; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpErrorTest : ParserTestBase + { + [Fact] + public void HandlesQuotesAfterTransition() + { + ParseDocumentTest("@\""); + } + + [Fact] + public void WithHelperDirectiveProducesError() + { + ParseDocumentTest("@helper fooHelper { }"); + } + + [Fact] + public void WithNestedCodeBlockProducesError() + { + ParseDocumentTest("@if { @{} }"); + } + + [Fact] + public void CapturesWhitespaceToEOLInInvalidUsingStmtAndTreatsAsFileCode() + { + // ParseBlockCapturesWhitespaceToEndOfLineInInvalidUsingStatementAndTreatsAsFileCode + ParseDocumentTest( + "@using " + Environment.NewLine + Environment.NewLine); + } + + [Fact] + public void MethodOutputsOpenCurlyAsCodeSpanIfEofFoundAfterOpenCurlyBrace() + { + ParseDocumentTest("@{"); + } + + [Fact] + public void MethodOutputsZeroLengthCodeSpanIfStatementBlockEmpty() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void MethodProducesErrorIfNewlineFollowsTransition() + { + ParseDocumentTest("@" + Environment.NewLine); + } + + [Fact] + public void MethodProducesErrorIfWhitespaceBetweenTransitionAndBlockStartInEmbeddedExpr() + { + // ParseBlockMethodProducesErrorIfWhitespaceBetweenTransitionAndBlockStartInEmbeddedExpression + ParseDocumentTest("@{" + Environment.NewLine + + " @ {}" + Environment.NewLine + + "}"); + } + + [Fact] + public void MethodProducesErrorIfEOFAfterTransitionInEmbeddedExpression() + { + ParseDocumentTest("@{" + Environment.NewLine + + " @"); + } + + [Fact] + public void MethodParsesNothingIfFirstCharacterIsNotIdentifierStartOrParenOrBrace() + { + ParseDocumentTest("@!!!"); + } + + [Fact] + public void ShouldReportErrorAndTerminateAtEOFIfIfParenInExplicitExprUnclosed() + { + // ParseBlockShouldReportErrorAndTerminateAtEOFIfIfParenInExplicitExpressionUnclosed + ParseDocumentTest("@(foo bar" + Environment.NewLine + + "baz"); + } + + [Fact] + public void ShouldReportErrorAndTerminateAtMarkupIfIfParenInExplicitExprUnclosed() + { + // ParseBlockShouldReportErrorAndTerminateAtMarkupIfIfParenInExplicitExpressionUnclosed + ParseDocumentTest("@(foo bar" + Environment.NewLine + + "" + Environment.NewLine + + "baz" + Environment.NewLine + + "@Html.Foo(Bar);" + Environment.NewLine); + } + + [Fact] + // Test for fix to Dev10 884975 - Incorrect Error Messaging + public void ShouldReportErrorAndTerminateAtEOFIfParenInImplicitExprUnclosed() + { + // ParseBlockShouldReportErrorAndTerminateAtEOFIfParenInImplicitExpressionUnclosed + ParseDocumentTest("@Foo(Bar(Baz)" + Environment.NewLine + + "Biz" + Environment.NewLine + + "Boz"); + } + + [Fact] + // Test for fix to Dev10 884975 - Incorrect Error Messaging + public void ShouldReportErrorAndTerminateAtMarkupIfParenInImplicitExpressionUnclosed() + { + // ParseBlockShouldReportErrorAndTerminateAtMarkupIfParenInImplicitExpressionUnclosed + ParseDocumentTest("@Foo(Bar(Baz)" + Environment.NewLine + + "Biz" + Environment.NewLine + + "" + Environment.NewLine + + "Boz" + Environment.NewLine + + ""); + } + + [Fact] + // Test for fix to Dev10 884975 - Incorrect Error Messaging + public void ShouldReportErrorAndTerminateAtEOFIfBracketInImplicitExpressionUnclosed() + { + // ParseBlockShouldReportErrorAndTerminateAtEOFIfBracketInImplicitExpressionUnclosed + ParseDocumentTest("@Foo[Bar[Baz]" + Environment.NewLine + + "Biz" + Environment.NewLine + + "Boz"); + } + + [Fact] + // Test for fix to Dev10 884975 - Incorrect Error Messaging + public void ShouldReportErrorAndTerminateAtMarkupIfBracketInImplicitExprUnclosed() + { + // ParseBlockShouldReportErrorAndTerminateAtMarkupIfBracketInImplicitExpressionUnclosed + ParseDocumentTest("@Foo[Bar[Baz]" + Environment.NewLine + + "Biz" + Environment.NewLine + + "" + Environment.NewLine + + "Boz" + Environment.NewLine + + ""); + } + + // Simple EOF handling errors: + [Fact] + public void ReportsErrorIfExplicitCodeBlockUnterminatedAtEOF() + { + ParseDocumentTest("@{ var foo = bar; if(foo != null) { bar(); } "); + } + + [Fact] + public void ReportsErrorIfClassBlockUnterminatedAtEOF() + { + ParseDocumentTest( + "@functions { var foo = bar; if(foo != null) { bar(); } ", + new[] { FunctionsDirective.Directive }); + } + + [Fact] + public void ReportsErrorIfIfBlockUnterminatedAtEOF() + { + RunUnterminatedSimpleKeywordBlock("@if"); + } + + [Fact] + public void ReportsErrorIfElseBlockUnterminatedAtEOF() + { + ParseDocumentTest("@if(foo) { baz(); } else { var foo = bar; if(foo != null) { bar(); } "); + } + + [Fact] + public void ReportsErrorIfElseIfBlockUnterminatedAtEOF() + { + ParseDocumentTest("@if(foo) { baz(); } else if { var foo = bar; if(foo != null) { bar(); } "); + } + + [Fact] + public void ReportsErrorIfDoBlockUnterminatedAtEOF() + { + ParseDocumentTest("@do { var foo = bar; if(foo != null) { bar(); } "); + } + + [Fact] + public void ReportsErrorIfTryBlockUnterminatedAtEOF() + { + ParseDocumentTest("@try { var foo = bar; if(foo != null) { bar(); } "); + } + + [Fact] + public void ReportsErrorIfCatchBlockUnterminatedAtEOF() + { + ParseDocumentTest("@try { baz(); } catch(Foo) { var foo = bar; if(foo != null) { bar(); } "); + } + + [Fact] + public void ReportsErrorIfFinallyBlockUnterminatedAtEOF() + { + ParseDocumentTest("@try { baz(); } finally { var foo = bar; if(foo != null) { bar(); } "); + } + + [Fact] + public void ReportsErrorIfForBlockUnterminatedAtEOF() + { + RunUnterminatedSimpleKeywordBlock("@for"); + } + + [Fact] + public void ReportsErrorIfForeachBlockUnterminatedAtEOF() + { + RunUnterminatedSimpleKeywordBlock("@foreach"); + } + + [Fact] + public void ReportsErrorIfWhileBlockUnterminatedAtEOF() + { + RunUnterminatedSimpleKeywordBlock("@while"); + } + + [Fact] + public void ReportsErrorIfSwitchBlockUnterminatedAtEOF() + { + RunUnterminatedSimpleKeywordBlock("@switch"); + } + + [Fact] + public void ReportsErrorIfLockBlockUnterminatedAtEOF() + { + RunUnterminatedSimpleKeywordBlock("@lock"); + } + + [Fact] + public void ReportsErrorIfUsingBlockUnterminatedAtEOF() + { + RunUnterminatedSimpleKeywordBlock("@using"); + } + + [Fact] + public void RequiresControlFlowStatementsToHaveBraces() + { + ParseDocumentTest("@if(foo)

    Bar

    else if(bar)

    Baz

    else

    Boz

    "); + } + + [Fact] + public void IncludesUnexpectedCharacterInSingleStatementControlFlowStatementError() + { + ParseDocumentTest("@if(foo)) { var bar = foo; }"); + } + + [Fact] + public void OutputsErrorIfAtSignFollowedByLessThanSignAtStatementStart() + { + ParseDocumentTest("@if(foo) { @

    Bar

    }"); + } + + [Fact] + public void TerminatesIfBlockAtEOLWhenRecoveringFromMissingCloseParen() + { + ParseDocumentTest("@if(foo bar" + Environment.NewLine + + "baz"); + } + + [Fact] + public void TerminatesForeachBlockAtEOLWhenRecoveringFromMissingCloseParen() + { + ParseDocumentTest("@foreach(foo bar" + Environment.NewLine + + "baz"); + } + + [Fact] + public void TerminatesWhileClauseInDoStmtAtEOLWhenRecoveringFromMissingCloseParen() + { + ParseDocumentTest("@do { } while(foo bar" + Environment.NewLine + + "baz"); + } + + [Fact] + public void TerminatesUsingBlockAtEOLWhenRecoveringFromMissingCloseParen() + { + ParseDocumentTest("@using(foo bar" + Environment.NewLine + + "baz"); + } + + [Fact] + public void ResumesIfStatementAfterOpenParen() + { + ParseDocumentTest("@if(" + Environment.NewLine + + "else {

    Foo

    }"); + } + + [Fact] + public void TerminatesNormalCSharpStringsAtEOLIfEndQuoteMissing() + { + ParseDocumentTest("@if(foo) {" + Environment.NewLine + + " var p = \"foo bar baz" + Environment.NewLine + + ";" + Environment.NewLine + + "}"); + } + + [Fact] + public void TerminatesNormalStringAtEndOfFile() + { + ParseDocumentTest("@if(foo) { var foo = \"blah blah blah blah blah"); + } + + [Fact] + public void TerminatesVerbatimStringAtEndOfFile() + { + ParseDocumentTest("@if(foo) { var foo = @\"blah " + Environment.NewLine + + "blah; " + Environment.NewLine + + "

    Foo

    " + Environment.NewLine + + "blah " + Environment.NewLine + + "blah"); + } + + [Fact] + public void CorrectlyParsesMarkupIncorrectyAssumedToBeWithinAStatement() + { + ParseDocumentTest("@if(foo) {" + Environment.NewLine + + " var foo = \"foo bar baz" + Environment.NewLine + + "

    Foo is @foo

    " + Environment.NewLine + + "}"); + } + + [Fact] + public void CorrectlyParsesAtSignInDelimitedBlock() + { + ParseDocumentTest("@(Request[\"description\"] ?? @photo.Description)"); + } + + [Fact] + public void CorrectlyRecoversFromMissingCloseParenInExpressionWithinCode() + { + ParseDocumentTest("@{string.Format(}"); + } + + private void RunUnterminatedSimpleKeywordBlock(string keyword) + { + ParseDocumentTest( + keyword + " (foo) { var foo = bar; if(foo != null) { bar(); } "); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpExplicitExpressionTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpExplicitExpressionTest.cs new file mode 100644 index 0000000000..fdb782cf69 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpExplicitExpressionTest.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpExplicitExpressionTest : ParserTestBase + { + [Fact] + public void ShouldOutputZeroLengthCodeSpanIfExplicitExpressionIsEmpty() + { + ParseDocumentTest("@()"); + } + + [Fact] + public void ShouldOutputZeroLengthCodeSpanIfEOFOccursAfterStartOfExplicitExpr() + { + // ParseBlockShouldOutputZeroLengthCodeSpanIfEOFOccursAfterStartOfExplicitExpression + ParseDocumentTest("@("); + } + + [Fact] + public void ShouldAcceptEscapedQuoteInNonVerbatimStrings() + { + ParseDocumentTest("@(\"\\\"\")"); + } + + [Fact] + public void ShouldAcceptEscapedQuoteInVerbatimStrings() + { + ParseDocumentTest("@(@\"\"\"\")"); + } + + [Fact] + public void ShouldAcceptMultipleRepeatedEscapedQuoteInVerbatimStrings() + { + ParseDocumentTest("@(@\"\"\"\"\"\")"); + } + + [Fact] + public void ShouldAcceptMultiLineVerbatimStrings() + { + ParseDocumentTest(@"@(@""" + Environment.NewLine + + @"Foo" + Environment.NewLine + + @"Bar" + Environment.NewLine + + @"Baz" + Environment.NewLine + + @""")"); + } + + [Fact] + public void ShouldAcceptMultipleEscapedQuotesInNonVerbatimStrings() + { + ParseDocumentTest("@(\"\\\"hello, world\\\"\")"); + } + + [Fact] + public void ShouldAcceptMultipleEscapedQuotesInVerbatimStrings() + { + ParseDocumentTest("@(@\"\"\"hello, world\"\"\")"); + } + + [Fact] + public void ShouldAcceptConsecutiveEscapedQuotesInNonVerbatimStrings() + { + ParseDocumentTest("@(\"\\\"\\\"\")"); + } + + [Fact] + public void ShouldAcceptConsecutiveEscapedQuotesInVerbatimStrings() + { + ParseDocumentTest("@(@\"\"\"\"\"\")"); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpFunctionsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpFunctionsTest.cs new file mode 100644 index 0000000000..34e9918f7d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpFunctionsTest.cs @@ -0,0 +1,136 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Extensions; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpFunctionsTest : ParserTestBase + { + [Fact] + public void MarkupInFunctionsBlock_DoesNotParseWhenNotSupported() + { + ParseDocumentTest( + RazorLanguageVersion.Version_2_1, + @" +@functions { + void Announcment(string message) + { +

    @message

    + } +} +", new[] { FunctionsDirective.Directive, }, designTime: false); + } + + [Fact] + public void MarkupInFunctionsBlock_ParsesMarkupInsideMethod() + { + ParseDocumentTest( + RazorLanguageVersion.Version_3_0, + @" +@functions { + void Announcment(string message) + { +

    @message

    + } +} +", new[] { FunctionsDirective.Directive, }, designTime: false); + } + + // This will parse correctly in Razor, but will generate invalid C#. + [Fact] + public void MarkupInFunctionsBlock_ParsesMarkupWithExpressionsMethod() + { + ParseDocumentTest( + RazorLanguageVersion.Version_3_0, + @" +@functions { + void Announcment(string message) =>

    @message

    +} +", new[] { FunctionsDirective.Directive, }, designTime: false); + } + + [Fact] + public void MarkupInFunctionsBlock_DoesNotParseMarkupInString() + { + ParseDocumentTest( + RazorLanguageVersion.Version_3_0, + @" +@functions { + void Announcment(string message) => ""

    @message

    ""; +} +", new[] { FunctionsDirective.Directive, }, designTime: false); + } + + [Fact] + public void MarkupInFunctionsBlock_DoesNotParseMarkupInVerbatimString() + { + ParseDocumentTest( + RazorLanguageVersion.Version_3_0, + @" +@functions { + void Announcment(string message) => @""

    @message

    ""; +} +", new[] { FunctionsDirective.Directive, }, designTime: false); + } + + [Fact] + public void MarkupInFunctionsBlock_CanContainCurlyBraces() + { + ParseDocumentTest( + RazorLanguageVersion.Version_3_0, + @" +@functions { + void Announcment(string message) + { +
    + @if (message.Length > 0) + { +

    @message.Length

    + } +
    + } +} +", new[] { FunctionsDirective.Directive, }, designTime: false); + } + + [Fact] + public void MarkupInFunctionsBlock_MarkupCanContainTemplate() + { + ParseDocumentTest( + RazorLanguageVersion.Version_3_0, + @" +@functions { + void Announcment(string message) + { +
    + @if (message.Length > 0) + { + Repeat(@

    @message.Length

    ); + } +
    + } +} +", new[] { FunctionsDirective.Directive, }, designTime: false); + } + + [Fact] + public void ReservedKeywordsInFunctionsBlock_WithMarkup() + { + ParseDocumentTest( + RazorLanguageVersion.Version_3_0, + @" +@functions { + class Person + { + public void DoSomething() + { +

    Just do it!

    + } + } +} +", new[] { FunctionsDirective.Directive, }, designTime: false); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpImplicitExpressionTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpImplicitExpressionTest.cs new file mode 100644 index 0000000000..594b6d2050 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpImplicitExpressionTest.cs @@ -0,0 +1,374 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpImplicitExpressionTest : ParserTestBase + { + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Bracket1() + { + // Act & Assert + ParseDocumentTest("@val??["); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Bracket2() + { + // Act & Assert + ParseDocumentTest("@val??[0"); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Bracket3() + { + // Act & Assert + ParseDocumentTest("@val?["); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Bracket4() + { + // Act & Assert + ParseDocumentTest("@val?("); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Bracket5() + { + // Act & Assert + ParseDocumentTest("@val?[more"); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Bracket6() + { + // Act & Assert + ParseDocumentTest("@val?[0]"); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Bracket7() + { + // Act & Assert + ParseDocumentTest("@val?[

    "); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Bracket8() + { + // Act & Assert + ParseDocumentTest("@val?[more.

    "); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Bracket9() + { + // Act & Assert + ParseDocumentTest("@val??[more

    "); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Bracket10() + { + // Act & Assert + ParseDocumentTest("@val?[-1]?"); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Bracket11() + { + // Act & Assert + ParseDocumentTest("@val?[abc]?[def"); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Bracket12() + { + // Act & Assert + ParseDocumentTest("@val?[abc]?[2]"); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Bracket13() + { + // Act & Assert + ParseDocumentTest("@val?[abc]?.more?[def]"); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Bracket14() + { + // Act & Assert + ParseDocumentTest("@val?[abc]?.more?.abc"); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Bracket15() + { + // Act & Assert + ParseDocumentTest("@val?[null ?? true]"); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Bracket16() + { + // Act & Assert + ParseDocumentTest("@val?[abc?.gef?[-1]]"); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Dot1() + { + // Act & Assert + ParseDocumentTest("@val?"); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Dot2() + { + // Act & Assert + ParseDocumentTest("@val??"); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Dot3() + { + // Act & Assert + ParseDocumentTest("@val??more"); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Dot4() + { + // Act & Assert + ParseDocumentTest("@val?!"); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Dot5() + { + // Act & Assert + ParseDocumentTest("@val?."); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Dot6() + { + // Act & Assert + ParseDocumentTest("@val??."); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Dot7() + { + // Act & Assert + ParseDocumentTest("@val?.(abc)"); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Dot8() + { + // Act & Assert + ParseDocumentTest("@val?.

    "); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Dot9() + { + // Act & Assert + ParseDocumentTest("@val?.more"); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Dot10() + { + // Act & Assert + ParseDocumentTest("@val?.more

    "); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Dot11() + { + // Act & Assert + ParseDocumentTest("@val??.more

    "); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Dot12() + { + // Act & Assert + ParseDocumentTest("@val?.more(false)?.

    "); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Dot13() + { + // Act & Assert + ParseDocumentTest("@val?.more(false)?.abc"); + } + + [Fact] + public void ParsesNullConditionalOperatorImplicitExpression_Dot14() + { + // Act & Assert + ParseDocumentTest("@val?.more(null ?? true)?.abc"); + } + + [Fact] + public void NestedImplicitExpression() + { + ParseDocumentTest("if (true) { @foo }"); + } + + [Fact] + public void AcceptsNonEnglishCharactersThatAreValidIdentifiers() + { + ParseDocumentTest("@हळूँजद॔."); + } + + [Fact] + public void OutputsZeroLengthCodeSpanIfInvalidCharacterFollowsTransition() + { + ParseDocumentTest("@/"); + } + + [Fact] + public void OutputsZeroLengthCodeSpanIfEOFOccursAfterTransition() + { + ParseDocumentTest("@"); + } + + [Fact] + public void SupportsSlashesWithinComplexImplicitExpressions() + { + ParseDocumentTest("@DataGridColumn.Template(\"Years of Service\", e => (int)Math.Round((DateTime.Now - dt).TotalDays / 365))"); + } + + [Fact] + public void ParsesSingleIdentifierAsImplicitExpression() + { + ParseDocumentTest("@foo"); + } + + [Fact] + public void DoesNotAcceptSemicolonIfExpressionTerminatedByWhitespace() + { + ParseDocumentTest("@foo ;"); + } + + [Fact] + public void IgnoresSemicolonAtEndOfSimpleImplicitExpression() + { + ParseDocumentTest("@foo;"); + } + + [Fact] + public void ParsesDottedIdentifiersAsImplicitExpression() + { + ParseDocumentTest("@foo.bar.baz"); + } + + [Fact] + public void IgnoresSemicolonAtEndOfDottedIdentifiers() + { + ParseDocumentTest("@foo.bar.baz;"); + } + + [Fact] + public void DoesNotIncludeDotAtEOFInImplicitExpression() + { + ParseDocumentTest("@foo.bar."); + } + + [Fact] + public void DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr1() + { + // ParseBlockMethodDoesNotIncludeDotFollowedByInvalidIdentifierCharacterInImplicitExpression1 + ParseDocumentTest("@foo.bar.0"); + } + + [Fact] + public void DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr2() + { + // ParseBlockMethodDoesNotIncludeDotFollowedByInvalidIdentifierCharacterInImplicitExpression2 + ParseDocumentTest("@foo.bar.

    "); + } + + [Fact] + public void DoesNotIncludeSemicolonAfterDot() + { + ParseDocumentTest("@foo.bar.;"); + } + + [Fact] + public void TerminatesAfterIdentifierUnlessFollowedByDotOrParenInImplicitExpr() + { + // ParseBlockMethodTerminatesAfterIdentifierUnlessFollowedByDotOrParenInImplicitExpression + ParseDocumentTest("@foo.bar

    "); + } + + [Fact] + public void ProperlyParsesParenthesesAndBalancesThemInImplicitExpression() + { + ParseDocumentTest(@"@foo().bar(""bi\""z"", 4)(""chained method; call"").baz(@""bo""""z"", '\'', () => { return 4; }, (4+5+new { foo = bar[4] }))"); + } + + [Fact] + public void ProperlyParsesBracketsAndBalancesThemInImplicitExpression() + { + ParseDocumentTest(@"@foo.bar[4 * (8 + 7)][""fo\""o""].baz"); + } + + [Fact] + public void TerminatesImplicitExpressionAtHtmlEndTag() + { + ParseDocumentTest("@foo().bar.baz

    zoop"); + } + + [Fact] + public void TerminatesImplicitExpressionAtHtmlStartTag() + { + ParseDocumentTest("@foo().bar.baz

    zoop"); + } + + [Fact] + public void TerminatesImplicitExprBeforeDotIfDotNotFollowedByIdentifierStartChar() + { + // ParseBlockTerminatesImplicitExpressionBeforeDotIfDotNotFollowedByIdentifierStartCharacter + ParseDocumentTest("@foo().bar.baz.42"); + } + + [Fact] + public void StopsBalancingParenthesesAtEOF() + { + ParseDocumentTest("@foo(()"); + } + + [Fact] + public void TerminatesImplicitExpressionIfCloseParenFollowedByAnyWhiteSpace() + { + ParseDocumentTest("@foo.bar() (baz)"); + } + + [Fact] + public void TerminatesImplicitExpressionIfIdentifierFollowedByAnyWhiteSpace() + { + ParseDocumentTest("@foo .bar() (baz)"); + } + + [Fact] + public void TerminatesImplicitExpressionAtLastValidPointIfDotFollowedByWhitespace() + { + ParseDocumentTest("@foo. bar() (baz)"); + } + + [Fact] + public void OutputExpressionIfModuleTokenNotFollowedByBrace() + { + ParseDocumentTest("@module.foo()"); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpLanguageCharacteristicsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpLanguageCharacteristicsTest.cs new file mode 100644 index 0000000000..84802523b2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpLanguageCharacteristicsTest.cs @@ -0,0 +1,20 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpLanguageCharacteristicsTest + { + [Fact] + public void GetSample_RightShiftAssign_ReturnsCorrectToken() + { + // Arrange & Act + var token = CSharpLanguageCharacteristics.Instance.GetSample(SyntaxKind.RightShiftAssign); + + // Assert + Assert.Equal(">>=", token); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpNestedStatementsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpNestedStatementsTest.cs new file mode 100644 index 0000000000..613cdca2a4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpNestedStatementsTest.cs @@ -0,0 +1,46 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpNestedStatementsTest : ParserTestBase + { + [Fact] + public void NestedSimpleStatement() + { + ParseDocumentTest("@while(true) { foo(); }"); + } + + [Fact] + public void NestedKeywordStatement() + { + ParseDocumentTest("@while(true) { for(int i = 0; i < 10; i++) { foo(); } }"); + } + + [Fact] + public void NestedCodeBlock() + { + ParseDocumentTest("@while(true) { { { { foo(); } } } }"); + } + + [Fact] + public void NestedImplicitExpression() + { + ParseDocumentTest("@while(true) { @foo }"); + } + + [Fact] + public void NestedExplicitExpression() + { + ParseDocumentTest("@while(true) { @(foo) }"); + } + + [Fact] + public void NestedMarkupBlock() + { + ParseDocumentTest("@while(true) {

    Hello

    }"); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpRazorCommentsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpRazorCommentsTest.cs new file mode 100644 index 0000000000..55d3edf1e2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpRazorCommentsTest.cs @@ -0,0 +1,134 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpRazorCommentsTest : ParserTestBase + { + [Fact] + public void UnterminatedRazorComment() + { + ParseDocumentTest("@*"); + } + + [Fact] + public void EmptyRazorComment() + { + ParseDocumentTest("@**@"); + } + + [Fact] + public void RazorCommentInImplicitExpressionMethodCall() + { + ParseDocumentTest("@foo(" + Environment.NewLine + + "@**@" + Environment.NewLine); + } + + [Fact] + public void UnterminatedRazorCommentInImplicitExpressionMethodCall() + { + ParseDocumentTest("@foo(@*"); + } + + [Fact] + public void RazorMultilineCommentInBlock() + { + ParseDocumentTest(@" +@{ + @* +This is a comment + *@ +} +"); + } + + [Fact] + public void RazorCommentInVerbatimBlock() + { + ParseDocumentTest("@{" + Environment.NewLine + + " "); + } + + [Fact] + public void RazorCommentInClosingTagBlock() + { + ParseDocumentTest(""); + } + + [Fact] + public void UnterminatedRazorCommentInVerbatimBlock() + { + ParseDocumentTest("@{@*"); + } + + [Fact] + public void RazorCommentInMarkup() + { + ParseDocumentTest( + "

    " + Environment.NewLine + + "@**@" + Environment.NewLine + + "

    "); + } + + [Fact] + public void MultipleRazorCommentInMarkup() + { + ParseDocumentTest( + "

    " + Environment.NewLine + + " @**@ " + Environment.NewLine + + "@**@" + Environment.NewLine + + "

    "); + } + + [Fact] + public void MultipleRazorCommentsInSameLineInMarkup() + { + ParseDocumentTest( + "

    " + Environment.NewLine + + "@**@ @**@" + Environment.NewLine + + "

    "); + } + + [Fact] + public void RazorCommentsSurroundingMarkup() + { + ParseDocumentTest( + "

    " + Environment.NewLine + + "@* hello *@ content @* world *@" + Environment.NewLine + + "

    "); + } + + [Fact] + public void RazorCommentBetweenCodeBlockAndMarkup() + { + ParseDocumentTest( + "@{ }" + Environment.NewLine + + "@* Hello World *@" + Environment.NewLine + + "
    Foo
    " + ); + } + + [Fact] + public void RazorCommentWithExtraNewLineInMarkup() + { + ParseDocumentTest( + "

    " + Environment.NewLine + Environment.NewLine + + "@* content *@" + Environment.NewLine + + "@*" + Environment.NewLine + + "content" + Environment.NewLine + + "*@" + Environment.NewLine + Environment.NewLine + + "

    "); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpReservedWordsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpReservedWordsTest.cs new file mode 100644 index 0000000000..9132524166 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpReservedWordsTest.cs @@ -0,0 +1,22 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpReservedWordsTest : ParserTestBase + { + [Fact] + public void ReservedWord() + { + ParseDocumentTest("@namespace"); + } + + [Fact] + private void ReservedWordIsCaseSensitive() + { + ParseDocumentTest("@NameSpace"); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpSectionTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpSectionTest.cs new file mode 100644 index 0000000000..517dd4a83d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpSectionTest.cs @@ -0,0 +1,290 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Razor.Language.Extensions; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpSectionTest : ParserTestBase + { + [Fact] + public void CapturesNewlineImmediatelyFollowing() + { + ParseDocumentTest( + "@section" + Environment.NewLine, + new[] { SectionDirective.Directive }); + } + + [Fact] + public void CapturesWhitespaceToEndOfLineInSectionStatementMissingOpenBrace() + { + ParseDocumentTest( + "@section Foo " + Environment.NewLine + " ", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void CapturesWhitespaceToEndOfLineInSectionStatementMissingName() + { + ParseDocumentTest( + "@section " + Environment.NewLine + " ", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void IgnoresSectionUnlessAllLowerCase() + { + ParseDocumentTest( + "@Section foo", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void ReportsErrorAndTerminatesSectionBlockIfKeywordNotFollowedByIdentifierStartChar() + { + // ParseSectionBlockReportsErrorAndTerminatesSectionBlockIfKeywordNotFollowedByIdentifierStartCharacter + ParseDocumentTest( + "@section 9 {

    Foo

    }", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void ReportsErrorAndTerminatesSectionBlockIfNameNotFollowedByOpenBrace() + { + // ParseSectionBlockReportsErrorAndTerminatesSectionBlockIfNameNotFollowedByOpenBrace + ParseDocumentTest( + "@section foo-bar {

    Foo

    }", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void ParserOutputsErrorOnNestedSections() + { + ParseDocumentTest( + "@section foo { @section bar {

    Foo

    } }", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void ParserOutputsErrorOnMultipleNestedSections() + { + ParseDocumentTest( + "@section foo { @section bar {

    Foo

    @section baz { } } }", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void ParserDoesNotOutputErrorOtherNestedDirectives() + { + // This isn't a real scenario but we just want to verify we don't show misleading errors. + ParseDocumentTest( + "@section foo { @inherits Bar }", + new[] { SectionDirective.Directive, InheritsDirective.Directive }); + } + + [Fact] + public void HandlesEOFAfterOpenBrace() + { + ParseDocumentTest( + "@section foo {", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void HandlesEOFAfterOpenContent1() + { + + ParseDocumentTest( + "@section foo { ", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void HandlesEOFAfterOpenContent2() + { + + ParseDocumentTest( + "@section foo {\n", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void HandlesEOFAfterOpenContent3() + { + + ParseDocumentTest( + "@section foo {abc", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void HandlesEOFAfterOpenContent4() + { + + ParseDocumentTest( + "@section foo {\n abc", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void HandlesUnterminatedSection() + { + ParseDocumentTest( + "@section foo {

    Foo{}

    ", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void HandlesUnterminatedSectionWithNestedIf() + { + // Arrange + var newLine = Environment.NewLine; + var spaces = " "; + + // Act & Assert + ParseDocumentTest( + string.Format( + "@section Test{0}{{{0}{1}@if(true){0}{1}{{{0}{1}{1}

    Hello World

    {0}{1}}}", + newLine, + spaces), + new[] { SectionDirective.Directive }); + } + + [Fact] + public void ReportsErrorAndAcceptsWhitespaceToEOLIfSectionNotFollowedByOpenBrace() + { + // ParseSectionBlockReportsErrorAndAcceptsWhitespaceToEndOfLineIfSectionNotFollowedByOpenBrace + ParseDocumentTest( + "@section foo " + Environment.NewLine, + new[] { SectionDirective.Directive }); + } + + [Fact] + public void AcceptsOpenBraceMultipleLinesBelowSectionName() + { + ParseDocumentTest( + "@section foo " + + Environment.NewLine + + Environment.NewLine + + Environment.NewLine + + Environment.NewLine + + Environment.NewLine + + Environment.NewLine + + "{" + Environment.NewLine + + "

    Foo

    " + Environment.NewLine + + "}", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void ParsesNamedSectionCorrectly() + { + ParseDocumentTest( + "@section foo {

    Foo

    }", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void DoesNotRequireSpaceBetweenSectionNameAndOpenBrace() + { + ParseDocumentTest( + "@section foo{

    Foo

    }", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void BalancesBraces() + { + ParseDocumentTest( + "@section foo { }", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void AllowsBracesInCSharpExpression() + { + ParseDocumentTest( + "@section foo { I really want to render a close brace, so here I go: @(\"}\") }", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void SectionIsCorrectlyTerminatedWhenCloseBraceImmediatelyFollowsCodeBlock() + { + ParseDocumentTest( + "@section Foo {" + Environment.NewLine + + "@if(true) {" + Environment.NewLine + + "}" + Environment.NewLine + + "}", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void SectionCorrectlyTerminatedWhenCloseBraceFollowsCodeBlockNoWhitespace() + { + // SectionIsCorrectlyTerminatedWhenCloseBraceImmediatelyFollowsCodeBlockNoWhitespace + ParseDocumentTest( + "@section Foo {" + Environment.NewLine + + "@if(true) {" + Environment.NewLine + + "}}", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void CorrectlyTerminatesWhenCloseBraceImmediatelyFollowsMarkup() + { + ParseDocumentTest( + "@section foo {something}", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void ParsesComment() + { + ParseDocumentTest( + "@section s {}", + new[] { SectionDirective.Directive }); + } + + // This was a user reported bug (codeplex #710), the section parser wasn't handling + // comments. + [Fact] + public void ParsesCommentWithDelimiters() + { + ParseDocumentTest( + "@section s {}", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void CommentRecoversFromUnclosedTag() + { + ParseDocumentTest( + "@section s {" + Environment.NewLine + " \" '-->}", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void ParsesXmlProcessingInstruction() + { + ParseDocumentTest( + "@section s { }", + new[] { SectionDirective.Directive }); + } + + [Fact] + public void _WithDoubleTransition1() + { + ParseDocumentTest("@section s {}", new[] { SectionDirective.Directive }); + } + + [Fact] + public void _WithDoubleTransition2() + { + ParseDocumentTest("@section s {}", new[] { SectionDirective.Directive }); + } + + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpSpecialBlockTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpSpecialBlockTest.cs new file mode 100644 index 0000000000..d18b24759e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpSpecialBlockTest.cs @@ -0,0 +1,50 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpSpecialBlockTest : ParserTestBase + { + [Fact] + public void NonKeywordStatementInCodeBlockIsHandledCorrectly() + { + ParseDocumentTest( +@"@{ + List photos = gallery.Photo.ToList(); +}"); + } + + [Fact] + public void BalancesBracesOutsideStringsIfFirstCharIsBraceAndReturnsSpanOfTypeCode() + { + // ParseBlockBalancesBracesOutsideStringsIfFirstCharacterIsBraceAndReturnsSpanOfTypeCode + ParseDocumentTest("@{foo\"b}ar\" if(condition) { string.Format(\"{0}\"); } }"); + } + + [Fact] + public void BalancesParensOutsideStringsIfFirstCharIsParenAndReturnsSpanOfTypeExpr() + { + // ParseBlockBalancesParensOutsideStringsIfFirstCharacterIsParenAndReturnsSpanOfTypeExpression + ParseDocumentTest("@(foo\"b)ar\" if(condition) { string.Format(\"{0}\"); } )"); + } + + [Fact] + public void ParseBlockIgnoresSingleSlashAtStart() + { + ParseDocumentTest("@/ foo"); + } + + [Fact] + public void ParseBlockTerminatesSingleLineCommentAtEndOfLine() + { + ParseDocumentTest( +"@if(!false) {" + Environment.NewLine + +" // Foo" + Environment.NewLine + +"\t

    A real tag!

    " + Environment.NewLine + +"}"); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpStatementTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpStatementTest.cs new file mode 100644 index 0000000000..a8da56d6a9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpStatementTest.cs @@ -0,0 +1,247 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + // Basic Tests for C# Statements: + // * Basic case for each statement + // * Basic case for ALL clauses + + // This class DOES NOT contain + // * Error cases + // * Tests for various types of nested statements + // * Comment tests + + public class CSharpStatementTest : ParserTestBase + { + [Fact] + public void ForStatement() + { + ParseDocumentTest("@for(int i = 0; i++; i < length) { foo(); }"); + } + + [Fact] + public void ForEachStatement() + { + ParseDocumentTest("@foreach(var foo in bar) { foo(); }"); + } + + [Fact] + public void AwaitForEachStatement() + { + ParseDocumentTest("@await foreach(var foo in bar) { foo(); }"); + } + + [Fact] + public void MalformedAwaitForEachStatement() + { + ParseDocumentTest("@await foreach(var foo in bar { foo(); "); + } + + [Fact] + public void WhileStatement() + { + ParseDocumentTest("@while(true) { foo(); }"); + } + + [Fact] + public void SwitchStatement() + { + ParseDocumentTest("@switch(foo) { foo(); }"); + } + + [Fact] + public void LockStatement() + { + ParseDocumentTest("@lock(baz) { foo(); }"); + } + + [Fact] + public void IfStatement() + { + ParseDocumentTest("@if(true) { foo(); }"); + } + + [Fact] + public void ElseIfClause() + { + ParseDocumentTest("@if(true) { foo(); } else if(false) { foo(); } else if(!false) { foo(); }"); + } + + [Fact] + public void ElseClause() + { + ParseDocumentTest("@if(true) { foo(); } else { foo(); }"); + } + + [Fact] + public void TryStatement() + { + ParseDocumentTest("@try { foo(); }"); + } + + [Fact] + public void CatchClause() + { + ParseDocumentTest("@try { foo(); } catch(IOException ioex) { handleIO(); } catch(Exception ex) { handleOther(); }"); + } + + [Fact] + public void ExceptionFilter_TryCatchWhenComplete_SingleLine() + { + ParseDocumentTest("@try { someMethod(); } catch(Exception) when (true) { handleIO(); }"); + } + + [Fact] + public void ExceptionFilter_TryCatchWhenFinallyComplete_SingleLine() + { + ParseDocumentTest("@try { A(); } catch(Exception) when (true) { B(); } finally { C(); }"); + } + + [Fact] + public void ExceptionFilter_TryCatchWhenCatchWhenComplete_SingleLine() + { + ParseDocumentTest("@try { A(); } catch(Exception) when (true) { B(); } catch(IOException) when (false) { C(); }"); + } + + [Fact] + public void ExceptionFilter_MultiLine() + { + ParseDocumentTest( +@"@try +{ +A(); +} +catch(Exception) when (true) +{ +B(); +} +catch(IOException) when (false) +{ +C(); +}"); + } + + [Fact] + public void ExceptionFilter_NestedTryCatchWhen() + { + ParseDocumentTest("@{try { someMethod(); } catch(Exception) when (true) { handleIO(); }}"); + } + + [Fact] + public void ExceptionFilter_IncompleteTryCatchWhen() + { + ParseDocumentTest("@try { someMethod(); } catch(Exception) when"); + } + + [Fact] + public void ExceptionFilter_IncompleteTryWhen() + { + ParseDocumentTest("@try { someMethod(); } when"); + } + + [Fact] + public void ExceptionFilter_IncompleteTryCatchNoBodyWhen() + { + ParseDocumentTest("@try { someMethod(); } catch(Exception) when { anotherMethod(); }"); + } + + [Fact] + public void ExceptionFilter_IncompleteTryCatchWhenNoBodies() + { + ParseDocumentTest("@try { someMethod(); } catch(Exception) when (true)"); + } + + [Fact] + public void ExceptionFilterError_TryCatchWhen_InCompleteCondition() + { + ParseDocumentTest("@try { someMethod(); } catch(Exception) when ("); + } + + [Fact] + public void ExceptionFilterError_TryCatchWhen_InCompleteBody() + { + ParseDocumentTest("@try { someMethod(); } catch(Exception) when (true) {"); + } + + [Fact] + public void FinallyClause() + { + ParseDocumentTest("@try { foo(); } finally { Dispose(); }"); + } + + [Fact] + public void Using_VariableDeclaration_Simple() + { + ParseDocumentTest("@{ using var foo = someDisposable; }"); + } + + [Fact] + public void Using_VariableDeclaration_Complex() + { + ParseDocumentTest("@{ using Some.Disposable.TypeName foo = GetDisposable(() => { using var bar = otherDisposable; }); }"); + } + + [Fact] + public void StaticUsing_NoUsing() + { + ParseDocumentTest("@using static"); + } + + [Fact] + public void StaticUsing_SingleIdentifier() + { + ParseDocumentTest("@using static System"); + } + + [Fact] + public void StaticUsing_MultipleIdentifiers() + { + ParseDocumentTest("@using static System.Console"); + } + + [Fact] + public void StaticUsing_GlobalPrefix() + { + ParseDocumentTest("@using static global::System.Console"); + } + + [Fact] + public void StaticUsing_Complete_Spaced() + { + ParseDocumentTest("@using static global::System.Console "); + } + + [Fact] + public void UsingStatement() + { + ParseDocumentTest("@using(var foo = new Foo()) { foo.Bar(); }"); + } + + [Fact] + public void UsingTypeAlias() + { + ParseDocumentTest("@using StringDictionary = System.Collections.Generic.Dictionary"); + } + + [Fact] + public void UsingNamespaceImport() + { + ParseDocumentTest("@using System.Text.Encoding.ASCIIEncoding"); + } + + [Fact] + public void DoStatement() + { + ParseDocumentTest("@do { foo(); } while(true);"); + } + + [Fact] + public void NonBlockKeywordTreatedAsImplicitExpression() + { + ParseDocumentTest("@is foo"); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTemplateTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTemplateTest.cs new file mode 100644 index 0000000000..55a2695afa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTemplateTest.cs @@ -0,0 +1,92 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpTemplateTest : ParserTestBase + { + [Fact] + public void HandlesSingleLineTemplate() + { + ParseDocumentTest("@{ var foo = @: bar" + Environment.NewLine + "; }"); + } + + [Fact] + public void HandlesSingleLineImmediatelyFollowingStatementChar() + { + ParseDocumentTest("@{i@: bar" + Environment.NewLine + "}"); + } + + [Fact] + public void HandlesSimpleTemplateInExplicitExpressionParens() + { + ParseDocumentTest("@(Html.Repeat(10, @

    Foo #@item

    ))"); + } + + [Fact] + public void HandlesSimpleTemplateInImplicitExpressionParens() + { + ParseDocumentTest("@Html.Repeat(10, @

    Foo #@item

    )"); + } + + [Fact] + public void HandlesTwoTemplatesInImplicitExpressionParens() + { + ParseDocumentTest("@Html.Repeat(10, @

    Foo #@item

    , @

    Foo #@item

    )"); + } + + [Fact] + public void ProducesErrorButCorrectlyParsesNestedTemplateInImplicitExprParens() + { + // ParseBlockProducesErrorButCorrectlyParsesNestedTemplateInImplicitExpressionParens + ParseDocumentTest("@Html.Repeat(10, @

    Foo #@Html.Repeat(10, @

    @item

    )

    )"); + } + + [Fact] + public void HandlesSimpleTemplateInStatementWithinCodeBlock() + { + ParseDocumentTest("@foreach(foo in Bar) { Html.ExecuteTemplate(foo, @

    Foo #@item

    ); }"); + } + + [Fact] + public void HandlesTwoTemplatesInStatementWithinCodeBlock() + { + ParseDocumentTest("@foreach(foo in Bar) { Html.ExecuteTemplate(foo, @

    Foo #@item

    , @

    Foo #@item

    ); }"); + } + + [Fact] + public void ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinCodeBlock() + { + // ParseBlockProducesErrorButCorrectlyParsesNestedTemplateInStatementWithinCodeBlock + ParseDocumentTest("@foreach(foo in Bar) { Html.ExecuteTemplate(foo, @

    Foo #@Html.Repeat(10, @

    @item

    )

    ); }"); + } + + [Fact] + public void HandlesSimpleTemplateInStatementWithinStatementBlock() + { + ParseDocumentTest("@{ var foo = bar; Html.ExecuteTemplate(foo, @

    Foo #@item

    ); }"); + } + + [Fact] + public void HandlessTwoTemplatesInStatementWithinStatementBlock() + { + ParseDocumentTest("@{ var foo = bar; Html.ExecuteTemplate(foo, @

    Foo #@item

    , @

    Foo #@item

    ); }"); + } + + [Fact] + public void ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinStmtBlock() + { + // ParseBlockProducesErrorButCorrectlyParsesNestedTemplateInStatementWithinStatementBlock + ParseDocumentTest("@{ var foo = bar; Html.ExecuteTemplate(foo, @

    Foo #@Html.Repeat(10, @

    @item

    )

    ); }"); + } + + [Fact] + public void _WithDoubleTransition_DoesNotThrow() + { + ParseDocumentTest("@{ var foo = bar; Html.ExecuteTemplate(foo, @

    Foo #@item

    ); }"); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpToMarkupSwitchTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpToMarkupSwitchTest.cs new file mode 100644 index 0000000000..c427d580f8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpToMarkupSwitchTest.cs @@ -0,0 +1,218 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpToMarkupSwitchTest : ParserTestBase + { + [Fact] + public void SingleAngleBracketDoesNotCauseSwitchIfOuterBlockIsTerminated() + { + ParseDocumentTest("@{ List< }"); + } + + [Fact] + public void GivesSpacesToCodeOnAtTagTemplateTransitionInDesignTimeMode() + { + ParseDocumentTest("@Foo( @

    Foo

    )", designTime: true); + } + + [Fact] + public void GivesSpacesToCodeOnAtColonTemplateTransitionInDesignTimeMode() + { + ParseDocumentTest("@Foo( " + Environment.NewLine + + "@:

    Foo

    " + Environment.NewLine + + ")", designTime: true); + } + + [Fact] + public void GivesSpacesToCodeOnTagTransitionInDesignTimeMode() + { + ParseDocumentTest("@{" + Environment.NewLine + + "

    Foo

    " + Environment.NewLine + + "}", designTime: true); + } + + [Fact] + public void GivesSpacesToCodeOnInvalidAtTagTransitionInDesignTimeMode() + { + ParseDocumentTest("@{" + Environment.NewLine + + " @

    Foo

    " + Environment.NewLine + + "}", designTime: true); + } + + [Fact] + public void GivesSpacesToCodeOnAtColonTransitionInDesignTimeMode() + { + ParseDocumentTest("@{" + Environment.NewLine + + " @:

    Foo

    " + Environment.NewLine + + "}", designTime: true); + } + + [Fact] + public void ShouldSupportSingleLineMarkupContainingStatementBlock() + { + ParseDocumentTest("@Repeat(10," + Environment.NewLine + + " @: @{}" + Environment.NewLine + + ")"); + } + + [Fact] + public void ShouldSupportMarkupWithoutPreceedingWhitespace() + { + ParseDocumentTest("@foreach(var file in files){" + Environment.NewLine + + Environment.NewLine + + Environment.NewLine + + "@:Baz" + Environment.NewLine + + "
    " + Environment.NewLine + + "Foo" + Environment.NewLine + + "@:Bar" + Environment.NewLine + + "}"); + } + + [Fact] + public void GivesAllWhitespaceOnSameLineWithTrailingNewLineToMarkupExclPreceedingNewline() + { + // ParseBlockGivesAllWhitespaceOnSameLineExcludingPreceedingNewlineButIncludingTrailingNewLineToMarkup + ParseDocumentTest("@if(foo) {" + Environment.NewLine + + " var foo = \"After this statement there are 10 spaces\"; " + Environment.NewLine + + "

    " + Environment.NewLine + + " Foo" + Environment.NewLine + + " @bar" + Environment.NewLine + + "

    " + Environment.NewLine + + " @:Hello!" + Environment.NewLine + + " var biz = boz;" + Environment.NewLine + + "}"); + } + + [Fact] + public void AllowsMarkupInIfBodyWithBraces() + { + ParseDocumentTest("@if(foo) {

    Bar

    } else if(bar) {

    Baz

    } else {

    Boz

    }"); + } + + [Fact] + public void AllowsMarkupInIfBodyWithBracesWithinCodeBlock() + { + ParseDocumentTest("@{ if(foo) {

    Bar

    } else if(bar) {

    Baz

    } else {

    Boz

    } }"); + } + + [Fact] + public void SupportsMarkupInCaseAndDefaultBranchesOfSwitch() + { + // Arrange + ParseDocumentTest("@switch(foo) {" + Environment.NewLine + + " case 0:" + Environment.NewLine + + "

    Foo

    " + Environment.NewLine + + " break;" + Environment.NewLine + + " case 1:" + Environment.NewLine + + "

    Bar

    " + Environment.NewLine + + " return;" + Environment.NewLine + + " case 2:" + Environment.NewLine + + " {" + Environment.NewLine + + "

    Baz

    " + Environment.NewLine + + "

    Boz

    " + Environment.NewLine + + " }" + Environment.NewLine + + " default:" + Environment.NewLine + + "

    Biz

    " + Environment.NewLine + + "}"); + } + + [Fact] + public void SupportsMarkupInCaseAndDefaultBranchesOfSwitchInCodeBlock() + { + // Arrange + ParseDocumentTest("@{ switch(foo) {" + Environment.NewLine + + " case 0:" + Environment.NewLine + + "

    Foo

    " + Environment.NewLine + + " break;" + Environment.NewLine + + " case 1:" + Environment.NewLine + + "

    Bar

    " + Environment.NewLine + + " return;" + Environment.NewLine + + " case 2:" + Environment.NewLine + + " {" + Environment.NewLine + + "

    Baz

    " + Environment.NewLine + + "

    Boz

    " + Environment.NewLine + + " }" + Environment.NewLine + + " default:" + Environment.NewLine + + "

    Biz

    " + Environment.NewLine + + "} }"); + } + + [Fact] + public void ParsesMarkupStatementOnOpenAngleBracket() + { + ParseDocumentTest("@for(int i = 0; i < 10; i++) {

    Foo

    }"); + } + + [Fact] + public void ParsesMarkupStatementOnOpenAngleBracketInCodeBlock() + { + ParseDocumentTest("@{ for(int i = 0; i < 10; i++) {

    Foo

    } }"); + } + + [Fact] + public void ParsesMarkupStatementOnSwitchCharacterFollowedByColon() + { + // Arrange + ParseDocumentTest("@if(foo) { @:Bar" + Environment.NewLine + + "} zoop"); + } + + [Fact] + public void ParsesMarkupStatementOnSwitchCharacterFollowedByDoubleColon() + { + // Arrange + ParseDocumentTest("@if(foo) { @::Sometext" + Environment.NewLine + + "}"); + } + + + [Fact] + public void ParsesMarkupStatementOnSwitchCharacterFollowedByTripleColon() + { + // Arrange + ParseDocumentTest("@if(foo) { @:::Sometext" + Environment.NewLine + + "}"); + } + + [Fact] + public void ParsesMarkupStatementOnSwitchCharacterFollowedByColonInCodeBlock() + { + // Arrange + ParseDocumentTest("@{ if(foo) { @:Bar" + Environment.NewLine + + "} } zoop"); + } + + [Fact] + public void CorrectlyReturnsFromMarkupBlockWithPseudoTag() + { + ParseDocumentTest("@if (i > 0) { ; }"); + } + + [Fact] + public void CorrectlyReturnsFromMarkupBlockWithPseudoTagInCodeBlock() + { + ParseDocumentTest("@{ if (i > 0) { ; } }"); + } + + [Fact] + public void SupportsAllKindsOfImplicitMarkupInCodeBlock() + { + ParseDocumentTest("@{" + Environment.NewLine + + " if(true) {" + Environment.NewLine + + " @:Single Line Markup" + Environment.NewLine + + " }" + Environment.NewLine + + " foreach (var p in Enumerable.Range(1, 10)) {" + Environment.NewLine + + " The number is @p" + Environment.NewLine + + " }" + Environment.NewLine + + " if(!false) {" + Environment.NewLine + + "

    A real tag!

    " + Environment.NewLine + + " }" + Environment.NewLine + + "}"); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerCommentTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerCommentTest.cs new file mode 100644 index 0000000000..0a7c55cc34 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerCommentTest.cs @@ -0,0 +1,95 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpTokenizerCommentTest : CSharpTokenizerTestBase + { + private new SyntaxToken IgnoreRemaining => (SyntaxToken)base.IgnoreRemaining; + + [Fact] + public void Next_Ignores_Star_At_EOF_In_RazorComment() + { + TestTokenizer( + "@* Foo * Bar * Baz *", + SyntaxFactory.Token(SyntaxKind.RazorCommentTransition, "@"), + SyntaxFactory.Token(SyntaxKind.RazorCommentStar, "*"), + SyntaxFactory.Token(SyntaxKind.RazorCommentLiteral, " Foo * Bar * Baz *")); + } + + [Fact] + public void Next_Ignores_Star_Without_Trailing_At() + { + TestTokenizer( + "@* Foo * Bar * Baz *@", + SyntaxFactory.Token(SyntaxKind.RazorCommentTransition, "@"), + SyntaxFactory.Token(SyntaxKind.RazorCommentStar, "*"), + SyntaxFactory.Token(SyntaxKind.RazorCommentLiteral, " Foo * Bar * Baz "), + SyntaxFactory.Token(SyntaxKind.RazorCommentStar, "*"), + SyntaxFactory.Token(SyntaxKind.RazorCommentTransition, "@")); + } + + [Fact] + public void Next_Returns_RazorComment_Token_For_Entire_Razor_Comment() + { + TestTokenizer( + "@* Foo Bar Baz *@", + SyntaxFactory.Token(SyntaxKind.RazorCommentTransition, "@"), + SyntaxFactory.Token(SyntaxKind.RazorCommentStar, "*"), + SyntaxFactory.Token(SyntaxKind.RazorCommentLiteral, " Foo Bar Baz "), + SyntaxFactory.Token(SyntaxKind.RazorCommentStar, "*"), + SyntaxFactory.Token(SyntaxKind.RazorCommentTransition, "@")); + } + + [Fact] + public void Next_Returns_Comment_Token_For_Entire_Single_Line_Comment() + { + TestTokenizer("// Foo Bar Baz", SyntaxFactory.Token(SyntaxKind.CSharpComment, "// Foo Bar Baz")); + } + + [Fact] + public void Single_Line_Comment_Is_Terminated_By_Newline() + { + TestTokenizer("// Foo Bar Baz\na", SyntaxFactory.Token(SyntaxKind.CSharpComment, "// Foo Bar Baz"), IgnoreRemaining); + } + + [Fact] + public void Multi_Line_Comment_In_Single_Line_Comment_Has_No_Effect() + { + TestTokenizer("// Foo/*Bar*/ Baz\na", SyntaxFactory.Token(SyntaxKind.CSharpComment, "// Foo/*Bar*/ Baz"), IgnoreRemaining); + } + + [Fact] + public void Next_Returns_Comment_Token_For_Entire_Multi_Line_Comment() + { + TestTokenizer("/* Foo\nBar\nBaz */", SyntaxFactory.Token(SyntaxKind.CSharpComment, "/* Foo\nBar\nBaz */")); + } + + [Fact] + public void Multi_Line_Comment_Is_Terminated_By_End_Sequence() + { + TestTokenizer("/* Foo\nBar\nBaz */a", SyntaxFactory.Token(SyntaxKind.CSharpComment, "/* Foo\nBar\nBaz */"), IgnoreRemaining); + } + + [Fact] + public void Unterminated_Multi_Line_Comment_Captures_To_EOF() + { + TestTokenizer("/* Foo\nBar\nBaz", SyntaxFactory.Token(SyntaxKind.CSharpComment, "/* Foo\nBar\nBaz"), IgnoreRemaining); + } + + [Fact] + public void Nested_Multi_Line_Comments_Terminated_At_First_End_Sequence() + { + TestTokenizer("/* Foo/*\nBar\nBaz*/ */", SyntaxFactory.Token(SyntaxKind.CSharpComment, "/* Foo/*\nBar\nBaz*/"), IgnoreRemaining); + } + + [Fact] + public void Nested_Multi_Line_Comments_Terminated_At_Full_End_Sequence() + { + TestTokenizer("/* Foo\nBar\nBaz* */", SyntaxFactory.Token(SyntaxKind.CSharpComment, "/* Foo\nBar\nBaz* */"), IgnoreRemaining); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerIdentifierTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerIdentifierTest.cs new file mode 100644 index 0000000000..e5a3a466ac --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerIdentifierTest.cs @@ -0,0 +1,171 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpTokenizerIdentifierTest : CSharpTokenizerTestBase + { + [Fact] + public void Simple_Identifier_Is_Recognized() + { + TestTokenizer("foo", SyntaxFactory.Token(SyntaxKind.Identifier, "foo")); + } + + [Fact] + public void Identifier_Starting_With_Underscore_Is_Recognized() + { + TestTokenizer("_foo", SyntaxFactory.Token(SyntaxKind.Identifier, "_foo")); + } + + [Fact] + public void Identifier_Can_Contain_Digits() + { + TestTokenizer("foo4", SyntaxFactory.Token(SyntaxKind.Identifier, "foo4")); + } + + [Fact] + public void Identifier_Can_Start_With_Titlecase_Letter() + { + TestTokenizer("ῼfoo", SyntaxFactory.Token(SyntaxKind.Identifier, "ῼfoo")); + } + + [Fact] + public void Identifier_Can_Start_With_Letter_Modifier() + { + TestTokenizer("ᵊfoo", SyntaxFactory.Token(SyntaxKind.Identifier, "ᵊfoo")); + } + + [Fact] + public void Identifier_Can_Start_With_Other_Letter() + { + TestTokenizer("ƻfoo", SyntaxFactory.Token(SyntaxKind.Identifier, "ƻfoo")); + } + + [Fact] + public void Identifier_Can_Start_With_Number_Letter() + { + TestTokenizer("Ⅽool", SyntaxFactory.Token(SyntaxKind.Identifier, "Ⅽool")); + } + + [Fact] + public void Identifier_Can_Contain_Non_Spacing_Mark() + { + TestTokenizer("foo\u0300", SyntaxFactory.Token(SyntaxKind.Identifier, "foo\u0300")); + } + + [Fact] + public void Identifier_Can_Contain_Spacing_Combining_Mark() + { + TestTokenizer("fooः", SyntaxFactory.Token(SyntaxKind.Identifier, "fooः")); + } + + [Fact] + public void Identifier_Can_Contain_Non_English_Digit() + { + TestTokenizer("foo١", SyntaxFactory.Token(SyntaxKind.Identifier, "foo١")); + } + + [Fact] + public void Identifier_Can_Contain_Connector_Punctuation() + { + TestTokenizer("foo‿bar", SyntaxFactory.Token(SyntaxKind.Identifier, "foo‿bar")); + } + + [Fact] + public void Identifier_Can_Contain_Format_Character() + { + TestTokenizer("foo؃bar", SyntaxFactory.Token(SyntaxKind.Identifier, "foo؃bar")); + } + + [Fact] + public void Keywords_Are_Recognized_As_Keyword_Tokens() + { + TestKeyword("abstract", CSharpKeyword.Abstract); + TestKeyword("byte", CSharpKeyword.Byte); + TestKeyword("class", CSharpKeyword.Class); + TestKeyword("delegate", CSharpKeyword.Delegate); + TestKeyword("event", CSharpKeyword.Event); + TestKeyword("fixed", CSharpKeyword.Fixed); + TestKeyword("if", CSharpKeyword.If); + TestKeyword("internal", CSharpKeyword.Internal); + TestKeyword("new", CSharpKeyword.New); + TestKeyword("override", CSharpKeyword.Override); + TestKeyword("readonly", CSharpKeyword.Readonly); + TestKeyword("short", CSharpKeyword.Short); + TestKeyword("struct", CSharpKeyword.Struct); + TestKeyword("try", CSharpKeyword.Try); + TestKeyword("unsafe", CSharpKeyword.Unsafe); + TestKeyword("volatile", CSharpKeyword.Volatile); + TestKeyword("as", CSharpKeyword.As); + TestKeyword("do", CSharpKeyword.Do); + TestKeyword("is", CSharpKeyword.Is); + TestKeyword("params", CSharpKeyword.Params); + TestKeyword("ref", CSharpKeyword.Ref); + TestKeyword("switch", CSharpKeyword.Switch); + TestKeyword("ushort", CSharpKeyword.Ushort); + TestKeyword("while", CSharpKeyword.While); + TestKeyword("case", CSharpKeyword.Case); + TestKeyword("const", CSharpKeyword.Const); + TestKeyword("explicit", CSharpKeyword.Explicit); + TestKeyword("float", CSharpKeyword.Float); + TestKeyword("null", CSharpKeyword.Null); + TestKeyword("sizeof", CSharpKeyword.Sizeof); + TestKeyword("typeof", CSharpKeyword.Typeof); + TestKeyword("implicit", CSharpKeyword.Implicit); + TestKeyword("private", CSharpKeyword.Private); + TestKeyword("this", CSharpKeyword.This); + TestKeyword("using", CSharpKeyword.Using); + TestKeyword("extern", CSharpKeyword.Extern); + TestKeyword("return", CSharpKeyword.Return); + TestKeyword("stackalloc", CSharpKeyword.Stackalloc); + TestKeyword("uint", CSharpKeyword.Uint); + TestKeyword("base", CSharpKeyword.Base); + TestKeyword("catch", CSharpKeyword.Catch); + TestKeyword("continue", CSharpKeyword.Continue); + TestKeyword("double", CSharpKeyword.Double); + TestKeyword("for", CSharpKeyword.For); + TestKeyword("in", CSharpKeyword.In); + TestKeyword("lock", CSharpKeyword.Lock); + TestKeyword("object", CSharpKeyword.Object); + TestKeyword("protected", CSharpKeyword.Protected); + TestKeyword("static", CSharpKeyword.Static); + TestKeyword("false", CSharpKeyword.False); + TestKeyword("public", CSharpKeyword.Public); + TestKeyword("sbyte", CSharpKeyword.Sbyte); + TestKeyword("throw", CSharpKeyword.Throw); + TestKeyword("virtual", CSharpKeyword.Virtual); + TestKeyword("decimal", CSharpKeyword.Decimal); + TestKeyword("else", CSharpKeyword.Else); + TestKeyword("operator", CSharpKeyword.Operator); + TestKeyword("string", CSharpKeyword.String); + TestKeyword("ulong", CSharpKeyword.Ulong); + TestKeyword("bool", CSharpKeyword.Bool); + TestKeyword("char", CSharpKeyword.Char); + TestKeyword("default", CSharpKeyword.Default); + TestKeyword("foreach", CSharpKeyword.Foreach); + TestKeyword("long", CSharpKeyword.Long); + TestKeyword("void", CSharpKeyword.Void); + TestKeyword("enum", CSharpKeyword.Enum); + TestKeyword("finally", CSharpKeyword.Finally); + TestKeyword("int", CSharpKeyword.Int); + TestKeyword("out", CSharpKeyword.Out); + TestKeyword("sealed", CSharpKeyword.Sealed); + TestKeyword("true", CSharpKeyword.True); + TestKeyword("goto", CSharpKeyword.Goto); + TestKeyword("unchecked", CSharpKeyword.Unchecked); + TestKeyword("interface", CSharpKeyword.Interface); + TestKeyword("break", CSharpKeyword.Break); + TestKeyword("checked", CSharpKeyword.Checked); + TestKeyword("namespace", CSharpKeyword.Namespace); + TestKeyword("when", CSharpKeyword.When); + } + + private void TestKeyword(string keyword, CSharpKeyword keywordType) + { + TestTokenizer(keyword, SyntaxFactory.Token(SyntaxKind.Keyword, keyword)); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerLiteralTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerLiteralTest.cs new file mode 100644 index 0000000000..c7c250cce3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerLiteralTest.cs @@ -0,0 +1,288 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpTokenizerLiteralTest : CSharpTokenizerTestBase + { + private new SyntaxToken IgnoreRemaining => (SyntaxToken)base.IgnoreRemaining; + + [Fact] + public void Simple_Integer_Literal_Is_Recognized() + { + TestSingleToken("01189998819991197253", SyntaxKind.IntegerLiteral); + } + + [Fact] + public void Integer_Type_Suffix_Is_Recognized() + { + TestSingleToken("42U", SyntaxKind.IntegerLiteral); + TestSingleToken("42u", SyntaxKind.IntegerLiteral); + + TestSingleToken("42L", SyntaxKind.IntegerLiteral); + TestSingleToken("42l", SyntaxKind.IntegerLiteral); + + TestSingleToken("42UL", SyntaxKind.IntegerLiteral); + TestSingleToken("42Ul", SyntaxKind.IntegerLiteral); + + TestSingleToken("42uL", SyntaxKind.IntegerLiteral); + TestSingleToken("42ul", SyntaxKind.IntegerLiteral); + + TestSingleToken("42LU", SyntaxKind.IntegerLiteral); + TestSingleToken("42Lu", SyntaxKind.IntegerLiteral); + + TestSingleToken("42lU", SyntaxKind.IntegerLiteral); + TestSingleToken("42lu", SyntaxKind.IntegerLiteral); + } + + [Fact] + public void Trailing_Letter_Is_Not_Part_Of_Integer_Literal_If_Not_Type_Sufix() + { + TestTokenizer("42a", SyntaxFactory.Token(SyntaxKind.IntegerLiteral, "42"), IgnoreRemaining); + } + + [Fact] + public void Simple_Hex_Literal_Is_Recognized() + { + TestSingleToken("0x0123456789ABCDEF", SyntaxKind.IntegerLiteral); + } + + [Fact] + public void Integer_Type_Suffix_Is_Recognized_In_Hex_Literal() + { + TestSingleToken("0xDEADBEEFU", SyntaxKind.IntegerLiteral); + TestSingleToken("0xDEADBEEFu", SyntaxKind.IntegerLiteral); + + TestSingleToken("0xDEADBEEFL", SyntaxKind.IntegerLiteral); + TestSingleToken("0xDEADBEEFl", SyntaxKind.IntegerLiteral); + + TestSingleToken("0xDEADBEEFUL", SyntaxKind.IntegerLiteral); + TestSingleToken("0xDEADBEEFUl", SyntaxKind.IntegerLiteral); + + TestSingleToken("0xDEADBEEFuL", SyntaxKind.IntegerLiteral); + TestSingleToken("0xDEADBEEFul", SyntaxKind.IntegerLiteral); + + TestSingleToken("0xDEADBEEFLU", SyntaxKind.IntegerLiteral); + TestSingleToken("0xDEADBEEFLu", SyntaxKind.IntegerLiteral); + + TestSingleToken("0xDEADBEEFlU", SyntaxKind.IntegerLiteral); + TestSingleToken("0xDEADBEEFlu", SyntaxKind.IntegerLiteral); + } + + [Fact] + public void Trailing_Letter_Is_Not_Part_Of_Hex_Literal_If_Not_Type_Sufix() + { + TestTokenizer("0xDEADBEEFz", SyntaxFactory.Token(SyntaxKind.IntegerLiteral, "0xDEADBEEF"), IgnoreRemaining); + } + + [Fact] + public void Dot_Followed_By_Non_Digit_Is_Not_Part_Of_Real_Literal() + { + TestTokenizer("3.a", SyntaxFactory.Token(SyntaxKind.IntegerLiteral, "3"), IgnoreRemaining); + } + + [Fact] + public void Simple_Real_Literal_Is_Recognized() + { + TestTokenizer("3.14159", SyntaxFactory.Token(SyntaxKind.RealLiteral, "3.14159")); + } + + [Fact] + public void Real_Literal_Between_Zero_And_One_Is_Recognized() + { + TestTokenizer(".14159", SyntaxFactory.Token(SyntaxKind.RealLiteral, ".14159")); + } + + [Fact] + public void Integer_With_Real_Type_Suffix_Is_Recognized() + { + TestSingleToken("42F", SyntaxKind.RealLiteral); + TestSingleToken("42f", SyntaxKind.RealLiteral); + TestSingleToken("42D", SyntaxKind.RealLiteral); + TestSingleToken("42d", SyntaxKind.RealLiteral); + TestSingleToken("42M", SyntaxKind.RealLiteral); + TestSingleToken("42m", SyntaxKind.RealLiteral); + } + + [Fact] + public void Integer_With_Exponent_Is_Recognized() + { + TestSingleToken("1e10", SyntaxKind.RealLiteral); + TestSingleToken("1E10", SyntaxKind.RealLiteral); + TestSingleToken("1e+10", SyntaxKind.RealLiteral); + TestSingleToken("1E+10", SyntaxKind.RealLiteral); + TestSingleToken("1e-10", SyntaxKind.RealLiteral); + TestSingleToken("1E-10", SyntaxKind.RealLiteral); + } + + [Fact] + public void Real_Number_With_Type_Suffix_Is_Recognized() + { + TestSingleToken("3.14F", SyntaxKind.RealLiteral); + TestSingleToken("3.14f", SyntaxKind.RealLiteral); + TestSingleToken("3.14D", SyntaxKind.RealLiteral); + TestSingleToken("3.14d", SyntaxKind.RealLiteral); + TestSingleToken("3.14M", SyntaxKind.RealLiteral); + TestSingleToken("3.14m", SyntaxKind.RealLiteral); + } + + [Fact] + public void Real_Number_With_Exponent_Is_Recognized() + { + TestSingleToken("3.14E10", SyntaxKind.RealLiteral); + TestSingleToken("3.14e10", SyntaxKind.RealLiteral); + TestSingleToken("3.14E+10", SyntaxKind.RealLiteral); + TestSingleToken("3.14e+10", SyntaxKind.RealLiteral); + TestSingleToken("3.14E-10", SyntaxKind.RealLiteral); + TestSingleToken("3.14e-10", SyntaxKind.RealLiteral); + } + + [Fact] + public void Real_Number_With_Exponent_And_Type_Suffix_Is_Recognized() + { + TestSingleToken("3.14E+10F", SyntaxKind.RealLiteral); + } + + [Fact] + public void Single_Character_Literal_Is_Recognized() + { + TestSingleToken("'f'", SyntaxKind.CharacterLiteral); + } + + [Fact] + public void Multi_Character_Literal_Is_Recognized() + { + TestSingleToken("'foo'", SyntaxKind.CharacterLiteral); + } + + [Fact] + public void Character_Literal_Is_Terminated_By_EOF_If_Unterminated() + { + TestSingleToken("'foo bar", SyntaxKind.CharacterLiteral); + } + + [Fact] + public void Character_Literal_Not_Terminated_By_Escaped_Quote() + { + TestSingleToken("'foo\\'bar'", SyntaxKind.CharacterLiteral); + } + + [Fact] + public void Character_Literal_Is_Terminated_By_EOL_If_Unterminated() + { + TestTokenizer("'foo\n", SyntaxFactory.Token(SyntaxKind.CharacterLiteral, "'foo"), IgnoreRemaining); + } + + [Fact] + public void Character_Literal_Terminated_By_EOL_Even_When_Last_Char_Is_Slash() + { + TestTokenizer("'foo\\\n", SyntaxFactory.Token(SyntaxKind.CharacterLiteral, "'foo\\"), IgnoreRemaining); + } + + [Fact] + public void Character_Literal_Terminated_By_EOL_Even_When_Last_Char_Is_Slash_And_Followed_By_Stuff() + { + TestTokenizer("'foo\\\nflarg", SyntaxFactory.Token(SyntaxKind.CharacterLiteral, "'foo\\"), IgnoreRemaining); + } + + [Fact] + public void Character_Literal_Terminated_By_CRLF_Even_When_Last_Char_Is_Slash() + { + TestTokenizer("'foo\\" + Environment.NewLine, SyntaxFactory.Token(SyntaxKind.CharacterLiteral, "'foo\\"), IgnoreRemaining); + } + + [Fact] + public void Character_Literal_Terminated_By_CRLF_Even_When_Last_Char_Is_Slash_And_Followed_By_Stuff() + { + TestTokenizer($"'foo\\{Environment.NewLine}flarg", SyntaxFactory.Token(SyntaxKind.CharacterLiteral, "'foo\\"), IgnoreRemaining); + } + + [Fact] + public void Character_Literal_Allows_Escaped_Escape() + { + TestTokenizer("'foo\\\\'blah", SyntaxFactory.Token(SyntaxKind.CharacterLiteral, "'foo\\\\'"), IgnoreRemaining); + } + + [Fact] + public void String_Literal_Is_Recognized() + { + TestSingleToken("\"foo\"", SyntaxKind.StringLiteral); + } + + [Fact] + public void String_Literal_Is_Terminated_By_EOF_If_Unterminated() + { + TestSingleToken("\"foo bar", SyntaxKind.StringLiteral); + } + + [Fact] + public void String_Literal_Not_Terminated_By_Escaped_Quote() + { + TestSingleToken("\"foo\\\"bar\"", SyntaxKind.StringLiteral); + } + + [Fact] + public void String_Literal_Is_Terminated_By_EOL_If_Unterminated() + { + TestTokenizer("\"foo\n", SyntaxFactory.Token(SyntaxKind.StringLiteral, "\"foo"), IgnoreRemaining); + } + + [Fact] + public void String_Literal_Terminated_By_EOL_Even_When_Last_Char_Is_Slash() + { + TestTokenizer("\"foo\\\n", SyntaxFactory.Token(SyntaxKind.StringLiteral, "\"foo\\"), IgnoreRemaining); + } + + [Fact] + public void String_Literal_Terminated_By_EOL_Even_When_Last_Char_Is_Slash_And_Followed_By_Stuff() + { + TestTokenizer("\"foo\\\nflarg", SyntaxFactory.Token(SyntaxKind.StringLiteral, "\"foo\\"), IgnoreRemaining); + } + + [Fact] + public void String_Literal_Terminated_By_CRLF_Even_When_Last_Char_Is_Slash() + { + TestTokenizer("\"foo\\" + Environment.NewLine, SyntaxFactory.Token(SyntaxKind.StringLiteral, "\"foo\\"), IgnoreRemaining); + } + + [Fact] + public void String_Literal_Terminated_By_CRLF_Even_When_Last_Char_Is_Slash_And_Followed_By_Stuff() + { + TestTokenizer($"\"foo\\{Environment.NewLine}flarg", SyntaxFactory.Token(SyntaxKind.StringLiteral, "\"foo\\"), IgnoreRemaining); + } + + [Fact] + public void String_Literal_Allows_Escaped_Escape() + { + TestTokenizer("\"foo\\\\\"blah", SyntaxFactory.Token(SyntaxKind.StringLiteral, "\"foo\\\\\""), IgnoreRemaining); + } + + [Fact] + public void Verbatim_String_Literal_Can_Contain_Newlines() + { + TestSingleToken("@\"foo\nbar\nbaz\"", SyntaxKind.StringLiteral); + } + + [Fact] + public void Verbatim_String_Literal_Not_Terminated_By_Escaped_Double_Quote() + { + TestSingleToken("@\"foo\"\"bar\"", SyntaxKind.StringLiteral); + } + + [Fact] + public void Verbatim_String_Literal_Is_Terminated_By_Slash_Double_Quote() + { + TestTokenizer("@\"foo\\\"bar\"", SyntaxFactory.Token(SyntaxKind.StringLiteral, "@\"foo\\\""), IgnoreRemaining); + } + + [Fact] + public void Verbatim_String_Literal_Is_Terminated_By_EOF() + { + TestSingleToken("@\"foo", SyntaxKind.StringLiteral); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerOperatorsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerOperatorsTest.cs new file mode 100644 index 0000000000..fdf2718387 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerOperatorsTest.cs @@ -0,0 +1,297 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpTokenizerOperatorsTest : CSharpTokenizerTestBase + { + [Fact] + public void LeftBrace_Is_Recognized() + { + TestSingleToken("{", SyntaxKind.LeftBrace); + } + + [Fact] + public void Plus_Is_Recognized() + { + TestSingleToken("+", SyntaxKind.Plus); + } + + [Fact] + public void Assign_Is_Recognized() + { + TestSingleToken("=", SyntaxKind.Assign); + } + + [Fact] + public void Arrow_Is_Recognized() + { + TestSingleToken("->", SyntaxKind.Arrow); + } + + [Fact] + public void AndAssign_Is_Recognized() + { + TestSingleToken("&=", SyntaxKind.AndAssign); + } + + [Fact] + public void RightBrace_Is_Recognized() + { + TestSingleToken("}", SyntaxKind.RightBrace); + } + + [Fact] + public void Minus_Is_Recognized() + { + TestSingleToken("-", SyntaxKind.Minus); + } + + [Fact] + public void LessThan_Is_Recognized() + { + TestSingleToken("<", SyntaxKind.LessThan); + } + + [Fact] + public void Equals_Is_Recognized() + { + TestSingleToken("==", SyntaxKind.Equals); + } + + [Fact] + public void OrAssign_Is_Recognized() + { + TestSingleToken("|=", SyntaxKind.OrAssign); + } + + [Fact] + public void LeftBracket_Is_Recognized() + { + TestSingleToken("[", SyntaxKind.LeftBracket); + } + + [Fact] + public void Star_Is_Recognized() + { + TestSingleToken("*", SyntaxKind.Star); + } + + [Fact] + public void GreaterThan_Is_Recognized() + { + TestSingleToken(">", SyntaxKind.GreaterThan); + } + + [Fact] + public void NotEqual_Is_Recognized() + { + TestSingleToken("!=", SyntaxKind.NotEqual); + } + + [Fact] + public void XorAssign_Is_Recognized() + { + TestSingleToken("^=", SyntaxKind.XorAssign); + } + + [Fact] + public void RightBracket_Is_Recognized() + { + TestSingleToken("]", SyntaxKind.RightBracket); + } + + [Fact] + public void Slash_Is_Recognized() + { + TestSingleToken("/", SyntaxKind.Slash); + } + + [Fact] + public void QuestionMark_Is_Recognized() + { + TestSingleToken("?", SyntaxKind.QuestionMark); + } + + [Fact] + public void LessThanEqual_Is_Recognized() + { + TestSingleToken("<=", SyntaxKind.LessThanEqual); + } + + [Fact] + public void LeftShift_Is_Not_Specially_Recognized() + { + TestTokenizer("<<", + SyntaxFactory.Token(SyntaxKind.LessThan, "<"), + SyntaxFactory.Token(SyntaxKind.LessThan, "<")); + } + + [Fact] + public void LeftParen_Is_Recognized() + { + TestSingleToken("(", SyntaxKind.LeftParenthesis); + } + + [Fact] + public void Modulo_Is_Recognized() + { + TestSingleToken("%", SyntaxKind.Modulo); + } + + [Fact] + public void NullCoalesce_Is_Recognized() + { + TestSingleToken("??", SyntaxKind.NullCoalesce); + } + + [Fact] + public void GreaterThanEqual_Is_Recognized() + { + TestSingleToken(">=", SyntaxKind.GreaterThanEqual); + } + + [Fact] + public void EqualGreaterThan_Is_Recognized() + { + TestSingleToken("=>", SyntaxKind.GreaterThanEqual); + } + + [Fact] + public void RightParen_Is_Recognized() + { + TestSingleToken(")", SyntaxKind.RightParenthesis); + } + + [Fact] + public void And_Is_Recognized() + { + TestSingleToken("&", SyntaxKind.And); + } + + [Fact] + public void DoubleColon_Is_Recognized() + { + TestSingleToken("::", SyntaxKind.DoubleColon); + } + + [Fact] + public void PlusAssign_Is_Recognized() + { + TestSingleToken("+=", SyntaxKind.PlusAssign); + } + + [Fact] + public void Semicolon_Is_Recognized() + { + TestSingleToken(";", SyntaxKind.Semicolon); + } + + [Fact] + public void Tilde_Is_Recognized() + { + TestSingleToken("~", SyntaxKind.Tilde); + } + + [Fact] + public void DoubleOr_Is_Recognized() + { + TestSingleToken("||", SyntaxKind.DoubleOr); + } + + [Fact] + public void ModuloAssign_Is_Recognized() + { + TestSingleToken("%=", SyntaxKind.ModuloAssign); + } + + [Fact] + public void Colon_Is_Recognized() + { + TestSingleToken(":", SyntaxKind.Colon); + } + + [Fact] + public void Not_Is_Recognized() + { + TestSingleToken("!", SyntaxKind.Not); + } + + [Fact] + public void DoubleAnd_Is_Recognized() + { + TestSingleToken("&&", SyntaxKind.DoubleAnd); + } + + [Fact] + public void DivideAssign_Is_Recognized() + { + TestSingleToken("/=", SyntaxKind.DivideAssign); + } + + [Fact] + public void Comma_Is_Recognized() + { + TestSingleToken(",", SyntaxKind.Comma); + } + + [Fact] + public void Xor_Is_Recognized() + { + TestSingleToken("^", SyntaxKind.Xor); + } + + [Fact] + public void Decrement_Is_Recognized() + { + TestSingleToken("--", SyntaxKind.Decrement); + } + + [Fact] + public void MultiplyAssign_Is_Recognized() + { + TestSingleToken("*=", SyntaxKind.MultiplyAssign); + } + + [Fact] + public void Dot_Is_Recognized() + { + TestSingleToken(".", SyntaxKind.Dot); + } + + [Fact] + public void Or_Is_Recognized() + { + TestSingleToken("|", SyntaxKind.Or); + } + + [Fact] + public void Increment_Is_Recognized() + { + TestSingleToken("++", SyntaxKind.Increment); + } + + [Fact] + public void MinusAssign_Is_Recognized() + { + TestSingleToken("-=", SyntaxKind.MinusAssign); + } + + [Fact] + public void RightShift_Is_Not_Specially_Recognized() + { + TestTokenizer(">>", + SyntaxFactory.Token(SyntaxKind.GreaterThan, ">"), + SyntaxFactory.Token(SyntaxKind.GreaterThan, ">")); + } + + [Fact] + public void Hash_Is_Recognized() + { + TestSingleToken("#", SyntaxKind.Hash); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerTest.cs new file mode 100644 index 0000000000..5ee0715a7e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerTest.cs @@ -0,0 +1,107 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpTokenizerTest : CSharpTokenizerTestBase + { + private new SyntaxToken IgnoreRemaining => (SyntaxToken)base.IgnoreRemaining; + + [Fact] + public void Next_Returns_Null_When_EOF_Reached() + { + TestTokenizer(""); + } + + [Fact] + public void Next_Returns_Newline_Token_For_Single_CR() + { + TestTokenizer( + "\r\ra", + SyntaxFactory.Token(SyntaxKind.NewLine, "\r"), + SyntaxFactory.Token(SyntaxKind.NewLine, "\r"), + IgnoreRemaining); + } + + [Fact] + public void Next_Returns_Newline_Token_For_Single_LF() + { + TestTokenizer( + "\n\na", + SyntaxFactory.Token(SyntaxKind.NewLine, "\n"), + SyntaxFactory.Token(SyntaxKind.NewLine, "\n"), + IgnoreRemaining); + } + + [Fact] + public void Next_Returns_Newline_Token_For_Single_NEL() + { + // NEL: Unicode "Next Line" U+0085 + TestTokenizer( + "\u0085\u0085a", + SyntaxFactory.Token(SyntaxKind.NewLine, "\u0085"), + SyntaxFactory.Token(SyntaxKind.NewLine, "\u0085"), + IgnoreRemaining); + } + + [Fact] + public void Next_Returns_Newline_Token_For_Single_Line_Separator() + { + // Unicode "Line Separator" U+2028 + TestTokenizer( + "\u2028\u2028a", + SyntaxFactory.Token(SyntaxKind.NewLine, "\u2028"), + SyntaxFactory.Token(SyntaxKind.NewLine, "\u2028"), + IgnoreRemaining); + } + + [Fact] + public void Next_Returns_Newline_Token_For_Single_Paragraph_Separator() + { + // Unicode "Paragraph Separator" U+2029 + TestTokenizer( + "\u2029\u2029a", + SyntaxFactory.Token(SyntaxKind.NewLine, "\u2029"), + SyntaxFactory.Token(SyntaxKind.NewLine, "\u2029"), + IgnoreRemaining); + } + + [Fact] + public void Next_Returns_Single_Newline_Token_For_CRLF() + { + TestTokenizer( + "\r\n\r\na", + SyntaxFactory.Token(SyntaxKind.NewLine, "\r\n"), + SyntaxFactory.Token(SyntaxKind.NewLine, "\r\n"), + IgnoreRemaining); + } + + [Fact] + public void Next_Returns_Token_For_Whitespace_Characters() + { + TestTokenizer( + " \f\t\u000B \n ", + SyntaxFactory.Token(SyntaxKind.Whitespace, " \f\t\u000B "), + SyntaxFactory.Token(SyntaxKind.NewLine, "\n"), + SyntaxFactory.Token(SyntaxKind.Whitespace, " ")); + } + + [Fact] + public void Transition_Is_Recognized() + { + TestSingleToken("@", SyntaxKind.Transition); + } + + [Fact] + public void Transition_Is_Recognized_As_SingleCharacter() + { + TestTokenizer( + "@(", + SyntaxFactory.Token(SyntaxKind.Transition, "@"), + SyntaxFactory.Token(SyntaxKind.LeftParenthesis, "(")); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerTestBase.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerTestBase.cs new file mode 100644 index 0000000000..83b2adc684 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpTokenizerTestBase.cs @@ -0,0 +1,27 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public abstract class CSharpTokenizerTestBase : TokenizerTestBase + { + private static SyntaxToken _ignoreRemaining = SyntaxFactory.Token(SyntaxKind.Marker, string.Empty); + + internal override object IgnoreRemaining + { + get { return _ignoreRemaining; } + } + + internal override object CreateTokenizer(ITextDocument source) + { + return new CSharpTokenizer(source); + } + + internal void TestSingleToken(string text, SyntaxKind expectedTokenKind) + { + TestTokenizer(text, SyntaxFactory.Token(expectedTokenKind, text)); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpVerbatimBlockTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpVerbatimBlockTest.cs new file mode 100644 index 0000000000..a2f4509a6d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpVerbatimBlockTest.cs @@ -0,0 +1,49 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpVerbatimBlockTest : ParserTestBase + { + private const string TestExtraKeyword = "model"; + + [Fact] + public void VerbatimBlock() + { + ParseDocumentTest("@{ foo(); }"); + } + + [Fact] + public void InnerImplicitExprWithOnlySingleAtOutputsZeroLengthCodeSpan() + { + ParseDocumentTest("@{@}"); + } + + [Fact] + public void InnerImplicitExprDoesNotAcceptDotAfterAt() + { + ParseDocumentTest("@{@.}"); + } + + [Fact] + public void InnerImplicitExprWithOnlySingleAtAcceptsSingleSpaceOrNewlineAtDesignTime() + { + ParseDocumentTest("@{" + Environment.NewLine + " @" + Environment.NewLine + "}", designTime: true); + } + + [Fact] + public void InnerImplicitExprDoesNotAcceptTrailingNewlineInRunTimeMode() + { + ParseDocumentTest("@{@foo." + Environment.NewLine + "}"); + } + + [Fact] + public void InnerImplicitExprAcceptsTrailingNewlineInDesignTimeMode() + { + ParseDocumentTest("@{@foo." + Environment.NewLine + "}", designTime: true); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpWhitespaceHandlingTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpWhitespaceHandlingTest.cs new file mode 100644 index 0000000000..67ce3318dc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CSharpWhitespaceHandlingTest.cs @@ -0,0 +1,17 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class CSharpWhitespaceHandlingTest : ParserTestBase + { + [Fact] + public void StmtBlockDoesNotAcceptTrailingNewlineIfTheyAreSignificantToAncestor() + { + ParseDocumentTest("@{@: @if (true) { }" + Environment.NewLine + "}"); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CodeBlockEditHandlerTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CodeBlockEditHandlerTest.cs new file mode 100644 index 0000000000..add5518809 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/CodeBlockEditHandlerTest.cs @@ -0,0 +1,293 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Legacy; +using Microsoft.AspNetCore.Razor.Language.Syntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Test.Legacy +{ + public class CodeBlockEditHandlerTest + { + [Fact] + public void IsAcceptableReplacement_AcceptableReplacement_ReturnsTrue() + { + // Arrange + var span = GetSpan(SourceLocation.Zero, "Hello {world}."); + var change = new SourceChange(new SourceSpan(0, 5), "H3ll0"); + + // Act + var result = CodeBlockEditHandler.IsAcceptableReplacement(span, change); + + // Assert + Assert.True(result); + } + + [Fact] + public void IsAcceptableReplacement_AcceptableReplacement_WithMarkup_ReturnsTrue() + { + // Arrange + var span = GetSpan(SourceLocation.Zero, "Hello
    @world
    ."); + var change = new SourceChange(new SourceSpan(0, 5), "H3ll0"); + + // Act + var result = CodeBlockEditHandler.IsAcceptableReplacement(span, change); + + // Assert + Assert.True(result); + } + + [Fact] + public void IsAcceptableReplacement_ChangeModifiesInvalidContent_ReturnsFalse() + { + // Arrange + var span = GetSpan(SourceLocation.Zero, "Hello {world}."); + var change = new SourceChange(new SourceSpan(6, 1), "!"); + + // Act + var result = CodeBlockEditHandler.IsAcceptableReplacement(span, change); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsAcceptableReplacement_ChangeAddsOpenAngle_ReturnsFalse() + { + // Arrange + var span = GetSpan(SourceLocation.Zero, "Hello
    ."); + var change = new SourceChange(new SourceSpan(6, 1), "<"); + + // Act + var result = CodeBlockEditHandler.IsAcceptableReplacement(span, change); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsAcceptableReplacement_ChangeToComment_ReturnsFalse() + { + // Arrange + var span = GetSpan(SourceLocation.Zero, "Hello @"); + var change = new SourceChange(new SourceSpan(6, 1), "@*"); + + // Act + var result = CodeBlockEditHandler.IsAcceptableReplacement(span, change); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsAcceptableReplacement_ChangeContainsInvalidContent_ReturnsFalse() + { + // Arrange + var span = GetSpan(SourceLocation.Zero, "Hello {world}."); + var change = new SourceChange(new SourceSpan(0, 0), "{"); + + // Act + var result = CodeBlockEditHandler.IsAcceptableReplacement(span, change); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsAcceptableReplacement_NotReplace_ReturnsFalse() + { + // Arrange + var span = GetSpan(SourceLocation.Zero, "Hello {world}."); + var change = new SourceChange(new SourceSpan(0, 5), string.Empty); + + // Act + var result = CodeBlockEditHandler.IsAcceptableReplacement(span, change); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsAcceptableDeletion_ValidChange_ReturnsTrue() + { + // Arrange + var span = GetSpan(SourceLocation.Zero, "Hello {world}."); + var change = new SourceChange(new SourceSpan(0, 5), string.Empty); + + // Act + var result = CodeBlockEditHandler.IsAcceptableDeletion(span, change); + + // Assert + Assert.True(result); + } + + [Fact] + public void IsAcceptableDeletion_InvalidChange_ReturnsFalse() + { + // Arrange + var span = GetSpan(SourceLocation.Zero, "Hello {world}."); + var change = new SourceChange(new SourceSpan(5, 3), string.Empty); + + // Act + var result = CodeBlockEditHandler.IsAcceptableDeletion(span, change); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsAcceptableDeletion_NotDelete_ReturnsFalse() + { + // Arrange + var span = GetSpan(SourceLocation.Zero, "world"); + var change = new SourceChange(new SourceSpan(0, 0), "hello"); + + // Act + var result = CodeBlockEditHandler.IsAcceptableDeletion(span, change); + + // Assert + Assert.False(result); + } + + [Fact] + public void ModifiesInvalidContent_ValidContent_ReturnsFalse() + { + // Arrange + var span = GetSpan(SourceLocation.Zero, "Hello {world}."); + var change = new SourceChange(new SourceSpan(0, 5), string.Empty); + + // Act + var result = CodeBlockEditHandler.ModifiesInvalidContent(span, change); + + // Assert + Assert.False(result); + } + + [Fact] + public void ModifiesInvalidContent_InvalidContent_ReturnsTrue() + { + // Arrange + var span = GetSpan(SourceLocation.Zero, "Hello {world}."); + var change = new SourceChange(new SourceSpan(5, 7), string.Empty); + + // Act + var result = CodeBlockEditHandler.ModifiesInvalidContent(span, change); + + // Assert + Assert.True(result); + } + + [Fact] + public void IsAcceptableInsertion_ValidChange_ReturnsTrue() + { + // Arrange + var change = new SourceChange(new SourceSpan(0, 0), "hello"); + + // Act + var result = CodeBlockEditHandler.IsAcceptableInsertion(change); + + // Assert + Assert.True(result); + } + + [Fact] + public void IsAcceptableInsertion_InvalidChange_ReturnsFalse() + { + // Arrange + var change = new SourceChange(new SourceSpan(0, 0), "{"); + + // Act + var result = CodeBlockEditHandler.IsAcceptableInsertion(change); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsAcceptableInsertion_InvalidChange_Transition_ReturnsFalse() + { + // Arrange + var change = new SourceChange(new SourceSpan(0, 0), "@"); + + // Act + var result = CodeBlockEditHandler.IsAcceptableInsertion(change); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsAcceptableInsertion_InvalidChange_TemplateTransition_ReturnsFalse() + { + // Arrange + var change = new SourceChange(new SourceSpan(0, 0), "<"); + + // Act + var result = CodeBlockEditHandler.IsAcceptableInsertion(change); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsAcceptableInsertion_NotInsert_ReturnsFalse() + { + // Arrange + var change = new SourceChange(new SourceSpan(0, 2), string.Empty); + + // Act + var result = CodeBlockEditHandler.IsAcceptableInsertion(change); + + // Assert + Assert.False(result); + } + + [Theory] + [InlineData("{")] + [InlineData("}")] + [InlineData("if (true) { }")] + [InlineData("@
    ")] + [InlineData("
    ")] + [InlineData("*")] + public void ContainsInvalidContent_InvalidContent_ReturnsTrue(string content) + { + // Arrange + var change = new SourceChange(new SourceSpan(0, 0), content); + + // Act + var result = CodeBlockEditHandler.ContainsInvalidContent(change); + + // Assert + Assert.True(result); + } + + [Theory] + [InlineData("var x = true;")] + [InlineData("if (true) Console.WriteLine('!')")] + public void ContainsInvalidContent_ValidContent_ReturnsFalse(string content) + { + // Arrange + var change = new SourceChange(new SourceSpan(0, 0), content); + + // Act + var result = CodeBlockEditHandler.ContainsInvalidContent(change); + + // Assert + Assert.False(result); + } + + private static SyntaxNode GetSpan(SourceLocation start, string content) + { + var builder = SyntaxListBuilder.Create(); + var tokens = CSharpLanguageCharacteristics.Instance.TokenizeString(content).ToArray(); + foreach (var token in tokens) + { + builder.Add((SyntaxToken)token.CreateRed()); + } + var node = SyntaxFactory.CSharpStatementLiteral(builder.ToList()); + + return node; + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/DirectiveCSharpTokenizerTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/DirectiveCSharpTokenizerTest.cs new file mode 100644 index 0000000000..7f6e8db88a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/DirectiveCSharpTokenizerTest.cs @@ -0,0 +1,48 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class DirectiveCSharpTokenizerTest : CSharpTokenizerTestBase + { + [Fact] + public void Next_ReturnsNull_AfterTokenizingFirstDirective() + { + TestTokenizer( + "\r\n @something \r\n @this is ignored", + SyntaxFactory.Token(SyntaxKind.NewLine, "\r\n"), + SyntaxFactory.Token(SyntaxKind.Whitespace, " "), + SyntaxFactory.Token(SyntaxKind.Transition, "@"), + SyntaxFactory.Token(SyntaxKind.Identifier, "something"), + SyntaxFactory.Token(SyntaxKind.Whitespace, " "), + SyntaxFactory.Token(SyntaxKind.NewLine, "\r\n")); + } + + [Fact] + public void Next_IncludesComments_ReturnsNull_AfterTokenizingFirstDirective() + { + TestTokenizer( + "@*included*@\r\n @something \"value\"\r\n @this is ignored", + SyntaxFactory.Token(SyntaxKind.RazorCommentTransition, "@"), + SyntaxFactory.Token(SyntaxKind.RazorCommentStar, "*"), + SyntaxFactory.Token(SyntaxKind.RazorCommentLiteral, "included"), + SyntaxFactory.Token(SyntaxKind.RazorCommentStar, "*"), + SyntaxFactory.Token(SyntaxKind.RazorCommentTransition, "@"), + SyntaxFactory.Token(SyntaxKind.NewLine, "\r\n"), + SyntaxFactory.Token(SyntaxKind.Whitespace, " "), + SyntaxFactory.Token(SyntaxKind.Transition, "@"), + SyntaxFactory.Token(SyntaxKind.Identifier, "something"), + SyntaxFactory.Token(SyntaxKind.Whitespace, " "), + SyntaxFactory.Token(SyntaxKind.StringLiteral, "\"value\""), + SyntaxFactory.Token(SyntaxKind.NewLine, "\r\n")); + } + + internal override object CreateTokenizer(ITextDocument source) + { + return new DirectiveCSharpTokenizer(source); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/DirectiveHtmlTokenizerTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/DirectiveHtmlTokenizerTest.cs new file mode 100644 index 0000000000..ffee2ab489 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/DirectiveHtmlTokenizerTest.cs @@ -0,0 +1,42 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class DirectiveHtmlTokenizerTest : HtmlTokenizerTestBase + { + [Fact] + public void Next_ReturnsNull_WhenHtmlIsSeen() + { + TestTokenizer( + "\r\n
    Ignored
    ", + SyntaxFactory.Token(SyntaxKind.NewLine, "\r\n"), + SyntaxFactory.Token(SyntaxKind.Whitespace, " "), + SyntaxFactory.Token(SyntaxKind.OpenAngle, "<")); + } + + [Fact] + public void Next_IncludesRazorComments_ReturnsNull_WhenHtmlIsSeen() + { + TestTokenizer( + "\r\n @*included*@
    Ignored
    ", + SyntaxFactory.Token(SyntaxKind.NewLine, "\r\n"), + SyntaxFactory.Token(SyntaxKind.Whitespace, " "), + SyntaxFactory.Token(SyntaxKind.RazorCommentTransition, "@"), + SyntaxFactory.Token(SyntaxKind.RazorCommentStar, "*"), + SyntaxFactory.Token(SyntaxKind.RazorCommentLiteral, "included"), + SyntaxFactory.Token(SyntaxKind.RazorCommentStar, "*"), + SyntaxFactory.Token(SyntaxKind.RazorCommentTransition, "@"), + SyntaxFactory.Token(SyntaxKind.Whitespace, " "), + SyntaxFactory.Token(SyntaxKind.OpenAngle, "<")); + } + + internal override object CreateTokenizer(ITextDocument source) + { + return new DirectiveHtmlTokenizer(source); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/DisposableActionTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/DisposableActionTest.cs new file mode 100644 index 0000000000..8f14f832c4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/DisposableActionTest.cs @@ -0,0 +1,25 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class DisposableActionTest + { + [Fact] + public void ActionIsExecutedOnDispose() + { + // Arrange + var called = false; + var action = new DisposableAction(() => { called = true; }); + + // Act + action.Dispose(); + + // Assert + Assert.True(called, "The action was not run when the DisposableAction was disposed"); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlAttributeTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlAttributeTest.cs new file mode 100644 index 0000000000..b919eef4f7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlAttributeTest.cs @@ -0,0 +1,252 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Linq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class HtmlAttributeTest : ParserTestBase + { + [Fact] + public void SymbolBoundAttributes_BeforeEqualWhitespace1() + { + var attributeName = "[item]"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SymbolBoundAttributes_BeforeEqualWhitespace2() + { + var attributeName = "[(item,"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SymbolBoundAttributes_BeforeEqualWhitespace3() + { + var attributeName = "(click)"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SymbolBoundAttributes_BeforeEqualWhitespace4() + { + var attributeName = "(^click)"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SymbolBoundAttributes_BeforeEqualWhitespace5() + { + var attributeName = "*something"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SymbolBoundAttributes_BeforeEqualWhitespace6() + { + var attributeName = "#local"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SymbolBoundAttributes_Whitespace1() + { + var attributeName = "[item]"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SymbolBoundAttributes_Whitespace2() + { + var attributeName = "[(item,"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SymbolBoundAttributes_Whitespace3() + { + var attributeName = "(click)"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SymbolBoundAttributes_Whitespace4() + { + var attributeName = "(^click)"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SymbolBoundAttributes_Whitespace5() + { + var attributeName = "*something"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SymbolBoundAttributes_Whitespace6() + { + var attributeName = "#local"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SymbolBoundAttributes1() + { + var attributeName = "[item]"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SymbolBoundAttributes2() + { + var attributeName = "[(item,"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SymbolBoundAttributes3() + { + var attributeName = "(click)"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SymbolBoundAttributes4() + { + var attributeName = "(^click)"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SymbolBoundAttributes5() + { + var attributeName = "*something"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SymbolBoundAttributes6() + { + var attributeName = "#local"; + ParseDocumentTest($"@{{}}"); + } + + [Fact] + public void SimpleLiteralAttribute() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void SimpleLiteralAttributeWithWhitespaceSurroundingEquals() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void DynamicAttributeWithWhitespaceSurroundingEquals() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void MultiPartLiteralAttribute() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void DoubleQuotedLiteralAttribute() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void NewLinePrecedingAttribute() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void NewLineBetweenAttributes() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void WhitespaceAndNewLinePrecedingAttribute() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void UnquotedLiteralAttribute() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void SimpleExpressionAttribute() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void MultiValueExpressionAttribute() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void VirtualPathAttributesWorkWithConditionalAttributes() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void UnquotedAttributeWithCodeWithSpacesInBlock() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void UnquotedAttributeWithCodeWithSpacesInDocument() + { + ParseDocumentTest("}"); + } + + [Fact] + public void ConditionalAttributesAreEnabledForDataAttributesWithExperimentalFlag() + { + ParseDocumentTest(RazorLanguageVersion.Experimental, "@{}", directives: null, designTime: false); + } + + [Fact] + public void ConditionalAttributesAreDisabledForDataAttributesInBlock() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInBlock() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void ConditionalAttributesAreDisabledForDataAttributesInDocument() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInDocument() + { + ParseDocumentTest("@{}"); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlBlockTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlBlockTest.cs new file mode 100644 index 0000000000..f44b9d2421 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlBlockTest.cs @@ -0,0 +1,279 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class HtmlBlockTest : ParserTestBase + { + [Fact] + public void HandlesUnbalancedTripleDashHTMLComments() + { + ParseDocumentTest( +@"@{ + +}"); + } + + [Fact] + public void HandlesOpenAngleAtEof() + { + ParseDocumentTest("@{" + Environment.NewLine + + "<"); + } + + [Fact] + public void HandlesOpenAngleWithProperTagFollowingIt() + { + ParseDocumentTest("@{" + Environment.NewLine + + "<" + Environment.NewLine + + "", + designTime: true); + } + + [Fact] + public void TagWithoutCloseAngleDoesNotTerminateBlock() + { + ParseDocumentTest("@{< " + Environment.NewLine + + " "); + } + + [Fact] + public void AllowsStartAndEndTagsToDifferInCase() + { + ParseDocumentTest("@{
  • Foo

  • }"); + } + + [Fact] + public void ReadsToEndOfLineIfFirstCharacterAfterTransitionIsColon() + { + ParseDocumentTest("@{@:
  • Foo Bar Baz" + Environment.NewLine + + "bork}"); + } + + [Fact] + public void StopsParsingSingleLineBlockAtEOFIfNoEOLReached() + { + ParseDocumentTest("@{@:foo bar"); + } + + [Fact] + public void StopsAtMatchingCloseTagToStartTag() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void ParsesUntilMatchingEndTagIfFirstNonWhitespaceCharacterIsStartTag() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void AllowsUnclosedTagsAsLongAsItCanRecoverToAnExpectedEndTag() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void WithSelfClosingTagJustEmitsTag() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void CanHandleSelfClosingTagsWithinBlock() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void SupportsTagsWithAttributes() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void AllowsCloseAngleBracketInAttributeValueIfDoubleQuoted() + { + ParseDocumentTest("@{\" />}"); + } + + [Fact] + public void AllowsCloseAngleBracketInAttributeValueIfSingleQuoted() + { + ParseDocumentTest("@{\' />}"); + } + + [Fact] + public void AllowsSlashInAttributeValueIfDoubleQuoted() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void AllowsSlashInAttributeValueIfSingleQuoted() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void TerminatesAtEOF() + { + ParseDocumentTest("@{"); + } + + [Fact] + public void SupportsCommentAsBlock() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void SupportsCommentWithExtraDashAsBlock() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void SupportsCommentWithinBlock() + { + ParseDocumentTest("@{barbaz}"); + } + + [Fact] + public void HtmlCommentSupportsMultipleDashes() + { + ParseDocumentTest( +@"
    +
    +
    +
    +"); + } + + [Fact] + public void ProperlyBalancesCommentStartAndEndTags() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void TerminatesAtEOFWhenParsingComment() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void TerminatesCommentAtFirstOccurrenceOfEndSequence() + { + ParseDocumentTest("@{-->}"); + } + + [Fact] + public void TreatsMalformedTagsAsContent() + { + ParseDocumentTest("@{}"); + } + + + [Fact] + public void ParsesSGMLDeclarationAsEmptyTag() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void TerminatesSGMLDeclarationAtFirstCloseAngle() + { + ParseDocumentTest("@{ baz>}"); + } + + [Fact] + public void ParsesXMLProcessingInstructionAsEmptyTag() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void TerminatesXMLProcessingInstructionAtQuestionMarkCloseAnglePair() + { + ParseDocumentTest("@{ baz}"); + } + + [Fact] + public void DoesNotTerminateXMLProcInstrAtCloseAngleUnlessPreceededByQuestionMark() + { + // ParseBlockDoesNotTerminateXMLProcessingInstructionAtCloseAngleUnlessPreceededByQuestionMark + ParseDocumentTest("@{ baz?>}"); + } + + [Fact] + public void SupportsScriptTagsWithLessThanSignsInThem() + { + ParseDocumentTest(@"@{}"); + } + + [Fact] + public void SupportsScriptTagsWithSpacedLessThanSignsInThem() + { + ParseDocumentTest(@"@{}"); + } + + [Fact] + public void AcceptsEmptyTextTag() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void AcceptsTextTagAsOuterTagButDoesNotRender() + { + ParseDocumentTest("@{Foo Bar Baz zoop}"); + } + + [Fact] + public void RendersLiteralTextTagIfDoubled() + { + ParseDocumentTest("@{Foo Bar Baz zoop}"); + } + + [Fact] + public void DoesNotConsiderPsuedoTagWithinMarkupBlock() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void StopsParsingMidEmptyTagIfEOFReached() + { + ParseDocumentTest("@{
    Foo @if(true) {} Bar}"); + } + + [Fact] + public void IgnoresTagsInContentsOfScriptTag() + { + ParseDocumentTest(@"@{}"); + } + + [Fact] + public void HandlesForwardSlashInAttributeContent() + { + ParseDocumentTest(@"@{

    }"); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlDocumentTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlDocumentTest.cs new file mode 100644 index 0000000000..9b28275bc5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlDocumentTest.cs @@ -0,0 +1,265 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Razor.Language.Extensions; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class HtmlDocumentTest : ParserTestBase + { + private static readonly TestFile Nested1000 = TestFile.Create("TestFiles/nested-1000.html", typeof(HtmlDocumentTest)); + + [Fact] + public void NestedCodeBlockWithMarkupSetsDotAsMarkup() + { + ParseDocumentTest("@if (true) { @if(false) {

    @something.
    } }"); + } + + [Fact] + public void OutputsEmptyBlockWithEmptyMarkupSpanIfContentIsEmptyString() + { + ParseDocumentTest(string.Empty); + } + + [Fact] + public void OutputsWhitespaceOnlyContentAsSingleWhitespaceMarkupSpan() + { + ParseDocumentTest(" "); + } + + [Fact] + public void AcceptsSwapTokenAtEndOfFileAndOutputsZeroLengthCodeSpan() + { + ParseDocumentTest("@"); + } + + [Fact] + public void CorrectlyHandlesOddlySpacedHTMLElements() + { + ParseDocumentTest("

    Foo

    "); + } + + [Fact] + public void CorrectlyHandlesSingleLineOfMarkupWithEmbeddedStatement() + { + ParseDocumentTest("
    Foo @if(true) {} Bar
    "); + } + + [Fact] + public void WithinSectionDoesNotCreateDocumentLevelSpan() + { + ParseDocumentTest("@section Foo {" + Environment.NewLine + + " " + Environment.NewLine + + "}", + new[] { SectionDirective.Directive, }); + } + + [Fact] + public void ParsesWholeContentAsOneSpanIfNoSwapCharacterEncountered() + { + ParseDocumentTest("foo baz"); + } + + [Fact] + public void HandsParsingOverToCodeParserWhenAtSignEncounteredAndEmitsOutput() + { + ParseDocumentTest("foo @bar baz"); + } + + [Fact] + public void EmitsAtSignAsMarkupIfAtEndOfFile() + { + ParseDocumentTest("foo @"); + } + + [Fact] + public void EmitsCodeBlockIfFirstCharacterIsSwapCharacter() + { + ParseDocumentTest("@bar"); + } + + [Fact] + public void ParseDocumentDoesNotSwitchToCodeOnEmailAddressInText() + { + ParseDocumentTest("example@microsoft.com"); + } + + [Fact] + public void DoesNotSwitchToCodeOnEmailAddressInAttribute() + { + ParseDocumentTest("Email me"); + } + + [Fact] + public void DoesNotReturnErrorOnMismatchedTags() + { + ParseDocumentTest("Foo

    Baz"); + } + + [Fact] + public void ReturnsOneMarkupSegmentIfNoCodeBlocksEncountered() + { + ParseDocumentTest("Foo BazBar"); + + // Act + var token = sut.AcceptAllButLastDoubleHyphens(); + + // Assert + Assert.True(doubleHyphenToken.IsEquivalentTo(token)); + Assert.True(sut.At(SyntaxKind.CloseAngle)); + Assert.True(doubleHyphenToken.IsEquivalentTo(sut.PreviousToken)); + } + + [Fact] + public void AcceptAllButLastDoubleHypens_ReturnsTheDoubleHyphenTokenAfterAcceptingTheDash() + { + // Arrange + var sut = CreateTestParserForContent("--->"); + + // Act + var token = sut.AcceptAllButLastDoubleHyphens(); + + // Assert + Assert.True(doubleHyphenToken.IsEquivalentTo(token)); + Assert.True(sut.At(SyntaxKind.CloseAngle)); + Assert.True(HtmlMarkupParser.IsHyphen(sut.PreviousToken)); + } + + [Fact] + public void IsHtmlCommentAhead_ReturnsTrueForEmptyCommentTag() + { + // Arrange + var sut = CreateTestParserForContent(""); + + // Act & Assert + Assert.True(sut.IsHtmlCommentAhead()); + } + + [Fact] + public void IsHtmlCommentAhead_ReturnsTrueForValidCommentTag() + { + // Arrange + var sut = CreateTestParserForContent(""); + + // Act & Assert + Assert.True(sut.IsHtmlCommentAhead()); + } + + [Fact] + public void IsHtmlCommentAhead_ReturnsTrueForValidCommentTagWithExtraDashesAtClosingTag() + { + // Arrange + var sut = CreateTestParserForContent(""); + + // Act & Assert + Assert.True(sut.IsHtmlCommentAhead()); + } + + [Fact] + public void IsHtmlCommentAhead_ReturnsFalseForContentWithBadEndingAndExtraDash() + { + // Arrange + var sut = CreateTestParserForContent(""); + + // Act & Assert + Assert.False(sut.IsHtmlCommentAhead()); + } + + [Fact] + public void IsHtmlCommentAhead_ReturnsTrueForValidCommentTagWithExtraInfoAfter() + { + // Arrange + var sut = CreateTestParserForContent(" the first part is a valid comment without the Open angle and bang tokens"); + + // Act & Assert + Assert.True(sut.IsHtmlCommentAhead()); + } + + [Fact] + public void IsHtmlCommentAhead_ReturnsFalseForNotClosedComment() + { + // Arrange + var sut = CreateTestParserForContent(""); + + // Act & Assert + Assert.True(sut.IsHtmlCommentAhead()); + } + + [Fact] + public void IsCommentContentEndingInvalid_ReturnsFalseForAllowedContent() + { + // Arrange + var expectedToken1 = SyntaxFactory.Token(SyntaxKind.Text, "a"); + var sequence = Enumerable.Range((int)'a', 26).Select(item => SyntaxFactory.Token(SyntaxKind.Text, ((char)item).ToString())); + + // Act & Assert + Assert.False(HtmlMarkupParser.IsCommentContentEndingInvalid(sequence)); + } + + [Fact] + public void IsCommentContentEndingInvalid_ReturnsTrueForDisallowedContent() + { + // Arrange + var expectedToken1 = SyntaxFactory.Token(SyntaxKind.Text, "a"); + var sequence = new[] + { + SyntaxFactory.Token(SyntaxKind.OpenAngle, "<"), + SyntaxFactory.Token(SyntaxKind.Bang, "!"), + SyntaxFactory.Token(SyntaxKind.Text, "-") + }; + + // Act & Assert + Assert.True(HtmlMarkupParser.IsCommentContentEndingInvalid(sequence)); + } + + [Fact] + public void IsCommentContentEndingInvalid_ReturnsFalseForEmptyContent() + { + // Arrange + var expectedToken1 = SyntaxFactory.Token(SyntaxKind.Text, "a"); + var sequence = Array.Empty(); + + // Act & Assert + Assert.False(HtmlMarkupParser.IsCommentContentEndingInvalid(sequence)); + } + + private class TestHtmlMarkupParser : HtmlMarkupParser + { + public new SyntaxToken PreviousToken + { + get => base.PreviousToken; + } + + public new bool IsHtmlCommentAhead() + { + return base.IsHtmlCommentAhead(); + } + + public TestHtmlMarkupParser(ParserContext context) : base(context) + { + EnsureCurrent(); + } + + public new SyntaxToken AcceptAllButLastDoubleHyphens() + { + return base.AcceptAllButLastDoubleHyphens(); + } + } + + private static TestHtmlMarkupParser CreateTestParserForContent(string content) + { + var source = TestRazorSourceDocument.Create(content); + var options = RazorParserOptions.CreateDefault(); + var context = new ParserContext(source, options); + + return new TestHtmlMarkupParser(context); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlTagsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlTagsTest.cs new file mode 100644 index 0000000000..cf4852999d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlTagsTest.cs @@ -0,0 +1,187 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Text; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class HtmlTagsTest : ParserTestBase + { + private static readonly string[] VoidElementNames = new[] + { + "area", + "base", + "br", + "col", + "command", + "embed", + "hr", + "img", + "input", + "keygen", + "link", + "meta", + "param", + "source", + "track", + "wbr", + }; + + [Fact] + public void EmptyTagNestsLikeNormalTag() + { + ParseDocumentTest("@{

    Bar}"); + } + + [Fact] + public void EmptyTag() + { + // This can happen in situations where a user is in VS' HTML editor and they're modifying + // the contents of an HTML tag. + ParseDocumentTest("@{<> Bar}"); + } + + [Fact] + public void CommentTag() + { + ParseDocumentTest("@{ Bar}"); + } + + [Fact] + public void DocTypeTag() + { + ParseDocumentTest("@{ foo}"); + } + + [Fact] + public void ProcessingInstructionTag() + { + ParseDocumentTest("@{ foo}"); + } + + [Fact] + public void ElementTags() + { + ParseDocumentTest("@{

    Foo

    Bar}"); + } + + [Fact] + public void TextTags() + { + ParseDocumentTest("@{Foo}"); + } + + [Fact] + public void CDataTag() + { + ParseDocumentTest("@{ Bar}"); + } + + [Fact] + public void ScriptTag() + { + ParseDocumentTest(""); + } + + [Fact] + public void ScriptTag_WithNestedMalformedTag() + { + ParseDocumentTest(""); + } + + [Fact] + public void ScriptTag_WithNestedEndTag() + { + ParseDocumentTest(""); + } + + [Fact] + public void ScriptTag_WithNestedBeginTag() + { + ParseDocumentTest(""); + } + + [Fact] + public void ScriptTag_WithNestedTag() + { + ParseDocumentTest(""); + } + + [Fact] + public void ScriptTag_Incomplete() + { + ParseDocumentTest(" }"); + } + + [Fact] + public void VoidElementFollowedByContent() + { + // Arrange + var content = new StringBuilder(); + foreach (var tagName in VoidElementNames) + { + content.AppendLine("@{"); + content.AppendLine("<" + tagName + ">var x = true;"); + content.AppendLine("}"); + } + + // Act & Assert + ParseDocumentTest(content.ToString()); + } + + [Fact] + public void VoidElementFollowedByOtherTag() + { + // Arrange + var content = new StringBuilder(); + foreach (var tagName in VoidElementNames) + { + content.AppendLine(@"{"); + content.AppendLine("<" + tagName + "> var x = true;"); + content.AppendLine("}"); + } + + // Act & Assert + ParseDocumentTest(content.ToString()); + } + + [Fact] + public void VoidElementFollowedByCloseTag() + { + // Arrange + var content = new StringBuilder(); + foreach (var tagName in VoidElementNames) + { + content.AppendLine("@{"); + content.AppendLine("<" + tagName + "> var x = true;"); + content.AppendLine("}"); + } + + // Act & Assert + ParseDocumentTest(content.ToString()); + } + + [Fact] + public void IncompleteVoidElementEndTag() + { + // Arrange + var content = new StringBuilder(); + foreach (var tagName in VoidElementNames) + { + content.AppendLine("@{"); + content.AppendLine("<" + tagName + ">foo#@i

    }"); + } + + [Fact] + public void SwitchesToCodeWhenSwapCharacterEncounteredMidTag() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void SwitchesToCodeWhenSwapCharacterEncounteredInAttributeValue() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void SwitchesToCodeWhenSwapCharacterEncounteredInTagContent() + { + ParseDocumentTest("@{@bar@boz}"); + } + + [Fact] + public void ParsesCodeWithinSingleLineMarkup() + { + // TODO: Fix at a later date, HTML should be a tag block: https://github.com/aspnet/Razor/issues/101 + ParseDocumentTest("@{@:
  • Foo @Bar Baz" + Environment.NewLine + + "bork}"); + } + + [Fact] + public void SupportsCodeWithinComment() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void SupportsCodeWithinSGMLDeclaration() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void SupportsCodeWithinCDataDeclaration() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void SupportsCodeWithinXMLProcessingInstruction() + { + ParseDocumentTest("@{}"); + } + + [Fact] + public void DoesNotSwitchToCodeOnEmailAddressInText() + { + ParseDocumentTest("@{anurse@microsoft.com}"); + } + + [Fact] + public void DoesNotSwitchToCodeOnEmailAddressInAttribute() + { + ParseDocumentTest("@{Email me}"); + } + + [Fact] + public void GivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine() + { + ParseDocumentTest("@{
      " + Environment.NewLine + + " @foreach(var p in Products) {" + Environment.NewLine + + "
    • Product: @p.Name
    • " + Environment.NewLine + + " }" + Environment.NewLine + + "
    }"); + } + + [Fact] + public void ParseDocumentGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine() + { + ParseDocumentTest("
      " + Environment.NewLine + + " @foreach(var p in Products) {" + Environment.NewLine + + "
    • Product: @p.Name
    • " + Environment.NewLine + + " }" + Environment.NewLine + + "
    "); + } + + [Fact] + public void SectionContextGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine() + { + ParseDocumentTest("@{@section foo {" + Environment.NewLine + + "
      " + Environment.NewLine + + " @foreach(var p in Products) {" + Environment.NewLine + + "
    • Product: @p.Name
    • " + Environment.NewLine + + " }" + Environment.NewLine + + "
    " + Environment.NewLine + + "}}", + new[] { SectionDirective.Directive, }); + } + + [Fact] + public void CSharpCodeParserDoesNotAcceptLeadingOrTrailingWhitespaceInDesignMode() + { + ParseDocumentTest("@{
      " + Environment.NewLine + + " @foreach(var p in Products) {" + Environment.NewLine + + "
    • Product: @p.Name
    • " + Environment.NewLine + + " }" + Environment.NewLine + + "
    }", + designTime: true); + } + + // Tests for "@@" escape sequence: + [Fact] + public void TreatsTwoAtSignsAsEscapeSequence() + { + ParseDocumentTest("@{@@bar}"); + } + + [Fact] + public void TreatsPairsOfAtSignsAsEscapeSequence() + { + ParseDocumentTest("@{@@@@@bar}"); + } + + [Fact] + public void ParseDocumentTreatsTwoAtSignsAsEscapeSequence() + { + ParseDocumentTest("@@bar"); + } + + [Fact] + public void ParseDocumentTreatsPairsOfAtSignsAsEscapeSequence() + { + ParseDocumentTest("@@@@@bar"); + } + + [Fact] + public void SectionBodyTreatsTwoAtSignsAsEscapeSequence() + { + ParseDocumentTest( + "@section Foo { @@bar }", + new[] { SectionDirective.Directive, }); + } + + [Fact] + public void SectionBodyTreatsPairsOfAtSignsAsEscapeSequence() + { + ParseDocumentTest( + "@section Foo { @@@@@bar }", + new[] { SectionDirective.Directive, }); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlTokenizerTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlTokenizerTest.cs new file mode 100644 index 0000000000..92091fa278 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlTokenizerTest.cs @@ -0,0 +1,164 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class HtmlTokenizerTest : HtmlTokenizerTestBase + { + [Fact] + public void Next_Returns_Null_When_EOF_Reached() + { + TestTokenizer(""); + } + + [Fact] + public void Text_Is_Recognized() + { + TestTokenizer("foo-9309&smlkmb;::-3029022,.sdkq92384", + SyntaxFactory.Token(SyntaxKind.Text, "foo-9309&smlkmb;::-3029022,.sdkq92384")); + } + + [Fact] + public void Whitespace_Is_Recognized() + { + TestTokenizer(" \t\f ", + SyntaxFactory.Token(SyntaxKind.Whitespace, " \t\f ")); + } + + [Fact] + public void Newline_Is_Recognized() + { + TestTokenizer("\n\r\r\n", + SyntaxFactory.Token(SyntaxKind.NewLine, "\n"), + SyntaxFactory.Token(SyntaxKind.NewLine, "\r"), + SyntaxFactory.Token(SyntaxKind.NewLine, "\r\n")); + } + + [Fact] + public void Transition_Is_Not_Recognized_Mid_Text_If_Surrounded_By_Alphanumeric_Characters() + { + TestSingleToken("foo@bar", SyntaxKind.Text); + } + + [Fact] + public void OpenAngle_Is_Recognized() + { + TestSingleToken("<", SyntaxKind.OpenAngle); + } + + [Fact] + public void Bang_Is_Recognized() + { + TestSingleToken("!", SyntaxKind.Bang); + } + + [Fact] + public void Solidus_Is_Recognized() + { + TestSingleToken("/", SyntaxKind.ForwardSlash); + } + + [Fact] + public void QuestionMark_Is_Recognized() + { + TestSingleToken("?", SyntaxKind.QuestionMark); + } + + [Fact] + public void LeftBracket_Is_Recognized() + { + TestSingleToken("[", SyntaxKind.LeftBracket); + } + + [Fact] + public void CloseAngle_Is_Recognized() + { + TestSingleToken(">", SyntaxKind.CloseAngle); + } + + [Fact] + public void RightBracket_Is_Recognized() + { + TestSingleToken("]", SyntaxKind.RightBracket); + } + + [Fact] + public void Equals_Is_Recognized() + { + TestSingleToken("=", SyntaxKind.Equals); + } + + [Fact] + public void DoubleQuote_Is_Recognized() + { + TestSingleToken("\"", SyntaxKind.DoubleQuote); + } + + [Fact] + public void SingleQuote_Is_Recognized() + { + TestSingleToken("'", SyntaxKind.SingleQuote); + } + + [Fact] + public void Transition_Is_Recognized() + { + TestSingleToken("@", SyntaxKind.Transition); + } + + [Fact] + public void DoubleHyphen_Is_Recognized() + { + TestSingleToken("--", SyntaxKind.DoubleHyphen); + } + + [Fact] + public void SingleHyphen_Is_Not_Recognized() + { + TestSingleToken("-", SyntaxKind.Text); + } + + [Fact] + public void SingleHyphen_Mid_Text_Is_Not_Recognized_As_Separate_Token() + { + TestSingleToken("foo-bar", SyntaxKind.Text); + } + + [Fact] + public void Next_Ignores_Star_At_EOF_In_RazorComment() + { + TestTokenizer( + "@* Foo * Bar * Baz *", + SyntaxFactory.Token(SyntaxKind.RazorCommentTransition, "@"), + SyntaxFactory.Token(SyntaxKind.RazorCommentStar, "*"), + SyntaxFactory.Token(SyntaxKind.RazorCommentLiteral, " Foo * Bar * Baz *")); + } + + [Fact] + public void Next_Ignores_Star_Without_Trailing_At() + { + TestTokenizer( + "@* Foo * Bar * Baz *@", + SyntaxFactory.Token(SyntaxKind.RazorCommentTransition, "@"), + SyntaxFactory.Token(SyntaxKind.RazorCommentStar, "*"), + SyntaxFactory.Token(SyntaxKind.RazorCommentLiteral, " Foo * Bar * Baz "), + SyntaxFactory.Token(SyntaxKind.RazorCommentStar, "*"), + SyntaxFactory.Token(SyntaxKind.RazorCommentTransition, "@")); + } + + [Fact] + public void Next_Returns_RazorComment_Token_For_Entire_Razor_Comment() + { + TestTokenizer( + "@* Foo Bar Baz *@", + SyntaxFactory.Token(SyntaxKind.RazorCommentTransition, "@"), + SyntaxFactory.Token(SyntaxKind.RazorCommentStar, "*"), + SyntaxFactory.Token(SyntaxKind.RazorCommentLiteral, " Foo Bar Baz "), + SyntaxFactory.Token(SyntaxKind.RazorCommentStar, "*"), + SyntaxFactory.Token(SyntaxKind.RazorCommentTransition, "@")); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlTokenizerTestBase.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlTokenizerTestBase.cs new file mode 100644 index 0000000000..0b6250d6d8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/HtmlTokenizerTestBase.cs @@ -0,0 +1,27 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public abstract class HtmlTokenizerTestBase : TokenizerTestBase + { + private static SyntaxToken _ignoreRemaining = SyntaxFactory.Token(SyntaxKind.Marker, string.Empty); + + internal override object IgnoreRemaining + { + get { return _ignoreRemaining; } + } + + internal override object CreateTokenizer(ITextDocument source) + { + return new HtmlTokenizer(source); + } + + internal void TestSingleToken(string text, SyntaxKind expectedTokenKind) + { + TestTokenizer(text, SyntaxFactory.Token(expectedTokenKind, text)); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/ImplicitExpressionEditHandlerTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/ImplicitExpressionEditHandlerTest.cs new file mode 100644 index 0000000000..bf71526ede --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/ImplicitExpressionEditHandlerTest.cs @@ -0,0 +1,463 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Collections.Generic; +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class ImplicitExpressionEditHandlerTest + { + [Fact] + public void IsAcceptableDeletionInBalancedParenthesis_DeletionStartNotInBalancedParenthesis_ReturnsFalse() + { + // Arrange + var span = GetSyntaxNode(SourceLocation.Zero, "(Hell)(o)"); + var change = new SourceChange(new SourceSpan(6, 1), string.Empty); + + // Act + var result = ImplicitExpressionEditHandler.IsAcceptableDeletionInBalancedParenthesis(span, change); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsAcceptableDeletionInBalancedParenthesis_DeletionEndNotInBalancedParenthesis_ReturnsFalse() + { + // Arrange + var span = GetSyntaxNode(SourceLocation.Zero, "(Hell)(o)"); + var change = new SourceChange(new SourceSpan(5, 1), string.Empty); + + // Act + var result = ImplicitExpressionEditHandler.IsAcceptableDeletionInBalancedParenthesis(span, change); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsAcceptableDeletionInBalancedParenthesis_DeletionOverlapsBalancedParenthesis_ReturnsFalse() + { + // Arrange + var span = GetSyntaxNode(SourceLocation.Zero, "(Hell)(o)"); + var change = new SourceChange(new SourceSpan(5, 2), string.Empty); + + // Act + var result = ImplicitExpressionEditHandler.IsAcceptableDeletionInBalancedParenthesis(span, change); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsAcceptableDeletionInBalancedParenthesis_DeletionDoesNotImpactBalancedParenthesis_ReturnsTrue() + { + // Arrange + var span = GetSyntaxNode(SourceLocation.Zero, "(H(ell)o)"); + var change = new SourceChange(new SourceSpan(3, 3), string.Empty); + + // Act + var result = ImplicitExpressionEditHandler.IsAcceptableDeletionInBalancedParenthesis(span, change); + + // Assert + Assert.True(result); + } + + [Theory] + [InlineData("(")] + [InlineData(")")] + public void IsAcceptableInsertionInBalancedParenthesis_ReturnsFalseIfChangeIsParenthesis(string changeText) + { + // Arrange + var change = new SourceChange(0, 1, changeText); + + // Act + var result = ImplicitExpressionEditHandler.IsAcceptableInsertionInBalancedParenthesis(null, change); + + // Assert + Assert.False(result); + } + + [Fact] + public void TryUpdateCountFromContent_SingleLeftParenthesis_CountsCorrectly() + { + // Arrange + var content = "("; + var count = 0; + + // Act + var result = ImplicitExpressionEditHandler.TryUpdateCountFromContent(content, ref count); + + // Assert + Assert.True(result); + Assert.Equal(1, count); + } + + [Fact] + public void TryUpdateCountFromContent_SingleRightParenthesis_CountsCorrectly() + { + // Arrange + var content = ")"; + var count = 2; + + // Act + var result = ImplicitExpressionEditHandler.TryUpdateCountFromContent(content, ref count); + + // Assert + Assert.True(result); + Assert.Equal(1, count); + } + + [Fact] + public void TryUpdateCountFromContent_CorrectCount_ReturnsTrue() + { + // Arrange + var content = "\"(()("; + var count = 0; + + // Act + var result = ImplicitExpressionEditHandler.TryUpdateCountFromContent(content, ref count); + + // Assert + Assert.True(result); + Assert.Equal(2, count); + } + + [Fact] + public void TryUpdateCountFromContent_ExistingCountAndNonParenthesisContent_ReturnsTrue() + { + // Arrange + var content = "'(abc)de)fg"; + var count = 1; + + // Act + var result = ImplicitExpressionEditHandler.TryUpdateCountFromContent(content, ref count); + + // Assert + Assert.True(result); + Assert.Equal(0, count); + } + + [Fact] + public void TryUpdateCountFromContent_InvalidParenthesis_ReturnsFalse() + { + // Arrange + var content = "'())))))"; + var count = 4; + + // Act + var result = ImplicitExpressionEditHandler.TryUpdateCountFromContent(content, ref count); + + // Assert + Assert.False(result); + Assert.Equal(4, count); + } + + [Fact] + public void TryUpdateBalanceCount_SingleLeftParenthesis_CountsCorrectly() + { + // Arrange + var token = Syntax.SyntaxFactory.Token(SyntaxKind.LeftParenthesis, "("); + var count = 0; + + // Act + var result = ImplicitExpressionEditHandler.TryUpdateBalanceCount(token, ref count); + + // Assert + Assert.True(result); + Assert.Equal(1, count); + } + + [Fact] + public void TryUpdateBalanceCount_SingleRightParenthesis_CountsCorrectly() + { + // Arrange + var token = Syntax.SyntaxFactory.Token(SyntaxKind.RightParenthesis, ")"); + var count = 2; + + // Act + var result = ImplicitExpressionEditHandler.TryUpdateBalanceCount(token, ref count); + + // Assert + Assert.True(result); + Assert.Equal(1, count); + } + + [Fact] + public void TryUpdateBalanceCount_IncompleteStringLiteral_CountsCorrectly() + { + // Arrange + var token = Syntax.SyntaxFactory.Token(SyntaxKind.StringLiteral, "\"(("); + var count = 2; + + // Act + var result = ImplicitExpressionEditHandler.TryUpdateBalanceCount(token, ref count); + + // Assert + Assert.True(result); + Assert.Equal(4, count); + } + + [Fact] + public void TryUpdateBalanceCount_IncompleteCharacterLiteral_CountsCorrectly() + { + // Arrange + var token = Syntax.SyntaxFactory.Token(SyntaxKind.CharacterLiteral, "'(("); + var count = 2; + + // Act + var result = ImplicitExpressionEditHandler.TryUpdateBalanceCount(token, ref count); + + // Assert + Assert.True(result); + Assert.Equal(4, count); + } + + [Fact] + public void TryUpdateBalanceCount_CompleteStringLiteral_CountsCorrectly() + { + // Arrange + var token = Syntax.SyntaxFactory.Token(SyntaxKind.StringLiteral, "\"((\""); + var count = 2; + + // Act + var result = ImplicitExpressionEditHandler.TryUpdateBalanceCount(token, ref count); + + // Assert + Assert.True(result); + Assert.Equal(2, count); + } + + [Fact] + public void TryUpdateBalanceCount_CompleteCharacterLiteral_CountsCorrectly() + { + // Arrange + var token = Syntax.SyntaxFactory.Token(SyntaxKind.CharacterLiteral, "'('"); + var count = 2; + + // Act + var result = ImplicitExpressionEditHandler.TryUpdateBalanceCount(token, ref count); + + // Assert + Assert.True(result); + Assert.Equal(2, count); + } + + [Fact] + public void TryUpdateBalanceCount_InvalidParenthesis_ReturnsFalse() + { + // Arrange + var token = Syntax.SyntaxFactory.Token(SyntaxKind.RightParenthesis, ")"); + var count = 0; + + // Act + var result = ImplicitExpressionEditHandler.TryUpdateBalanceCount(token, ref count); + + // Assert + Assert.False(result); + Assert.Equal(0, count); + } + + [Fact] + public void TryUpdateBalanceCount_InvalidParenthesisStringLiteral_ReturnsFalse() + { + // Arrange + var token = Syntax.SyntaxFactory.Token(SyntaxKind.StringLiteral, "\")"); + var count = 0; + + // Act + var result = ImplicitExpressionEditHandler.TryUpdateBalanceCount(token, ref count); + + // Assert + Assert.False(result); + Assert.Equal(0, count); + } + + [Fact] + public void TryUpdateBalanceCount_InvalidParenthesisCharacterLiteral_ReturnsFalse() + { + // Arrange + var token = Syntax.SyntaxFactory.Token(SyntaxKind.CharacterLiteral, "')"); + var count = 0; + + // Act + var result = ImplicitExpressionEditHandler.TryUpdateBalanceCount(token, ref count); + + // Assert + Assert.False(result); + Assert.Equal(0, count); + } + + [Fact] + public void ContainsPosition_AtStartOfToken_ReturnsTrue() + { + // Arrange + var token = GetTokens(new SourceLocation(4, 1, 2), "hello").Single(); + + // Act + var result = ImplicitExpressionEditHandler.ContainsPosition(4, token); + + // Assert + Assert.True(result); + } + + [Fact] + public void ContainsPosition_InsideOfToken_ReturnsTrue() + { + // Arrange + var token = GetTokens(new SourceLocation(4, 1, 2), "hello").Single(); + + // Act + var result = ImplicitExpressionEditHandler.ContainsPosition(6, token); + + // Assert + Assert.True(result); + } + + [Fact] + public void ContainsPosition_AtEndOfToken_ReturnsFalse() + { + // Arrange + var token = GetTokens(new SourceLocation(4, 1, 2), "hello").Single(); + + // Act + var result = ImplicitExpressionEditHandler.ContainsPosition(9, token); + + // Assert + Assert.False(result); + } + + [Theory] + [InlineData(10)] + [InlineData(2)] + public void ContainsPosition_OutsideOfToken_ReturnsFalse(int position) + { + // Arrange + var token = GetTokens(new SourceLocation(4, 1, 2), "hello").Single(); + + // Act + var result = ImplicitExpressionEditHandler.ContainsPosition(position, token); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsInsideParenthesis_SurroundedByCompleteParenthesis_ReturnsFalse() + { + // Arrange + var tokens = GetTokens(SourceLocation.Zero, "(hello)point(world)"); + + // Act + var result = ImplicitExpressionEditHandler.IsInsideParenthesis(9, tokens); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsInsideParenthesis_InvalidParenthesis_ReturnsFalse() + { + // Arrange + var tokens = GetTokens(SourceLocation.Zero, "(hello))point)"); + + // Act + var result = ImplicitExpressionEditHandler.IsInsideParenthesis(10, tokens); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsInsideParenthesis_NoParenthesis_ReturnsFalse() + { + // Arrange + var tokens = GetTokens(SourceLocation.Zero, "Hello World"); + + // Act + var result = ImplicitExpressionEditHandler.IsInsideParenthesis(3, tokens); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsInsideParenthesis_InBalancedParenthesis_ReturnsTrue() + { + // Arrange + var tokens = GetTokens(SourceLocation.Zero, "Foo(GetValue(), DoSomething(point))"); + + // Act + var result = ImplicitExpressionEditHandler.IsInsideParenthesis(30, tokens); + + // Assert + Assert.True(result); + } + + [Theory] + [InlineData("(")] + [InlineData(")")] + public void IsAcceptableInsertionInBalancedParenthesis_InsertingParenthesis_ReturnsFalse(string text) + { + // Arrange + var span = GetSyntaxNode(SourceLocation.Zero, "(Hello World)"); + var change = new SourceChange(new SourceSpan(3, 0), text); + + // Act + var result = ImplicitExpressionEditHandler.IsAcceptableInsertionInBalancedParenthesis(span, change); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsAcceptableInsertionInBalancedParenthesis_UnbalancedParenthesis_ReturnsFalse() + { + // Arrange + var span = GetSyntaxNode(SourceLocation.Zero, "(Hello"); + var change = new SourceChange(new SourceSpan(6, 0), " World"); + + // Act + var result = ImplicitExpressionEditHandler.IsAcceptableInsertionInBalancedParenthesis(span, change); + + // Assert + Assert.False(result); + } + + [Fact] + public void IsAcceptableInsertionInBalancedParenthesis_BalancedParenthesis_ReturnsTrue() + { + // Arrange + var span = GetSyntaxNode(SourceLocation.Zero, "(Hello)"); + var change = new SourceChange(new SourceSpan(6, 0), " World"); + + // Act + var result = ImplicitExpressionEditHandler.IsAcceptableInsertionInBalancedParenthesis(span, change); + + // Assert + Assert.True(result); + } + + private static Syntax.MarkupTextLiteralSyntax GetSyntaxNode(SourceLocation start, string content) + { + var builder = SyntaxListBuilder.Create(); + var tokens = CSharpLanguageCharacteristics.Instance.TokenizeString(content).ToArray(); + foreach (var token in tokens) + { + builder.Add(token); + } + var node = SyntaxFactory.MarkupTextLiteral(builder.ToList()).CreateRed(parent: null, position: start.AbsoluteIndex); + + return (Syntax.MarkupTextLiteralSyntax)node; + } + + private static IReadOnlyList GetTokens(SourceLocation start, string content) + { + var parent = GetSyntaxNode(start, content); + return parent.LiteralTokens; + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/LineTrackingStringBufferTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/LineTrackingStringBufferTest.cs new file mode 100644 index 0000000000..27179a9f6d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/LineTrackingStringBufferTest.cs @@ -0,0 +1,26 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class LineTrackingStringBufferTest + { + [Fact] + public void CtorInitializesProperties() + { + var buffer = new LineTrackingStringBuffer(string.Empty, "test.cshtml"); + Assert.Equal(0, buffer.Length); + } + + [Fact] + public void CharAtCorrectlyReturnsLocation() + { + var buffer = new LineTrackingStringBuffer("foo\rbar\nbaz\r\nbiz", "test.cshtml"); + var chr = buffer.CharAt(14); + Assert.Equal('i', chr.Character); + Assert.Equal(new SourceLocation("test.cshtml", 14, 3, 1), chr.Location); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/MarkupElementGroupingTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/MarkupElementGroupingTest.cs new file mode 100644 index 0000000000..f1167e3eb8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/MarkupElementGroupingTest.cs @@ -0,0 +1,154 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class MarkupElementGroupingTest : ParserTestBase + { + [Fact] + public void Handles_ValidTags() + { + // Arrange + var content = @" +
    Foo
    +

    Bar

    +"; + + // Act & Assert + ParseDocumentTest(content); + } + + [Fact] + public void Handles_ValidNestedTags() + { + // Arrange + var content = @" +
    + Foo +

    Bar

    + Baz +
    "; + + // Act & Assert + ParseDocumentTest(content); + } + + [Fact] + public void Handles_ValidNestedTagsMixedWithCode() + { + // Arrange + var content = @" +
    + Foo +

    @Bar

    + @{ var x = Bar; } +
    +"; + + // Act & Assert + ParseDocumentTest(content); + } + + [Fact] + public void Handles_EndTagsWithMissingStartTags() + { + // Arrange + var content = @" +Foo +"; + + // Act & Assert + ParseDocumentTest(content); + } + + [Fact] + public void Handles_StartTagsWithMissingEndTags() + { + // Arrange + var content = @" +
    + Foo +

    + Bar + +"; + + // Act & Assert + ParseDocumentTest(content); + } + + [Fact] + public void Handles_SelfClosingTags() + { + // Arrange + var content = @" +
    Foo +"; + + // Act & Assert + ParseDocumentTest(content); + } + + [Fact] + public void Handles_MalformedTags_RecoversSuccessfully() + { + // Arrange + var content = @" +

    contentfooter
    +"; + + // Act & Assert + ParseDocumentTest(content); + } + + [Fact] + public void Handles_MisplacedEndTags_RecoversSuccessfully() + { + // Arrange + var content = @" +
    contentfooter
    +"; + + // Act & Assert + ParseDocumentTest(content); + } + + [Fact] + public void Handles_DoesNotSpecialCase_VoidTags() + { + // Arrange + var content = @" +Foo +"; + + // Act & Assert + ParseDocumentTest(content); + } + + [Fact] + public void Handles_SpecialCasesVoidTags_WithNoEndTags() + { + // Arrange + var content = @" + +"; + + // Act & Assert + ParseDocumentTest(content); + } + + [Fact] + public void Handles_IncompleteTags() + { + // Arrange + var content = @" +<
    >Foo< > +"; + + // Act & Assert + ParseDocumentTest(content); + } + } +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/RazorDirectivesTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/RazorDirectivesTest.cs new file mode 100644 index 0000000000..291331f915 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/RazorDirectivesTest.cs @@ -0,0 +1,910 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Razor.Language.Extensions; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class RazorDirectivesTest : ParserTestBase + { + [Fact] + public void DirectiveDescriptor_FileScopedMultipleOccurring_CanHaveDuplicates() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + builder => + { + builder.Usage = DirectiveUsage.FileScopedMultipleOccurring; + builder.AddTypeToken(); + }); + + // Act & Assert + ParseDocumentTest( +@"@custom System.Text.Encoding.ASCIIEncoding +@custom System.Text.Encoding.UTF8Encoding", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_FileScopedSinglyOccurring_ErrorsIfDuplicate() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + builder => + { + builder.Usage = DirectiveUsage.FileScopedSinglyOccurring; + builder.AddTypeToken(); + }); + + // Act & Assert + ParseDocumentTest( +@"@custom System.Text.Encoding.ASCIIEncoding +@custom System.Text.Encoding.UTF8Encoding", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_FileScoped_CanBeBeneathOtherDirectives() + { + // Arrange + var customDescriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + builder => + { + builder.Usage = DirectiveUsage.FileScopedSinglyOccurring; + builder.AddTypeToken(); + }); + var somethingDescriptor = DirectiveDescriptor.CreateDirective( + "something", + DirectiveKind.SingleLine, + builder => + { + builder.Usage = DirectiveUsage.FileScopedMultipleOccurring; + builder.AddMemberToken(); + }); + + // Act & Assert + ParseDocumentTest( +@"@custom System.Text.Encoding.ASCIIEncoding +@something Else", + new[] { customDescriptor, somethingDescriptor }); + } + + [Fact] + public void DirectiveDescriptor_FileScoped_CanBeBeneathOtherWhiteSpaceCommentsAndDirectives() + { + // Arrange + var customDescriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + builder => + { + builder.Usage = DirectiveUsage.FileScopedSinglyOccurring; + builder.AddTypeToken(); + }); + var somethingDescriptor = DirectiveDescriptor.CreateDirective( + "something", + DirectiveKind.SingleLine, + builder => + { + builder.Usage = DirectiveUsage.FileScopedMultipleOccurring; + builder.AddMemberToken(); + }); + + // Act & Assert + ParseDocumentTest( +@"@* There are two directives beneath this *@ +@custom System.Text.Encoding.ASCIIEncoding + +@something Else + +

    This is extra

    ", + new[] { customDescriptor, somethingDescriptor }); + } + + [Fact] + public void DirectiveDescriptor_TokensMustBeSeparatedBySpace() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddStringToken().AddStringToken()); + + // Act & Assert + ParseDocumentTest( + "@custom \"string1\"\"string2\"", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_CanHandleEOFIncompleteNamespaceTokens() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddNamespaceToken()); + + // Act & Assert + ParseDocumentTest( + "@custom System.", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_CanHandleEOFInvalidNamespaceTokens() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddNamespaceToken()); + + // Act & Assert + ParseDocumentTest( + "@custom System<", + new[] { descriptor }); + } + [Fact] + public void DirectiveDescriptor_CanHandleIncompleteNamespaceTokens() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddNamespaceToken()); + + // Act & Assert + ParseDocumentTest( + "@custom System." + Environment.NewLine, + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_CanHandleInvalidNamespaceTokens() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddNamespaceToken()); + + // Act & Assert + ParseDocumentTest( + "@custom System<" + Environment.NewLine, + new[] { descriptor }); + } + + [Fact] + public void ExtensibleDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddTypeToken()); + + // Act & Assert + ParseDocumentTest(Environment.NewLine + " @custom System.Text.Encoding.ASCIIEncoding", + new[] { descriptor }); + } + + [Fact] + public void BuiltInDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace() + { + // Act & Assert + ParseDocumentTest(Environment.NewLine + " @addTagHelper \"*, Foo\""); + } + + [Fact] + public void BuiltInDirectiveErrorsIfNotAtStartOfLine() + { + // Act & Assert + ParseDocumentTest("{ @addTagHelper \"*, Foo\"" + Environment.NewLine + "}"); + } + + [Fact] + public void ExtensibleDirectiveErrorsIfNotAtStartOfLine() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddTypeToken()); + + // Act & Assert + ParseDocumentTest( + "{ @custom System.Text.Encoding.ASCIIEncoding" + Environment.NewLine + "}", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_UnderstandsTypeTokens() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddTypeToken()); + + // Act & Assert + ParseDocumentTest( + "@custom System.Text.Encoding.ASCIIEncoding", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_UnderstandsMemberTokens() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddMemberToken()); + + // Act & Assert + ParseDocumentTest( + "@custom Some_Member", + new[] { descriptor }); + } + + [Fact] + public void Parser_ParsesNamespaceDirectiveToken_WithSingleSegment() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddNamespaceToken()); + + // Act & Assert + ParseDocumentTest( + "@custom BaseNamespace", + new[] { descriptor }); + } + + [Fact] + public void Parser_ParsesNamespaceDirectiveToken_WithMultipleSegments() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddNamespaceToken()); + + // Act & Assert + ParseDocumentTest( + "@custom BaseNamespace.Foo.Bar", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_UnderstandsStringTokens() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddStringToken()); + + // Act & Assert + ParseDocumentTest( + "@custom \"AString\"", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_StringToken_ParserErrorForUnquotedValue() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddStringToken()); + + // Act & Assert + ParseDocumentTest( + "@custom AString", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_StringToken_ParserErrorForNonStringValue() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddStringToken()); + + // Act & Assert + ParseDocumentTest( + "@custom {foo?}", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_StringToken_ParserErrorForSingleQuotedValue() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddStringToken()); + + // Act & Assert + ParseDocumentTest( + "@custom 'AString'", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_StringToken_ParserErrorForPartialQuotedValue() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddStringToken()); + + // Act & Assert + ParseDocumentTest( + "@custom AString\"", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_UnderstandsMultipleTokens() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddTypeToken().AddMemberToken().AddStringToken()); + + // Act & Assert + ParseDocumentTest( + "@custom System.Text.Encoding.ASCIIEncoding Some_Member \"AString\"", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_UnderstandsRazorBlocks() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.RazorBlock, + b => b.AddStringToken()); + + // Act & Assert + ParseDocumentTest( + "@custom \"Header\" {

    F{o}o

    }", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_UnderstandsCodeBlocks() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.CodeBlock, + b => b.AddStringToken()); + + // Act & Assert + ParseDocumentTest( + "@custom \"Name\" { foo(); bar(); }", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_AllowsWhiteSpaceAroundTokens() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddTypeToken().AddMemberToken()); + + // Act & Assert + ParseDocumentTest( + "@custom System.Text.Encoding.ASCIIEncoding Some_Member ", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_ErrorsForInvalidMemberTokens() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddMemberToken()); + + // Act & Assert + ParseDocumentTest( + "@custom -Some_Member", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_NoErrorsSemicolonAfterDirective() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddStringToken()); + + // Act & Assert + ParseDocumentTest( + "@custom \"hello\" ; ", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_AllowsNullableTypes() + { + // Arrange + var variants = new[] + { + "string?", + "string?[]", + "global::System.Int32?", + "KeyValuePair?", + "KeyValuePair?[]", + "global::System.Collections.Generic.KeyValuePair?[]", + }; + + var directiveName = "custom"; + var source = $"@{directiveName}"; + var descriptor = DirectiveDescriptor.CreateDirective( + directiveName, + DirectiveKind.SingleLine, + b => + { + b.AddTypeToken(); + b.AddTypeToken(); + b.AddTypeToken(); + b.AddTypeToken(); + b.AddTypeToken(); + b.AddTypeToken(); + }); + + for (var i = 0; i < variants.Length; i++) + { + source += $" {variants[i]}"; + } + + // Act & Assert + ParseDocumentTest(source, new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_AllowsTupleTypes() + { + // Arrange + var variants = new[] + { + "(bool, int)", + "(int aa, string bb)?", + "( int? q , bool w )", + "( int ? q, bool ?w ,(long ? [])) ?", + "(List<(int, string)?> aa, string bb)", + "(string ss, (int u, List<(string, int)> k, (Char c, bool b, List l)), global::System.Int32[] a)", + }; + + var directiveName = "custom"; + var source = $"@{directiveName}"; + var descriptor = DirectiveDescriptor.CreateDirective( + directiveName, + DirectiveKind.SingleLine, + b => + { + b.AddTypeToken(); + b.AddTypeToken(); + b.AddTypeToken(); + b.AddTypeToken(); + b.AddTypeToken(); + b.AddTypeToken(); + }); + + for (var i = 0; i < variants.Length; i++) + { + source += $" {variants[i]}"; + } + + // Act & Assert + ParseDocumentTest(source, new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_AllowsTupleTypes_IgnoresTrailingWhitespace() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddTypeToken()); + + // Act & Assert + ParseDocumentTest( + $"@custom (bool, int?) ", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_ErrorsExtraContentAfterDirective() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddStringToken()); + + // Act & Assert + ParseDocumentTest( + "@custom \"hello\" \"world\"", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_ErrorsWhenExtraContentBeforeBlockStart() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.CodeBlock, + b => b.AddStringToken()); + + // Act & Assert + ParseDocumentTest( + "@custom \"Hello\" World { foo(); bar(); }", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_ErrorsWhenEOFBeforeDirectiveBlockStart() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.CodeBlock, + b => b.AddStringToken()); + + // Act & Assert + ParseDocumentTest( + "@custom \"Hello\"", + new[] { descriptor }); + } + + [Fact] + public void DirectiveDescriptor_ErrorsWhenMissingEndBrace() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.CodeBlock, + b => b.AddStringToken()); + + // Act & Assert + ParseDocumentTest( + "@custom \"Hello\" {", + new[] { descriptor }); + } + + [Fact] + public void TagHelperPrefixDirective_NoValueSucceeds() + { + ParseDocumentTest("@tagHelperPrefix \"\""); + } + + [Fact] + public void TagHelperPrefixDirective_Succeeds() + { + ParseDocumentTest("@tagHelperPrefix Foo"); + } + + [Fact] + public void TagHelperPrefixDirective_WithQuotes_Succeeds() + { + ParseDocumentTest("@tagHelperPrefix \"Foo\""); + } + + [Fact] + public void TagHelperPrefixDirective_RequiresValue() + { + ParseDocumentTest("@tagHelperPrefix "); + } + + [Fact] + public void TagHelperPrefixDirective_StartQuoteRequiresDoubleQuotesAroundValue() + { + ParseDocumentTest("@tagHelperPrefix \"Foo"); + } + + [Fact] + public void TagHelperPrefixDirective_EndQuoteRequiresDoubleQuotesAroundValue() + { + ParseDocumentTest("@tagHelperPrefix Foo \""); + } + + [Fact] + public void RemoveTagHelperDirective_NoValue_Invalid() + { + ParseDocumentTest("@removeTagHelper \"\""); + } + + [Fact] + public void RemoveTagHelperDirective_InvalidLookupText_AddsError() + { + ParseDocumentTest("@removeTagHelper Foo"); + } + + [Fact] + public void RemoveTagHelperDirective_SingleQuotes_AddsError() + { + ParseDocumentTest("@removeTagHelper '*, Foo'"); + } + + [Fact] + public void RemoveTagHelperDirective_WithQuotes_InvalidLookupText_AddsError() + { + ParseDocumentTest("@removeTagHelper \"Foo\""); + } + + [Fact] + public void RemoveTagHelperDirective_SupportsSpaces() + { + ParseDocumentTest("@removeTagHelper Foo, Bar "); + } + + [Fact] + public void RemoveTagHelperDirective_RequiresValue() + { + ParseDocumentTest("@removeTagHelper "); + } + + [Fact] + public void RemoveTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue() + { + // Arrange + ParseDocumentTest("@removeTagHelper \"Foo"); + } + + [Fact] + public void RemoveTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue() + { + ParseDocumentTest("@removeTagHelper Foo\""); + } + + [Fact] + public void AddTagHelperDirective_NoValue_Invalid() + { + ParseDocumentTest("@addTagHelper \"\""); + } + + [Fact] + public void AddTagHelperDirective_InvalidLookupText_AddsError() + { + ParseDocumentTest("@addTagHelper Foo"); + } + + [Fact] + public void AddTagHelperDirective_WithQuotes_InvalidLookupText_AddsError() + { + ParseDocumentTest("@addTagHelper \"Foo\""); + } + + [Fact] + public void AddTagHelperDirective_SingleQuotes_AddsError() + { + ParseDocumentTest("@addTagHelper '*, Foo'"); + } + + [Fact] + public void AddTagHelperDirective_SupportsSpaces() + { + ParseDocumentTest("@addTagHelper Foo, Bar "); + } + + [Fact] + public void AddTagHelperDirective_RequiresValue() + { + ParseDocumentTest("@addTagHelper "); + } + + [Fact] + public void AddTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue() + { + ParseDocumentTest("@addTagHelper \"Foo"); + } + + [Fact] + public void AddTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue() + { + ParseDocumentTest("@addTagHelper Foo\""); + } + + [Fact] + public void InheritsDirectiveSupportsArrays() + { + ParseDocumentTest( + "@inherits string[[]][]", + new[] { InheritsDirective.Directive, }); + } + + [Fact] + public void InheritsDirectiveSupportsNestedGenerics() + { + ParseDocumentTest( + "@inherits System.Web.Mvc.WebViewPage>", + new[] { InheritsDirective.Directive, }); + } + + [Fact] + public void InheritsDirectiveSupportsTypeKeywords() + { + ParseDocumentTest( + "@inherits string", + new[] { InheritsDirective.Directive, }); + } + + [Fact] + public void Parse_FunctionsDirective() + { + ParseDocumentTest( + "@functions { foo(); bar(); }", + new[] { FunctionsDirective.Directive, }); + } + + [Fact] + public void EmptyFunctionsDirective() + { + ParseDocumentTest( + "@functions { }", + new[] { FunctionsDirective.Directive, }); + } + + [Fact] + public void Parse_SectionDirective() + { + ParseDocumentTest( + "@section Header {

    F{o}o

    }", + new[] { SectionDirective.Directive, }); + } + + [Fact] + public void OptionalDirectiveTokens_AreSkipped() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddOptionalStringToken()); + + // Act & Assert + ParseDocumentTest( + "@custom ", + new[] { descriptor }); + } + + [Fact] + public void OptionalDirectiveTokens_WithSimpleTokens_AreParsed() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddOptionalStringToken()); + + // Act & Assert + ParseDocumentTest( + "@custom \"simple-value\"", + new[] { descriptor }); + } + + [Fact] + public void OptionalDirectiveTokens_WithBraces_AreParsed() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddOptionalStringToken()); + + // Act & Assert + ParseDocumentTest( + "@custom \"{formaction}?/{id}?\"", + new[] { descriptor }); + } + + [Fact] + public void OptionalDirectiveTokens_WithMultipleOptionalTokens_AreParsed() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "custom", + DirectiveKind.SingleLine, + b => b.AddOptionalStringToken().AddOptionalTypeToken()); + + // Act & Assert + ParseDocumentTest( + "@custom \"{formaction}?/{id}?\" System.String", + new[] { descriptor }); + } + + [Fact] + public void OptionalMemberTokens_WithMissingMember_IsParsed() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "TestDirective", + DirectiveKind.SingleLine, + b => b.AddOptionalMemberToken().AddOptionalStringToken()); + + // Act & Assert + ParseDocumentTest( + "@TestDirective ", + new[] { descriptor }); + } + + [Fact] + public void OptionalMemberTokens_WithMemberSpecified_IsParsed() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "TestDirective", + DirectiveKind.SingleLine, + b => b.AddOptionalMemberToken().AddOptionalStringToken()); + + // Act & Assert + ParseDocumentTest( + "@TestDirective PropertyName", + new[] { descriptor }); + } + + [Fact] + public void Directives_CanUseReservedWord_Class() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "class", + DirectiveKind.SingleLine); + + // Act & Assert + ParseDocumentTest( + "@class", + new[] { descriptor }); + } + + [Fact] + public void Directives_CanUseReservedWord_Namespace() + { + // Arrange + var descriptor = DirectiveDescriptor.CreateDirective( + "namespace", + DirectiveKind.SingleLine); + + // Act & Assert + ParseDocumentTest( + "@namespace", + new[] { descriptor }); + } + + [Fact] + public void Directives_ReservedWordInsideCodeBlock() + { + ParseDocumentTest("@{ class }"); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/RazorParserTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/RazorParserTest.cs new file mode 100644 index 0000000000..7d848c2975 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/RazorParserTest.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class RazorParserTest + { + [Fact] + public void CanParseStuff() + { + var parser = new RazorParser(); + var sourceDocument = TestRazorSourceDocument.CreateResource("TestFiles/Source/BasicMarkup.cshtml", GetType()); + var output = parser.Parse(sourceDocument); + + Assert.NotNull(output); + } + + [Fact] + public void ParseMethodCallsParseDocumentOnMarkupParserAndReturnsResults() + { + // Arrange + var parser = new RazorParser(); + var expected = +@"RazorDocument - [0..12)::12 - [foo @bar baz] + MarkupBlock - [0..12)::12 + MarkupTextLiteral - [0..4)::4 - [foo ] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + Whitespace;[ ]; + CSharpCodeBlock - [4..8)::4 + CSharpImplicitExpression - [4..8)::4 + CSharpTransition - [4..5)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [5..8)::3 + CSharpCodeBlock - [5..8)::3 + CSharpExpressionLiteral - [5..8)::3 - [bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[bar]; + MarkupTextLiteral - [8..12)::4 - [ baz] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[baz]; +"; + + // Act + var syntaxTree = parser.Parse(TestRazorSourceDocument.Create("foo @bar baz")); + + // Assert + var actual = SyntaxNodeSerializer.Serialize(syntaxTree.Root); + Assert.Equal(expected, actual); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/SourceLocationTrackerTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/SourceLocationTrackerTest.cs new file mode 100644 index 0000000000..9671ecedda --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/SourceLocationTrackerTest.cs @@ -0,0 +1,214 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class SourceLocationTrackerTest + { + private static readonly SourceLocation TestStartLocation = new SourceLocation(10, 42, 45); + + [Fact] + public void ConstructorSetsCurrentLocationToZero() + { + Assert.Equal(SourceLocation.Zero, new SourceLocationTracker().CurrentLocation); + } + + [Fact] + public void ConstructorWithSourceLocationSetsCurrentLocationToSpecifiedValue() + { + var loc = new SourceLocation(10, 42, 4); + Assert.Equal(loc, new SourceLocationTracker(loc).CurrentLocation); + } + + [Theory] + [InlineData(null)] + [InlineData("path-to-file")] + public void Advance_PreservesSourceLocationFilePath(string path) + { + // Arrange + var sourceLocation = new SourceLocation(path, 15, 2, 8); + + // Act + var result = SourceLocationTracker.Advance(sourceLocation, "Hello world"); + + // Assert + Assert.Equal(path, result.FilePath); + Assert.Equal(26, result.AbsoluteIndex); + Assert.Equal(2, result.LineIndex); + Assert.Equal(19, result.CharacterIndex); + } + + [Fact] + public void UpdateLocationAdvancesCorrectlyForMultiLineString() + { + // Arrange + var tracker = new SourceLocationTracker(TestStartLocation); + + // Act + tracker.UpdateLocation("foo\nbar\rbaz\r\nbox"); + + // Assert + Assert.Equal(26, tracker.CurrentLocation.AbsoluteIndex); + Assert.Equal(45, tracker.CurrentLocation.LineIndex); + Assert.Equal(3, tracker.CurrentLocation.CharacterIndex); + } + + [Fact] + public void UpdateLocationAdvancesAbsoluteIndexOnNonNewlineCharacter() + { + // Arrange + var tracker = new SourceLocationTracker(TestStartLocation); + + // Act + tracker.UpdateLocation('f', 'o'); + + // Assert + Assert.Equal(11, tracker.CurrentLocation.AbsoluteIndex); + } + + [Fact] + public void UpdateLocationAdvancesCharacterIndexOnNonNewlineCharacter() + { + // Arrange + var tracker = new SourceLocationTracker(TestStartLocation); + + // Act + tracker.UpdateLocation('f', 'o'); + + // Assert + Assert.Equal(46, tracker.CurrentLocation.CharacterIndex); + } + + [Fact] + public void UpdateLocationDoesNotAdvanceLineIndexOnNonNewlineCharacter() + { + // Arrange + var tracker = new SourceLocationTracker(TestStartLocation); + + // Act + tracker.UpdateLocation('f', 'o'); + + // Assert + Assert.Equal(42, tracker.CurrentLocation.LineIndex); + } + + [Fact] + public void UpdateLocationAdvancesLineIndexOnSlashN() + { + // Arrange + var tracker = new SourceLocationTracker(TestStartLocation); + + // Act + tracker.UpdateLocation('\n', 'o'); + + // Assert + Assert.Equal(43, tracker.CurrentLocation.LineIndex); + } + + [Fact] + public void UpdateLocationAdvancesAbsoluteIndexOnSlashN() + { + // Arrange + var tracker = new SourceLocationTracker(TestStartLocation); + + // Act + tracker.UpdateLocation('\n', 'o'); + + // Assert + Assert.Equal(11, tracker.CurrentLocation.AbsoluteIndex); + } + + [Fact] + public void UpdateLocationResetsCharacterIndexOnSlashN() + { + // Arrange + var tracker = new SourceLocationTracker(TestStartLocation); + + // Act + tracker.UpdateLocation('\n', 'o'); + + // Assert + Assert.Equal(0, tracker.CurrentLocation.CharacterIndex); + } + + [Fact] + public void UpdateLocationAdvancesLineIndexOnSlashRFollowedByNonNewlineCharacter() + { + // Arrange + var tracker = new SourceLocationTracker(TestStartLocation); + + // Act + tracker.UpdateLocation('\r', 'o'); + + // Assert + Assert.Equal(43, tracker.CurrentLocation.LineIndex); + } + + [Fact] + public void UpdateLocationAdvancesAbsoluteIndexOnSlashRFollowedByNonNewlineCharacter() + { + // Arrange + var tracker = new SourceLocationTracker(TestStartLocation); + + // Act + tracker.UpdateLocation('\r', 'o'); + + // Assert + Assert.Equal(11, tracker.CurrentLocation.AbsoluteIndex); + } + + [Fact] + public void UpdateLocationResetsCharacterIndexOnSlashRFollowedByNonNewlineCharacter() + { + // Arrange + var tracker = new SourceLocationTracker(TestStartLocation); + + // Act + tracker.UpdateLocation('\r', 'o'); + + // Assert + Assert.Equal(0, tracker.CurrentLocation.CharacterIndex); + } + + [Fact] + public void UpdateLocationDoesNotAdvanceLineIndexOnSlashRFollowedBySlashN() + { + // Arrange + var tracker = new SourceLocationTracker(TestStartLocation); + + // Act + tracker.UpdateLocation('\r', '\n'); + + // Assert + Assert.Equal(42, tracker.CurrentLocation.LineIndex); + } + + [Fact] + public void UpdateLocationAdvancesAbsoluteIndexOnSlashRFollowedBySlashN() + { + // Arrange + var tracker = new SourceLocationTracker(TestStartLocation); + + // Act + tracker.UpdateLocation('\r', '\n'); + + // Assert + Assert.Equal(11, tracker.CurrentLocation.AbsoluteIndex); + } + + [Fact] + public void UpdateLocationAdvancesCharacterIndexOnSlashRFollowedBySlashN() + { + // Arrange + var tracker = new SourceLocationTracker(TestStartLocation); + + // Act + tracker.UpdateLocation('\r', '\n'); + + // Assert + Assert.Equal(46, tracker.CurrentLocation.CharacterIndex); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperBlockRewriterTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperBlockRewriterTest.cs new file mode 100644 index 0000000000..c2a2e7356c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperBlockRewriterTest.cs @@ -0,0 +1,2187 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class TagHelperBlockRewriterTest : TagHelperRewritingTestBase + { + public static TagHelperDescriptor[] SymbolBoundAttributes_Descriptors = new[] + { + TagHelperDescriptorBuilder.Create("CatchAllTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("*") + .RequireAttributeDescriptor(attribute => attribute.Name("bound"))) + .BoundAttributeDescriptor(attribute => + attribute + .Name("[item]") + .PropertyName("ListItems") + .TypeName(typeof(List).Namespace + "List")) + .BoundAttributeDescriptor(attribute => + attribute + .Name("[(item)]") + .PropertyName("ArrayItems") + .TypeName(typeof(string[]).Namespace + "System.String[]")) + .BoundAttributeDescriptor(attribute => + attribute + .Name("(click)") + .PropertyName("Event1") + .TypeName(typeof(Action).FullName)) + .BoundAttributeDescriptor(attribute => + attribute + .Name("(^click)") + .PropertyName("Event2") + .TypeName(typeof(Action).FullName)) + .BoundAttributeDescriptor(attribute => + attribute + .Name("*something") + .PropertyName("StringProperty1") + .TypeName(typeof(string).FullName)) + .BoundAttributeDescriptor(attribute => + attribute + .Name("#local") + .PropertyName("StringProperty2") + .TypeName(typeof(string).FullName)) + .Build() + }; + + [Fact] + public void CanHandleSymbolBoundAttributes1() + { + EvaluateData(SymbolBoundAttributes_Descriptors, "
      "); + } + + [Fact] + public void CanHandleSymbolBoundAttributes2() + { + EvaluateData(SymbolBoundAttributes_Descriptors, "
        "); + } + + [Fact] + public void CanHandleSymbolBoundAttributes3() + { + EvaluateData(SymbolBoundAttributes_Descriptors, ""); + } + + [Fact] + public void CanHandleSymbolBoundAttributes4() + { + EvaluateData(SymbolBoundAttributes_Descriptors, ""); + } + + [Fact] + public void CanHandleSymbolBoundAttributes5() + { + EvaluateData(SymbolBoundAttributes_Descriptors, ""); + } + + [Fact] + public void CanHandleSymbolBoundAttributes6() + { + EvaluateData(SymbolBoundAttributes_Descriptors, "
        "); + } + + [Fact] + public void CanHandleSymbolBoundAttributes7() + { + EvaluateData(SymbolBoundAttributes_Descriptors, "
        "); + } + + public static TagHelperDescriptor[] WithoutEndTag_Descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("InputTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("input") + .RequireTagStructure(TagStructure.WithoutEndTag)) + .Build() + }; + + [Fact] + public void CanHandleWithoutEndTagTagStructure1() + { + EvaluateData(WithoutEndTag_Descriptors, ""); + } + + [Fact] + public void CanHandleWithoutEndTagTagStructure2() + { + EvaluateData(WithoutEndTag_Descriptors, ""); + } + + [Fact] + public void CanHandleWithoutEndTagTagStructure3() + { + EvaluateData(WithoutEndTag_Descriptors, ""); + } + + [Fact] + public void CanHandleWithoutEndTagTagStructure4() + { + EvaluateData(WithoutEndTag_Descriptors, ""); + } + + [Fact] + public void CanHandleWithoutEndTagTagStructure5() + { + EvaluateData(WithoutEndTag_Descriptors, "
        "); + } + + public static TagHelperDescriptor[] GetTagStructureCompatibilityDescriptors(TagStructure structure1, TagStructure structure2) + { + var descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("InputTagHelper1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("input") + .RequireTagStructure(structure1)) + .Build(), + TagHelperDescriptorBuilder.Create("InputTagHelper2", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("input") + .RequireTagStructure(structure2)) + .Build() + }; + + return descriptors; + } + + [Fact] + public void AllowsCompatibleTagStructures1() + { + // Arrange + var descriptors = GetTagStructureCompatibilityDescriptors(TagStructure.Unspecified, TagStructure.Unspecified); + + // Act & Assert + EvaluateData(descriptors, ""); + } + + [Fact] + public void AllowsCompatibleTagStructures2() + { + // Arrange + var descriptors = GetTagStructureCompatibilityDescriptors(TagStructure.Unspecified, TagStructure.Unspecified); + + // Act & Assert + EvaluateData(descriptors, ""); + } + + [Fact] + public void AllowsCompatibleTagStructures3() + { + // Arrange + var descriptors = GetTagStructureCompatibilityDescriptors(TagStructure.Unspecified, TagStructure.WithoutEndTag); + + // Act & Assert + EvaluateData(descriptors, ""); + } + + [Fact] + public void AllowsCompatibleTagStructures4() + { + // Arrange + var descriptors = GetTagStructureCompatibilityDescriptors(TagStructure.WithoutEndTag, TagStructure.WithoutEndTag); + + // Act & Assert + EvaluateData(descriptors, ""); + } + + [Fact] + public void AllowsCompatibleTagStructures5() + { + // Arrange + var descriptors = GetTagStructureCompatibilityDescriptors(TagStructure.Unspecified, TagStructure.NormalOrSelfClosing); + + // Act & Assert + EvaluateData(descriptors, ""); + } + + [Fact] + public void AllowsCompatibleTagStructures6() + { + // Arrange + var descriptors = GetTagStructureCompatibilityDescriptors(TagStructure.Unspecified, TagStructure.WithoutEndTag); + + // Act & Assert + EvaluateData(descriptors, ""); + } + + [Fact] + public void AllowsCompatibleTagStructures7() + { + // Arrange + var descriptors = GetTagStructureCompatibilityDescriptors(TagStructure.NormalOrSelfClosing, TagStructure.Unspecified); + + // Act & Assert + EvaluateData(descriptors, ""); + } + + [Fact] + public void AllowsCompatibleTagStructures8() + { + // Arrange + var descriptors = GetTagStructureCompatibilityDescriptors(TagStructure.WithoutEndTag, TagStructure.Unspecified); + + // Act & Assert + EvaluateData(descriptors, ""); + } + + [Fact] + public void CreatesErrorForMalformedTagHelpersWithAttributes1() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void CreatesErrorForMalformedTagHelpersWithAttributes4() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void CreatesErrorForMalformedTagHelpersWithAttributes8() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void CreatesErrorForMalformedTagHelpersWithAttributes9() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void CreatesErrorForMalformedTagHelpersWithAttributes10() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void CreatesErrorForMalformedTagHelpersWithAttributes11() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void CreatesErrorForMalformedTagHelpersWithAttributes12() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void CreatesErrorForMalformedTagHelpersWithAttributes13() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void CreatesErrorForMalformedTagHelpersWithAttributes14() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void CreatesErrorForMalformedTagHelpersWithAttributes15() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void CreatesErrorForMalformedTagHelpersWithAttributes16() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void CreatesErrorForMalformedTagHelpersWithAttributes18() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void CreatesErrorForMalformedTagHelpersWithAttributes19() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void CreatesErrorForMalformedTagHelpersWithAttributes20() + { + RunParseTreeRewriterTest("

        }\">

        ", "strong", "p"); + } + + [Fact] + public void CreatesErrorForMalformedTagHelper1() + { + RunParseTreeRewriterTest("", "strong", "p"); + } + + [Fact] + public void CreatesErrorForMalformedTagHelper5() + { + RunParseTreeRewriterTest(" <

        ", "strong", "p"); + } + + [Fact] + public void CreatesErrorForMalformedTagHelper7() + { + RunParseTreeRewriterTest("<<> <<>>", "strong", "p"); + } + + [Fact] + public void CreatesErrorForMalformedTagHelper8() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + public static TagHelperDescriptor[] CodeTagHelperAttributes_Descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("PersonTagHelper", "personAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("person")) + .BoundAttributeDescriptor(attribute => + attribute + .Name("age") + .PropertyName("Age") + .TypeName(typeof(int).FullName)) + .BoundAttributeDescriptor(attribute => + attribute + .Name("birthday") + .PropertyName("BirthDay") + .TypeName(typeof(DateTime).FullName)) + .BoundAttributeDescriptor(attribute => + attribute + .Name("name") + .PropertyName("Name") + .TypeName(typeof(string).FullName)) + .Build() + }; + + [Fact] + public void CreatesMarkupCodeSpansForNonStringTagHelperAttributes1() + { + EvaluateData(CodeTagHelperAttributes_Descriptors, ""); + } + + [Fact] + public void CreatesMarkupCodeSpansForNonStringTagHelperAttributes2() + { + EvaluateData(CodeTagHelperAttributes_Descriptors, ""); + } + + [Fact] + public void CreatesMarkupCodeSpansForNonStringTagHelperAttributes3() + { + EvaluateData(CodeTagHelperAttributes_Descriptors, ""); + } + + [Fact] + public void CreatesMarkupCodeSpansForNonStringTagHelperAttributes4() + { + EvaluateData(CodeTagHelperAttributes_Descriptors, ""); + } + + [Fact] + public void CreatesMarkupCodeSpansForNonStringTagHelperAttributes5() + { + EvaluateData(CodeTagHelperAttributes_Descriptors, ""); + } + + [Fact] + public void CreatesMarkupCodeSpansForNonStringTagHelperAttributes6() + { + EvaluateData(CodeTagHelperAttributes_Descriptors, ""); + } + + [Fact] + public void CreatesMarkupCodeSpansForNonStringTagHelperAttributes7() + { + EvaluateData(CodeTagHelperAttributes_Descriptors, ""); + } + + [Fact] + public void CreatesMarkupCodeSpansForNonStringTagHelperAttributes8() + { + EvaluateData(CodeTagHelperAttributes_Descriptors, ""); + } + + [Fact] + public void CreatesMarkupCodeSpansForNonStringTagHelperAttributes9() + { + EvaluateData(CodeTagHelperAttributes_Descriptors, ""); + } + + [Fact] + public void CreatesMarkupCodeSpansForNonStringTagHelperAttributes10() + { + EvaluateData(CodeTagHelperAttributes_Descriptors, ""); + } + + [Fact] + public void CreatesMarkupCodeSpansForNonStringTagHelperAttributes11() + { + EvaluateData(CodeTagHelperAttributes_Descriptors, ""); + } + + [Fact] + public void CreatesMarkupCodeSpansForNonStringTagHelperAttributes12() + { + EvaluateData(CodeTagHelperAttributes_Descriptors, ""); + } + + [Fact] + public void TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper1() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper2() + { + RunParseTreeRewriterTest("

        Hello World

        ", "strong", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper3() + { + RunParseTreeRewriterTest("

        Hello World

        ", "strong", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper4() + { + RunParseTreeRewriterTest("

        Hello

        World

        ", "strong", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks1() + { + RunParseTreeRewriterTest("

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks2() + { + RunParseTreeRewriterTest("

        Hello World

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks3() + { + RunParseTreeRewriterTest("

        Hello

        World

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks1() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var currentFormattedString = "

        "; + var document = string.Format(currentFormattedString, dateTimeNowString); + + // Act & Assert + RunParseTreeRewriterTest(document, "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks2() + { + // Arrange + var doWhileString = "@do { var foo = bar; Foo foo++; } while (foo);"; + var currentFormattedString = "

        "; + var document = string.Format(currentFormattedString, doWhileString); + + // Act & Assert + RunParseTreeRewriterTest(document, "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks3() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var currentFormattedString = "

        Hello World

        "; + var document = string.Format(currentFormattedString, dateTimeNowString); + + // Act & Assert + RunParseTreeRewriterTest(document, "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks4() + { + // Arrange + var doWhileString = "@do { var foo = bar; Foo foo++; } while (foo);"; + var currentFormattedString = "

        Hello World

        "; + var document = string.Format(currentFormattedString, doWhileString); + + // Act & Assert + RunParseTreeRewriterTest(document, "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks5() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var currentFormattedString = "

        Hello

        World

        "; + var document = string.Format(currentFormattedString, dateTimeNowString); + + // Act & Assert + RunParseTreeRewriterTest(document, "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks6() + { + // Arrange + var doWhileString = "@do { var foo = bar; Foo foo++; } while (foo);"; + var currentFormattedString = "

        Hello

        World

        "; + var document = string.Format(currentFormattedString, doWhileString); + + // Act & Assert + RunParseTreeRewriterTest(document, "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks7() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var currentFormattedString = "

        Hello World inside of strong tag

        "; + var document = string.Format(currentFormattedString, dateTimeNowString); + + // Act & Assert + RunParseTreeRewriterTest(document, "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks1() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var currentFormattedString = "

        {0}

        "; + var document = string.Format(currentFormattedString, dateTimeNowString); + + // Act & Assert + RunParseTreeRewriterTest(document, "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks2() + { + // Arrange + var doWhileString = "@do { var foo = bar;

        Foo

        foo++; } while (foo);"; + var currentFormattedString = "

        {0}

        "; + var document = string.Format(currentFormattedString, doWhileString); + + // Act & Assert + RunParseTreeRewriterTest(document, "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks3() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var currentFormattedString = "

        Hello World {0}

        "; + var document = string.Format(currentFormattedString, dateTimeNowString); + + // Act & Assert + RunParseTreeRewriterTest(document, "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks4() + { + // Arrange + var doWhileString = "@do { var foo = bar;

        Foo

        foo++; } while (foo);"; + var currentFormattedString = "

        Hello World {0}

        "; + var document = string.Format(currentFormattedString, doWhileString); + + // Act & Assert + RunParseTreeRewriterTest(document, "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks5() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var currentFormattedString = "

        {0}

        {0}

        "; + var document = string.Format(currentFormattedString, dateTimeNowString); + + // Act & Assert + RunParseTreeRewriterTest(document, "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks6() + { + // Arrange + var doWhileString = "@do { var foo = bar;

        Foo

        foo++; } while (foo);"; + var currentFormattedString = "

        {0}

        {0}

        "; + var document = string.Format(currentFormattedString, doWhileString); + + // Act & Assert + RunParseTreeRewriterTest(document, "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks7() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var currentFormattedString = "

        Hello {0}inside of {0} strong tag

        "; + var document = string.Format(currentFormattedString, dateTimeNowString); + + // Act & Assert + RunParseTreeRewriterTest(document, "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks8() + { + // Arrange + var doWhileString = "@do { var foo = bar;

        Foo

        foo++; } while (foo);"; + var currentFormattedString = "

        Hello {0}inside of {0} strong tag

        "; + var document = string.Format(currentFormattedString, doWhileString); + + // Act & Assert + RunParseTreeRewriterTest(document, "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_AllowsInvalidHtml1() + { + RunParseTreeRewriterTest("<<

        >>

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_AllowsInvalidHtml2() + { + RunParseTreeRewriterTest("<

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_AllowsInvalidHtml3() + { + RunParseTreeRewriterTest("< p />", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_AllowsInvalidHtml4() + { + RunParseTreeRewriterTest("", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_AllowsInvalidHtml5() + { + RunParseTreeRewriterTest("< class=\"foo\"

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_AllowsInvalidHtml6() + { + RunParseTreeRewriterTest("/>

        >", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_AllowsInvalidHtml7() + { + RunParseTreeRewriterTest("/>

        >", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_AllowsInvalidHtml8() + { + RunParseTreeRewriterTest("@DateTime.Now/>

        >", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_AllowsInvalidHtml9() + { + RunParseTreeRewriterTest("

        @DateTime.Now / >

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_AllowsInvalidHtml10() + { + RunParseTreeRewriterTest("

        < @DateTime.Now >

        ", "p"); + } + + [Fact] + public void UnderstandsEmptyAttributeTagHelpers1() + { + RunParseTreeRewriterTest("

        ", "p"); + } + + [Fact] + public void UnderstandsEmptyAttributeTagHelpers2() + { + RunParseTreeRewriterTest("

        ", "p"); + } + + [Fact] + public void UnderstandsEmptyAttributeTagHelpers3() + { + RunParseTreeRewriterTest("

        ", "p"); + } + + [Fact] + public void UnderstandsEmptyAttributeTagHelpers4() + { + RunParseTreeRewriterTest("

        ", "p"); + } + + [Fact] + public void UnderstandsEmptyAttributeTagHelpers5() + { + RunParseTreeRewriterTest("

        ", "p"); + } + + public static TagHelperDescriptor[] EmptyTagHelperBoundAttribute_Descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("mythTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("myth")) + .BoundAttributeDescriptor(attribute => + attribute + .Name("bound") + .PropertyName("Bound") + .TypeName(typeof(bool).FullName)) + .BoundAttributeDescriptor(attribute => + attribute + .Name("name") + .PropertyName("Name") + .TypeName(typeof(string).FullName)) + .Build() + }; + + [Fact] + public void CreatesErrorForEmptyTagHelperBoundAttributes1() + { + EvaluateData(EmptyTagHelperBoundAttribute_Descriptors, ""); + } + + [Fact] + public void CreatesErrorForEmptyTagHelperBoundAttributes2() + { + EvaluateData(EmptyTagHelperBoundAttribute_Descriptors, ""); + } + + [Fact] + public void CreatesErrorForEmptyTagHelperBoundAttributes3() + { + EvaluateData(EmptyTagHelperBoundAttribute_Descriptors, ""); + } + + [Fact] + public void CreatesErrorForEmptyTagHelperBoundAttributes4() + { + EvaluateData(EmptyTagHelperBoundAttribute_Descriptors, ""); + } + + [Fact] + public void CreatesErrorForEmptyTagHelperBoundAttributes5() + { + EvaluateData(EmptyTagHelperBoundAttribute_Descriptors, ""); + } + + [Fact] + public void CreatesErrorForEmptyTagHelperBoundAttributes6() + { + EvaluateData(EmptyTagHelperBoundAttribute_Descriptors, ""); + } + + [Fact] + public void CreatesErrorForEmptyTagHelperBoundAttributes7() + { + EvaluateData(EmptyTagHelperBoundAttribute_Descriptors, ""); + } + + [Fact] + public void CreatesErrorForEmptyTagHelperBoundAttributes8() + { + EvaluateData(EmptyTagHelperBoundAttribute_Descriptors, ""); + } + + [Fact] + public void CreatesErrorForEmptyTagHelperBoundAttributes9() + { + EvaluateData(EmptyTagHelperBoundAttribute_Descriptors, ""); + } + + [Fact] + public void CreatesErrorForEmptyTagHelperBoundAttributes10() + { + EvaluateData(EmptyTagHelperBoundAttribute_Descriptors, ""); + } + + [Fact] + public void CreatesErrorForEmptyTagHelperBoundAttributes11() + { + EvaluateData(EmptyTagHelperBoundAttribute_Descriptors, ""); + } + + [Fact] + public void CreatesErrorForEmptyTagHelperBoundAttributes12() + { + EvaluateData(EmptyTagHelperBoundAttribute_Descriptors, ""); + } + + [Fact] + public void CreatesErrorForEmptyTagHelperBoundAttributes13() + { + EvaluateData(EmptyTagHelperBoundAttribute_Descriptors, ""); + } + + [Fact] + public void CreatesErrorForEmptyTagHelperBoundAttributes14() + { + EvaluateData(EmptyTagHelperBoundAttribute_Descriptors, ""); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesScriptTagHelpers1() + { + RunParseTreeRewriterTest("", "p", "div", "script"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesScriptTagHelpers2() + { + RunParseTreeRewriterTest("", "p", "div", "script"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesScriptTagHelpers3() + { + RunParseTreeRewriterTest("

        World

        ", "p", "div", "script"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesScriptTagHelpers4() + { + RunParseTreeRewriterTest(" ", "p", "div", "script"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesScriptTagHelpers5() + { + RunParseTreeRewriterTest(" World

        ", "p", "div", "script"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesScriptTagHelpers7() + { + RunParseTreeRewriterTest("

        Hello World

        ", "p", "div", "script"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers1() + { + RunParseTreeRewriterTest("

        ", "p"); + } + + + [Fact] + public void TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers2() + { + RunParseTreeRewriterTest("

        Hello

        World

        ", "p"); + } + + + [Fact] + public void TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers3() + { + RunParseTreeRewriterTest("Hello

        World", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes1() + { + RunParseTreeRewriterTest("

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes2() + { + RunParseTreeRewriterTest("

        Hello World

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes3() + { + RunParseTreeRewriterTest("

        Hello World

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes4() + { + RunParseTreeRewriterTest("

        Hello

        World

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes5() + { + RunParseTreeRewriterTest("

        Hello World inside of strong tag

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes1() + { + RunParseTreeRewriterTest("

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes2() + { + RunParseTreeRewriterTest("

        Hello World

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes3() + { + RunParseTreeRewriterTest("

        Hello

        World

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes4() + { + RunParseTreeRewriterTest("

        Hello World inside of strong tag

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks1() + { + RunParseTreeRewriterTest("

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks2() + { + RunParseTreeRewriterTest("

        Hello World

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks3() + { + RunParseTreeRewriterTest("

        Hello

        World

        ", "p"); + } + + [Fact] + public void TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks4() + { + RunParseTreeRewriterTest("

        Hello World inside of strong tag

        ", "p"); + } + + [Fact] + public void GeneratesExpectedOutputForUnboundDataDashAttributes_Document1() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var document = $""; + + // Act & Assert + RunParseTreeRewriterTest(document, "input"); + } + + [Fact] + public void GeneratesExpectedOutputForUnboundDataDashAttributes_Document2() + { + // Arrange + var document = ""; + + // Act & Assert + RunParseTreeRewriterTest(document, "input"); + } + + [Fact] + public void GeneratesExpectedOutputForUnboundDataDashAttributes_Document3() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var document = $""; + + // Act & Assert + RunParseTreeRewriterTest(document, "input"); + } + + [Fact] + public void GeneratesExpectedOutputForUnboundDataDashAttributes_Document4() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var document = $""; + + // Act & Assert + RunParseTreeRewriterTest(document, "input"); + } + + [Fact] + public void GeneratesExpectedOutputForUnboundDataDashAttributes_Document5() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var document = $""; + + // Act & Assert + RunParseTreeRewriterTest(document, "input"); + } + + [Fact] + public void GeneratesExpectedOutputForUnboundDataDashAttributes_Document6() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var document = $""; + + // Act & Assert + RunParseTreeRewriterTest(document, "input"); + } + + [Fact] + public void GeneratesExpectedOutputForUnboundDataDashAttributes_Document7() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var document = $""; + + // Act & Assert + RunParseTreeRewriterTest(document, "input"); + } + + [Fact] + public void GeneratesExpectedOutputForUnboundDataDashAttributes_Block1() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var document = $""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + RunParseTreeRewriterTest(document, "input"); + } + + [Fact] + public void GeneratesExpectedOutputForUnboundDataDashAttributes_Block2() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + RunParseTreeRewriterTest(document, "input"); + } + + [Fact] + public void GeneratesExpectedOutputForUnboundDataDashAttributes_Block3() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var document = $""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + RunParseTreeRewriterTest(document, "input"); + } + + [Fact] + public void GeneratesExpectedOutputForUnboundDataDashAttributes_Block4() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var document = $""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + RunParseTreeRewriterTest(document, "input"); + } + + [Fact] + public void GeneratesExpectedOutputForUnboundDataDashAttributes_Block5() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var document = $""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + RunParseTreeRewriterTest(document, "input"); + } + + [Fact] + public void GeneratesExpectedOutputForUnboundDataDashAttributes_Block6() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var document = $""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + RunParseTreeRewriterTest(document, "input"); + } + + [Fact] + public void GeneratesExpectedOutputForUnboundDataDashAttributes_Block7() + { + // Arrange + var dateTimeNowString = "@DateTime.Now"; + var document = $""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + RunParseTreeRewriterTest(document, "input"); + } + + public static TagHelperDescriptor[] MinimizedAttribute_Descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("InputTagHelper1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("input") + .RequireAttributeDescriptor(attribute => attribute.Name("unbound-required"))) + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("input") + .RequireAttributeDescriptor(attribute => attribute.Name("bound-required-string"))) + .BoundAttributeDescriptor(attribute => + attribute + .Name("bound-required-string") + .PropertyName("BoundRequiredString") + .TypeName(typeof(string).FullName)) + .Build(), + TagHelperDescriptorBuilder.Create("InputTagHelper2", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("input") + .RequireAttributeDescriptor(attribute => attribute.Name("bound-required-int"))) + .BoundAttributeDescriptor(attribute => + attribute + .Name("bound-required-int") + .PropertyName("BoundRequiredInt") + .TypeName(typeof(int).FullName)) + .Build(), + TagHelperDescriptorBuilder.Create("InputTagHelper3", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("input")) + .BoundAttributeDescriptor(attribute => + attribute + .Name("int-dictionary") + .PropertyName("DictionaryOfIntProperty") + .TypeName(typeof(IDictionary).Namespace + ".IDictionary") + .AsDictionaryAttribute("int-prefix-", typeof(int).FullName)) + .BoundAttributeDescriptor(attribute => + attribute + .Name("string-dictionary") + .PropertyName("DictionaryOfStringProperty") + .TypeName(typeof(IDictionary).Namespace + ".IDictionary") + .AsDictionaryAttribute("string-prefix-", typeof(string).FullName)) + .Build(), + TagHelperDescriptorBuilder.Create("PTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")) + .BoundAttributeDescriptor(attribute => + attribute + .Name("bound-string") + .PropertyName("BoundRequiredString") + .TypeName(typeof(string).FullName)) + .BoundAttributeDescriptor(attribute => + attribute + .Name("bound-int") + .PropertyName("BoundRequiredString") + .TypeName(typeof(int).FullName)) + .Build(), + }; + + [Fact] + public void UnderstandsMinimizedAttributes_Document1() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document2() + { + // Arrange + var document = "

        "; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document3() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document4() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document5() + { + // Arrange + var document = "

        "; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document6() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document7() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document8() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document9() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document10() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document11() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document12() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document13() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document14() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document15() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document16() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document17() + { + // Arrange + var document = "

        "; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document18() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document19() + { + // Arrange + var document = "

        "; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document20() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document21() + { + // Arrange + var document = "

        "; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document22() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document23() + { + // Arrange + var document = "

        "; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document24() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document25() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document26() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document27() + { + // Arrange + var document = "

        "; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document28() + { + // Arrange + var document = ""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document29() + { + // Arrange + var document = "

        "; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document30() + { + // Arrange + var expressionString = "@DateTime.Now + 1"; + var document = $""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document31() + { + // Arrange + var expressionString = "@DateTime.Now + 1"; + var document = $"

        "; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document32() + { + // Arrange + var expressionString = "@DateTime.Now + 1"; + var document = $""; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Document33() + { + // Arrange + var expressionString = "@DateTime.Now + 1"; + var document = $"

        "; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block1() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block2() + { + // Arrange + var document = "

        "; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block3() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block4() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block5() + { + // Arrange + var document = "

        "; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block6() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block7() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block8() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block9() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block10() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block11() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block12() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block13() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block14() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block15() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block16() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block17() + { + // Arrange + var document = "

        "; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block18() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block19() + { + // Arrange + var document = "

        "; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block20() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block21() + { + // Arrange + var document = "

        "; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block22() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block23() + { + // Arrange + var document = "

        "; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block24() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block25() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block26() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block27() + { + // Arrange + var document = "

        "; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block28() + { + // Arrange + var document = ""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block29() + { + // Arrange + var document = "

        "; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block30() + { + // Arrange + var expressionString = "@DateTime.Now + 1"; + var document = $""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block31() + { + // Arrange + var expressionString = "@DateTime.Now + 1"; + var document = $"

        "; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block32() + { + // Arrange + var expressionString = "@DateTime.Now + 1"; + var document = $""; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_Block33() + { + // Arrange + var expressionString = "@DateTime.Now + 1"; + var document = $"

        "; + + // Wrap in a CSharp block + document = $"@{{{document}}}"; + + // Act & Assert + EvaluateData(MinimizedAttribute_Descriptors, document); + } + + [Fact] + public void UnderstandsMinimizedAttributes_PartialTags1() + { + EvaluateData(MinimizedAttribute_Descriptors, " + rule + .RequireTagName("input")) + .BoundAttributeDescriptor(attribute => + attribute + .Name("boundbool") + .PropertyName("BoundBoolProp") + .TypeName(typeof(bool).FullName)) + .BoundAttributeDescriptor(attribute => + attribute + .Name("boundbooldict") + .PropertyName("BoundBoolDictProp") + .TypeName("System.Collections.Generic.IDictionary") + .AsDictionary("boundbooldict-", typeof(bool).FullName)) + .Build(), + }; + + // Act & Assert + EvaluateData(descriptors, document); + } + + [Fact] + public void FeatureDisabled_AddsErrorForMinimizedBooleanBoundAttributes() + { + // Arrange + var document = ""; + var descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("InputTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("input")) + .BoundAttributeDescriptor(attribute => + attribute + .Name("boundbool") + .PropertyName("BoundBoolProp") + .TypeName(typeof(bool).FullName)) + .BoundAttributeDescriptor(attribute => + attribute + .Name("boundbooldict") + .PropertyName("BoundBoolDictProp") + .TypeName("System.Collections.Generic.IDictionary") + .AsDictionary("boundbooldict-", typeof(bool).FullName)) + .Build(), + }; + + var featureFlags = new TestRazorParserFeatureFlags(); + + // Act & Assert + EvaluateData(descriptors, document, featureFlags: featureFlags); + } + + private class TestRazorParserFeatureFlags : RazorParserFeatureFlags + { + public TestRazorParserFeatureFlags( + bool allowMinimizedBooleanTagHelperAttributes = false, + bool allowHtmlCommentsInTagHelper = false, + bool allowComponentFileKind = false, + bool allowRazorInCodeBlockDirectives = false, + bool allowUsingVariableDeclarations = false, + bool experimental_AllowConditionalDataDashAttributes = false) + { + AllowMinimizedBooleanTagHelperAttributes = allowMinimizedBooleanTagHelperAttributes; + AllowHtmlCommentsInTagHelpers = allowHtmlCommentsInTagHelper; + AllowComponentFileKind = allowComponentFileKind; + AllowRazorInAllCodeBlocks = allowRazorInCodeBlockDirectives; + AllowUsingVariableDeclarations = allowUsingVariableDeclarations; + EXPERIMENTAL_AllowConditionalDataDashAttributes = experimental_AllowConditionalDataDashAttributes; + } + + public override bool AllowMinimizedBooleanTagHelperAttributes { get; } + + public override bool AllowHtmlCommentsInTagHelpers { get; } + + public override bool AllowComponentFileKind { get; } + + public override bool AllowRazorInAllCodeBlocks { get; } + + public override bool AllowUsingVariableDeclarations { get; } + + public override bool EXPERIMENTAL_AllowConditionalDataDashAttributes { get; } + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperParseTreeRewriterTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperParseTreeRewriterTest.cs new file mode 100644 index 0000000000..e68eed561a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperParseTreeRewriterTest.cs @@ -0,0 +1,1884 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Syntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class TagHelperParseTreeRewriterTest : TagHelperRewritingTestBase + { + public static TheoryData GetAttributeNameValuePairsData + { + get + { + Func> kvp = + (key, value) => new KeyValuePair(key, value); + var empty = Enumerable.Empty>(); + var csharp = TagHelperParseTreeRewriter.Rewriter.InvalidAttributeValueMarker; + + // documentContent, expectedPairs + return new TheoryData>> + { + { "", empty }, + { "", empty }, + { "", new[] { kvp("href", csharp) } }, + { "", new[] { kvp("href", $"prefix{csharp} suffix") } }, + { "", new[] { kvp("href", "~/home") } }, + { "", new[] { kvp("href", "~/home") } }, + { + "", + new[] { kvp("href", $"{csharp}::0"), kvp("class", "btn btn-success"), kvp("random", "") } + }, + { "", new[] { kvp("href", "") } }, + { "> expectedPairs) + { + // Arrange + var errorSink = new ErrorSink(); + var parseResult = ParseDocument(documentContent); + var document = parseResult.Root; + var parseTreeRewriter = new TagHelperParseTreeRewriter.Rewriter( + parseResult.Source, + null, + Enumerable.Empty(), + parseResult.Options.FeatureFlags, + errorSink); + + // Assert - Guard + var rootBlock = Assert.IsType(document); + var rootMarkup = Assert.IsType(rootBlock.Document); + var childBlock = Assert.Single(rootMarkup.Children); + var element = Assert.IsType(childBlock); + Assert.Empty(errorSink.Errors); + + // Act + var pairs = parseTreeRewriter.GetAttributeNameValuePairs(element.StartTag); + + // Assert + Assert.Equal(expectedPairs, pairs); + } + + public static TagHelperDescriptor[] PartialRequiredParentTags_Descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("StrongTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("strong")) + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("div")) + .Build(), + TagHelperDescriptorBuilder.Create("CatchALlTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("*")) + .Build(), + TagHelperDescriptorBuilder.Create("PTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")) + .Build(), + }; + + [Fact] + public void UnderstandsPartialRequiredParentTags1() + { + var document = "

        "; + EvaluateData(PartialRequiredParentTags_Descriptors, document); + } + + [Fact] + public void UnderstandsPartialRequiredParentTags2() + { + var document = "

        "; + EvaluateData(PartialRequiredParentTags_Descriptors, document); + } + + [Fact] + public void UnderstandsPartialRequiredParentTags3() + { + var document = "

        "; + EvaluateData(PartialRequiredParentTags_Descriptors, document); + } + + [Fact] + public void UnderstandsPartialRequiredParentTags4() + { + var document = "<

        <

        "; + EvaluateData(PartialRequiredParentTags_Descriptors, document); + } + + [Fact] + public void UnderstandsPartialRequiredParentTags5() + { + var document = "<

        <

        "; + EvaluateData(PartialRequiredParentTags_Descriptors, document); + } + + [Fact] + public void UnderstandsPartialRequiredParentTags6() + { + var document = "<

        <

        "; + EvaluateData(PartialRequiredParentTags_Descriptors, document); + } + + public static TagHelperDescriptor[] NestedVoidSelfClosingRequiredParent_Descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("InputTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("input") + .RequireTagStructure(TagStructure.WithoutEndTag)) + .Build(), + TagHelperDescriptorBuilder.Create("StrongTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("strong") + .RequireParentTag("p")) + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("strong") + .RequireParentTag("input")) + .Build(), + TagHelperDescriptorBuilder.Create("PTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")) + .Build(), + }; + + [Fact] + public void UnderstandsNestedVoidSelfClosingRequiredParent1() + { + var document = ""; + EvaluateData(NestedVoidSelfClosingRequiredParent_Descriptors, document); + } + + [Fact] + public void UnderstandsNestedVoidSelfClosingRequiredParent2() + { + var document = "

        "; + EvaluateData(NestedVoidSelfClosingRequiredParent_Descriptors, document); + } + + [Fact] + public void UnderstandsNestedVoidSelfClosingRequiredParent3() + { + var document = "


        "; + EvaluateData(NestedVoidSelfClosingRequiredParent_Descriptors, document); + } + + [Fact] + public void UnderstandsNestedVoidSelfClosingRequiredParent4() + { + var document = "


        "; + EvaluateData(NestedVoidSelfClosingRequiredParent_Descriptors, document); + } + + [Fact] + public void UnderstandsNestedVoidSelfClosingRequiredParent5() + { + var document = ""; + EvaluateData(NestedVoidSelfClosingRequiredParent_Descriptors, document); + } + + [Fact] + public void UnderstandsNestedVoidSelfClosingRequiredParent6() + { + var document = "

        "; + EvaluateData(NestedVoidSelfClosingRequiredParent_Descriptors, document); + } + + [Fact] + public void UnderstandsNestedVoidSelfClosingRequiredParent7() + { + var document = "


        "; + EvaluateData(NestedVoidSelfClosingRequiredParent_Descriptors, document); + } + + [Fact] + public void UnderstandsNestedVoidSelfClosingRequiredParent8() + { + var document = "


        "; + EvaluateData(NestedVoidSelfClosingRequiredParent_Descriptors, document); + } + + public static TagHelperDescriptor[] NestedRequiredParent_Descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("StrongTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("strong") + .RequireParentTag("p")) + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("strong") + .RequireParentTag("div")) + .Build(), + TagHelperDescriptorBuilder.Create("PTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")) + .Build(), + }; + + [Fact] + public void UnderstandsNestedRequiredParent1() + { + var document = ""; + EvaluateData(NestedRequiredParent_Descriptors, document); + } + + [Fact] + public void UnderstandsNestedRequiredParent2() + { + var document = "

        "; + EvaluateData(NestedRequiredParent_Descriptors, document); + } + + [Fact] + public void UnderstandsNestedRequiredParent3() + { + var document = "
        "; + EvaluateData(NestedRequiredParent_Descriptors, document); + } + + [Fact] + public void UnderstandsNestedRequiredParent4() + { + var document = ""; + EvaluateData(NestedRequiredParent_Descriptors, document); + } + + [Fact] + public void UnderstandsNestedRequiredParent5() + { + var document = "

        "; + EvaluateData(NestedRequiredParent_Descriptors, document); + } + + [Fact] + public void UnderstandsTagHelperPrefixAndAllowedChildren() + { + // Arrange + var documentContent = ""; + var descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("PTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")) + .AllowChildTag("strong") + .Build(), + TagHelperDescriptorBuilder.Create("StrongTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("strong")) + .Build(), + }; + + // Act & Assert + EvaluateData( + descriptors, + documentContent, + tagHelperPrefix: "th:"); + } + + [Fact] + public void UnderstandsTagHelperPrefixAndAllowedChildrenAndRequireParent() + { + // Arrange + var documentContent = ""; + var descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("PTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")) + .AllowChildTag("strong") + .Build(), + TagHelperDescriptorBuilder.Create("StrongTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("strong").RequireParentTag("p")) + .Build(), + }; + + // Act & Assert + EvaluateData( + descriptors, + documentContent, + tagHelperPrefix: "th:"); + } + + [Fact] + public void InvalidStructure_UnderstandsTHPrefixAndAllowedChildrenAndRequireParent() + { + // Rewrite_InvalidStructure_UnderstandsTagHelperPrefixAndAllowedChildrenAndRequireParent + // Arrange + var documentContent = ""; + var descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("PTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")) + .AllowChildTag("strong") + .Build(), + TagHelperDescriptorBuilder.Create("StrongTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("strong").RequireParentTag("p")) + .Build(), + }; + + // Act & Assert + EvaluateData( + descriptors, + documentContent, + tagHelperPrefix: "th:"); + } + + [Fact] + public void NonTagHelperChild_UnderstandsTagHelperPrefixAndAllowedChildren() + { + // Arrange + var documentContent = ""; + var descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("PTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")) + .AllowChildTag("strong") + .Build(), + }; + + // Act & Assert + EvaluateData( + descriptors, + documentContent, + tagHelperPrefix: "th:"); + } + + [Fact] + public void DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags1() + { + var document = ""; + RunParseTreeRewriterTest(document, "input"); + } + + [Fact] + public void DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags2() + { + var document = ""; + RunParseTreeRewriterTest(document, "input"); + } + + [Fact] + public void DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags3() + { + var document = ""; + RunParseTreeRewriterTest(document, "input"); + } + + [Fact] + public void DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags4() + { + var document = ""; + RunParseTreeRewriterTest(document, "input"); + } + + [Fact] + public void UnderstandsTagHelpersInHtmlTypedScriptTags1() + { + var document = ""; + RunParseTreeRewriterTest(document, "p", "input"); + } + + [Fact] + public void UnderstandsTagHelpersInHtmlTypedScriptTags2() + { + var document = ""; + RunParseTreeRewriterTest(document, "p", "input"); + } + + [Fact] + public void UnderstandsTagHelpersInHtmlTypedScriptTags3() + { + var document = "

        "; + RunParseTreeRewriterTest(document, "p", "input"); + } + + [Fact] + public void UnderstandsTagHelpersInHtmlTypedScriptTags4() + { + var document = "

        "; + RunParseTreeRewriterTest(document, "p", "input"); + } + + [Fact] + public void CanHandleInvalidChildrenWithWhitespace() + { + // Arrange + var documentContent = $"

        {Environment.NewLine} {Environment.NewLine} Hello" + + $"{Environment.NewLine} {Environment.NewLine}

        "; + var descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("PTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")) + .AllowChildTag("br") + .Build() + }; + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void RecoversWhenRequiredAttributeMismatchAndRestrictedChildren() + { + // Arrange + var documentContent = ""; + var descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("StrongTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("strong") + .RequireAttributeDescriptor(attribute => attribute.Name("required"))) + .AllowChildTag("br") + .Build() + }; + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void CanHandleMultipleTagHelpersWithAllowedChildren_OneNull() + { + // Arrange + var documentContent = "

        Hello World

        "; + var descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("PTagHelper1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")) + .AllowChildTag("strong") + .AllowChildTag("br") + .Build(), + TagHelperDescriptorBuilder.Create("PTagHelper2", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")) + .Build(), + TagHelperDescriptorBuilder.Create("StrongTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("strong")) + .Build(), + TagHelperDescriptorBuilder.Create("BRTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("br") + .RequireTagStructure(TagStructure.WithoutEndTag)) + .Build(), + }; + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void CanHandleMultipleTagHelpersWithAllowedChildren() + { + // Arrange + var documentContent = "

        Hello World

        "; + var descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("PTagHelper1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")) + .AllowChildTag("strong") + .Build(), + TagHelperDescriptorBuilder.Create("PTagHelper2", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")) + .AllowChildTag("br") + .Build(), + TagHelperDescriptorBuilder.Create("StrongTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("strong")) + .Build(), + TagHelperDescriptorBuilder.Create("BRTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("br") + .RequireTagStructure(TagStructure.WithoutEndTag)) + .Build(), + }; + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void UnderstandsAllowedChildren1() + { + // Arrange + var documentContent = "


        "; + var descriptors = GetAllowedChildrenTagHelperDescriptors(new[] { "br" }); + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void UnderstandsAllowedChildren2() + { + // Arrange + var documentContent = $"

        {Environment.NewLine}
        {Environment.NewLine}

        "; + var descriptors = GetAllowedChildrenTagHelperDescriptors(new[] { "br" }); + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void UnderstandsAllowedChildren3() + { + // Arrange + var documentContent = "


        "; + var descriptors = GetAllowedChildrenTagHelperDescriptors(new[] { "strong" }); + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void UnderstandsAllowedChildren4() + { + // Arrange + var documentContent = "

        Hello

        "; + var descriptors = GetAllowedChildrenTagHelperDescriptors(new[] { "strong" }); + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void UnderstandsAllowedChildren5() + { + // Arrange + var documentContent = "


        "; + var descriptors = GetAllowedChildrenTagHelperDescriptors(new[] { "br", "strong" }); + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void UnderstandsAllowedChildren6() + { + // Arrange + var documentContent = "


        Hello

        "; + var descriptors = GetAllowedChildrenTagHelperDescriptors(new[] { "strong" }); + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void UnderstandsAllowedChildren7() + { + // Arrange + var documentContent = "

        Title:
        Something

        "; + var descriptors = GetAllowedChildrenTagHelperDescriptors(new[] { "strong" }); + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void UnderstandsAllowedChildren8() + { + // Arrange + var documentContent = "

        Title:
        Something

        "; + var descriptors = GetAllowedChildrenTagHelperDescriptors(new[] { "strong", "br" }); + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void UnderstandsAllowedChildren9() + { + // Arrange + var documentContent = "

        Title:
        Something

        "; + var descriptors = GetAllowedChildrenTagHelperDescriptors(new[] { "strong", "br" }); + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void UnderstandsAllowedChildren10() + { + // Arrange + var documentContent = "

        Title:
        A Very Cool

        Something

        "; + var descriptors = GetAllowedChildrenTagHelperDescriptors(new[] { "strong" }); + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void UnderstandsAllowedChildren11() + { + // Arrange + var documentContent = "

        Title:
        A Very Cool

        Something

        "; + var descriptors = GetAllowedChildrenTagHelperDescriptors(new[] { "custom" }); + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void UnderstandsAllowedChildren12() + { + // Arrange + var documentContent = "

        "; + var descriptors = GetAllowedChildrenTagHelperDescriptors(new[] { "custom" }); + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void UnderstandsAllowedChildren13() + { + // Arrange + var documentContent = "

        <

        "; + var descriptors = GetAllowedChildrenTagHelperDescriptors(new[] { "custom" }); + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void UnderstandsAllowedChildren14() + { + // Arrange + var documentContent = "


        :Hello:

        "; + var descriptors = GetAllowedChildrenTagHelperDescriptors(new[] { "custom", "strong" }); + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + private TagHelperDescriptor[] GetAllowedChildrenTagHelperDescriptors(string[] allowedChildren) + { + var pTagHelperBuilder = TagHelperDescriptorBuilder.Create("PTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")); + var strongTagHelperBuilder = TagHelperDescriptorBuilder.Create("StrongTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("strong")); + + foreach (var childTag in allowedChildren) + { + pTagHelperBuilder.AllowChildTag(childTag); + strongTagHelperBuilder.AllowChildTag(childTag); + } + var descriptors = new TagHelperDescriptor[] + { + pTagHelperBuilder.Build(), + strongTagHelperBuilder.Build(), + TagHelperDescriptorBuilder.Create("BRTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("br") + .RequireTagStructure(TagStructure.WithoutEndTag)) + .Build(), + }; + + return descriptors; + } + + [Fact] + public void AllowsSimpleHtmlCommentsAsChildren() + { + // Arrange + var allowedChildren = new List { "b" }; + var literal = "asdf"; + var commentOutput = "Hello World"; + var document = $"

        {literal}

        "; + + var pTagHelperBuilder = TagHelperDescriptorBuilder + .Create("PTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")); + foreach (var childTag in allowedChildren) + { + pTagHelperBuilder.AllowChildTag(childTag); + } + + var descriptors = new TagHelperDescriptor[] + { + pTagHelperBuilder.Build() + }; + + // Act & Assert + EvaluateData(descriptors, document); + } + + [Fact] + public void DoesntAllowSimpleHtmlCommentsAsChildrenWhenFeatureFlagIsOff() + { + // Arrange + var allowedChildren = new List { "b" }; + var comment1 = "Hello"; + var document = $"

        "; + + var pTagHelperBuilder = TagHelperDescriptorBuilder + .Create("PTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")); + foreach (var childTag in allowedChildren) + { + pTagHelperBuilder.AllowChildTag(childTag); + } + + var descriptors = new TagHelperDescriptor[] + { + pTagHelperBuilder.Build() + }; + + // Act & Assert + EvaluateData( + descriptors, + document, + featureFlags: RazorParserFeatureFlags.Create(RazorLanguageVersion.Version_2_0)); + } + + [Fact] + public void FailsForContentWithCommentsAsChildren() + { + // Arrange + var allowedChildren = new List { "b" }; + var comment1 = "Hello"; + var literal = "asdf"; + var comment2 = "World"; + var document = $"

        {literal}

        "; + + var pTagHelperBuilder = TagHelperDescriptorBuilder + .Create("PTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")); + foreach (var childTag in allowedChildren) + { + pTagHelperBuilder.AllowChildTag(childTag); + } + + var descriptors = new TagHelperDescriptor[] + { + pTagHelperBuilder.Build() + }; + + // Act & Assert + EvaluateData(descriptors, document); + } + + [Fact] + public void AllowsRazorCommentsAsChildren() + { + // Arrange + var allowedChildren = new List { "b" }; + var literal = "asdf"; + var commentOutput = $"@*{literal}*@"; + var document = $"

        {literal}{commentOutput}

        "; + + var pTagHelperBuilder = TagHelperDescriptorBuilder + .Create("PTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")); + foreach (var childTag in allowedChildren) + { + pTagHelperBuilder.AllowChildTag(childTag); + } + + var descriptors = new TagHelperDescriptor[] + { + pTagHelperBuilder.Build() + }; + + // Act & Assert + EvaluateData(descriptors, document); + } + + [Fact] + public void AllowsRazorMarkupInHtmlComment() + { + // Arrange + var allowedChildren = new List { "b" }; + var literal = "asdf"; + var part1 = "Hello "; + var part2 = "World"; + var commentStart = ""; + var document = $"

        {literal}{commentStart}{part1}@{part2}{commentEnd}

        "; + + var pTagHelperBuilder = TagHelperDescriptorBuilder + .Create("PTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")); + foreach (var childTag in allowedChildren) + { + pTagHelperBuilder.AllowChildTag(childTag); + } + + var descriptors = new TagHelperDescriptor[] + { + pTagHelperBuilder.Build() + }; + + // Act & Assert + EvaluateData(descriptors, document); + } + + [Fact] + public void UnderstandsNullTagNameWithAllowedChildrenForCatchAll() + { + // Arrange + var documentContent = "

        "; + var descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("PTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")) + .AllowChildTag("custom") + .Build(), + TagHelperDescriptorBuilder.Create("CatchAllTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("*")) + .Build(), + }; + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void UnderstandsNullTagNameWithAllowedChildrenForCatchAllWithPrefix() + { + // Arrange + var documentContent = ""; + var descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("PTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")) + .AllowChildTag("custom") + .Build(), + TagHelperDescriptorBuilder.Create("CatchAllTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("*")) + .Build(), + }; + + // Act & Assert + EvaluateData(descriptors, documentContent, "th:"); + } + + [Fact] + public void CanHandleStartTagOnlyTagTagMode() + { + // Arrange + var documentContent = ""; + var descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("InputTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("input") + .RequireTagStructure(TagStructure.WithoutEndTag)) + .Build() + }; + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void CreatesErrorForWithoutEndTagTagStructureForEndTags() + { + // Arrange + var documentContent = ""; + var descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("InputTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("input") + .RequireTagStructure(TagStructure.WithoutEndTag)) + .Build() + }; + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + [Fact] + public void CreatesErrorForInconsistentTagStructures() + { + // Arrange + var documentContent = ""; + var descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("InputTagHelper1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("input") + .RequireTagStructure(TagStructure.WithoutEndTag)) + .Build(), + TagHelperDescriptorBuilder.Create("InputTagHelper2", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("input") + .RequireTagStructure(TagStructure.NormalOrSelfClosing)) + .Build() + }; + + // Act & Assert + EvaluateData(descriptors, documentContent); + } + + public static TagHelperDescriptor[] RequiredAttribute_Descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("pTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("p") + .RequireAttributeDescriptor(attribute => attribute.Name("class"))) + .Build(), + TagHelperDescriptorBuilder.Create("divTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("div") + .RequireAttributeDescriptor(attribute => attribute.Name("class")) + .RequireAttributeDescriptor(attribute => attribute.Name("style"))) + .Build(), + TagHelperDescriptorBuilder.Create("catchAllTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("*") + .RequireAttributeDescriptor(attribute => attribute.Name("catchAll"))) + .Build() + }; + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1() + { + EvaluateData(RequiredAttribute_Descriptors, "

        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2() + { + EvaluateData(RequiredAttribute_Descriptors, "

        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3() + { + EvaluateData(RequiredAttribute_Descriptors, "
        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4() + { + EvaluateData(RequiredAttribute_Descriptors, "
        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5() + { + EvaluateData(RequiredAttribute_Descriptors, "

        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6() + { + EvaluateData(RequiredAttribute_Descriptors, "

        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7() + { + EvaluateData(RequiredAttribute_Descriptors, "

        words and spaces

        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8() + { + EvaluateData(RequiredAttribute_Descriptors, "

        words and spaces

        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9() + { + EvaluateData(RequiredAttribute_Descriptors, "

        wordsandspaces

        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10() + { + EvaluateData(RequiredAttribute_Descriptors, ""); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly11() + { + EvaluateData(RequiredAttribute_Descriptors, ""); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly12() + { + EvaluateData(RequiredAttribute_Descriptors, "words and spaces"); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly13() + { + EvaluateData(RequiredAttribute_Descriptors, "words and spaces"); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly14() + { + EvaluateData(RequiredAttribute_Descriptors, "
        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly15() + { + EvaluateData(RequiredAttribute_Descriptors, "
        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly16() + { + EvaluateData(RequiredAttribute_Descriptors, "

        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly17() + { + EvaluateData(RequiredAttribute_Descriptors, "

        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly18() + { + EvaluateData(RequiredAttribute_Descriptors, "

        words and spaces

        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly19() + { + EvaluateData(RequiredAttribute_Descriptors, "
        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly20() + { + EvaluateData(RequiredAttribute_Descriptors, "
        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly21() + { + EvaluateData(RequiredAttribute_Descriptors, "
        words and spaces
        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly22() + { + EvaluateData(RequiredAttribute_Descriptors, "
        words and spaces
        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly23() + { + EvaluateData(RequiredAttribute_Descriptors, "
        wordsandspaces
        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly24() + { + EvaluateData(RequiredAttribute_Descriptors, "

        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly25() + { + EvaluateData(RequiredAttribute_Descriptors, "

        words and spaces

        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly26() + { + EvaluateData(RequiredAttribute_Descriptors, "
        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly27() + { + EvaluateData(RequiredAttribute_Descriptors, "
        words and spaces
        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly28() + { + EvaluateData(RequiredAttribute_Descriptors, "
        words and spaces
        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly29() + { + EvaluateData(RequiredAttribute_Descriptors, "
        words and spaces
        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly30() + { + EvaluateData(RequiredAttribute_Descriptors, "
        wordsandspaces
        "); + } + + public static TagHelperDescriptor[] NestedRequiredAttribute_Descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("pTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("p") + .RequireAttributeDescriptor(attribute => attribute.Name("class"))) + .Build(), + TagHelperDescriptorBuilder.Create("catchAllTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("*") + .RequireAttributeDescriptor(attribute => attribute.Name("catchAll"))) + .Build(), + }; + + [Fact] + public void NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1() + { + EvaluateData(NestedRequiredAttribute_Descriptors, "

        "); + } + + [Fact] + public void NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2() + { + EvaluateData(NestedRequiredAttribute_Descriptors, ""); + } + + [Fact] + public void NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3() + { + EvaluateData(NestedRequiredAttribute_Descriptors, "

        "); + } + + [Fact] + public void NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4() + { + EvaluateData(NestedRequiredAttribute_Descriptors, "

        "); + } + + [Fact] + public void NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5() + { + EvaluateData(NestedRequiredAttribute_Descriptors, "

        "); + } + + [Fact] + public void NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6() + { + EvaluateData(NestedRequiredAttribute_Descriptors, "

        "); + } + + [Fact] + public void NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7() + { + EvaluateData(NestedRequiredAttribute_Descriptors, "

        "); + } + + [Fact] + public void NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8() + { + EvaluateData(NestedRequiredAttribute_Descriptors, ""); + } + + [Fact] + public void NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9() + { + EvaluateData(NestedRequiredAttribute_Descriptors, "

        "); + } + + [Fact] + public void NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10() + { + EvaluateData(NestedRequiredAttribute_Descriptors, ""); + } + + public static TagHelperDescriptor[] MalformedRequiredAttribute_Descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("pTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("p") + .RequireAttributeDescriptor(attribute => attribute.Name("class"))) + .Build(), + }; + + [Fact] + public void RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly1() + { + EvaluateData(MalformedRequiredAttribute_Descriptors, ""); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8() + { + EvaluateData(MalformedRequiredAttribute_Descriptors, "

        "); + } + + [Fact] + public void RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9() + { + EvaluateData(MalformedRequiredAttribute_Descriptors, "

        rule.RequireTagName("myth")) + .Build(), + TagHelperDescriptorBuilder.Create("mythTagHelper2", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("myth2")) + .BoundAttributeDescriptor(attribute => + attribute + .Name("bound") + .PropertyName("Bound") + .TypeName(typeof(bool).FullName)) + .Build() + }; + + public static TagHelperDescriptor[] PrefixedTagHelperCatchAll_Descriptors = new TagHelperDescriptor[] + { + TagHelperDescriptorBuilder.Create("mythTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("*")) + .Build(), + }; + + [Fact] + public void AllowsPrefixedTagHelpers1() + { + EvaluateData(PrefixedTagHelperCatchAll_Descriptors, "", tagHelperPrefix: "th:"); + } + + [Fact] + public void AllowsPrefixedTagHelpers2() + { + EvaluateData(PrefixedTagHelperCatchAll_Descriptors, "words and spaces", tagHelperPrefix: "th:"); + } + + [Fact] + public void AllowsPrefixedTagHelpers3() + { + EvaluateData(PrefixedTagHelperColon_Descriptors, "", tagHelperPrefix: "th:"); + } + + [Fact] + public void AllowsPrefixedTagHelpers4() + { + EvaluateData(PrefixedTagHelperColon_Descriptors, "", tagHelperPrefix: "th:"); + } + + [Fact] + public void AllowsPrefixedTagHelpers5() + { + EvaluateData(PrefixedTagHelperColon_Descriptors, "", tagHelperPrefix: "th:"); + } + + [Fact] + public void AllowsPrefixedTagHelpers6() + { + EvaluateData(PrefixedTagHelperColon_Descriptors, "", tagHelperPrefix: "th:"); + } + + [Fact] + public void AllowsPrefixedTagHelpers7() + { + EvaluateData(PrefixedTagHelperColon_Descriptors, "", tagHelperPrefix: "th:"); + } + + [Fact] + public void AllowsPrefixedTagHelpers8() + { + EvaluateData(PrefixedTagHelperColon_Descriptors, "", tagHelperPrefix: "th:"); + } + + [Fact] + public void AllowsPrefixedTagHelpers9() + { + EvaluateData(PrefixedTagHelperColon_Descriptors, "", tagHelperPrefix: "th:"); + } + + [Fact] + public void AllowsPrefixedTagHelpers10() + { + EvaluateData(PrefixedTagHelperColon_Descriptors, "words and spaces", tagHelperPrefix: "th:"); + } + + [Fact] + public void AllowsPrefixedTagHelpers11() + { + EvaluateData(PrefixedTagHelperColon_Descriptors, "", tagHelperPrefix: "th:"); + } + + [Fact] + public void AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag1() + { + RunParseTreeRewriterTest("@{}", "p", "text"); + } + + [Fact] + public void AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag2() + { + RunParseTreeRewriterTest("@{}", "p", "text"); + } + + [Fact] + public void AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag3() + { + RunParseTreeRewriterTest("@{words with spaces}", "p", "text"); + } + + [Fact] + public void AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag4() + { + RunParseTreeRewriterTest("@{}", "p", "text"); + } + + [Fact] + public void AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag5() + { + RunParseTreeRewriterTest("@{}", "p", "text"); + } + + [Fact] + public void AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag1() + { + RunParseTreeRewriterTest("@{}", "p", "text"); + } + + [Fact] + public void AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag2() + { + RunParseTreeRewriterTest("@{}", "p", "text"); + } + + [Fact] + public void AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag3() + { + RunParseTreeRewriterTest("@{}", "p", "text"); + } + + [Fact] + public void AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag4() + { + RunParseTreeRewriterTest("@{words and spaces}", "p", "text"); + } + + [Fact] + public void AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag5() + { + RunParseTreeRewriterTest("@{}", "p", "text"); + } + + [Fact] + public void AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag6() + { + RunParseTreeRewriterTest("@{}", "p", "text"); + } + + [Fact] + public void AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag7() + { + RunParseTreeRewriterTest("@{}", "p", "text"); + } + + [Fact] + public void AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag8() + { + RunParseTreeRewriterTest("@{}", "p", "text"); + } + + [Fact] + public void AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag9() + { + RunParseTreeRewriterTest("@{}", "p", "text"); + } + + [Fact] + public void AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock1() + { + RunParseTreeRewriterTest("@{}", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutCSharp_WithBlockData2() + { + RunParseTreeRewriterTest("@{}", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutCSharp_WithBlockData3() + { + RunParseTreeRewriterTest("@{}", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutCSharp_WithBlockData4() + { + RunParseTreeRewriterTest("@{words and spaces}", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutCSharp_WithBlockData5() + { + RunParseTreeRewriterTest("@{

        }", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutCSharp_WithBlockData6() + { + RunParseTreeRewriterTest("@{

        }", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutCSharp_WithBlockData7() + { + RunParseTreeRewriterTest("@{

        }", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutCSharp_WithBlockData8() + { + RunParseTreeRewriterTest("@{

        }", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutCSharp_WithBlockData9() + { + RunParseTreeRewriterTest("@{

        }", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutCSharp_WithBlockData10() + { + RunParseTreeRewriterTest("@{}", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutCSharp_WithBlockData11() + { + RunParseTreeRewriterTest("@{}", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutCSharp_WithBlockData12() + { + RunParseTreeRewriterTest("@{

        }", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutCSharp_WithAttributeData1() + { + RunParseTreeRewriterTest("@{}", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutCSharp_WithAttributeData2() + { + RunParseTreeRewriterTest("@{}", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutCSharp_WithAttributeData3() + { + RunParseTreeRewriterTest("@{words with spaces}", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutCSharp_WithAttributeData4() + { + RunParseTreeRewriterTest("@{}", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutCSharp_WithAttributeData5() + { + RunParseTreeRewriterTest("@{}", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutHTML_WithBlockData1() + { + RunParseTreeRewriterTest("", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutHTML_WithBlockData2() + { + RunParseTreeRewriterTest("", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutHTML_WithBlockData3() + { + RunParseTreeRewriterTest("", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutHTML_WithBlockData4() + { + RunParseTreeRewriterTest("words and spaces", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutHTML_WithBlockData5() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutHTML_WithBlockData6() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutHTML_WithBlockData7() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutHTML_WithBlockData8() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutHTML_WithBlockData9() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutHTML_WithBlockData10() + { + RunParseTreeRewriterTest("", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutHTML_WithBlockData11() + { + RunParseTreeRewriterTest("", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutHTML_WithBlockData12() + { + RunParseTreeRewriterTest("

        ", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutHTML_WithAttributeData1() + { + RunParseTreeRewriterTest("", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutHTML_WithAttributeData2() + { + RunParseTreeRewriterTest("", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutHTML_WithAttributeData3() + { + RunParseTreeRewriterTest("words and spaces", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutHTML_WithAttributeData4() + { + RunParseTreeRewriterTest("", "strong", "p"); + } + + [Fact] + public void AllowsTagHelperElementOptOutHTML_WithAttributeData5() + { + RunParseTreeRewriterTest("", "strong", "p"); + } + + [Fact] + public void DoesNotRewriteTextTagTransitionTagHelpers1() + { + RunParseTreeRewriterTest("Hello World", "p", "text"); + } + + [Fact] + public void DoesNotRewriteTextTagTransitionTagHelpers2() + { + RunParseTreeRewriterTest("@{Hello World}", "p", "text"); + } + + [Fact] + public void DoesNotRewriteTextTagTransitionTagHelpers3() + { + RunParseTreeRewriterTest("@{

        Hello World

        }", "p", "text"); + } + + [Fact] + public void DoesNotRewriteTextTagTransitionTagHelpers4() + { + RunParseTreeRewriterTest("@{

        Hello World

        }", "p", "text"); + } + + [Fact] + public void DoesNotRewriteSpecialTagTagHelpers1() + { + RunParseTreeRewriterTest("", "!--", "?xml", "![CDATA[", "!DOCTYPE"); + } + + [Fact] + public void DoesNotRewriteSpecialTagTagHelpers2() + { + RunParseTreeRewriterTest("", "!--", "?xml", "![CDATA[", "!DOCTYPE"); + } + + [Fact] + public void DoesNotRewriteSpecialTagTagHelpers3() + { + RunParseTreeRewriterTest("", "!--", "?xml", "![CDATA[", "!DOCTYPE"); + } + + [Fact] + public void DoesNotRewriteSpecialTagTagHelpers4() + { + RunParseTreeRewriterTest("", "!--", "?xml", "![CDATA[", "!DOCTYPE"); + } + + [Fact] + public void DoesNotRewriteSpecialTagTagHelpers5() + { + RunParseTreeRewriterTest("", "!--", "?xml", "![CDATA[", "!DOCTYPE"); + } + + [Fact] + public void DoesNotRewriteSpecialTagTagHelpers6() + { + RunParseTreeRewriterTest("", "!--", "?xml", "![CDATA[", "!DOCTYPE"); + } + + [Fact] + public void DoesNotRewriteSpecialTagTagHelpers7() + { + RunParseTreeRewriterTest("", "!--", "?xml", "![CDATA[", "!DOCTYPE"); + } + + [Fact] + public void DoesNotRewriteSpecialTagTagHelpers8() + { + RunParseTreeRewriterTest("", "!--", "?xml", "![CDATA[", "!DOCTYPE"); + } + + [Fact] + public void RewritesNestedTagHelperTagBlocks1() + { + RunParseTreeRewriterTest("

        ", "p", "div"); + } + + [Fact] + public void RewritesNestedTagHelperTagBlocks2() + { + RunParseTreeRewriterTest("

        Hello World

        ", "p", "div"); + } + + [Fact] + public void RewritesNestedTagHelperTagBlocks3() + { + RunParseTreeRewriterTest("

        Hel

        lo

        World

        ", "p", "div"); + } + + [Fact] + public void RewritesNestedTagHelperTagBlocks4() + { + RunParseTreeRewriterTest("

        Hello

        World

        ", "p", "div"); + } + + [Fact] + public void HandlesMalformedNestedNonTagHelperTags_Correctly() + { + RunParseTreeRewriterTest("
        @{
        }"); + } + + [Fact] + public void HandlesNonTagHelperStartAndEndVoidTags_Correctly() + { + RunParseTreeRewriterTest("Foo"); + } + } +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperRewritingTestBase.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperRewritingTestBase.cs new file mode 100644 index 0000000000..febc0663a5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TagHelperRewritingTestBase.cs @@ -0,0 +1,45 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Collections.Generic; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class TagHelperRewritingTestBase : ParserTestBase + { + internal void RunParseTreeRewriterTest(string documentContent, params string[] tagNames) + { + var descriptors = BuildDescriptors(tagNames); + + EvaluateData(descriptors, documentContent); + } + + internal IEnumerable BuildDescriptors(params string[] tagNames) + { + var descriptors = new List(); + + foreach (var tagName in tagNames) + { + var descriptor = TagHelperDescriptorBuilder.Create(tagName + "taghelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName(tagName)) + .Build(); + descriptors.Add(descriptor); + } + + return descriptors; + } + + internal void EvaluateData( + IEnumerable descriptors, + string documentContent, + string tagHelperPrefix = null, + RazorParserFeatureFlags featureFlags = null) + { + var syntaxTree = ParseDocument(documentContent, featureFlags: featureFlags); + + var rewrittenTree = TagHelperParseTreeRewriter.Rewrite(syntaxTree, tagHelperPrefix, descriptors); + + BaselineTest(rewrittenTree); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TextReaderExtensionsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TextReaderExtensionsTest.cs new file mode 100644 index 0000000000..e95878c148 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TextReaderExtensionsTest.cs @@ -0,0 +1,113 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.IO; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class TextReaderExtensionsTest + { + [Fact] + public void ReadUntilWithCharReadsAllTextUpToSpecifiedCharacterButNotPast() + { + RunReaderTest("foo bar baz @biz", "foo bar baz ", '@', r => r.ReadUntil('@')); + } + + [Fact] + public void ReadUntilWithCharWithInclusiveFlagReadsAllTextUpToSpecifiedCharacterButNotPastIfInclusiveFalse() + { + RunReaderTest("foo bar baz @biz", "foo bar baz ", '@', r => r.ReadUntil('@', inclusive: false)); + } + + [Fact] + public void ReadUntilWithCharWithInclusiveFlagReadsAllTextUpToAndIncludingSpecifiedCharacterIfInclusiveTrue() + { + RunReaderTest("foo bar baz @biz", "foo bar baz @", 'b', r => r.ReadUntil('@', inclusive: true)); + } + + [Fact] + public void ReadUntilWithCharReadsToEndIfSpecifiedCharacterNotFound() + { + RunReaderTest("foo bar baz", "foo bar baz", -1, r => r.ReadUntil('@')); + } + + [Fact] + public void ReadUntilWithMultipleTerminatorsReadsUntilAnyTerminatorIsFound() + { + RunReaderTest("", " r.ReadUntil('/', '>')); + } + + [Fact] + public void ReadUntilWithMultipleTerminatorsHonorsInclusiveFlagWhenFalse() + { + // NOTE: Using named parameters would be difficult here, hence the inline comment + RunReaderTest("", " r.ReadUntil(/* inclusive */ false, '/', '>')); + } + + [Fact] + public void ReadUntilWithMultipleTerminatorsHonorsInclusiveFlagWhenTrue() + { + // NOTE: Using named parameters would be difficult here, hence the inline comment + RunReaderTest("", "', r => r.ReadUntil(/* inclusive */ true, '/', '>')); + } + + [Fact] + public void ReadUntilWithPredicateStopsWhenPredicateIsTrue() + { + RunReaderTest("foo bar baz 0 zoop zork zoink", "foo bar baz ", '0', r => r.ReadUntil(c => Char.IsDigit(c))); + } + + [Fact] + public void ReadUntilWithPredicateHonorsInclusiveFlagWhenFalse() + { + RunReaderTest("foo bar baz 0 zoop zork zoink", "foo bar baz ", '0', r => r.ReadUntil(c => Char.IsDigit(c), inclusive: false)); + } + + [Fact] + public void ReadUntilWithPredicateHonorsInclusiveFlagWhenTrue() + { + RunReaderTest("foo bar baz 0 zoop zork zoink", "foo bar baz 0", ' ', r => r.ReadUntil(c => Char.IsDigit(c), inclusive: true)); + } + + [Fact] + public void ReadWhileWithPredicateStopsWhenPredicateIsFalse() + { + RunReaderTest("012345a67890", "012345", 'a', r => r.ReadWhile(c => Char.IsDigit(c))); + } + + [Fact] + public void ReadWhileWithPredicateHonorsInclusiveFlagWhenFalse() + { + RunReaderTest("012345a67890", "012345", 'a', r => r.ReadWhile(c => Char.IsDigit(c), inclusive: false)); + } + + [Fact] + public void ReadWhileWithPredicateHonorsInclusiveFlagWhenTrue() + { + RunReaderTest("012345a67890", "012345a", '6', r => r.ReadWhile(c => Char.IsDigit(c), inclusive: true)); + } + + private static void RunReaderTest(string testString, string expectedOutput, int expectedPeek, Func action) + { + // Arrange + var reader = new StringReader(testString); + + // Act + var read = action(reader); + + // Assert + Assert.Equal(expectedOutput, read); + + if (expectedPeek == -1) + { + Assert.True(reader.Peek() == -1, "Expected that the reader would be positioned at the end of the input stream"); + } + else + { + Assert.Equal((char)expectedPeek, (char)reader.Peek()); + } + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TokenizerLookaheadTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TokenizerLookaheadTest.cs new file mode 100644 index 0000000000..655a88d14a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TokenizerLookaheadTest.cs @@ -0,0 +1,217 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class TokenizerLookaheadTest : HtmlTokenizerTestBase + { + [Fact] + public void Lookahead_MaintainsExistingBufferWhenRejected() + { + // Arrange + var tokenizer = new ExposedTokenizer("01234"); + tokenizer.Buffer.Append("pre-existing values"); + + // Act + var result = tokenizer.Lookahead("0x", takeIfMatch: true, caseSensitive: true); + + // Assert + Assert.False(result); + Assert.Equal("pre-existing values", tokenizer.Buffer.ToString(), StringComparer.Ordinal); + } + + [Fact] + public void Lookahead_AddsToExistingBufferWhenSuccessfulAndTakeIfMatchIsTrue() + { + // Arrange + var tokenizer = new ExposedTokenizer("0x1234"); + tokenizer.Buffer.Append("pre-existing values"); + + // Act + var result = tokenizer.Lookahead("0x", takeIfMatch: true, caseSensitive: true); + + // Assert + Assert.True(result); + Assert.Equal("pre-existing values0x", tokenizer.Buffer.ToString(), StringComparer.Ordinal); + } + + [Fact] + public void Lookahead_MaintainsExistingBufferWhenSuccessfulAndTakeIfMatchIsFalse() + { + // Arrange + var tokenizer = new ExposedTokenizer("0x1234"); + tokenizer.Buffer.Append("pre-existing values"); + + // Act + var result = tokenizer.Lookahead("0x", takeIfMatch: false, caseSensitive: true); + + // Assert + Assert.True(result); + Assert.Equal("pre-existing values", tokenizer.Buffer.ToString(), StringComparer.Ordinal); + } + + [Fact] + public void LookaheadUntil_PassesThePreviousTokensInTheSameOrder() + { + // Arrange + var tokenizer = CreateContentTokenizer("asdf--fvd--<"); + + // Act + var i = 3; + IEnumerable previousTokens = null; + var tokenFound = tokenizer.LookaheadUntil((s, p) => + { + previousTokens = p; + return --i == 0; + }); + + // Assert + Assert.Equal(4, previousTokens.Count()); + + // For the very first element, there will be no previous items, so null is expected + var orderIndex = 0; + Assert.Null(previousTokens.ElementAt(orderIndex++)); + AssertTokenEqual(SyntaxFactory.Token(SyntaxKind.Text, "asdf"), previousTokens.ElementAt(orderIndex++)); + AssertTokenEqual(SyntaxFactory.Token(SyntaxKind.DoubleHyphen, "--"), previousTokens.ElementAt(orderIndex++)); + AssertTokenEqual(SyntaxFactory.Token(SyntaxKind.Text, "fvd"), previousTokens.ElementAt(orderIndex++)); + } + + [Fact] + public void LookaheadUntil_ReturnsFalseAfterIteratingOverAllTokensIfConditionIsNotMet() + { + // Arrange + var tokenizer = CreateContentTokenizer("asdf--fvd"); + + // Act + var tokens = new Stack(); + var tokenFound = tokenizer.LookaheadUntil((s, p) => + { + tokens.Push(s); + return false; + }); + + // Assert + Assert.False(tokenFound); + Assert.Equal(3, tokens.Count); + AssertTokenEqual(SyntaxFactory.Token(SyntaxKind.Text, "fvd"), tokens.Pop()); + AssertTokenEqual(SyntaxFactory.Token(SyntaxKind.DoubleHyphen, "--"), tokens.Pop()); + AssertTokenEqual(SyntaxFactory.Token(SyntaxKind.Text, "asdf"), tokens.Pop()); + } + + [Fact] + public void LookaheadUntil_ReturnsTrueAndBreaksIteration() + { + // Arrange + var tokenizer = CreateContentTokenizer("asdf--fvd"); + + // Act + var tokens = new Stack(); + var tokenFound = tokenizer.LookaheadUntil((s, p) => + { + tokens.Push(s); + return s.Kind == SyntaxKind.DoubleHyphen; + }); + + // Assert + Assert.True(tokenFound); + Assert.Equal(2, tokens.Count); + AssertTokenEqual(SyntaxFactory.Token(SyntaxKind.DoubleHyphen, "--"), tokens.Pop()); + AssertTokenEqual(SyntaxFactory.Token(SyntaxKind.Text, "asdf"), tokens.Pop()); + } + + private static TestTokenizerBackedParser CreateContentTokenizer(string content) + { + var source = TestRazorSourceDocument.Create(content); + var options = RazorParserOptions.CreateDefault(); + var context = new ParserContext(source, options); + + var tokenizer = new TestTokenizerBackedParser(HtmlLanguageCharacteristics.Instance, context); + return tokenizer; + } + + private static void AssertTokenEqual(SyntaxToken expected, SyntaxToken actual) + { + Assert.True(expected.IsEquivalentTo(actual), "Tokens not equal."); + } + + private class ExposedTokenizer : Tokenizer + { + public ExposedTokenizer(string input) + : base(new SeekableTextReader(input, filePath: null)) + { + } + + public new StringBuilder Buffer + { + get + { + return base.Buffer; + } + } + + public override SyntaxKind RazorCommentStarKind + { + get + { + throw new NotImplementedException(); + } + } + + public override SyntaxKind RazorCommentTransitionKind + { + get + { + throw new NotImplementedException(); + } + } + + public override SyntaxKind RazorCommentKind + { + get + { + throw new NotImplementedException(); + } + } + + protected override int StartState + { + get + { + throw new NotImplementedException(); + } + } + + protected override SyntaxToken CreateToken( + string content, + SyntaxKind type, + IReadOnlyList errors) + { + throw new NotImplementedException(); + } + + protected override StateResult Dispatch() + { + throw new NotImplementedException(); + } + } + + private class TestTokenizerBackedParser : TokenizerBackedParser + { + internal TestTokenizerBackedParser(LanguageCharacteristics language, ParserContext context) : base(language, context) + { + } + + internal new bool LookaheadUntil(Func, bool> condition) + { + return base.LookaheadUntil(condition); + } + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TokenizerTestBase.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TokenizerTestBase.cs new file mode 100644 index 0000000000..21ccddba3b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/TokenizerTestBase.cs @@ -0,0 +1,71 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Diagnostics; +using System.Text; +using Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public abstract class TokenizerTestBase + { + internal abstract object IgnoreRemaining { get; } + internal abstract object CreateTokenizer(ITextDocument source); + + internal void TestTokenizer(string input, params SyntaxToken[] expectedSymbols) + { + // Arrange + var success = true; + var output = new StringBuilder(); + using (var source = new SeekableTextReader(input, filePath: null)) + { + var tokenizer = (Tokenizer)CreateTokenizer(source); + var counter = 0; + SyntaxToken current = null; + while ((current = tokenizer.NextToken()) != null) + { + if (counter >= expectedSymbols.Length) + { + output.AppendLine(string.Format("F: Expected: << Nothing >>; Actual: {0}", current)); + success = false; + } + else if (ReferenceEquals(expectedSymbols[counter], IgnoreRemaining)) + { + output.AppendLine(string.Format("P: Ignored |{0}|", current)); + } + else + { + if (!expectedSymbols[counter].IsEquivalentTo(current)) + { + output.AppendLine(string.Format("F: Expected: {0}; Actual: {1}", expectedSymbols[counter], current)); + success = false; + } + else + { + output.AppendLine(string.Format("P: Expected: {0}", expectedSymbols[counter])); + } + counter++; + } + } + if (counter < expectedSymbols.Length && !ReferenceEquals(expectedSymbols[counter], IgnoreRemaining)) + { + success = false; + for (; counter < expectedSymbols.Length; counter++) + { + output.AppendLine(string.Format("F: Expected: {0}; Actual: << None >>", expectedSymbols[counter])); + } + } + } + Assert.True(success, Environment.NewLine + output.ToString()); + WriteTraceLine(output.Replace("{", "{{").Replace("}", "}}").ToString()); + } + + [Conditional("PARSER_TRACE")] + private static void WriteTraceLine(string format, params object[] args) + { + Trace.WriteLine(string.Format(format, args)); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/WhiteSpaceRewriterTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/WhiteSpaceRewriterTest.cs new file mode 100644 index 0000000000..4bc69b6d7c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Legacy/WhiteSpaceRewriterTest.cs @@ -0,0 +1,37 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Legacy +{ + public class WhiteSpaceRewriterTest : ParserTestBase + { + [Fact] + public void Moves_Whitespace_Preceeding_ExpressionBlock_To_Parent_Block() + { + // Arrange + var content = @" +
        + @result +
        +
        + @(result) +
        "; + var parsed = ParseDocument( + RazorLanguageVersion.Latest, + content, + Array.Empty()); + + var rewriter = new WhitespaceRewriter(); + + // Act + var rewritten = rewriter.Visit(parsed.Root); + + // Assert + var rewrittenTree = RazorSyntaxTree.Create(rewritten, parsed.Source, parsed.Diagnostics, parsed.Options); + BaselineTest(rewrittenTree); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Microsoft.AspNetCore.Razor.Language.Test.csproj b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Microsoft.AspNetCore.Razor.Language.Test.csproj new file mode 100644 index 0000000000..4430c2e13b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Microsoft.AspNetCore.Razor.Language.Test.csproj @@ -0,0 +1,26 @@ + + + + $(StandardTestTfms) + $(DefaultItemExcludes);TestFiles\**\* + $(DefineConstants);GENERATE_BASELINES + + + + + + + + + + + + + + + + + + + + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Properties/AssemblyInfo.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..3337ebeac2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/Properties/AssemblyInfo.cs @@ -0,0 +1,6 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorCodeDocumentExtensionsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorCodeDocumentExtensionsTest.cs new file mode 100644 index 0000000000..9cf25fbeed --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorCodeDocumentExtensionsTest.cs @@ -0,0 +1,382 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Razor.Language.Intermediate; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class RazorCodeDocumentExtensionsTest + { + [Fact] + public void GetRazorSyntaxTree_ReturnsSyntaxTree() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + var expected = RazorSyntaxTree.Parse(codeDocument.Source); + codeDocument.Items[typeof(RazorSyntaxTree)] = expected; + + // Act + var actual = codeDocument.GetSyntaxTree(); + + // Assert + Assert.Same(expected, actual); + } + + [Fact] + public void SetRazorSyntaxTree_SetsSyntaxTree() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + var expected = RazorSyntaxTree.Parse(codeDocument.Source); + + // Act + codeDocument.SetSyntaxTree(expected); + + // Assert + Assert.Same(expected, codeDocument.Items[typeof(RazorSyntaxTree)]); + } + + [Fact] + public void GetAndSetImportSyntaxTrees_ReturnsSyntaxTrees() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + var expected = new[] { RazorSyntaxTree.Parse(codeDocument.Source), }; + codeDocument.SetImportSyntaxTrees(expected); + + // Act + var actual = codeDocument.GetImportSyntaxTrees(); + + // Assert + Assert.Same(expected, actual); + } + + [Fact] + public void GetAndSetTagHelpers_ReturnsTagHelpers() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + var expected = new[] { TagHelperDescriptorBuilder.Create("TestTagHelper", "TestAssembly").Build() }; + codeDocument.SetTagHelpers(expected); + + // Act + var actual = codeDocument.GetTagHelpers(); + + // Assert + Assert.Same(expected, actual); + } + + [Fact] + public void GetIRDocument_ReturnsIRDocument() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + var expected = new DocumentIntermediateNode(); + codeDocument.Items[typeof(DocumentIntermediateNode)] = expected; + + // Act + var actual = codeDocument.GetDocumentIntermediateNode(); + + // Assert + Assert.Same(expected, actual); + } + + [Fact] + public void SetIRDocument_SetsIRDocument() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + var expected = new DocumentIntermediateNode(); + + // Act + codeDocument.SetDocumentIntermediateNode((DocumentIntermediateNode)expected); + + // Assert + Assert.Same(expected, codeDocument.Items[typeof(DocumentIntermediateNode)]); + } + + [Fact] + public void GetCSharpDocument_ReturnsCSharpDocument() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + var expected = RazorCSharpDocument.Create("", RazorCodeGenerationOptions.CreateDefault(), Array.Empty()); + codeDocument.Items[typeof(RazorCSharpDocument)] = expected; + + // Act + var actual = codeDocument.GetCSharpDocument(); + + // Assert + Assert.Same(expected, actual); + } + + [Fact] + public void SetCSharpDocument_SetsCSharpDocument() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + var expected = RazorCSharpDocument.Create("", RazorCodeGenerationOptions.CreateDefault(), Array.Empty()); + + // Act + codeDocument.SetCSharpDocument(expected); + + // Assert + Assert.Same(expected, codeDocument.Items[typeof(RazorCSharpDocument)]); + } + + [Fact] + public void GetTagHelperContext_ReturnsTagHelperContext() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + var expected = TagHelperDocumentContext.Create(null, new TagHelperDescriptor[0]); + codeDocument.Items[typeof(TagHelperDocumentContext)] = expected; + + // Act + var actual = codeDocument.GetTagHelperContext(); + + // Assert + Assert.Same(expected, actual); + } + + [Fact] + public void SetTagHelperContext_SetsTagHelperContext() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + var expected = TagHelperDocumentContext.Create(null, new TagHelperDescriptor[0]); + + // Act + codeDocument.SetTagHelperContext(expected); + + // Assert + Assert.Same(expected, codeDocument.Items[typeof(TagHelperDocumentContext)]); + } + + [Fact] + public void GetParserOptions_ReturnsSuccessfully() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + var expected = RazorParserOptions.CreateDefault(); + codeDocument.Items[typeof(RazorParserOptions)] = expected; + + // Act + var actual = codeDocument.GetParserOptions(); + + // Assert + Assert.Same(expected, actual); + } + + [Fact] + public void SetParserOptions_SetsSuccessfully() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + var expected = RazorParserOptions.CreateDefault(); + + // Act + codeDocument.SetParserOptions(expected); + + // Assert + Assert.Same(expected, codeDocument.Items[typeof(RazorParserOptions)]); + } + + [Fact] + public void GetCodeGenerationOptions_ReturnsSuccessfully() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + var expected = RazorCodeGenerationOptions.CreateDefault(); + codeDocument.Items[typeof(RazorCodeGenerationOptions)] = expected; + + // Act + var actual = codeDocument.GetCodeGenerationOptions(); + + // Assert + Assert.Same(expected, actual); + } + + [Fact] + public void SetCodeGenerationOptions_SetsSuccessfully() + { + // Arrange + var codeDocument = TestRazorCodeDocument.CreateEmpty(); + + var expected = RazorCodeGenerationOptions.CreateDefault(); + + // Act + codeDocument.SetCodeGenerationOptions(expected); + + // Assert + Assert.Same(expected, codeDocument.Items[typeof(RazorCodeGenerationOptions)]); + } + + [Fact] + public void TryComputeNamespaceAndClass_RootNamespaceNotSet_ReturnsNull() + { + // Arrange + var sourceDocument = TestRazorSourceDocument.Create(filePath: "C:\\Hello\\Test.cshtml", relativePath: "Test.cshtml"); + var codeDocument = TestRazorCodeDocument.Create(sourceDocument, Array.Empty()); + + // Act + codeDocument.TryComputeNamespaceAndClass(out var @namespace, out var @class); + + // Assert + Assert.Null(@namespace); + Assert.Null(@class); + } + + [Fact] + public void TryComputeNamespaceAndClass_RelativePathNull_ReturnsNull() + { + // Arrange + var sourceDocument = TestRazorSourceDocument.Create(filePath: "C:\\Hello\\Test.cshtml", relativePath: null); + var codeDocument = TestRazorCodeDocument.Create(sourceDocument, Array.Empty()); + + // Act + codeDocument.TryComputeNamespaceAndClass(out var @namespace, out var @class); + + // Assert + Assert.Null(@namespace); + Assert.Null(@class); + } + + [Fact] + public void TryComputeNamespaceAndClass_FilePathNull_ReturnsNull() + { + // Arrange + var sourceDocument = TestRazorSourceDocument.Create(filePath: null, relativePath: "Test.cshtml"); + var codeDocument = TestRazorCodeDocument.Create(sourceDocument, Array.Empty()); + + // Act + codeDocument.TryComputeNamespaceAndClass(out var @namespace, out var @class); + + // Assert + Assert.Null(@namespace); + Assert.Null(@class); + } + + [Fact] + public void TryComputeNamespaceAndClass_RelativePathLongerThanFilePath_ReturnsNull() + { + // Arrange + var sourceDocument = TestRazorSourceDocument.Create(filePath: "C:\\Hello\\Test.cshtml", relativePath: "Some\\invalid\\relative\\path\\Test.cshtml"); + var codeDocument = TestRazorCodeDocument.Create(sourceDocument, Array.Empty()); + + // Act + codeDocument.TryComputeNamespaceAndClass(out var @namespace, out var @class); + + // Assert + Assert.Null(@namespace); + Assert.Null(@class); + } + + [Fact] + public void TryComputeNamespaceAndClass_ComputesNamespaceAndClass() + { + // Arrange + var sourceDocument = TestRazorSourceDocument.Create(filePath: "C:\\Hello\\Components\\Test.cshtml", relativePath: "\\Components\\Test.cshtml"); + var codeDocument = TestRazorCodeDocument.Create(sourceDocument, Array.Empty()); + codeDocument.SetCodeGenerationOptions(RazorCodeGenerationOptions.Create(c => + { + c.RootNamespace = "Hello"; + })); + + // Act + codeDocument.TryComputeNamespaceAndClass(out var @namespace, out var @class); + + // Assert + Assert.Equal("Hello.Components", @namespace); + Assert.Equal("Test", @class); + } + + [Fact] + public void TryComputeNamespaceAndClass_UsesIROptions_ComputesNamespaceAndClass() + { + // Arrange + var sourceDocument = TestRazorSourceDocument.Create(filePath: "C:\\Hello\\Components\\Test.cshtml", relativePath: "\\Components\\Test.cshtml"); + var codeDocument = TestRazorCodeDocument.Create(sourceDocument, Array.Empty()); + var documentNode = new DocumentIntermediateNode() + { + Options = RazorCodeGenerationOptions.Create(c => + { + c.RootNamespace = "Hello"; + }) + }; + codeDocument.SetDocumentIntermediateNode(documentNode); + + // Act + codeDocument.TryComputeNamespaceAndClass(out var @namespace, out var @class); + + // Assert + Assert.Equal("Hello.Components", @namespace); + Assert.Equal("Test", @class); + } + + [Fact] + public void TryComputeNamespaceAndClass_PrefersOptionsFromCodeDocument_ComputesNamespaceAndClass() + { + // Arrange + var sourceDocument = TestRazorSourceDocument.Create(filePath: "C:\\Hello\\Components\\Test.cshtml", relativePath: "\\Components\\Test.cshtml"); + var codeDocument = TestRazorCodeDocument.Create(sourceDocument, Array.Empty()); + codeDocument.SetCodeGenerationOptions(RazorCodeGenerationOptions.Create(c => + { + c.RootNamespace = "World"; + })); + var documentNode = new DocumentIntermediateNode() + { + Options = RazorCodeGenerationOptions.Create(c => + { + c.RootNamespace = "Hello"; + }) + }; + codeDocument.SetDocumentIntermediateNode(documentNode); + + // Act + codeDocument.TryComputeNamespaceAndClass(out var @namespace, out var @class); + + // Assert + Assert.Equal("World.Components", @namespace); + Assert.Equal("Test", @class); + } + + [Fact] + public void TryComputeNamespaceAndClass_SanitizesNamespaceAndClassName() + { + // Arrange + var sourceDocument = TestRazorSourceDocument.Create(filePath: "C:\\Hello\\Components with space\\Test$name.cshtml", relativePath: "\\Components with space\\Test$name.cshtml"); + var codeDocument = TestRazorCodeDocument.Create(sourceDocument, Array.Empty()); + var documentNode = new DocumentIntermediateNode() + { + Options = RazorCodeGenerationOptions.Create(c => + { + c.RootNamespace = "Hel?o.World"; + }) + }; + codeDocument.SetDocumentIntermediateNode(documentNode); + + // Act + codeDocument.TryComputeNamespaceAndClass(out var @namespace, out var @class); + + // Assert + Assert.Equal("Hel_o.World.Components_with_space", @namespace); + Assert.Equal("Test_name", @class); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorCodeDocumentTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorCodeDocumentTest.cs new file mode 100644 index 0000000000..c0cce4b7c6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorCodeDocumentTest.cs @@ -0,0 +1,61 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class RazorCodeDocumentTest + { + [Fact] + public void Create() + { + // Arrange + var source = TestRazorSourceDocument.Create(); + + // Act + var code = RazorCodeDocument.Create(source); + + // Assert + Assert.Same(source, code.Source); + Assert.NotNull(code.Items); + } + + [Fact] + public void Create_WithImports() + { + // Arrange + var source = TestRazorSourceDocument.Create(); + + var imports = new RazorSourceDocument[] + { + TestRazorSourceDocument.Create(), + }; + + // Act + var code = RazorCodeDocument.Create(source, imports); + + // Assert + Assert.Same(source, code.Source); + Assert.NotNull(code.Items); + + Assert.NotSame(imports, code.Imports); + Assert.Collection(imports, d => Assert.Same(imports[0], d)); + } + + [Fact] + public void Create_WithImports_AllowsNull() + { + // Arrange + var source = TestRazorSourceDocument.Create(); + + // Act + var code = RazorCodeDocument.Create(source, imports: null); + + // Assert + Assert.Same(source, code.Source); + Assert.NotNull(code.Items); + Assert.Empty(code.Imports); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorDiagnosticDescriptorTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorDiagnosticDescriptorTest.cs new file mode 100644 index 0000000000..9b3af87f6f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorDiagnosticDescriptorTest.cs @@ -0,0 +1,78 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class RazorDiagnosticDescriptorTest + { + [Fact] + public void RazorDiagnosticDescriptor_Ctor() + { + // Arrange & Act + var descriptor = new RazorDiagnosticDescriptor("RZ0001", () => "Hello, World!", RazorDiagnosticSeverity.Error); + + // Assert + Assert.Equal("RZ0001", descriptor.Id); + Assert.Equal(RazorDiagnosticSeverity.Error, descriptor.Severity); + Assert.Equal("Hello, World!", descriptor.GetMessageFormat()); + } + + [Fact] + public void RazorDiagnosticDescriptor_Equals() + { + // Arrange + var descriptor1 = new RazorDiagnosticDescriptor("RZ0001", () => "a!", RazorDiagnosticSeverity.Error); + var descriptor2 = new RazorDiagnosticDescriptor("RZ0001", () => "b!", RazorDiagnosticSeverity.Error); + + // Act + var result = descriptor1.Equals(descriptor2); + + // Assert + Assert.True(result); + } + + [Fact] + public void RazorDiagnosticDescriptor_NotEquals() + { + // Arrange + var descriptor1 = new RazorDiagnosticDescriptor("RZ0001", () => "a!", RazorDiagnosticSeverity.Error); + var descriptor2 = new RazorDiagnosticDescriptor("RZ0002", () => "b!", RazorDiagnosticSeverity.Error); + + // Act + var result = descriptor1.Equals(descriptor2); + + // Assert + Assert.False(result); + } + + [Fact] + public void RazorDiagnosticDescriptor_HashCodesEqual() + { + // Arrange + var descriptor1 = new RazorDiagnosticDescriptor("RZ0001", () => "a!", RazorDiagnosticSeverity.Error); + var descriptor2 = new RazorDiagnosticDescriptor("RZ0001", () => "b!", RazorDiagnosticSeverity.Error); + + // Act + var result = descriptor1.GetHashCode() == descriptor2.GetHashCode(); + + // Assert + Assert.True(result); + } + + [Fact] + public void RazorDiagnosticDescriptor_HashCodesNotEqual() + { + // Arrange + var descriptor1 = new RazorDiagnosticDescriptor("RZ0001", () => "a!", RazorDiagnosticSeverity.Error); + var descriptor2 = new RazorDiagnosticDescriptor("RZ0002", () => "b!", RazorDiagnosticSeverity.Error); + + // Act + var result = descriptor1.GetHashCode() == descriptor2.GetHashCode(); + + // Assert + Assert.False(result); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorDiagnosticTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorDiagnosticTest.cs new file mode 100644 index 0000000000..0ad45e8ed5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorDiagnosticTest.cs @@ -0,0 +1,45 @@ +// Copyright(c) .NET Foundation.All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.Legacy; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class RazorDiagnosticTest + { + [Fact] + public void Create_WithDescriptor_CreatesDefaultRazorDiagnostic() + { + // Arrange + var descriptor = new RazorDiagnosticDescriptor("RZ0001", () => "a", RazorDiagnosticSeverity.Error); + var span = new SourceSpan("test.cs", 15, 1, 8, 5); + + // Act + var diagnostic = RazorDiagnostic.Create(descriptor, span); + + // Assert + var defaultDiagnostic = Assert.IsType(diagnostic); + Assert.Equal("RZ0001", defaultDiagnostic.Id); + Assert.Equal(RazorDiagnosticSeverity.Error, defaultDiagnostic.Severity); + Assert.Equal(span, diagnostic.Span); + } + + [Fact] + public void Create_WithDescriptor_AndArgs_CreatesDefaultRazorDiagnostic() + { + // Arrange + var descriptor = new RazorDiagnosticDescriptor("RZ0001", () => "a", RazorDiagnosticSeverity.Error); + var span = new SourceSpan("test.cs", 15, 1, 8, 5); + + // Act + var diagnostic = RazorDiagnostic.Create(descriptor, span, "Hello", "World"); + + // Assert + var defaultDiagnostic = Assert.IsType(diagnostic); + Assert.Equal("RZ0001", defaultDiagnostic.Id); + Assert.Equal(RazorDiagnosticSeverity.Error, defaultDiagnostic.Severity); + Assert.Equal(span, diagnostic.Span); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorEngineBuilderExtensionsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorEngineBuilderExtensionsTest.cs new file mode 100644 index 0000000000..3df637cadc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorEngineBuilderExtensionsTest.cs @@ -0,0 +1,98 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.CodeGeneration; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ +#pragma warning disable CS0618 // Type or member is obsolete + public class RazorEngineBuilderExtensionsTest + { + [Fact] + public void AddDirective_ExistingFeature_UsesFeature() + { + // Arrange + var expected = new DefaultRazorDirectiveFeature(); + var engine = RazorEngine.CreateEmpty(b => + { + b.Features.Add(expected); + + // Act + b.AddDirective(DirectiveDescriptor.CreateDirective("test", DirectiveKind.SingleLine)); + }); + + // Assert + var actual = Assert.Single(engine.Features.OfType()); + Assert.Same(expected, actual); + + var directive = Assert.Single(actual.Directives); + Assert.Equal("test", directive.Directive); + } + + [Fact] + public void AddDirective_NoFeature_CreatesFeature() + { + // Arrange + var engine = RazorEngine.CreateEmpty(b => + { + // Act + b.AddDirective(DirectiveDescriptor.CreateDirective("test", DirectiveKind.SingleLine)); + }); + + // Assert + var actual = Assert.Single(engine.Features.OfType()); + Assert.IsType(actual); + + var directive = Assert.Single(actual.Directives); + Assert.Equal("test", directive.Directive); + } + + [Fact] + public void AddTargetExtensions_ExistingFeature_UsesFeature() + { + // Arrange + var extension = new MyTargetExtension(); + + var expected = new DefaultRazorTargetExtensionFeature(); + var engine = RazorEngine.CreateEmpty(b => + { + b.Features.Add(expected); + + // Act + b.AddTargetExtension(extension); + }); + + // Assert + var actual = Assert.Single(engine.Features.OfType()); + Assert.Same(expected, actual); + + Assert.Same(extension, Assert.Single(actual.TargetExtensions)); + } + + [Fact] + public void AddTargetExtensions_NoFeature_CreatesFeature() + { + // Arrange + var extension = new MyTargetExtension(); + + var engine = RazorEngine.CreateEmpty(b => + { + // Act + b.AddTargetExtension(extension); + }); + + // Assert + var actual = Assert.Single(engine.Features.OfType()); + Assert.IsType(actual); + + Assert.Same(extension, Assert.Single(actual.TargetExtensions)); + } + + private class MyTargetExtension : ICodeTargetExtension + { + } + } +#pragma warning restore CS0618 // Type or member is obsolete +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorEngineTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorEngineTest.cs new file mode 100644 index 0000000000..225f73f342 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorEngineTest.cs @@ -0,0 +1,233 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Collections.Generic; +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Extensions; +using Moq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ +#pragma warning disable CS0618 // Type or member is obsolete + public class RazorEngineTest + { + [Fact] + public void Create_NoArg_CreatesDefaultRuntimeEngine() + { + // Arrange + // Act + var engine = RazorEngine.Create(); + + // Assert + Assert.IsType(engine); + AssertDefaultRuntimeFeatures(engine.Features); + AssertDefaultRuntimePhases(engine.Phases); + AssertDefaultRuntimeTargetExtensions(engine); + } + + [Fact] + public void CreateDesignTime_NoArg_CreatesDefaultDesignTimeEngine() + { + // Arrange + // Act + var engine = RazorEngine.CreateDesignTime(); + + // Assert + Assert.IsType(engine); + AssertDefaultDesignTimeFeatures(engine.Features); + AssertDefaultDesignTimePhases(engine.Phases); + AssertDefaultDesignTimeTargetExtensions(engine); + } + + [Fact] + public void Create_Null_CreatesDefaultRuntimeEngine() + { + // Arrange + // Act + var engine = RazorEngine.Create(configure: null); + + // Assert + Assert.IsType(engine); + AssertDefaultRuntimeFeatures(engine.Features); + AssertDefaultRuntimePhases(engine.Phases); + AssertDefaultRuntimeTargetExtensions(engine); + } + + [Fact] + public void CreateDesignTime_Null_CreatesDefaultDesignTimeEngine() + { + // Arrange + // Act + var engine = RazorEngine.CreateDesignTime(configure: null); + + // Assert + Assert.IsType(engine); + AssertDefaultDesignTimeFeatures(engine.Features); + AssertDefaultDesignTimePhases(engine.Phases); + AssertDefaultDesignTimeTargetExtensions(engine); + } + + [Fact] + public void Create_Lambda_AddsFeaturesAndPhases() + { + // Arrange + IRazorEngineFeature[] features = null; + IRazorEnginePhase[] phases = null; + + // Act + var engine = RazorEngine.Create(builder => + { + builder.Features.Clear(); + builder.Phases.Clear(); + + builder.Features.Add(Mock.Of()); + builder.Features.Add(Mock.Of()); + + builder.Phases.Add(Mock.Of()); + builder.Phases.Add(Mock.Of()); + + features = builder.Features.ToArray(); + phases = builder.Phases.ToArray(); + }); + + // Assert + Assert.Collection( + engine.Features, + f => Assert.Same(features[0], f), + f => Assert.Same(features[1], f)); + + Assert.Collection( + engine.Phases, + p => Assert.Same(phases[0], p), + p => Assert.Same(phases[1], p)); + } + + [Fact] + public void CreateDesignTime_Lambda_AddsFeaturesAndPhases() + { + // Arrange + IRazorEngineFeature[] features = null; + IRazorEnginePhase[] phases = null; + + // Act + var engine = RazorEngine.CreateDesignTime(builder => + { + builder.Features.Clear(); + builder.Phases.Clear(); + + builder.Features.Add(Mock.Of()); + builder.Features.Add(Mock.Of()); + + builder.Phases.Add(Mock.Of()); + builder.Phases.Add(Mock.Of()); + + features = builder.Features.ToArray(); + phases = builder.Phases.ToArray(); + }); + + // Assert + Assert.Collection( + engine.Features, + f => Assert.Same(features[0], f), + f => Assert.Same(features[1], f)); + + Assert.Collection( + engine.Phases, + p => Assert.Same(phases[0], p), + p => Assert.Same(phases[1], p)); + } + + private static void AssertDefaultRuntimeTargetExtensions(RazorEngine engine) + { + var feature = engine.Features.OfType().FirstOrDefault(); + Assert.NotNull(feature); + + Assert.Collection( + feature.TargetExtensions, + extension => Assert.IsType(extension), + extension => Assert.IsType(extension), + extension => Assert.IsType(extension)); + } + + private static void AssertDefaultRuntimeFeatures(IEnumerable features) + { + Assert.Collection( + features, + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature)); + } + + private static void AssertDefaultRuntimePhases(IReadOnlyList phases) + { + Assert.Collection( + phases, + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase)); + } + + private static void AssertDefaultDesignTimeTargetExtensions(RazorEngine engine) + { + var feature = engine.Features.OfType().FirstOrDefault(); + Assert.NotNull(feature); + + Assert.Collection( + feature.TargetExtensions, + extension => Assert.IsType(extension), + extension => Assert.IsType(extension), + extension => Assert.IsType(extension)); + } + + private static void AssertDefaultDesignTimeFeatures(IEnumerable features) + { + Assert.Collection( + features, + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature)); + } + + private static void AssertDefaultDesignTimePhases(IReadOnlyList phases) + { + Assert.Collection( + phases, + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase)); + } + } +#pragma warning restore CS0618 // Type or member is obsolete +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorLanguageVersionTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorLanguageVersionTest.cs new file mode 100644 index 0000000000..5b09826ebf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorLanguageVersionTest.cs @@ -0,0 +1,141 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Linq; +using System.Reflection; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class RazorLanguageVersionTest + { + [Fact] + public void TryParseInvalid() + { + // Arrange + var value = "not-version"; + + // Act + var result = RazorLanguageVersion.TryParse(value, out var _); + + // Assert + Assert.False(result); + } + + [Fact] + public void TryParse10() + { + // Arrange + var value = "1.0"; + + // Act + var result = RazorLanguageVersion.TryParse(value, out var version); + + // Assert + Assert.True(result); + Assert.Same(RazorLanguageVersion.Version_1_0, version); + } + + [Fact] + public void TryParse11() + { + // Arrange + var value = "1.1"; + + // Act + var result = RazorLanguageVersion.TryParse(value, out var version); + + // Assert + Assert.True(result); + Assert.Same(RazorLanguageVersion.Version_1_1, version); + } + + [Fact] + public void TryParse20() + { + // Arrange + var value = "2.0"; + + // Act + var result = RazorLanguageVersion.TryParse(value, out var version); + + // Assert + Assert.True(result); + Assert.Same(RazorLanguageVersion.Version_2_0, version); + } + + [Fact] + public void TryParse21() + { + // Arrange + var value = "2.1"; + + // Act + var result = RazorLanguageVersion.TryParse(value, out var version); + + // Assert + Assert.True(result); + Assert.Same(RazorLanguageVersion.Version_2_1, version); + } + + [Fact] + public void TryParse30() + { + // Arrange + var value = "3.0"; + + // Act + var result = RazorLanguageVersion.TryParse(value, out var version); + + // Assert + Assert.True(result); + Assert.Same(RazorLanguageVersion.Version_3_0, version); + } + + [Fact] + public void TryParseLatest() + { + // Arrange + var value = "Latest"; + + // Act + var result = RazorLanguageVersion.TryParse(value, out var version); + + // Assert + Assert.True(result); + Assert.Same(RazorLanguageVersion.Version_3_0, version); + } + + [Fact] + public void TryParseExperimental() + { + // Arrange + var value = "experimental"; + + // Act + var result = RazorLanguageVersion.TryParse(value, out var version); + + // Assert + Assert.True(result); + Assert.Same(RazorLanguageVersion.Experimental, version); + } + + [Fact] + public void LatestPointsToNewestVersion() + { + // Arrange + var v = RazorLanguageVersion.Parse("latest"); + var versions = typeof(RazorLanguageVersion).GetFields(BindingFlags.Public | BindingFlags.Static) + .Where(f => f.Name.StartsWith("Version_")) + .Select(f => f.GetValue(obj: null)) + .Cast(); + + // Act & Assert + Assert.NotEmpty(versions); + foreach (var version in versions) + { + Assert.True(version.CompareTo(v) <= 0, $"RazorLanguageVersion {version} has a higher version than RazorLanguageVersion.Latest"); + } + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorParserFeatureFlagsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorParserFeatureFlagsTest.cs new file mode 100644 index 0000000000..cfdb9f023d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorParserFeatureFlagsTest.cs @@ -0,0 +1,33 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class RazorParserFeatureFlagsTest + { + [Fact] + public void Create_LatestVersion_AllowsMinimizedBooleanTagHelperAttributes() + { + // Arrange & Act + var context = RazorParserFeatureFlags.Create(RazorLanguageVersion.Version_2_1); + + // Assert + Assert.True(context.AllowMinimizedBooleanTagHelperAttributes); + Assert.True(context.AllowHtmlCommentsInTagHelpers); + } + + [Fact] + public void Create_OlderVersion_DoesNotAllowMinimizedBooleanTagHelperAttributes() + { + // Arrange & Act + var context = RazorParserFeatureFlags.Create(RazorLanguageVersion.Version_1_1); + + // Assert + Assert.False(context.AllowMinimizedBooleanTagHelperAttributes); + Assert.False(context.AllowHtmlCommentsInTagHelpers); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectEngineBuilderExtensionsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectEngineBuilderExtensionsTest.cs new file mode 100644 index 0000000000..f0a57128c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectEngineBuilderExtensionsTest.cs @@ -0,0 +1,103 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Razor.Language.CodeGeneration; +using Moq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class RazorProjectEngineBuilderExtensionsTest + { + [Fact] + public void SetImportFeature_SetsTheImportFeature() + { + // Arrange + var builder = new DefaultRazorProjectEngineBuilder(RazorConfiguration.Default, Mock.Of()); + var testFeature1 = Mock.Of(); + var testFeature2 = Mock.Of(); + builder.Features.Add(testFeature1); + builder.Features.Add(testFeature2); + var newFeature = Mock.Of(); + + // Act + builder.SetImportFeature(newFeature); + + // Assert + var feature = Assert.Single(builder.Features); + Assert.Same(newFeature, feature); + } + + [Fact] + public void AddTargetExtension_CreatesAndAddsToTargetExtensionFeatureIfItDoesNotExist() + { + // Arrange + var builder = new DefaultRazorProjectEngineBuilder(RazorConfiguration.Default, Mock.Of()); + var expectedExtension = Mock.Of(); + + // Act + builder.AddTargetExtension(expectedExtension); + + // Assert + var feature = Assert.Single(builder.Features); + var codeTargetExtensionFeature = Assert.IsAssignableFrom(feature); + var extensions = Assert.Single(codeTargetExtensionFeature.TargetExtensions); + Assert.Same(expectedExtension, extensions); + } + + [Fact] + public void AddTargetExtension_UsesExistingFeatureIfExistsAndAddsTo() + { + // Arrange + var builder = new DefaultRazorProjectEngineBuilder(RazorConfiguration.Default, Mock.Of()); + var codeTargetExtensionFeature = new DefaultRazorTargetExtensionFeature(); + builder.Features.Add(codeTargetExtensionFeature); + var expectedExtension = Mock.Of(); + + // Act + builder.AddTargetExtension(expectedExtension); + + // Assert + var feature = Assert.Single(builder.Features); + Assert.Same(codeTargetExtensionFeature, feature); + var extensions = Assert.Single(codeTargetExtensionFeature.TargetExtensions); + Assert.Same(expectedExtension, extensions); + } + + [Fact] + public void AddDirective_CreatesAndAddsToDirectiveFeatureIfItDoesNotExist() + { + // Arrange + var builder = new DefaultRazorProjectEngineBuilder(RazorConfiguration.Default, Mock.Of()); + var expectedDirective = Mock.Of(); + + // Act + builder.AddDirective(expectedDirective); + + // Assert + var feature = Assert.Single(builder.Features); + var directiveFeature = Assert.IsAssignableFrom(feature); + var directive = Assert.Single(directiveFeature.Directives); + Assert.Same(expectedDirective, directive); + } + + [Fact] + public void AddDirective_UsesExistingFeatureIfExistsAndAddsTo() + { + // Arrange + var builder = new DefaultRazorProjectEngineBuilder(RazorConfiguration.Default, Mock.Of()); + var directiveFeature = new DefaultRazorDirectiveFeature(); + builder.Features.Add(directiveFeature); + var expecteDirective = Mock.Of(); + + // Act + builder.AddDirective(expecteDirective); + + // Assert + var feature = Assert.Single(builder.Features); + Assert.Same(directiveFeature, feature); + var directive = Assert.Single(directiveFeature.Directives); + Assert.Same(expecteDirective, directive); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectEngineFeatureBaseTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectEngineFeatureBaseTest.cs new file mode 100644 index 0000000000..8344e787c7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectEngineFeatureBaseTest.cs @@ -0,0 +1,34 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Moq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class RazorProjectEngineFeatureBaseTest + { + [Fact] + public void ProjectEngineSetter_CallsOnInitialized() + { + // Arrange + var testFeature = new TestFeature(); + + // Act + testFeature.ProjectEngine = Mock.Of(); + + // Assert + Assert.Equal(1, testFeature.InitializationCount); + } + + private class TestFeature : RazorProjectEngineFeatureBase + { + public int InitializationCount { get; private set; } + + protected override void OnInitialized() + { + InitializationCount++; + } + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectEngineTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectEngineTest.cs new file mode 100644 index 0000000000..65600a9b88 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectEngineTest.cs @@ -0,0 +1,109 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Components; +using Microsoft.AspNetCore.Razor.Language.Extensions; +using Moq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Test +{ + public class RazorProjectEngineTest + { + [Fact] + public void CreateDesignTime_Lambda_AddsFeaturesAndPhases() + { + // Arrange + + // Act + var engine = RazorProjectEngine.Create(RazorConfiguration.Default, Mock.Of()); + + // Assert + AssertDefaultPhases(engine); + AssertDefaultFeatures(engine); + AssertDefaultDirectives(engine); + AssertDefaultTargetExtensions(engine); + } + + private static void AssertDefaultPhases(RazorProjectEngine engine) + { + Assert.Collection( + engine.Phases, + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase), + phase => Assert.IsType(phase)); + } + + private static void AssertDefaultFeatures(RazorProjectEngine engine) + { + var features = engine.EngineFeatures.OrderBy(f => f.GetType().Name).ToArray(); + Assert.Collection( + features, + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature), + feature => Assert.IsType(feature)); + } + + private static void AssertDefaultDirectives(RazorProjectEngine engine) + { + var feature = engine.EngineFeatures.OfType().FirstOrDefault(); + Assert.NotNull(feature); + Assert.Collection( + feature.Directives, + directive => Assert.Same(FunctionsDirective.Directive, directive), + directive => Assert.Same(ImplementsDirective.Directive, directive), + directive => Assert.Same(InheritsDirective.Directive, directive)); + } + + private static void AssertDefaultTargetExtensions(RazorProjectEngine engine) + { + var feature = engine.EngineFeatures.OfType().FirstOrDefault(); + Assert.NotNull(feature); + + var extensions = feature.TargetExtensions.OrderBy(f => f.GetType().Name).ToArray(); + Assert.Collection( + extensions, + extension => Assert.IsType(extension), + extension => Assert.IsType(extension), + extension => Assert.IsType(extension), + extension => Assert.IsType(extension)); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectItemTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectItemTest.cs new file mode 100644 index 0000000000..e1e95b2cc0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectItemTest.cs @@ -0,0 +1,104 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class RazorProjectItemTest + { + [Fact] + public void CombinedPath_ReturnsPathIfBasePathIsEmpty() + { + // Arrange + var emptyBasePath = "/"; + var path = "/foo/bar.cshtml"; + var projectItem = new TestRazorProjectItem(path, basePath: emptyBasePath); + + // Act + var combinedPath = projectItem.CombinedPath; + + // Assert + Assert.Equal(path, combinedPath); + } + + [Theory] + [InlineData("/root", "/root/foo/bar.cshtml")] + [InlineData("root/subdir", "root/subdir/foo/bar.cshtml")] + public void CombinedPath_ConcatsPaths(string basePath, string expected) + { + // Arrange + var path = "/foo/bar.cshtml"; + var projectItem = new TestRazorProjectItem(path, basePath: basePath); + + // Act + var combinedPath = projectItem.CombinedPath; + + // Assert + Assert.Equal(expected, combinedPath); + } + + [Theory] + [InlineData("/Home/Index")] + [InlineData("EditUser")] + public void Extension_ReturnsNullIfFileDoesNotHaveExtension(string path) + { + // Arrange + var projectItem = new TestRazorProjectItem(path, basePath: "/views"); + + // Act + var extension = projectItem.Extension; + + // Assert + Assert.Null(extension); + } + + [Theory] + [InlineData("/Home/Index.cshtml", ".cshtml")] + [InlineData("/Home/Index.en-gb.cshtml", ".cshtml")] + [InlineData("EditUser.razor", ".razor")] + public void Extension_ReturnsFileExtension(string path, string expected) + { + // Arrange + var projectItem = new TestRazorProjectItem(path, basePath: "/views"); + + // Act + var extension = projectItem.Extension; + + // Assert + Assert.Equal(expected, extension); + } + + [Theory] + [InlineData("Home/Index.cshtml", "Index.cshtml")] + [InlineData("/Accounts/Customers/Manage-en-us.razor", "Manage-en-us.razor")] + public void FileName_ReturnsFileNameWithExtension(string path, string expected) + { + // Arrange + var projectItem = new TestRazorProjectItem(path, basePath: "/"); + + // Act + var fileName = projectItem.FileName; + + // Assert + Assert.Equal(expected, fileName); + } + + [Theory] + [InlineData("Home/Index", "Home/Index")] + [InlineData("Home/Index.cshtml", "Home/Index")] + [InlineData("/Accounts/Customers/Manage.en-us.razor", "/Accounts/Customers/Manage.en-us")] + [InlineData("/Accounts/Customers/Manage-en-us.razor", "/Accounts/Customers/Manage-en-us")] + public void PathWithoutExtension_ExcludesExtension(string path, string expected) + { + // Arrange + var projectItem = new TestRazorProjectItem(path, basePath: "/"); + + // Act + var fileName = projectItem.FilePathWithoutExtension; + + // Assert + Assert.Equal(expected, fileName); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectTest.cs new file mode 100644 index 0000000000..7831db3521 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorProjectTest.cs @@ -0,0 +1,333 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using Microsoft.AspNetCore.Testing; +using Moq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class RazorProjectTest + { + [Fact] + public void NormalizeAndEnsureValidPath_DoesNotModifyPath() + { + // Arrange + var project = new TestRazorProject(); + + // Act + var path = project.NormalizeAndEnsureValidPath("/Views/Home/Index.cshtml"); + + // Assert + Assert.Equal("/Views/Home/Index.cshtml", path); + } + + [Theory] + [InlineData(null)] + [InlineData("")] + public void NormalizeAndEnsureValidPath_ThrowsIfPathIsNullOrEmpty(string path) + { + // Arrange + var project = new TestRazorProject(); + + // Act and Assert + ExceptionAssert.ThrowsArgumentNullOrEmptyString(() => project.NormalizeAndEnsureValidPath(path), "path"); + } + + [Theory] + [InlineData("foo")] + [InlineData("~/foo")] + [InlineData("\\foo")] + public void NormalizeAndEnsureValidPath_ThrowsIfPathDoesNotStartWithForwardSlash(string path) + { + // Arrange + var project = new TestRazorProject(); + + // Act and Assert + ExceptionAssert.ThrowsArgument( + () => project.NormalizeAndEnsureValidPath(path), + "path", + "Path must begin with a forward slash '/'."); + } + + [Fact] + public void FindHierarchicalItems_ReturnsEmptySequenceIfPathIsAtRoot() + { + // Arrange + var project = new TestRazorProject(); + + // Act + var result = project.FindHierarchicalItems("/", "File.cshtml"); + + // Assert + Assert.Empty(result); + } + + [Theory] + [InlineData("_ViewStart.cshtml")] + [InlineData("_ViewImports.cshtml")] + public void FindHierarchicalItems_ReturnsItemsForPath(string fileName) + { + // Arrange + var path = "/Views/Home/Index.cshtml"; + var items = new List + { + CreateProjectItem($"/{fileName}"), + CreateProjectItem($"/Views/{fileName}"), + CreateProjectItem($"/Views/Home/{fileName}") + }; + var project = new TestRazorProject(items); + + // Act + var result = project.FindHierarchicalItems(path, $"{fileName}"); + + // Assert + Assert.Collection( + result, + item => Assert.Equal($"/Views/Home/{fileName}", item.FilePath), + item => Assert.Equal($"/Views/{fileName}", item.FilePath), + item => Assert.Equal($"/{fileName}", item.FilePath)); + } + + [Fact] + public void FindHierarchicalItems_ReturnsItemsForPathAtRoot() + { + // Arrange + var path = "/Index.cshtml"; + var items = new List + { + CreateProjectItem("/File.cshtml") + }; + var project = new TestRazorProject(items); + + // Act + var result = project.FindHierarchicalItems(path, "File.cshtml"); + + // Assert + Assert.Collection( + result, + item => Assert.Equal("/File.cshtml", item.FilePath)); + } + + [Fact] + public void FindHierarchicalItems_DoesNotIncludePassedInItem() + { + // Arrange + var path = "/Areas/MyArea/Views/Home/File.cshtml"; + var items = new List + { + CreateProjectItem("/Areas/MyArea/Views/Home/File.cshtml"), + CreateProjectItem("/Areas/MyArea/Views/File.cshtml"), + CreateProjectItem("/Areas/MyArea/File.cshtml"), + CreateProjectItem("/Areas/File.cshtml"), + CreateProjectItem("/File.cshtml"), + }; + var project = new TestRazorProject(items); + + // Act + var result = project.FindHierarchicalItems(path, "File.cshtml"); + + // Assert + Assert.Collection( + result, + item => Assert.Equal("/Areas/MyArea/Views/File.cshtml", item.FilePath), + item => Assert.Equal("/Areas/MyArea/File.cshtml", item.FilePath), + item => Assert.Equal("/Areas/File.cshtml", item.FilePath), + item => Assert.Equal("/File.cshtml", item.FilePath)); + } + + [Fact] + public void FindHierarchicalItems_ReturnsEmptySequenceIfPassedInItemWithFileNameIsAtRoot() + { + // Arrange + var path = "/File.cshtml"; + var items = new List + { + CreateProjectItem("/File.cshtml") + }; + var project = new TestRazorProject(items); + + // Act + var result = project.FindHierarchicalItems(path, "File.cshtml"); + + // Assert + Assert.Empty(result); + } + + [Fact] + public void FindHierarchicalItems_IncludesNonExistentFiles() + { + // Arrange + var path = "/Areas/MyArea/Views/Home/Test.cshtml"; + var items = new List + { + CreateProjectItem("/Areas/MyArea/File.cshtml"), + CreateProjectItem("/File.cshtml") + }; + var project = new TestRazorProject(items); + + // Act + var result = project.FindHierarchicalItems(path, "File.cshtml"); + + // Assert + Assert.Collection( + result, + item => + { + Assert.Equal("/Areas/MyArea/Views/Home/File.cshtml", item.FilePath); + Assert.False(item.Exists); + }, + item => + { + Assert.Equal("/Areas/MyArea/Views/File.cshtml", item.FilePath); + Assert.False(item.Exists); + }, + item => + { + Assert.Equal("/Areas/MyArea/File.cshtml", item.FilePath); + Assert.True(item.Exists); + }, + item => + { + Assert.Equal("/Areas/File.cshtml", item.FilePath); + Assert.False(item.Exists); + }, + item => + { + Assert.Equal("/File.cshtml", item.FilePath); + Assert.True(item.Exists); + }); + } + + [Theory] + [InlineData("/Areas")] + [InlineData("/Areas/")] + public void FindHierarchicalItems_WithBasePath(string basePath) + { + // Arrange + var path = "/Areas/MyArea/Views/Home/Test.cshtml"; + var items = new List + { + CreateProjectItem("/Areas/MyArea/File.cshtml"), + CreateProjectItem("/File.cshtml") + }; + var project = new TestRazorProject(items); + + // Act + var result = project.FindHierarchicalItems(basePath, path, "File.cshtml"); + + // Assert + Assert.Collection( + result, + item => + { + Assert.Equal("/Areas/MyArea/Views/Home/File.cshtml", item.FilePath); + Assert.False(item.Exists); + }, + item => + { + Assert.Equal("/Areas/MyArea/Views/File.cshtml", item.FilePath); + Assert.False(item.Exists); + }, + item => + { + Assert.Equal("/Areas/MyArea/File.cshtml", item.FilePath); + Assert.True(item.Exists); + }, + item => + { + Assert.Equal("/Areas/File.cshtml", item.FilePath); + Assert.False(item.Exists); + }); + } + + [Theory] + [InlineData("/Areas/MyArea/Views")] + [InlineData("/Areas/MyArea/Views/")] + public void FindHierarchicalItems_WithNestedBasePath(string basePath) + { + // Arrange + var path = "/Areas/MyArea/Views/Home/Test.cshtml"; + var items = new List + { + CreateProjectItem("/Areas/MyArea/File.cshtml"), + CreateProjectItem("/File.cshtml") + }; + var project = new TestRazorProject(items); + + // Act + var result = project.FindHierarchicalItems(basePath, path, "File.cshtml"); + + // Assert + Assert.Collection( + result, + item => + { + Assert.Equal("/Areas/MyArea/Views/Home/File.cshtml", item.FilePath); + Assert.False(item.Exists); + }, + item => + { + Assert.Equal("/Areas/MyArea/Views/File.cshtml", item.FilePath); + Assert.False(item.Exists); + }); + } + + [Theory] + [InlineData("/Areas/MyArea/Views/Home")] + [InlineData("/Areas/MyArea/Views/Home/")] + public void FindHierarchicalItems_WithFileAtBasePath(string basePath) + { + // Arrange + var path = "/Areas/MyArea/Views/Home/Test.cshtml"; + var items = new List + { + CreateProjectItem("/Areas/MyArea/File.cshtml"), + CreateProjectItem("/File.cshtml"), + }; + var project = new TestRazorProject(items); + + // Act + var result = project.FindHierarchicalItems(basePath, path, "File.cshtml"); + + // Assert + Assert.Collection( + result, + item => + { + Assert.Equal("/Areas/MyArea/Views/Home/File.cshtml", item.FilePath); + Assert.False(item.Exists); + }); + } + + [Fact] + public void FindHierarchicalItems_ReturnsEmptySequenceIfPathIsNotASubPathOfBasePath() + { + // Arrange + var basePath = "/Pages"; + var path = "/Areas/MyArea/Views/Home/Test.cshtml"; + var items = new List + { + CreateProjectItem("/Areas/MyArea/File.cshtml"), + CreateProjectItem("/File.cshtml"), + }; + var project = new TestRazorProject(items); + + // Act + var result = project.FindHierarchicalItems(basePath, path, "File.cshtml"); + + // Assert + Assert.Empty(result); + } + + private RazorProjectItem CreateProjectItem(string path) + { + var projectItem = new Mock(); + projectItem.SetupGet(f => f.FilePath).Returns(path); + projectItem.SetupGet(f => f.Exists).Returns(true); + return projectItem.Object; + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorSourceDocumentTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorSourceDocumentTest.cs new file mode 100644 index 0000000000..9c05f2851c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorSourceDocumentTest.cs @@ -0,0 +1,219 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Text; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class RazorSourceDocumentTest + { + [Fact] + public void ReadFrom() + { + // Arrange + var content = TestRazorSourceDocument.CreateStreamContent(); + + // Act + var document = RazorSourceDocument.ReadFrom(content, "file.cshtml"); + + // Assert + Assert.IsType(document); + Assert.Equal("file.cshtml", document.FilePath); + Assert.Same(Encoding.UTF8, document.Encoding); + } + + [Fact] + public void ReadFrom_WithEncoding() + { + // Arrange + var content = TestRazorSourceDocument.CreateStreamContent(encoding: Encoding.UTF32); + + // Act + var document = RazorSourceDocument.ReadFrom(content, "file.cshtml", Encoding.UTF32); + + // Assert + Assert.Equal("file.cshtml", document.FilePath); + Assert.Same(Encoding.UTF32, Assert.IsType(document).Encoding); + } + + [Fact] + public void ReadFrom_WithProperties() + { + // Arrange + var content = TestRazorSourceDocument.CreateStreamContent(encoding: Encoding.UTF32); + var properties = new RazorSourceDocumentProperties("c:\\myapp\\filePath.cshtml", "filePath.cshtml"); + + // Act + var document = RazorSourceDocument.ReadFrom(content, Encoding.UTF32, properties); + + // Assert + Assert.Equal("c:\\myapp\\filePath.cshtml", document.FilePath); + Assert.Equal("filePath.cshtml", document.RelativePath); + Assert.Same(Encoding.UTF32, Assert.IsType(document).Encoding); + } + + [Fact] + public void ReadFrom_EmptyStream_WithEncoding() + { + // Arrange + var content = TestRazorSourceDocument.CreateStreamContent(content: string.Empty, encoding: Encoding.UTF32); + + // Act + var document = RazorSourceDocument.ReadFrom(content, "file.cshtml", Encoding.UTF32); + + // Assert + Assert.Equal("file.cshtml", document.FilePath); + Assert.Same(Encoding.UTF32, Assert.IsType(document).Encoding); + } + + [Fact] + public void ReadFrom_ProjectItem() + { + // Arrange + var projectItem = new TestRazorProjectItem("filePath.cshtml", "c:\\myapp\\filePath.cshtml", "filePath.cshtml", "c:\\myapp\\"); + + // Act + var document = RazorSourceDocument.ReadFrom(projectItem); + + // Assert + Assert.Equal("c:\\myapp\\filePath.cshtml", document.FilePath); + Assert.Equal("filePath.cshtml", document.RelativePath); + Assert.Equal(projectItem.Content, ReadContent(document)); + } + + [Fact] + public void ReadFrom_ProjectItem_NoRelativePath() + { + // Arrange + var projectItem = new TestRazorProjectItem("filePath.cshtml", "c:\\myapp\\filePath.cshtml", basePath: "c:\\myapp\\"); + + // Act + var document = RazorSourceDocument.ReadFrom(projectItem); + + // Assert + Assert.Equal("c:\\myapp\\filePath.cshtml", document.FilePath); + Assert.Equal("filePath.cshtml", document.RelativePath); + Assert.Equal(projectItem.Content, ReadContent(document)); + } + + [Fact] + public void ReadFrom_ProjectItem_FallbackToRelativePath() + { + // Arrange + var projectItem = new TestRazorProjectItem("filePath.cshtml", relativePhysicalPath: "filePath.cshtml", basePath: "c:\\myapp\\"); + + // Act + var document = RazorSourceDocument.ReadFrom(projectItem); + + // Assert + Assert.Equal("filePath.cshtml", document.FilePath); + Assert.Equal("filePath.cshtml", document.RelativePath); + Assert.Equal(projectItem.Content, ReadContent(document)); + } + + [Fact] + public void ReadFrom_ProjectItem_FallbackToFileName() + { + // Arrange + var projectItem = new TestRazorProjectItem("filePath.cshtml", basePath: "c:\\myapp\\"); + + // Act + var document = RazorSourceDocument.ReadFrom(projectItem); + + // Assert + Assert.Equal("filePath.cshtml", document.FilePath); + Assert.Equal("filePath.cshtml", document.RelativePath); + Assert.Equal(projectItem.Content, ReadContent(document)); + } + + [Fact] + public void Create_WithoutEncoding() + { + // Arrange + var content = "Hello world"; + var fileName = "some-file-name"; + + // Act + var document = RazorSourceDocument.Create(content, fileName); + + // Assert + Assert.Equal(fileName, document.FilePath); + Assert.Equal(content, ReadContent(document)); + Assert.Same(Encoding.UTF8, document.Encoding); + } + + [Fact] + public void Create_WithEncoding() + { + // Arrange + var content = "Hello world"; + var fileName = "some-file-name"; + var encoding = Encoding.UTF32; + + // Act + var document = RazorSourceDocument.Create(content, fileName, encoding); + + // Assert + Assert.Equal(fileName, document.FilePath); + Assert.Equal(content, ReadContent(document)); + Assert.Same(encoding, document.Encoding); + } + + [Fact] + public void Create_WithProperties() + { + // Arrange + var content = "Hello world"; + var properties = new RazorSourceDocumentProperties("c:\\myapp\\filePath.cshtml", "filePath.cshtml"); + + // Act + var document = RazorSourceDocument.Create(content, Encoding.UTF32, properties); + + // Assert + Assert.Equal("c:\\myapp\\filePath.cshtml", document.FilePath); + Assert.Equal("filePath.cshtml", document.RelativePath); + Assert.Equal(content, ReadContent(document)); + Assert.Same(Encoding.UTF32, Assert.IsType(document).Encoding); + } + + [Fact] + public void ReadFrom_WithProjectItem_FallbackToFilePath_WhenRelativePhysicalPathIsNull() + { + // Arrange + var filePath = "filePath.cshtml"; + var projectItem = new TestRazorProjectItem(filePath, relativePhysicalPath: null); + + // Act + var document = RazorSourceDocument.ReadFrom(projectItem); + + // Assert + Assert.Equal(filePath, document.FilePath); + Assert.Equal(filePath, document.RelativePath); + } + + [Fact] + public void ReadFrom_WithProjectItem_UsesRelativePhysicalPath() + { + // Arrange + var filePath = "filePath.cshtml"; + var relativePhysicalPath = "relative-path.cshtml"; + var projectItem = new TestRazorProjectItem(filePath, relativePhysicalPath: relativePhysicalPath); + + // Act + var document = RazorSourceDocument.ReadFrom(projectItem); + + // Assert + Assert.Equal(relativePhysicalPath, document.FilePath); + Assert.Equal(relativePhysicalPath, document.RelativePath); + } + + private static string ReadContent(RazorSourceDocument razorSourceDocument) + { + var buffer = new char[razorSourceDocument.Length]; + razorSourceDocument.CopyTo(0, buffer, 0, buffer.Length); + + return new string(buffer); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorSyntaxTreeTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorSyntaxTreeTest.cs new file mode 100644 index 0000000000..ed0bf3fb26 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/RazorSyntaxTreeTest.cs @@ -0,0 +1,63 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Linq; +using Microsoft.AspNetCore.Razor.Language.Syntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language.Test +{ + public class RazorSyntaxTreeTest + { + [Fact] + public void Parse_CanParseEmptyDocument() + { + // Arrange + var source = TestRazorSourceDocument.Create(string.Empty); + + // Act + var syntaxTree = RazorSyntaxTree.Parse(source); + + // Assert + Assert.NotNull(syntaxTree); + Assert.Empty(syntaxTree.Diagnostics); + } + + [Fact] + public void Parse_NodesReturnCorrectFilePath() + { + // Arrange + var filePath = "test.cshtml"; + var source = TestRazorSourceDocument.Create("@if (true) { @if(false) {
        @something.
        } }", filePath: filePath); + + // Act + var syntaxTree = RazorSyntaxTree.Parse(source); + + // Assert + Assert.Empty(syntaxTree.Diagnostics); + Assert.NotNull(syntaxTree); + + var children = syntaxTree.Root.DescendantNodes(); + Assert.All(children, node => Assert.Equal(filePath, node.GetSourceLocation(source).FilePath)); + } + + [Fact] + public void Parse_UseDirectiveTokenizer_ParsesUntilFirstDirective() + { + // Arrange + var source = TestRazorSourceDocument.Create("\r\n \r\n @*SomeComment*@ \r\n @tagHelperPrefix \"SomePrefix\"\r\n\r\n@if (true) {\r\n @if(false) {
        @something.
        } \r\n}"); + var options = RazorParserOptions.Create(builder => builder.ParseLeadingDirectives = true); + + // Act + var syntaxTree = RazorSyntaxTree.Parse(source, options); + + // Assert + var root = syntaxTree.Root; + Assert.NotNull(syntaxTree); + Assert.Equal(61, root.EndPosition); + Assert.Single(root.DescendantNodes().Where(n => n is RazorDirectiveBodySyntax body && body.Keyword.GetContent() == "tagHelperPrefix")); + Assert.Empty(root.DescendantNodes().Where(n => n is MarkupElementSyntax)); + Assert.Empty(syntaxTree.Diagnostics); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/SourceChangeTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/SourceChangeTest.cs new file mode 100644 index 0000000000..2d829be381 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/SourceChangeTest.cs @@ -0,0 +1,198 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Razor.Language.Legacy; +using Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class SourceChangeTest + { + [Fact] + public void SourceChange_ConstructorSetsDefaults_WhenNotProvided() + { + // Arrange & Act + var change = new SourceChange(15, 7, "Hello"); + + // Assert + Assert.Equal(15, change.Span.AbsoluteIndex); + Assert.Equal(-1, change.Span.CharacterIndex); + Assert.Null(change.Span.FilePath); + Assert.Equal(7, change.Span.Length); + Assert.Equal(-1, change.Span.LineIndex); + Assert.Equal("Hello", change.NewText); + } + + [Fact] + public void IsDelete_IsTrue_WhenOldLengthIsPositive_AndNewLengthIsZero() + { + // Arrange & Act + var change = new SourceChange(3, 5, string.Empty); + + // Assert + Assert.True(change.IsDelete); + } + + [Fact] + public void IsInsert_IsTrue_WhenOldLengthIsZero_AndNewLengthIsPositive() + { + // Arrange & Act + var change = new SourceChange(3, 0, "Hello"); + + // Assert + Assert.True(change.IsInsert); + } + + [Fact] + public void IsReplace_IsTrue_WhenOldLengthIsPositive_AndNewLengthIsPositive() + { + // Arrange & Act + var change = new SourceChange(3, 5, "Hello"); + + // Assert + Assert.True(change.IsReplace); + } + + [Fact] + public void GetEditedContent_ForDelete_ReturnsNewContent() + { + // Arrange + var text = "Hello, World"; + + var change = new SourceChange(2, 2, string.Empty); + + // Act + var result = change.GetEditedContent(text, 1); + + // Act + Assert.Equal("Hlo, World", result); + } + + [Fact] + public void GetEditedContent_ForInsert_ReturnsNewContent() + { + // Arrange + var text = "Hello, World"; + + var change = new SourceChange(2, 0, "heyo"); + + // Act + var result = change.GetEditedContent(text, 1); + + // Act + Assert.Equal("Hheyoello, World", result); + } + + [Fact] + public void GetEditedContent_ForReplace_ReturnsNewContent() + { + // Arrange + var text = "Hello, World"; + + var change = new SourceChange(2, 2, "heyo"); + + // Act + var result = change.GetEditedContent(text, 1); + + // Act + Assert.Equal("Hheyolo, World", result); + } + + [Fact] + public void GetEditedContent_SyntaxNode_ReturnsNewContent() + { + // Arrange + var builder = SyntaxListBuilder.Create(); + builder.Add(SyntaxFactory.Token(SyntaxKind.Marker, "Hello, ")); + builder.Add(SyntaxFactory.Token(SyntaxKind.Marker, "World")); + + var node = SyntaxFactory.MarkupTextLiteral(builder.ToList()).CreateRed(); + + var change = new SourceChange(2, 2, "heyo"); + + // Act + var result = change.GetEditedContent(node); + + // Act + Assert.Equal("Heheyoo, World", result); + } + + [Fact] + public void GetOffSet_SpanIsOwner_ReturnsOffset() + { + // Arrange + var builder = SyntaxListBuilder.Create(); + builder.Add(SyntaxFactory.Token(SyntaxKind.Marker, "Hello, ")); + builder.Add(SyntaxFactory.Token(SyntaxKind.Marker, "World")); + + var node = SyntaxFactory.MarkupTextLiteral(builder.ToList()).CreateRed(null, 13); + + var change = new SourceChange(15, 2, "heyo"); + + // Act + var result = change.GetOffset(node); + + // Act + Assert.Equal(2, result); + } + + [Fact] + public void GetOffSet_SpanIsNotOwnerOfChange_ThrowsException() + { + // Arrange + var builder = SyntaxListBuilder.Create(); + builder.Add(SyntaxFactory.Token(SyntaxKind.Marker, "Hello, ")); + builder.Add(SyntaxFactory.Token(SyntaxKind.Marker, "World")); + + var node = SyntaxFactory.MarkupTextLiteral(builder.ToList()).CreateRed(null, 13); + + var change = new SourceChange(12, 2, "heyo"); + + var expected = $"The node '{node}' is not the owner of change '{change}'."; + + // Act & Assert + var exception = Assert.Throws(() => { change.GetOffset(node); }); + Assert.Equal(expected, exception.Message); + } + + [Fact] + public void GetOrigninalText_SpanIsOwner_ReturnsContent() + { + // Arrange + var builder = SyntaxListBuilder.Create(); + builder.Add(SyntaxFactory.Token(SyntaxKind.Marker, "Hello, ")); + builder.Add(SyntaxFactory.Token(SyntaxKind.Marker, "World")); + + var node = SyntaxFactory.MarkupTextLiteral(builder.ToList()).CreateRed(null, 13); + + var change = new SourceChange(15, 2, "heyo"); + + // Act + var result = change.GetOriginalText(node); + + // Act + Assert.Equal("ll", result); + } + + [Fact] + public void GetOrigninalText_SpanIsOwner_ReturnsContent_ZeroLengthSpan() + { + // Arrange + var builder = SyntaxListBuilder.Create(); + builder.Add(SyntaxFactory.Token(SyntaxKind.Marker, "Hello, ")); + builder.Add(SyntaxFactory.Token(SyntaxKind.Marker, "World")); + + var node = SyntaxFactory.MarkupTextLiteral(builder.ToList()).CreateRed(null, 13); + + var change = new SourceChange(15, 0, "heyo"); + + // Act + var result = change.GetOriginalText(node); + + // Act + Assert.Equal(string.Empty, result); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/SourceLocationTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/SourceLocationTest.cs new file mode 100644 index 0000000000..c2401c56b7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/SourceLocationTest.cs @@ -0,0 +1,110 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Testing; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class SourceLocationTest + { + [Fact] + public void ConstructorWithLineAndCharacterIndexSetsAssociatedProperties() + { + // Act + var loc = new SourceLocation(0, 42, 24); + + // Assert + Assert.Null(loc.FilePath); + Assert.Equal(0, loc.AbsoluteIndex); + Assert.Equal(42, loc.LineIndex); + Assert.Equal(24, loc.CharacterIndex); + } + + [Fact] + public void Constructor_SetsFilePathAndIndexes() + { + // Arrange + var filePath = "some-file-path"; + var absoluteIndex = 133; + var lineIndex = 23; + var characterIndex = 12; + + // Act + var sourceLocation = new SourceLocation(filePath, absoluteIndex, lineIndex, characterIndex); + + // Assert + Assert.Equal(filePath, sourceLocation.FilePath); + Assert.Equal(absoluteIndex, sourceLocation.AbsoluteIndex); + Assert.Equal(lineIndex, sourceLocation.LineIndex); + Assert.Equal(characterIndex, sourceLocation.CharacterIndex); + } + + [Theory] + [InlineData(null)] + [InlineData("some-file")] + public void GetHashCode_ReturnsSameValue_WhenEqual(string path) + { + // Arrange + var sourceLocationA = new SourceLocation(path, 10, 3, 4); + var sourceLocationB = new SourceLocation(path, 10, 3, 4); + var sourceLocationC = new SourceLocation(path, 10, 45, 8754); + + // Act + var hashCodeA = sourceLocationA.GetHashCode(); + var hashCodeB = sourceLocationB.GetHashCode(); + var hashCodeC = sourceLocationC.GetHashCode(); + + // Assert + Assert.Equal(hashCodeA, hashCodeB); + Assert.Equal(hashCodeA, hashCodeC); + } + + [Fact] + public void Equals_ReturnsFalse_FilePathsNullAndAbsoluteIndicesMatch() + { + // Arrange + var sourceLocationA = new SourceLocation(10, 3, 4); + var sourceLocationB = new SourceLocation(10, 45, 8754); + + // Act + var result = sourceLocationA.Equals(sourceLocationB); + + // Assert + Assert.False(result); + } + + [Fact] + public void Equals_ReturnsFalse_IfFilePathIsDifferent() + { + // Arrange + var sourceLocationA = new SourceLocation(10, 3, 4); + var sourceLocationB = new SourceLocation("different-file", 10, 3, 4); + + // Act + var result = sourceLocationA.Equals(sourceLocationB); + + // Assert + Assert.False(result); + } + + [Theory] + [InlineData(null)] + [InlineData("some-file")] + public void Equals_ReturnsTrue_IfFilePathAndIndexesAreSame(string path) + { + // Arrange + var sourceLocationA = new SourceLocation(path, 10, 3, 4); + var sourceLocationB = new SourceLocation(path, 10, 3, 4); + var sourceLocationC = new SourceLocation("different-path", 10, 3, 4); + + // Act + var result1 = sourceLocationA.Equals(sourceLocationB); + var result2 = sourceLocationA.Equals(sourceLocationC); + + // Assert + Assert.True(result1); + Assert.False(result2); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/SourceSpanTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/SourceSpanTest.cs new file mode 100644 index 0000000000..d59253c08a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/SourceSpanTest.cs @@ -0,0 +1,117 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; +using Microsoft.AspNetCore.Razor.Language.Legacy; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class SourceSpanTest + { + [Fact] + public void GeneratedCodeMappingsAreEqualIfDataIsEqual() + { + // Arrange + var left = new SourceMapping( + new SourceSpan(new SourceLocation(1, 2, 3), 4), + new SourceSpan(new SourceLocation(5, 6, 7), 8)); + + var right = new SourceMapping( + new SourceSpan(new SourceLocation(1, 2, 3), 4), + new SourceSpan(new SourceLocation(5, 6, 7), 8)); + + // Assert + Assert.True(left.Equals(right)); + Assert.True(right.Equals(left)); + Assert.True(Equals(left, right)); + } + + [Fact] + public void GeneratedCodeMappingsAreNotEqualIfCodeLengthIsNotEqual() + { + // Arrange + var left = new SourceMapping( + new SourceSpan(new SourceLocation(1, 2, 3), 4), + new SourceSpan(new SourceLocation(5, 6, 7), 8)); + + var right = new SourceMapping( + new SourceSpan(new SourceLocation(1, 2, 3), 5), + new SourceSpan(new SourceLocation(5, 6, 7), 9)); + + // Assert + AssertNotEqual(left, right); + } + + [Fact] + public void GeneratedCodeMappingsAreNotEqualIfStartGeneratedColumnIsNotEqual() + { + // Arrange + var left = new SourceMapping( + new SourceSpan(new SourceLocation(1, 2, 3), 4), + new SourceSpan(new SourceLocation(5, 6, 7), 8)); + + var right = new SourceMapping( + new SourceSpan(new SourceLocation(1, 2, 3), 4), + new SourceSpan(new SourceLocation(5, 6, 8), 8)); + + // Assert + AssertNotEqual(left, right); + } + + [Fact] + public void GeneratedCodeMappingsAreNotEqualIfStartColumnIsNotEqual() + { + // Arrange + var left = new SourceMapping( + new SourceSpan(new SourceLocation(1, 2, 3), 4), + new SourceSpan(new SourceLocation(5, 6, 8), 8)); + + var right = new SourceMapping( + new SourceSpan(new SourceLocation(1, 2, 3), 4), + new SourceSpan(new SourceLocation(5, 6, 7), 8)); + + // Assert + AssertNotEqual(left, right); + } + + [Fact] + public void GeneratedCodeMappingsAreNotEqualIfStartLineIsNotEqual() + { + // Arrange + var left = new SourceMapping( + new SourceSpan(new SourceLocation(1, 2, 3), 4), + new SourceSpan(new SourceLocation(5, 5, 7), 8)); + + var right = new SourceMapping( + new SourceSpan(new SourceLocation(1, 1, 3), 4), + new SourceSpan(new SourceLocation(5, 6, 7), 8)); + + // Assert + AssertNotEqual(left, right); + } + + [Fact] + public void GeneratedCodeMappingsAreNotEqualIfAbsoluteIndexIsNotEqual() + { + // Arrange + var left = new SourceMapping( + new SourceSpan(new SourceLocation(1, 2, 3), 4), + new SourceSpan(new SourceLocation(4, 6, 7), 8)); + + var right = new SourceMapping( + new SourceSpan(new SourceLocation(1, 2, 3), 4), + new SourceSpan(new SourceLocation(5, 6, 7), 9)); + + // Assert + AssertNotEqual(left, right); + } + + private void AssertNotEqual(SourceMapping left, SourceMapping right) + { + Assert.False(left == right); + Assert.False(left.Equals(right)); + Assert.False(right.Equals(left)); + Assert.False(Equals(left, right)); + } + } +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/StreamSourceDocumentTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/StreamSourceDocumentTest.cs new file mode 100644 index 0000000000..f377450320 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/StreamSourceDocumentTest.cs @@ -0,0 +1,200 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.IO; +using System.Text; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class StreamSourceDocumentTest + { + [Fact] + public void FilePath() + { + // Arrange + var content = "Hello World!"; + var stream = CreateBOMStream(content, Encoding.UTF8); + + // Act + var document = new StreamSourceDocument(stream, Encoding.UTF8, new RazorSourceDocumentProperties(filePath: "file.cshtml", relativePath: null)); + + // Assert + Assert.Equal("file.cshtml", document.FilePath); + } + + [Fact] + public void FilePath_Null() + { + // Arrange + var content = "Hello World!"; + var stream = CreateBOMStream(content, Encoding.UTF8); + + // Act + var document = new StreamSourceDocument(stream, Encoding.UTF8, new RazorSourceDocumentProperties(filePath: null, relativePath: null)); + + // Assert + Assert.Null(document.FilePath); + } + + [Fact] + public void RelativePath() + { + // Arrange + var content = "Hello World!"; + var stream = CreateBOMStream(content, Encoding.UTF8); + + // Act + var document = new StreamSourceDocument(stream, Encoding.UTF8, new RazorSourceDocumentProperties(filePath: null, relativePath: "file.cshtml")); + + // Assert + Assert.Equal("file.cshtml", document.RelativePath); + } + + [Fact] + public void RelativePath_Null() + { + // Arrange + var content = "Hello World!"; + var stream = CreateBOMStream(content, Encoding.UTF8); + + // Act + var document = new StreamSourceDocument(stream, Encoding.UTF8, new RazorSourceDocumentProperties(filePath: null, relativePath: null)); + + // Assert + Assert.Null(document.RelativePath); + } + + [Fact] + public void GetChecksum_ReturnsCopiedChecksum() + { + // Arrange + var content = "Hello World!"; + var stream = CreateBOMStream(content, Encoding.UTF8); + var document = new StreamSourceDocument(stream, null, RazorSourceDocumentProperties.Default); + + // Act + var firstChecksum = document.GetChecksum(); + var secondChecksum = document.GetChecksum(); + + // Assert + Assert.Equal(firstChecksum, secondChecksum); + Assert.NotSame(firstChecksum, secondChecksum); + } + + [Fact] + public void GetChecksum_ComputesCorrectChecksum_UTF8() + { + // Arrange + var content = "Hello World!"; + var stream = CreateBOMStream(content, Encoding.UTF8); + var document = new StreamSourceDocument(stream, Encoding.UTF8, RazorSourceDocumentProperties.Default); + var expectedChecksum = new byte[] { 70, 180, 84, 105, 70, 79, 152, 31, 71, 157, 46, 159, 50, 83, 1, 243, 222, 48, 90, 18 }; + + // Act + var checksum = document.GetChecksum(); + + // Assert + Assert.Equal(expectedChecksum, checksum); + } + + [Fact] + public void GetChecksum_ComputesCorrectChecksum_UTF32AutoDetect() + { + // Arrange + var content = "Hello World!"; + var stream = CreateBOMStream(content, Encoding.UTF32); + var document = new StreamSourceDocument(stream, null, RazorSourceDocumentProperties.Default); + var expectedChecksum = new byte[] { 159, 154, 109, 89, 250, 163, 165, 108, 2, 112, 34, 4, 247, 161, 82, 168, 77, 213, 107, 71 }; + + // Act + var checksum = document.GetChecksum(); + + // Assert + Assert.Equal(expectedChecksum, checksum); + } + + [Fact] + public void ConstructedWithoutEncoding_DetectsEncoding() + { + // Arrange + var content = TestRazorSourceDocument.CreateStreamContent(encoding: Encoding.UTF32); + + // Act + var document = new StreamSourceDocument(content, null, RazorSourceDocumentProperties.Default); + + // Assert + Assert.IsType(document); + Assert.Equal(Encoding.UTF32, document.Encoding); + } + + [Fact] + public void ConstructedWithoutEncoding_EmptyStream_DetectsEncoding() + { + // Arrange + var content = TestRazorSourceDocument.CreateStreamContent(content: string.Empty, encoding: Encoding.UTF32); + + // Act + var document = new StreamSourceDocument(content, null, RazorSourceDocumentProperties.Default); + + // Assert + Assert.IsType(document); + Assert.Equal(Encoding.UTF32, document.Encoding); + } + + [Fact] + public void FailsOnMismatchedEncoding() + { + // Arrange + var content = TestRazorSourceDocument.CreateStreamContent(encoding: Encoding.UTF32); + var expectedMessage = Resources.FormatMismatchedContentEncoding(Encoding.UTF8.EncodingName, Encoding.UTF32.EncodingName); + + // Act & Assert + var exception = Assert.Throws( + () => new StreamSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default)); + Assert.Equal(expectedMessage, exception.Message); + } + + [Theory] + [InlineData(100000)] + [InlineData(RazorSourceDocument.LargeObjectHeapLimitInChars)] + [InlineData(RazorSourceDocument.LargeObjectHeapLimitInChars + 2)] + [InlineData(RazorSourceDocument.LargeObjectHeapLimitInChars * 2 - 1)] + [InlineData(RazorSourceDocument.LargeObjectHeapLimitInChars * 2)] + public void DetectsSizeOfStreamForLargeContent(int contentLength) + { + // Arrange + var content = new string('a', contentLength); + var stream = TestRazorSourceDocument.CreateStreamContent(content); + + // Act + var document = new StreamSourceDocument(stream, null, RazorSourceDocumentProperties.Default); + + // Assert + var streamDocument = Assert.IsType(document); + Assert.IsType(streamDocument._innerSourceDocument); + Assert.Same(Encoding.UTF8, document.Encoding); + Assert.Equal(content, ReadContent(document)); + } + + private static MemoryStream CreateBOMStream(string content, Encoding encoding) + { + var preamble = encoding.GetPreamble(); + var contentBytes = encoding.GetBytes(content); + var buffer = new byte[preamble.Length + contentBytes.Length]; + preamble.CopyTo(buffer, 0); + contentBytes.CopyTo(buffer, preamble.Length); + var stream = new MemoryStream(buffer); + return stream; + } + + private static string ReadContent(RazorSourceDocument razorSourceDocument) + { + var buffer = new char[razorSourceDocument.Length]; + razorSourceDocument.CopyTo(0, buffer, 0, buffer.Length); + + return new string(buffer); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/StringSourceDocumentTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/StringSourceDocumentTest.cs new file mode 100644 index 0000000000..8306d2bf80 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/StringSourceDocumentTest.cs @@ -0,0 +1,516 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Text; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class StringSourceDocumentTest + { + [Fact] + public void GetChecksum_ReturnsCopiedChecksum() + { + // Arrange + var content = "Hello World!"; + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var firstChecksum = document.GetChecksum(); + var secondChecksum = document.GetChecksum(); + + // Assert + Assert.Equal(firstChecksum, secondChecksum); + Assert.NotSame(firstChecksum, secondChecksum); + } + + [Fact] + public void GetChecksum_ComputesCorrectChecksum_UTF8() + { + // Arrange + var content = "Hello World!"; + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + var expectedChecksum = new byte[] { 46, 247, 189, 230, 8, 206, 84, 4, 233, 125, 95, 4, 47, 149, 248, 159, 28, 35, 40, 113 }; + + // Act + var checksum = document.GetChecksum(); + + // Assert + Assert.Equal(expectedChecksum, checksum); + } + + [Fact] + public void GetChecksum_ComputesCorrectChecksum_UTF32() + { + // Arrange + var content = "Hello World!"; + var document = new StringSourceDocument(content, Encoding.UTF32, RazorSourceDocumentProperties.Default); + var expectedChecksum = new byte[] { 8, 149, 159, 15, 242, 255, 115, 227, 219, 78, 61, 53, 127, 239, 77, 239, 215, 140, 248, 44 }; + + // Act + var checksum = document.GetChecksum(); + + // Assert + Assert.Equal(expectedChecksum, checksum); + } + + [Fact] + public void Indexer_ProvidesCharacterAccessToContent() + { + // Arrange + var expectedContent = "Hello, World!"; + var indexerBuffer = new char[expectedContent.Length]; + var document = new StringSourceDocument(expectedContent, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + for (var i = 0; i < document.Length; i++) + { + indexerBuffer[i] = document[i]; + } + + // Assert + var output = new string(indexerBuffer); + Assert.Equal(expectedContent, output); + } + + [Fact] + public void Length() + { + // Arrange + var expectedContent = "Hello, World!"; + var document = new StringSourceDocument(expectedContent, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act & Assert + Assert.Equal(expectedContent.Length, document.Length); + } + + [Fact] + public void FilePath() + { + // Arrange + var content = "Hello, World!"; + + // Act + var document = new StringSourceDocument(content, Encoding.UTF8, new RazorSourceDocumentProperties(filePath: "file.cshtml", relativePath: null)); + + // Assert + Assert.Equal("file.cshtml", document.FilePath); + } + + [Fact] + public void FilePath_Null() + { + // Arrange + var content = "Hello, World!"; + + // Act + var document = new StringSourceDocument(content, Encoding.UTF8, new RazorSourceDocumentProperties(filePath: null, relativePath: null)); + + // Assert + Assert.Null(document.FilePath); + } + + [Fact] + public void RelativePath() + { + // Arrange + var content = "Hello, World!"; + + // Act + var document = new StringSourceDocument(content, Encoding.UTF8, new RazorSourceDocumentProperties(filePath: null, relativePath: "file.cshtml")); + + // Assert + Assert.Equal("file.cshtml", document.RelativePath); + } + + [Fact] + public void RelativePath_Null() + { + // Arrange + var content = "Hello, World!"; + + // Act + var document = new StringSourceDocument(content, Encoding.UTF8, new RazorSourceDocumentProperties(filePath: null, relativePath: null)); + + // Assert + Assert.Null(document.RelativePath); + } + + [Fact] + public void CopyTo_PartialCopyFromStart() + { + // Arrange + var content = "Hello, World!"; + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + var expectedContent = "Hello"; + var charBuffer = new char[expectedContent.Length]; + + // Act + document.CopyTo(0, charBuffer, 0, expectedContent.Length); + + // Assert + var copiedContent = new string(charBuffer); + Assert.Equal(expectedContent, copiedContent); + } + + [Fact] + public void CopyTo_PartialCopyDestinationOffset() + { + // Arrange + var content = "Hello, World!"; + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + var expectedContent = "$Hello"; + var charBuffer = new char[expectedContent.Length]; + charBuffer[0] = '$'; + + // Act + document.CopyTo(0, charBuffer, 1, "Hello".Length); + + // Assert + var copiedContent = new string(charBuffer); + Assert.Equal(expectedContent, copiedContent); + } + + [Fact] + public void CopyTo_PartialCopySourceOffset() + { + // Arrange + var content = "Hello, World!"; + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + var expectedContent = "World"; + var charBuffer = new char[expectedContent.Length]; + + // Act + document.CopyTo(7, charBuffer, 0, expectedContent.Length); + + // Assert + var copiedContent = new string(charBuffer); + Assert.Equal(expectedContent, copiedContent); + } + + [Fact] + public void CopyTo_CanCopyMultipleTimes() + { + // Arrange + var content = "Hi"; + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act & Assert + // + // (we should be able to do this twice to prove that the underlying data isn't disposed) + for (var i = 0; i < 2; i++) + { + var charBuffer = new char[2]; + document.CopyTo(0, charBuffer, 0, 2); + var copiedContent = new string(charBuffer); + Assert.Equal("Hi", copiedContent); + } + } + + [Fact] + public void Lines_Count_EmptyDocument() + { + // Arrange + var content = string.Empty; + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var actual = document.Lines.Count; + + // Assert + Assert.Equal(1, actual); + } + + [Fact] + public void Lines_GetLineLength_EmptyDocument() + { + // Arrange + var content = string.Empty; + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var actual = document.Lines.GetLineLength(0); + + // Assert + Assert.Equal(0, actual); + } + + [Fact] + public void Lines_GetLineLength_TrailingNewlineDoesNotStartNewLine() + { + // Arrange + var content = "hello\n"; + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var actual = document.Lines.GetLineLength(0); + + // Assert + Assert.Equal(6, actual); + } + + [Fact] + public void Lines_GetLineLength_TrailingNewlineDoesNotStartNewLine_CRLF() + { + // Arrange + var content = "hello\r\n"; + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var actual = document.Lines.GetLineLength(0); + + // Assert + Assert.Equal(7, actual); + } + + [Fact] + public void Lines_Simple_Document() + { + // Arrange + var content = new StringBuilder() + .Append("The quick brown").Append('\n') + .Append("fox").Append("\r\n") + .Append("jumps over the lazy dog.") + .ToString(); + + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var actual = GetAllSourceMappings(document); + + // Assert + Assert.Equal(new int[] { 16, 5, 24 }, actual); + } + + [Fact] + public void Lines_CRLF_OnlyCountsAsASingleNewLine() + { + // Arrange + var content = "Hello\r\nWorld!"; + + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var actual = GetAllSourceMappings(document); + + // Assert + Assert.Equal(new int[] { 7, 6 }, actual); + } + + [Fact] + public void Lines_CR_IsNewLine() + { + // Arrange + var content = "Hello\rWorld!"; + + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var actual = GetAllSourceMappings(document); + + // Assert + Assert.Equal(new int[] { 6, 6 }, actual); + } + + // CR handling is stateful in the parser, making sure we properly reset the state. + [Fact] + public void Lines_CR_IsNewLine_MultipleCRs() + { + // Arrange + var content = "Hello\rBig\r\nWorld!"; + + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var actual = GetAllSourceMappings(document); + + // Assert + Assert.Equal(new int[] { 6, 5, 6 }, actual); + } + + [Fact] + public void Lines_LF_IsNewLine() + { + // Arrange + var content = "Hello\nWorld!"; + + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var actual = GetAllSourceMappings(document); + + // Assert + Assert.Equal(new int[] { 6, 6 }, actual); + } + + [Fact] + public void Lines_Unicode0085_IsNewLine() + { + // Arrange + var content = "Hello\u0085World!"; + + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var actual = GetAllSourceMappings(document); + + // Assert + Assert.Equal(new int[] { 6, 6 }, actual); + } + + [Fact] + public void Lines_Unicode2028_IsNewLine() + { + // Arrange + var content = "Hello\u2028World!"; + + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var actual = GetAllSourceMappings(document); + + // Assert + Assert.Equal(new int[] { 6, 6 }, actual); + } + + [Fact] + public void Lines_Unicode2029_IsNewLine() + { + // Arrange + var content = "Hello\u2029World!"; + + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var actual = GetAllSourceMappings(document); + + // Assert + Assert.Equal(new int[] { 6, 6 }, actual); + } + + [Fact] + public void Lines_GetLocation_IncludesAbsoluteIndexAndDocument() + { + // Arrange + var content = "Hello, World!"; + + var document = new StringSourceDocument(content, Encoding.UTF8, new RazorSourceDocumentProperties(filePath: "Hi.cshtml", relativePath: null)); + + // Act + var actual = document.Lines.GetLocation(1); + + // Assert + Assert.Equal("Hi.cshtml", actual.FilePath); + Assert.Equal(1, actual.AbsoluteIndex); + } + + [Fact] + public void Lines_GetLocation_PrefersRelativePath() + { + // Arrange + var content = "Hello, World!"; + + var document = new StringSourceDocument(content, Encoding.UTF8, new RazorSourceDocumentProperties(filePath: "Hi.cshtml", relativePath: "Bye.cshtml")); + + // Act + var actual = document.Lines.GetLocation(1); + + // Assert + Assert.Equal("Bye.cshtml", actual.FilePath); + Assert.Equal(1, actual.AbsoluteIndex); + } + + // Beginnings of lines are special because the BinarySearch in the implementation + // will succeed. It's a different code path. + [Fact] + public void Lines_GetLocation_FirstCharacter() + { + // Arrange + var content = "Hello\nBig\r\nWorld!"; + + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var actual = document.Lines.GetLocation(0); + + // Assert + Assert.Equal(0, actual.LineIndex); + Assert.Equal(0, actual.CharacterIndex); + } + + [Fact] + public void Lines_GetLocation_EndOfFirstLine() + { + // Arrange + var content = "Hello\nBig\r\nWorld!"; + + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var actual = document.Lines.GetLocation(5); + + // Assert + Assert.Equal(0, actual.LineIndex); + Assert.Equal(5, actual.CharacterIndex); + } + + [Fact] + public void Lines_GetLocation_InteriorLine() + { + // Arrange + var content = "Hello\nBig\r\nWorld!"; + + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var actual = document.Lines.GetLocation(7); + + // Assert + Assert.Equal(1, actual.LineIndex); + Assert.Equal(1, actual.CharacterIndex); + } + + [Fact] + public void Lines_GetLocation_StartOfLastLine() + { + // Arrange + var content = "Hello\nBig\r\nWorld!"; + + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var actual = document.Lines.GetLocation(11); + + // Assert + Assert.Equal(2, actual.LineIndex); + Assert.Equal(0, actual.CharacterIndex); + } + + [Fact] + public void Lines_GetLocation_EndOfLastLine() + { + // Arrange + var content = "Hello\nBig\r\nWorld!"; + + var document = new StringSourceDocument(content, Encoding.UTF8, RazorSourceDocumentProperties.Default); + + // Act + var actual = document.Lines.GetLocation(16); + + // Assert + Assert.Equal(2, actual.LineIndex); + Assert.Equal(5, actual.CharacterIndex); + } + + private static int[] GetAllSourceMappings(RazorSourceDocument source) + { + var lines = new int[source.Lines.Count]; + for (var i = 0; i < lines.Length; i++) + { + lines[i] = source.Lines.GetLineLength(i); + } + + return lines; + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TagHelperBinderTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TagHelperBinderTest.cs new file mode 100644 index 0000000000..73b40802bb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TagHelperBinderTest.cs @@ -0,0 +1,602 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class TagHelperBinderTest + { + [Fact] + public void GetBinding_ReturnsBindingWithInformation() + { + // Arrange + var divTagHelper = TagHelperDescriptorBuilder.Create("DivTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("div")) + .Build(); + var expectedDescriptors = new[] { divTagHelper }; + var expectedAttributes = new[] + { + new KeyValuePair("class", "something") + }; + var tagHelperBinder = new TagHelperBinder("th:", expectedDescriptors); + + // Act + var bindingResult = tagHelperBinder.GetBinding( + tagName: "th:div", + attributes: expectedAttributes, + parentTagName: "body", + parentIsTagHelper: false); + + // Assert + Assert.Equal(expectedDescriptors, bindingResult.Descriptors, TagHelperDescriptorComparer.CaseSensitive); + Assert.Equal("th:div", bindingResult.TagName); + Assert.Equal("body", bindingResult.ParentTagName); + Assert.Equal(expectedAttributes, bindingResult.Attributes); + Assert.Equal("th:", bindingResult.TagHelperPrefix); + Assert.Equal(divTagHelper.TagMatchingRules, bindingResult.Mappings[divTagHelper], TagMatchingRuleDescriptorComparer.CaseSensitive); + } + + public static TheoryData RequiredParentData + { + get + { + var strongPDivParent = TagHelperDescriptorBuilder.Create("StrongTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("strong") + .RequireParentTag("p")) + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("strong") + .RequireParentTag("div")) + .Build(); + var catchAllPParent = TagHelperDescriptorBuilder.Create("CatchAllTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("*") + .RequireParentTag("p")) + .Build(); + + return new TheoryData< + string, // tagName + string, // parentTagName + IEnumerable, // availableDescriptors + IEnumerable> // expectedDescriptors + { + { + "strong", + "p", + new[] { strongPDivParent }, + new[] { strongPDivParent } + }, + { + "strong", + "div", + new[] { strongPDivParent, catchAllPParent }, + new[] { strongPDivParent } + }, + { + "strong", + "p", + new[] { strongPDivParent, catchAllPParent }, + new[] { strongPDivParent, catchAllPParent } + }, + { + "custom", + "p", + new[] { strongPDivParent, catchAllPParent }, + new[] { catchAllPParent } + }, + }; + } + } + + [Theory] + [MemberData(nameof(RequiredParentData))] + public void GetBinding_ReturnsBindingResultWithDescriptorsParentTags( + string tagName, + string parentTagName, + object availableDescriptors, + object expectedDescriptors) + { + // Arrange + var tagHelperBinder = new TagHelperBinder(null, (IEnumerable)availableDescriptors); + + // Act + var bindingResult = tagHelperBinder.GetBinding( + tagName, + attributes: Array.Empty>(), + parentTagName: parentTagName, + parentIsTagHelper: false); + + // Assert + Assert.Equal((IEnumerable)expectedDescriptors, bindingResult.Descriptors, TagHelperDescriptorComparer.CaseSensitive); + } + + public static TheoryData RequiredAttributeData + { + get + { + var divDescriptor = TagHelperDescriptorBuilder.Create("DivTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("div") + .RequireAttributeDescriptor(attribute => attribute.Name("style"))) + .Build(); + var inputDescriptor = TagHelperDescriptorBuilder.Create("InputTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("input") + .RequireAttributeDescriptor(attribute => attribute.Name("class")) + .RequireAttributeDescriptor(attribute => attribute.Name("style"))) + .Build(); + var inputWildcardPrefixDescriptor = TagHelperDescriptorBuilder.Create("InputWildCardAttribute", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName("input") + .RequireAttributeDescriptor(attribute => + attribute + .Name("nodashprefix") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.PrefixMatch))) + .Build(); + var catchAllDescriptor = TagHelperDescriptorBuilder.Create("CatchAllTagHelper", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName(TagHelperMatchingConventions.ElementCatchAllName) + .RequireAttributeDescriptor(attribute => attribute.Name("class"))) + .Build(); + var catchAllDescriptor2 = TagHelperDescriptorBuilder.Create("CatchAllTagHelper2", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName(TagHelperMatchingConventions.ElementCatchAllName) + .RequireAttributeDescriptor(attribute => attribute.Name("custom")) + .RequireAttributeDescriptor(attribute => attribute.Name("class"))) + .Build(); + var catchAllWildcardPrefixDescriptor = TagHelperDescriptorBuilder.Create("CatchAllWildCardAttribute", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => + rule + .RequireTagName(TagHelperMatchingConventions.ElementCatchAllName) + .RequireAttributeDescriptor(attribute => + attribute + .Name("prefix-") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.PrefixMatch))) + .Build(); + var defaultAvailableDescriptors = + new[] { divDescriptor, inputDescriptor, catchAllDescriptor, catchAllDescriptor2 }; + var defaultWildcardDescriptors = + new[] { inputWildcardPrefixDescriptor, catchAllWildcardPrefixDescriptor }; + Func> kvp = + (name) => new KeyValuePair(name, "test value"); + + return new TheoryData< + string, // tagName + IReadOnlyList>, // providedAttributes + IEnumerable, // availableDescriptors + IEnumerable> // expectedDescriptors + { + { + "div", + new[] { kvp("custom") }, + defaultAvailableDescriptors, + null + }, + { "div", new[] { kvp("style") }, defaultAvailableDescriptors, new[] { divDescriptor } }, + { "div", new[] { kvp("class") }, defaultAvailableDescriptors, new[] { catchAllDescriptor } }, + { + "div", + new[] { kvp("class"), kvp("style") }, + defaultAvailableDescriptors, + new[] { divDescriptor, catchAllDescriptor } + }, + { + "div", + new[] { kvp("class"), kvp("style"), kvp("custom") }, + defaultAvailableDescriptors, + new[] { divDescriptor, catchAllDescriptor, catchAllDescriptor2 } + }, + { + "input", + new[] { kvp("class"), kvp("style") }, + defaultAvailableDescriptors, + new[] { inputDescriptor, catchAllDescriptor } + }, + { + "input", + new[] { kvp("nodashprefixA") }, + defaultWildcardDescriptors, + new[] { inputWildcardPrefixDescriptor } + }, + { + "input", + new[] { kvp("nodashprefix-ABC-DEF"), kvp("random") }, + defaultWildcardDescriptors, + new[] { inputWildcardPrefixDescriptor } + }, + { + "input", + new[] { kvp("prefixABCnodashprefix") }, + defaultWildcardDescriptors, + null + }, + { + "input", + new[] { kvp("prefix-") }, + defaultWildcardDescriptors, + null + }, + { + "input", + new[] { kvp("nodashprefix") }, + defaultWildcardDescriptors, + null + }, + { + "input", + new[] { kvp("prefix-A") }, + defaultWildcardDescriptors, + new[] { catchAllWildcardPrefixDescriptor } + }, + { + "input", + new[] { kvp("prefix-ABC-DEF"), kvp("random") }, + defaultWildcardDescriptors, + new[] { catchAllWildcardPrefixDescriptor } + }, + { + "input", + new[] { kvp("prefix-abc"), kvp("nodashprefix-def") }, + defaultWildcardDescriptors, + new[] { inputWildcardPrefixDescriptor, catchAllWildcardPrefixDescriptor } + }, + { + "input", + new[] { kvp("class"), kvp("prefix-abc"), kvp("onclick"), kvp("nodashprefix-def"), kvp("style") }, + defaultWildcardDescriptors, + new[] { inputWildcardPrefixDescriptor, catchAllWildcardPrefixDescriptor } + }, + }; + } + } + + [Theory] + [MemberData(nameof(RequiredAttributeData))] + public void GetBinding_ReturnsBindingResultDescriptorsWithRequiredAttributes( + string tagName, + IReadOnlyList> providedAttributes, + object availableDescriptors, + object expectedDescriptors) + { + // Arrange + var tagHelperBinder = new TagHelperBinder(null, (IReadOnlyList)availableDescriptors); + + // Act + var bindingResult = tagHelperBinder.GetBinding(tagName, providedAttributes, parentTagName: "p", parentIsTagHelper: false); + + // Assert + Assert.Equal((IEnumerable)expectedDescriptors, bindingResult?.Descriptors, TagHelperDescriptorComparer.CaseSensitive); + } + + [Fact] + public void GetBinding_ReturnsNullBindingResultPrefixAsTagName() + { + // Arrange + var catchAllDescriptor = TagHelperDescriptorBuilder.Create("foo1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName(TagHelperMatchingConventions.ElementCatchAllName)) + .Build(); + var descriptors = new[] { catchAllDescriptor }; + var tagHelperBinder = new TagHelperBinder("th", descriptors); + + // Act + var bindingResult = tagHelperBinder.GetBinding( + tagName: "th", + attributes: Array.Empty>(), + parentTagName: "p", + parentIsTagHelper: false); + + // Assert + Assert.Null(bindingResult); + } + + [Fact] + public void GetBinding_ReturnsBindingResultCatchAllDescriptorsForPrefixedTags() + { + // Arrange + var catchAllDescriptor = TagHelperDescriptorBuilder.Create("foo1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName(TagHelperMatchingConventions.ElementCatchAllName)) + .Build(); + var descriptors = new[] { catchAllDescriptor }; + var tagHelperBinder = new TagHelperBinder("th:", descriptors); + + // Act + var bindingResultDiv = tagHelperBinder.GetBinding( + tagName: "th:div", + attributes: Array.Empty>(), + parentTagName: "p", + parentIsTagHelper: false); + var bindingResultSpan = tagHelperBinder.GetBinding( + tagName: "th:span", + attributes: Array.Empty>(), + parentTagName: "p", + parentIsTagHelper: false); + + // Assert + var descriptor = Assert.Single(bindingResultDiv.Descriptors); + Assert.Same(catchAllDescriptor, descriptor); + descriptor = Assert.Single(bindingResultSpan.Descriptors); + Assert.Same(catchAllDescriptor, descriptor); + } + + [Fact] + public void GetBinding_ReturnsBindingResultDescriptorsForPrefixedTags() + { + // Arrange + var divDescriptor = TagHelperDescriptorBuilder.Create("foo1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("div")) + .Build(); + var descriptors = new[] { divDescriptor }; + var tagHelperBinder = new TagHelperBinder("th:", descriptors); + + // Act + var bindingResult = tagHelperBinder.GetBinding( + tagName: "th:div", + attributes: Array.Empty>(), + parentTagName: "p", + parentIsTagHelper: false); + + // Assert + var descriptor = Assert.Single(bindingResult.Descriptors); + Assert.Same(divDescriptor, descriptor); + } + + [Theory] + [InlineData("*")] + [InlineData("div")] + public void GetBinding_ReturnsNullForUnprefixedTags(string tagName) + { + // Arrange + var divDescriptor = TagHelperDescriptorBuilder.Create("foo1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName(tagName)) + .Build(); + var descriptors = new[] { divDescriptor }; + var tagHelperBinder = new TagHelperBinder("th:", descriptors); + + // Act + var bindingResult = tagHelperBinder.GetBinding( + tagName: "div", + attributes: Array.Empty>(), + parentTagName: "p", + parentIsTagHelper: false); + + // Assert + Assert.Null(bindingResult); + } + + [Fact] + public void GetDescriptors_ReturnsNothingForUnregisteredTags() + { + // Arrange + var divDescriptor = TagHelperDescriptorBuilder.Create("foo1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("div")) + .Build(); + var spanDescriptor = TagHelperDescriptorBuilder.Create("foo2", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("span")) + .Build(); + var descriptors = new TagHelperDescriptor[] { divDescriptor, spanDescriptor }; + var tagHelperBinder = new TagHelperBinder(null, descriptors); + + // Act + var tagHelperBinding = tagHelperBinder.GetBinding( + tagName: "foo", + attributes: Array.Empty>(), + parentTagName: "p", + parentIsTagHelper: false); + + // Assert + Assert.Null(tagHelperBinding); + } + + [Fact] + public void GetDescriptors_ReturnsCatchAllsWithEveryTagName() + { + // Arrange + var divDescriptor = TagHelperDescriptorBuilder.Create("foo1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("div")) + .Build(); + var spanDescriptor = TagHelperDescriptorBuilder.Create("foo2", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("span")) + .Build(); + var catchAllDescriptor = TagHelperDescriptorBuilder.Create("foo3", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName(TagHelperMatchingConventions.ElementCatchAllName)) + .Build(); + var descriptors = new TagHelperDescriptor[] { divDescriptor, spanDescriptor, catchAllDescriptor }; + var tagHelperBinder = new TagHelperBinder(null, descriptors); + + // Act + var divBinding = tagHelperBinder.GetBinding( + tagName: "div", + attributes: Array.Empty>(), + parentTagName: "p", + parentIsTagHelper: false); + var spanBinding = tagHelperBinder.GetBinding( + tagName: "span", + attributes: Array.Empty>(), + parentTagName: "p", + parentIsTagHelper: false); + + // Assert + // For divs + Assert.Equal(2, divBinding.Descriptors.Count()); + Assert.Contains(divDescriptor, divBinding.Descriptors); + Assert.Contains(catchAllDescriptor, divBinding.Descriptors); + + // For spans + Assert.Equal(2, spanBinding.Descriptors.Count()); + Assert.Contains(spanDescriptor, spanBinding.Descriptors); + Assert.Contains(catchAllDescriptor, spanBinding.Descriptors); + } + + [Fact] + public void GetDescriptors_DuplicateDescriptorsAreNotPartOfTagHelperDescriptorPool() + { + // Arrange + var divDescriptor = TagHelperDescriptorBuilder.Create("foo1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("div")) + .Build(); + var descriptors = new TagHelperDescriptor[] { divDescriptor, divDescriptor }; + var tagHelperBinder = new TagHelperBinder(null, descriptors); + + // Act + var bindingResult = tagHelperBinder.GetBinding( + tagName: "div", + attributes: Array.Empty>(), + parentTagName: "p", + parentIsTagHelper: false); + + // Assert + var descriptor = Assert.Single(bindingResult.Descriptors); + Assert.Same(divDescriptor, descriptor); + } + + [Fact] + public void GetBinding_DescriptorWithMultipleRules_CorrectlySelectsMatchingRules() + { + // Arrange + var multiRuleDescriptor = TagHelperDescriptorBuilder.Create("foo", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule + .RequireTagName(TagHelperMatchingConventions.ElementCatchAllName) + .RequireParentTag("body")) + .TagMatchingRuleDescriptor(rule => rule + .RequireTagName("div")) + .TagMatchingRuleDescriptor(rule => rule + .RequireTagName("span")) + .Build(); + var descriptors = new TagHelperDescriptor[] { multiRuleDescriptor }; + var tagHelperBinder = new TagHelperBinder(null, descriptors); + + // Act + var binding = tagHelperBinder.GetBinding( + tagName: "div", + attributes: Array.Empty>(), + parentTagName: "p", + parentIsTagHelper: false); + + // Assert + var boundDescriptor = Assert.Single(binding.Descriptors); + Assert.Same(multiRuleDescriptor, boundDescriptor); + var boundRules = binding.Mappings[boundDescriptor]; + var boundRule = Assert.Single(boundRules); + Assert.Equal("div", boundRule.TagName); + } + + [Fact] + public void GetBinding_PrefixedParent_ReturnsBinding() + { + // Arrange + var divDescriptor = TagHelperDescriptorBuilder.Create("foo1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("div").RequireParentTag("p")) + .Build(); + var pDescriptor = TagHelperDescriptorBuilder.Create("foo2", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("p")) + .Build(); + var descriptors = new[] { divDescriptor, pDescriptor }; + var tagHelperBinder = new TagHelperBinder("th:", descriptors); + + // Act + var bindingResult = tagHelperBinder.GetBinding( + tagName: "th:div", + attributes: Array.Empty>(), + parentTagName: "th:p", + parentIsTagHelper: true); + + // Assert + var boundDescriptor = Assert.Single(bindingResult.Descriptors); + Assert.Same(divDescriptor, boundDescriptor); + var boundRules = bindingResult.Mappings[boundDescriptor]; + var boundRule = Assert.Single(boundRules); + Assert.Equal("div", boundRule.TagName); + Assert.Equal("p", boundRule.ParentTag); + } + + [Fact] + public void GetBinding_IsAttributeMatch_SingleAttributeMatch() + { + // Arrange + var divDescriptor = TagHelperDescriptorBuilder.Create("foo1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("div")) + .AddMetadata(TagHelperMetadata.Common.ClassifyAttributesOnly, bool.TrueString) + .Build(); + + var descriptors = new[] { divDescriptor, }; + var tagHelperBinder = new TagHelperBinder("", descriptors); + + // Act + var bindingResult = tagHelperBinder.GetBinding( + tagName: "div", + attributes: Array.Empty>(), + parentTagName: "p", + parentIsTagHelper: false); + + // Assert + Assert.True(bindingResult.IsAttributeMatch); + } + + [Fact] + public void GetBinding_IsAttributeMatch_MultipleAttributeMatches() + { + // Arrange + var divDescriptor1 = TagHelperDescriptorBuilder.Create("foo1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("div")) + .AddMetadata(TagHelperMetadata.Common.ClassifyAttributesOnly, bool.TrueString) + .Build(); + + var divDescriptor2 = TagHelperDescriptorBuilder.Create("foo1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("div")) + .AddMetadata(TagHelperMetadata.Common.ClassifyAttributesOnly, bool.TrueString) + .Build(); + + var descriptors = new[] { divDescriptor1, divDescriptor2, }; + var tagHelperBinder = new TagHelperBinder("", descriptors); + + // Act + var bindingResult = tagHelperBinder.GetBinding( + tagName: "div", + attributes: Array.Empty>(), + parentTagName: "p", + parentIsTagHelper: false); + + // Assert + Assert.True(bindingResult.IsAttributeMatch); + } + + [Fact] + public void GetBinding_IsAttributeMatch_MixedAttributeMatches() + { + // Arrange + var divDescriptor1 = TagHelperDescriptorBuilder.Create("foo1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("div")) + .AddMetadata(TagHelperMetadata.Common.ClassifyAttributesOnly, bool.TrueString) + .Build(); + + var divDescriptor2 = TagHelperDescriptorBuilder.Create("foo1", "SomeAssembly") + .TagMatchingRuleDescriptor(rule => rule.RequireTagName("div")) + .Build(); + + var descriptors = new[] { divDescriptor1, divDescriptor2, }; + var tagHelperBinder = new TagHelperBinder("", descriptors); + + // Act + var bindingResult = tagHelperBinder.GetBinding( + tagName: "div", + attributes: Array.Empty>(), + parentTagName: "p", + parentIsTagHelper: false); + + // Assert + Assert.False(bindingResult.IsAttributeMatch); + } + } +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TagHelperDescriptorBuilderTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TagHelperDescriptorBuilderTest.cs new file mode 100644 index 0000000000..37eef5fbfa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TagHelperDescriptorBuilderTest.cs @@ -0,0 +1,38 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class TagHelperDescriptorBuilderTest + { + [Fact] + public void DisplayName_SetsDescriptorsDisplayName() + { + // Arrange + var expectedDisplayName = "ExpectedDisplayName"; + var builder = TagHelperDescriptorBuilder.Create("TestTagHelper", "TestAssembly"); + + // Act + var descriptor = builder.DisplayName(expectedDisplayName).Build(); + + // Assert + Assert.Equal(expectedDisplayName, descriptor.DisplayName); + } + + [Fact] + public void DisplayName_DefaultsToTypeName() + { + // Arrange + var expectedDisplayName = "TestTagHelper"; + var builder = TagHelperDescriptorBuilder.Create("TestTagHelper", "TestAssembly"); + + // Act + var descriptor = builder.Build(); + + // Assert + Assert.Equal(expectedDisplayName, descriptor.DisplayName); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TagHelperDescriptorExtensionsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TagHelperDescriptorExtensionsTest.cs new file mode 100644 index 0000000000..0940661058 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TagHelperDescriptorExtensionsTest.cs @@ -0,0 +1,64 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Collections.Generic; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class TagHelperDescriptorExtensionsTest + { + [Fact] + public void GetTypeName_ReturnsTypeName() + { + // Arrange + var expectedTypeName = "TestTagHelper"; + var descriptor = TagHelperDescriptorBuilder.Create(expectedTypeName, "TestAssembly").TypeName(expectedTypeName).Build(); + + // Act + var typeName = descriptor.GetTypeName(); + + // Assert + Assert.Equal(expectedTypeName, typeName); + } + + [Fact] + public void GetTypeName_ReturnsNullIfNoTypeName() + { + // Arrange + var descriptor = TagHelperDescriptorBuilder.Create("Test", "TestAssembly").Build(); + + // Act + var typeName = descriptor.GetTypeName(); + + // Assert + Assert.Null(typeName); + } + + [Fact] + public void IsDefaultKind_ReturnsTrue_IfKindIsDefault() + { + // Arrange + var descriptor = TagHelperDescriptorBuilder.Create("TestTagHelper", "TestAssembly").Build(); + + // Act + var isDefault = descriptor.IsDefaultKind(); + + // Assert + Assert.True(isDefault); + } + + [Fact] + public void IsDefaultKind_ReturnsFalse_IfKindIsNotDefault() + { + // Arrange + var descriptor = TagHelperDescriptorBuilder.Create("other-kind", "TestTagHelper", "TestAssembly").Build(); + + // Act + var isDefault = descriptor.IsDefaultKind(); + + // Assert + Assert.False(isDefault); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TagHelperMatchingConventionsTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TagHelperMatchingConventionsTest.cs new file mode 100644 index 0000000000..7a1fc6c1e3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TagHelperMatchingConventionsTest.cs @@ -0,0 +1,156 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Xunit; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class TagHelperMatchingConventionsTest + { + public static TheoryData RequiredAttributeDescriptorData + { + get + { + // requiredAttributeDescriptor, attributeName, attributeValue, expectedResult + return new TheoryData, string, string, bool> + { + { + builder => builder.Name("key"), + "KeY", + "value", + true + }, + { + builder => builder.Name("key"), + "keys", + "value", + false + }, + { + builder => builder + .Name("route-") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.PrefixMatch), + "ROUTE-area", + "manage", + true + }, + { + builder => builder + .Name("route-") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.PrefixMatch), + "routearea", + "manage", + false + }, + { + builder => builder + .Name("route-") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.PrefixMatch), + "route-", + "manage", + false + }, + { + builder => builder + .Name("key") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch), + "KeY", + "value", + true + }, + { + builder => builder + .Name("key") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch), + "keys", + "value", + false + }, + { + builder => builder + .Name("key") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch) + .Value("value") + .ValueComparisonMode(RequiredAttributeDescriptor.ValueComparisonMode.FullMatch), + "key", + "value", + true + }, + { + builder => builder + .Name("key") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch) + .Value("value") + .ValueComparisonMode(RequiredAttributeDescriptor.ValueComparisonMode.FullMatch), + "key", + "Value", + false + }, + { + builder => builder + .Name("class") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch) + .Value("btn") + .ValueComparisonMode(RequiredAttributeDescriptor.ValueComparisonMode.PrefixMatch), + "class", + "btn btn-success", + true + }, + { + builder => builder + .Name("class") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch) + .Value("btn") + .ValueComparisonMode(RequiredAttributeDescriptor.ValueComparisonMode.PrefixMatch), + "class", + "BTN btn-success", + false + }, + { + builder => builder + .Name("href") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch) + .Value("#navigate") + .ValueComparisonMode(RequiredAttributeDescriptor.ValueComparisonMode.SuffixMatch), + "href", + "/home/index#navigate", + true + }, + { + builder => builder + .Name("href") + .NameComparisonMode(RequiredAttributeDescriptor.NameComparisonMode.FullMatch) + .Value("#navigate") + .ValueComparisonMode(RequiredAttributeDescriptor.ValueComparisonMode.SuffixMatch), + "href", + "/home/index#NAVigate", + false + }, + }; + } + } + + [Theory] + [MemberData(nameof(RequiredAttributeDescriptorData))] + public void Matches_ReturnsExpectedResult( + Action configure, + string attributeName, + string attributeValue, + bool expectedResult) + { + // Arrange + + var builder = new DefaultRequiredAttributeDescriptorBuilder(); + configure(builder); + + var requiredAttibute = builder.Build(); + + // Act + var result = TagHelperMatchingConventions.SatisfiesRequiredAttribute(attributeName, attributeValue, requiredAttibute); + + // Assert + Assert.Equal(expectedResult, result); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Home.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Home.cshtml new file mode 100644 index 0000000000..7c5b3ca2e3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Home.cshtml @@ -0,0 +1 @@ +home-content \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/About/About.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/About/About.cshtml new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/About/About.cshtml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/Home/Index.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/Home/Index.cshtml new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/Home/Index.cshtml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/Home/Index.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/Home/Index.txt new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/Home/Index.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/Home/_ViewImports.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/Home/_ViewImports.cshtml new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/Home/_ViewImports.cshtml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/_ViewImports.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/_ViewImports.cshtml new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/Views/_ViewImports.cshtml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/_ViewImports.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/_ViewImports.cshtml new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/DefaultRazorProjectFileSystem/_ViewImports.cshtml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/CustomDirective.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/CustomDirective.cshtml new file mode 100644 index 0000000000..f347706f3d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/CustomDirective.cshtml @@ -0,0 +1 @@ +@test \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/CustomDirective.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/CustomDirective.ir.txt new file mode 100644 index 0000000000..6142bc2eb1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/CustomDirective.ir.txt @@ -0,0 +1,6 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Razor + RazorSourceChecksumAttribute - + ClassDeclaration - - public - Template - - + MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/Empty.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/Empty.cshtml new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/Empty.cshtml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/Empty.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/Empty.ir.txt new file mode 100644 index 0000000000..6142bc2eb1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/Empty.ir.txt @@ -0,0 +1,6 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Razor + RazorSourceChecksumAttribute - + ClassDeclaration - - public - Template - - + MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/HelloWorld.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/HelloWorld.cshtml new file mode 100644 index 0000000000..46953c4542 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/HelloWorld.cshtml @@ -0,0 +1 @@ +Hello, World! \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/HelloWorld.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/HelloWorld.ir.txt new file mode 100644 index 0000000000..83409ed68c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/BasicIntegrationTest/HelloWorld.ir.txt @@ -0,0 +1,8 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Razor + RazorSourceChecksumAttribute - + ClassDeclaration - - public - Template - - + MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [13] HelloWorld.cshtml) + IntermediateToken - (0:0,0 [13] HelloWorld.cshtml) - Html - Hello, World! diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective.cshtml new file mode 100644 index 0000000000..10b53aaeaf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective.cshtml @@ -0,0 +1 @@ +@addTagHelper "*, TestAssembly" diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective_DesignTime.codegen.cs new file mode 100644 index 0000000000..9f3704669f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective_DesignTime.codegen.cs @@ -0,0 +1,32 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_AddTagHelperDirective_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective_DesignTime.ir.txt new file mode 100644 index 0000000000..a3c0f0d9e5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective_DesignTime.ir.txt @@ -0,0 +1,14 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_AddTagHelperDirective_DesignTime - - + DesignTimeDirective - + DirectiveToken - (14:0,14 [17] AddTagHelperDirective.cshtml) - "*, TestAssembly" + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:0,31 [2] AddTagHelperDirective.cshtml) + IntermediateToken - (31:0,31 [2] AddTagHelperDirective.cshtml) - Html - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective_DesignTime.mappings.txt new file mode 100644 index 0000000000..782c5c9d62 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective_DesignTime.mappings.txt @@ -0,0 +1,5 @@ +Source Location: (14:0,14 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective.cshtml) +|"*, TestAssembly"| +Generated Location: (543:12,37 [17] ) +|"*, TestAssembly"| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml new file mode 100644 index 0000000000..8610fe90aa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml @@ -0,0 +1,8 @@ +@addTagHelper *, TestAssembly + +

        +

        HelloWorld

        + + + +

        \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_DesignTime.codegen.cs new file mode 100644 index 0000000000..1a6736914b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_DesignTime.codegen.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_AttributeTargetingTagHelpers_DesignTime + { + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + private global::TestNamespace.CatchAllTagHelper __TestNamespace_CatchAllTagHelper; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __TestNamespace_InputTagHelper.Type = "checkbox"; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper.Type = "checkbox"; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable + __TestNamespace_PTagHelper = CreateTagHelper(); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_DesignTime.ir.txt new file mode 100644 index 0000000000..db2f83bb78 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_DesignTime.ir.txt @@ -0,0 +1,85 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_AttributeTargetingTagHelpers_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + FieldDeclaration - - private - global::TestNamespace.CatchAllTagHelper - __TestNamespace_CatchAllTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + DesignTimeDirective - + DirectiveToken - (14:0,14 [15] AttributeTargetingTagHelpers.cshtml) - *, TestAssembly + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (29:0,29 [4] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (29:0,29 [4] AttributeTargetingTagHelpers.cshtml) - Html - \n\n + TagHelper - (33:2,0 [228] AttributeTargetingTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (48:2,15 [9] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (48:2,15 [6] AttributeTargetingTagHelpers.cshtml) - Html - \n + IntermediateToken - (54:3,4 [2] AttributeTargetingTagHelpers.cshtml) - Html -

        + TagHelper - (57:3,7 [36] AttributeTargetingTagHelpers.cshtml) - strong - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (79:3,29 [5] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (79:3,29 [5] AttributeTargetingTagHelpers.cshtml) - Html - Hello + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - catchAll - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (75:3,25 [2] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (75:3,25 [2] AttributeTargetingTagHelpers.cshtml) - Html - hi + DefaultTagHelperExecute - + HtmlContent - (93:3,43 [62] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (93:3,43 [7] AttributeTargetingTagHelpers.cshtml) - Html - + IntermediateToken - (101:3,51 [5] AttributeTargetingTagHelpers.cshtml) - Html - World + IntermediateToken - (106:3,56 [9] AttributeTargetingTagHelpers.cshtml) - Html - + IntermediateToken - (115:3,65 [4] AttributeTargetingTagHelpers.cshtml) - Html -

        + IntermediateToken - (119:3,69 [6] AttributeTargetingTagHelpers.cshtml) - Html - \n + IntermediateToken - (125:4,4 [6] AttributeTargetingTagHelpers.cshtml) - Html - + IntermediateToken - (149:4,28 [6] AttributeTargetingTagHelpers.cshtml) - Html - \n + TagHelper - (155:5,4 [40] AttributeTargetingTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (168:5,17 [8] AttributeTargetingTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (168:5,17 [8] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (168:5,17 [8] AttributeTargetingTagHelpers.cshtml) - Html - checkbox + DefaultTagHelperProperty - (168:5,17 [8] AttributeTargetingTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (168:5,17 [8] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (168:5,17 [8] AttributeTargetingTagHelpers.cshtml) - Html - checkbox + DefaultTagHelperProperty - (187:5,36 [4] AttributeTargetingTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (187:5,36 [4] AttributeTargetingTagHelpers.cshtml) - CSharp - true + DefaultTagHelperExecute - + HtmlContent - (195:5,44 [6] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (195:5,44 [6] AttributeTargetingTagHelpers.cshtml) - Html - \n + TagHelper - (201:6,4 [54] AttributeTargetingTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperProperty - (214:6,17 [8] AttributeTargetingTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (214:6,17 [8] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (214:6,17 [8] AttributeTargetingTagHelpers.cshtml) - Html - checkbox + DefaultTagHelperProperty - (214:6,17 [8] AttributeTargetingTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (214:6,17 [8] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (214:6,17 [8] AttributeTargetingTagHelpers.cshtml) - Html - checkbox + DefaultTagHelperProperty - (233:6,36 [4] AttributeTargetingTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (233:6,36 [4] AttributeTargetingTagHelpers.cshtml) - CSharp - true + DefaultTagHelperHtmlAttribute - - catchAll - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (249:6,52 [2] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (249:6,52 [2] AttributeTargetingTagHelpers.cshtml) - Html - hi + DefaultTagHelperExecute - + HtmlContent - (255:6,58 [2] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (255:6,58 [2] AttributeTargetingTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (43:2,10 [3] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (43:2,10 [3] AttributeTargetingTagHelpers.cshtml) - Html - btn + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_DesignTime.mappings.txt new file mode 100644 index 0000000000..14f7685665 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_DesignTime.mappings.txt @@ -0,0 +1,15 @@ +Source Location: (14:0,14 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml) +|*, TestAssembly| +Generated Location: (902:16,38 [15] ) +|*, TestAssembly| + +Source Location: (187:5,36 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml) +|true| +Generated Location: (1919:38,42 [4] ) +|true| + +Source Location: (233:6,36 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml) +|true| +Generated Location: (2610:50,42 [4] ) +|true| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_Runtime.codegen.cs new file mode 100644 index 0000000000..e1a1e91204 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_Runtime.codegen.cs @@ -0,0 +1,130 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "2ceb35a784a30ab44eb8b621c9e61d2361841c63" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_AttributeTargetingTagHelpers_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"2ceb35a784a30ab44eb8b621c9e61d2361841c63", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_AttributeTargetingTagHelpers_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("catchAll", new global::Microsoft.AspNetCore.Html.HtmlString("hi"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "checkbox", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("btn"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + private global::TestNamespace.CatchAllTagHelper __TestNamespace_CatchAllTagHelper; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("\r\n

        "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("strong", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("Hello"); + } + ); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("World

        \r\n \r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_1.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_1.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1); +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_1.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_1.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1); +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_Runtime.ir.txt new file mode 100644 index 0000000000..dd411e5da2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers_Runtime.ir.txt @@ -0,0 +1,68 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_AttributeTargetingTagHelpers_Runtime - - + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_0 - catchAll - hi - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_1 - type - checkbox - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_2 - class - btn - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + FieldDeclaration - - private - global::TestNamespace.CatchAllTagHelper - __TestNamespace_CatchAllTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:1,0 [2] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (31:1,0 [2] AttributeTargetingTagHelpers.cshtml) - Html - \n + TagHelper - (33:2,0 [228] AttributeTargetingTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (48:2,15 [9] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (48:2,15 [6] AttributeTargetingTagHelpers.cshtml) - Html - \n + IntermediateToken - (54:3,4 [2] AttributeTargetingTagHelpers.cshtml) - Html -

        + TagHelper - (57:3,7 [36] AttributeTargetingTagHelpers.cshtml) - strong - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (79:3,29 [5] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (79:3,29 [5] AttributeTargetingTagHelpers.cshtml) - Html - Hello + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 + DefaultTagHelperExecute - + HtmlContent - (93:3,43 [62] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (93:3,43 [7] AttributeTargetingTagHelpers.cshtml) - Html - + IntermediateToken - (101:3,51 [5] AttributeTargetingTagHelpers.cshtml) - Html - World + IntermediateToken - (106:3,56 [9] AttributeTargetingTagHelpers.cshtml) - Html - + IntermediateToken - (115:3,65 [4] AttributeTargetingTagHelpers.cshtml) - Html -

        + IntermediateToken - (119:3,69 [6] AttributeTargetingTagHelpers.cshtml) - Html - \n + IntermediateToken - (125:4,4 [6] AttributeTargetingTagHelpers.cshtml) - Html - + IntermediateToken - (149:4,28 [6] AttributeTargetingTagHelpers.cshtml) - Html - \n + TagHelper - (155:5,4 [40] AttributeTargetingTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + PreallocatedTagHelperProperty - (168:5,17 [8] AttributeTargetingTagHelpers.cshtml) - __tagHelperAttribute_1 - type - Type + PreallocatedTagHelperProperty - (168:5,17 [8] AttributeTargetingTagHelpers.cshtml) - __tagHelperAttribute_1 - type - Type + DefaultTagHelperProperty - (187:5,36 [4] AttributeTargetingTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (187:5,36 [4] AttributeTargetingTagHelpers.cshtml) - CSharp - true + DefaultTagHelperExecute - + HtmlContent - (195:5,44 [6] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (195:5,44 [6] AttributeTargetingTagHelpers.cshtml) - Html - \n + TagHelper - (201:6,4 [54] AttributeTargetingTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + PreallocatedTagHelperProperty - (214:6,17 [8] AttributeTargetingTagHelpers.cshtml) - __tagHelperAttribute_1 - type - Type + PreallocatedTagHelperProperty - (214:6,17 [8] AttributeTargetingTagHelpers.cshtml) - __tagHelperAttribute_1 - type - Type + DefaultTagHelperProperty - (233:6,36 [4] AttributeTargetingTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (233:6,36 [4] AttributeTargetingTagHelpers.cshtml) - CSharp - true + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 + DefaultTagHelperExecute - + HtmlContent - (255:6,58 [2] AttributeTargetingTagHelpers.cshtml) + IntermediateToken - (255:6,58 [2] AttributeTargetingTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml new file mode 100644 index 0000000000..69b68e07c5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml @@ -0,0 +1,26 @@ +@functions { + public async Task Foo() + { + return "Bar"; + } +} + +
        +

        Basic Asynchronous Expression Test

        +

        Basic Asynchronous Expression: @await Foo()

        +

        Basic Asynchronous Template: @(await Foo())

        +

        Basic Asynchronous Statement: @{ await Foo(); }

        +

        Basic Asynchronous Statement Nested: @{ @await Foo() }

        +

        Basic Incomplete Asynchronous Statement: @await

        +
        + +
        +

        Advanced Asynchronous Expression Test

        +

        Advanced Asynchronous Expression: @await Foo(1, 2)

        +

        Advanced Asynchronous Expression Extended: @await Foo.Bar(1, 2)

        +

        Advanced Asynchronous Template: @(await Foo("bob", true))

        +

        Advanced Asynchronous Statement: @{ await Foo(something, hello: "world"); }

        +

        Advanced Asynchronous Statement Extended: @{ await Foo.Bar(1, 2) }

        +

        Advanced Asynchronous Statement Nested: @{ @await Foo(boolValue: false) }

        +

        Advanced Incomplete Asynchronous Statement: @await ("wrrronggg")

        +
        \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.codegen.cs new file mode 100644 index 0000000000..850e7d6fae --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.codegen.cs @@ -0,0 +1,145 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Await_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + __o = await Foo(); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + __o = await Foo(); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + await Foo(); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + __o = await Foo(); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + __o = await; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + __o = await Foo(1, 2); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 20 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + __o = await Foo.Bar(1, 2); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 21 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + __o = await Foo("bob", true); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 22 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + await Foo(something, hello: "world"); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 23 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + await Foo.Bar(1, 2) + +#line default +#line hidden +#nullable disable +#nullable restore +#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + __o = await Foo(boolValue: false); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 25 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + __o = await ("wrrronggg"); + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + + public async Task Foo() + { + return "Bar"; + } + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.ir.txt new file mode 100644 index 0000000000..0794ebc4bd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.ir.txt @@ -0,0 +1,148 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Await_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (89:5,1 [102] Await.cshtml) + IntermediateToken - (89:5,1 [4] Await.cshtml) - Html - \n\n + IntermediateToken - (93:7,0 [8] Await.cshtml) - Html -
        + IntermediateToken - (102:7,9 [6] Await.cshtml) - Html - \n + IntermediateToken - (108:8,4 [3] Await.cshtml) - Html -

        + IntermediateToken - (112:8,8 [34] Await.cshtml) - Html - Basic Asynchronous Expression Test + IntermediateToken - (146:8,42 [5] Await.cshtml) - Html -

        + IntermediateToken - (151:8,47 [6] Await.cshtml) - Html - \n + IntermediateToken - (157:9,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (160:9,7 [31] Await.cshtml) - Html - Basic Asynchronous Expression: + CSharpExpression - (192:9,39 [11] Await.cshtml) + IntermediateToken - (192:9,39 [11] Await.cshtml) - CSharp - await Foo() + HtmlContent - (203:9,50 [42] Await.cshtml) + IntermediateToken - (203:9,50 [4] Await.cshtml) - Html -

        + IntermediateToken - (207:9,54 [6] Await.cshtml) - Html - \n + IntermediateToken - (213:10,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (216:10,7 [29] Await.cshtml) - Html - Basic Asynchronous Template: + CSharpExpression - (247:10,38 [11] Await.cshtml) + IntermediateToken - (247:10,38 [11] Await.cshtml) - CSharp - await Foo() + HtmlContent - (259:10,50 [43] Await.cshtml) + IntermediateToken - (259:10,50 [4] Await.cshtml) - Html -

        + IntermediateToken - (263:10,54 [6] Await.cshtml) - Html - \n + IntermediateToken - (269:11,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (272:11,7 [30] Await.cshtml) - Html - Basic Asynchronous Statement: + CSharpCode - (304:11,39 [14] Await.cshtml) + IntermediateToken - (304:11,39 [14] Await.cshtml) - CSharp - await Foo(); + HtmlContent - (319:11,54 [50] Await.cshtml) + IntermediateToken - (319:11,54 [4] Await.cshtml) - Html -

        + IntermediateToken - (323:11,58 [6] Await.cshtml) - Html - \n + IntermediateToken - (329:12,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (332:12,7 [37] Await.cshtml) - Html - Basic Asynchronous Statement Nested: + CSharpCode - (371:12,46 [1] Await.cshtml) + IntermediateToken - (371:12,46 [1] Await.cshtml) - CSharp - + HtmlContent - (372:12,47 [3] Await.cshtml) + IntermediateToken - (372:12,47 [2] Await.cshtml) - Html - + CSharpExpression - (376:12,51 [11] Await.cshtml) + IntermediateToken - (376:12,51 [11] Await.cshtml) - CSharp - await Foo() + HtmlContent - (387:12,62 [4] Await.cshtml) + IntermediateToken - (387:12,62 [4] Await.cshtml) - Html - + CSharpCode - (391:12,66 [1] Await.cshtml) + IntermediateToken - (391:12,66 [1] Await.cshtml) - CSharp - + HtmlContent - (393:12,68 [54] Await.cshtml) + IntermediateToken - (393:12,68 [4] Await.cshtml) - Html -

        + IntermediateToken - (397:12,72 [6] Await.cshtml) - Html - \n + IntermediateToken - (403:13,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (406:13,7 [41] Await.cshtml) - Html - Basic Incomplete Asynchronous Statement: + CSharpExpression - (448:13,49 [5] Await.cshtml) + IntermediateToken - (448:13,49 [5] Await.cshtml) - CSharp - await + HtmlContent - (453:13,54 [124] Await.cshtml) + IntermediateToken - (453:13,54 [4] Await.cshtml) - Html -

        + IntermediateToken - (457:13,58 [2] Await.cshtml) - Html - \n + IntermediateToken - (459:14,0 [10] Await.cshtml) - Html -
        + IntermediateToken - (469:14,10 [4] Await.cshtml) - Html - \n\n + IntermediateToken - (473:16,0 [8] Await.cshtml) - Html -
        + IntermediateToken - (482:16,9 [6] Await.cshtml) - Html - \n + IntermediateToken - (488:17,4 [3] Await.cshtml) - Html -

        + IntermediateToken - (492:17,8 [37] Await.cshtml) - Html - Advanced Asynchronous Expression Test + IntermediateToken - (529:17,45 [5] Await.cshtml) - Html -

        + IntermediateToken - (534:17,50 [6] Await.cshtml) - Html - \n + IntermediateToken - (540:18,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (543:18,7 [34] Await.cshtml) - Html - Advanced Asynchronous Expression: + CSharpExpression - (578:18,42 [15] Await.cshtml) + IntermediateToken - (578:18,42 [15] Await.cshtml) - CSharp - await Foo(1, 2) + HtmlContent - (593:18,57 [56] Await.cshtml) + IntermediateToken - (593:18,57 [4] Await.cshtml) - Html -

        + IntermediateToken - (597:18,61 [6] Await.cshtml) - Html - \n + IntermediateToken - (603:19,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (606:19,7 [43] Await.cshtml) - Html - Advanced Asynchronous Expression Extended: + CSharpExpression - (650:19,51 [19] Await.cshtml) + IntermediateToken - (650:19,51 [19] Await.cshtml) - CSharp - await Foo.Bar(1, 2) + HtmlContent - (669:19,70 [45] Await.cshtml) + IntermediateToken - (669:19,70 [4] Await.cshtml) - Html -

        + IntermediateToken - (673:19,74 [6] Await.cshtml) - Html - \n + IntermediateToken - (679:20,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (682:20,7 [32] Await.cshtml) - Html - Advanced Asynchronous Template: + CSharpExpression - (716:20,41 [22] Await.cshtml) + IntermediateToken - (716:20,41 [22] Await.cshtml) - CSharp - await Foo("bob", true) + HtmlContent - (739:20,64 [46] Await.cshtml) + IntermediateToken - (739:20,64 [4] Await.cshtml) - Html -

        + IntermediateToken - (743:20,68 [6] Await.cshtml) - Html - \n + IntermediateToken - (749:21,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (752:21,7 [33] Await.cshtml) - Html - Advanced Asynchronous Statement: + CSharpCode - (787:21,42 [39] Await.cshtml) + IntermediateToken - (787:21,42 [39] Await.cshtml) - CSharp - await Foo(something, hello: "world"); + HtmlContent - (827:21,82 [55] Await.cshtml) + IntermediateToken - (827:21,82 [4] Await.cshtml) - Html -

        + IntermediateToken - (831:21,86 [6] Await.cshtml) - Html - \n + IntermediateToken - (837:22,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (840:22,7 [42] Await.cshtml) - Html - Advanced Asynchronous Statement Extended: + CSharpCode - (884:22,51 [21] Await.cshtml) + IntermediateToken - (884:22,51 [21] Await.cshtml) - CSharp - await Foo.Bar(1, 2) + HtmlContent - (906:22,73 [53] Await.cshtml) + IntermediateToken - (906:22,73 [4] Await.cshtml) - Html -

        + IntermediateToken - (910:22,77 [6] Await.cshtml) - Html - \n + IntermediateToken - (916:23,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (919:23,7 [40] Await.cshtml) - Html - Advanced Asynchronous Statement Nested: + CSharpCode - (961:23,49 [1] Await.cshtml) + IntermediateToken - (961:23,49 [1] Await.cshtml) - CSharp - + HtmlContent - (962:23,50 [3] Await.cshtml) + IntermediateToken - (962:23,50 [2] Await.cshtml) - Html - + CSharpExpression - (966:23,54 [27] Await.cshtml) + IntermediateToken - (966:23,54 [27] Await.cshtml) - CSharp - await Foo(boolValue: false) + HtmlContent - (993:23,81 [4] Await.cshtml) + IntermediateToken - (993:23,81 [4] Await.cshtml) - Html - + CSharpCode - (997:23,85 [1] Await.cshtml) + IntermediateToken - (997:23,85 [1] Await.cshtml) - CSharp - + HtmlContent - (999:23,87 [57] Await.cshtml) + IntermediateToken - (999:23,87 [4] Await.cshtml) - Html -

        + IntermediateToken - (1003:23,91 [6] Await.cshtml) - Html - \n + IntermediateToken - (1009:24,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (1012:24,7 [44] Await.cshtml) - Html - Advanced Incomplete Asynchronous Statement: + CSharpExpression - (1057:24,52 [19] Await.cshtml) + IntermediateToken - (1057:24,52 [19] Await.cshtml) - CSharp - await ("wrrronggg") + HtmlContent - (1076:24,71 [16] Await.cshtml) + IntermediateToken - (1076:24,71 [4] Await.cshtml) - Html -

        + IntermediateToken - (1080:24,75 [2] Await.cshtml) - Html - \n + IntermediateToken - (1082:25,0 [10] Await.cshtml) - Html -
        + CSharpCode - (12:0,12 [76] Await.cshtml) + IntermediateToken - (12:0,12 [76] Await.cshtml) - CSharp - \n public async Task Foo()\n {\n return "Bar";\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.mappings.txt new file mode 100644 index 0000000000..8fd6a5044a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.mappings.txt @@ -0,0 +1,95 @@ +Source Location: (192:9,39 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) +|await Foo()| +Generated Location: (768:19,39 [11] ) +|await Foo()| + +Source Location: (247:10,38 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) +|await Foo()| +Generated Location: (971:26,38 [11] ) +|await Foo()| + +Source Location: (304:11,39 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) +| await Foo(); | +Generated Location: (1175:33,39 [14] ) +| await Foo(); | + +Source Location: (371:12,46 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) +| | +Generated Location: (1388:40,46 [1] ) +| | + +Source Location: (376:12,51 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) +|await Foo()| +Generated Location: (1593:47,51 [11] ) +|await Foo()| + +Source Location: (391:12,66 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) +| | +Generated Location: (1824:54,66 [1] ) +| | + +Source Location: (448:13,49 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) +|await| +Generated Location: (2027:61,49 [5] ) +|await| + +Source Location: (578:18,42 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) +|await Foo(1, 2)| +Generated Location: (2228:68,42 [15] ) +|await Foo(1, 2)| + +Source Location: (650:19,51 [19] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) +|await Foo.Bar(1, 2)| +Generated Location: (2448:75,51 [19] ) +|await Foo.Bar(1, 2)| + +Source Location: (716:20,41 [22] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) +|await Foo("bob", true)| +Generated Location: (2662:82,41 [22] ) +|await Foo("bob", true)| + +Source Location: (787:21,42 [39] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) +| await Foo(something, hello: "world"); | +Generated Location: (2880:89,42 [39] ) +| await Foo(something, hello: "world"); | + +Source Location: (884:22,51 [21] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) +| await Foo.Bar(1, 2) | +Generated Location: (3123:96,51 [21] ) +| await Foo.Bar(1, 2) | + +Source Location: (961:23,49 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) +| | +Generated Location: (3346:103,49 [1] ) +| | + +Source Location: (966:23,54 [27] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) +|await Foo(boolValue: false)| +Generated Location: (3554:110,54 [27] ) +|await Foo(boolValue: false)| + +Source Location: (997:23,85 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) +| | +Generated Location: (3820:117,85 [1] ) +| | + +Source Location: (1057:24,52 [19] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) +|await ("wrrronggg")| +Generated Location: (4026:124,52 [19] ) +|await ("wrrronggg")| + +Source Location: (12:0,12 [76] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml) +| + public async Task Foo() + { + return "Bar"; + } +| +Generated Location: (4259:133,12 [76] ) +| + public async Task Foo() + { + return "Bar"; + } +| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_Runtime.codegen.cs new file mode 100644 index 0000000000..7eb1804dc5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_Runtime.codegen.cs @@ -0,0 +1,130 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "5a02c3ec89081f6e0a8f4810e127eed40467c358" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Await_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"5a02c3ec89081f6e0a8f4810e127eed40467c358", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Await_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n
        \r\n

        Basic Asynchronous Expression Test

        \r\n

        Basic Asynchronous Expression: "); +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + Write(await Foo()); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n

        Basic Asynchronous Template: "); +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + Write(await Foo()); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n

        Basic Asynchronous Statement: "); +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + await Foo(); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n

        Basic Asynchronous Statement Nested: "); + WriteLiteral(" "); +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + Write(await Foo()); + +#line default +#line hidden +#nullable disable + WriteLiteral(" "); + WriteLiteral("

        \r\n

        Basic Incomplete Asynchronous Statement: "); +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + Write(await); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n
        \r\n\r\n
        \r\n

        Advanced Asynchronous Expression Test

        \r\n

        Advanced Asynchronous Expression: "); +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + Write(await Foo(1, 2)); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n

        Advanced Asynchronous Expression Extended: "); +#nullable restore +#line 20 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + Write(await Foo.Bar(1, 2)); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n

        Advanced Asynchronous Template: "); +#nullable restore +#line 21 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + Write(await Foo("bob", true)); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n

        Advanced Asynchronous Statement: "); +#nullable restore +#line 22 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + await Foo(something, hello: "world"); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n

        Advanced Asynchronous Statement Extended: "); +#nullable restore +#line 23 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + await Foo.Bar(1, 2) + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n

        Advanced Asynchronous Statement Nested: "); + WriteLiteral(" "); +#nullable restore +#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + Write(await Foo(boolValue: false)); + +#line default +#line hidden +#nullable disable + WriteLiteral(" "); + WriteLiteral("

        \r\n

        Advanced Incomplete Asynchronous Statement: "); +#nullable restore +#line 25 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + Write(await ("wrrronggg")); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n
        "); + } + #pragma warning restore 1998 +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" + + public async Task Foo() + { + return "Bar"; + } + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_Runtime.ir.txt new file mode 100644 index 0000000000..5b906426af --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_Runtime.ir.txt @@ -0,0 +1,143 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Await_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (91:6,0 [100] Await.cshtml) + IntermediateToken - (91:6,0 [2] Await.cshtml) - Html - \n + IntermediateToken - (93:7,0 [8] Await.cshtml) - Html -
        + IntermediateToken - (102:7,9 [6] Await.cshtml) - Html - \n + IntermediateToken - (108:8,4 [3] Await.cshtml) - Html -

        + IntermediateToken - (112:8,8 [34] Await.cshtml) - Html - Basic Asynchronous Expression Test + IntermediateToken - (146:8,42 [5] Await.cshtml) - Html -

        + IntermediateToken - (151:8,47 [6] Await.cshtml) - Html - \n + IntermediateToken - (157:9,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (160:9,7 [31] Await.cshtml) - Html - Basic Asynchronous Expression: + CSharpExpression - (192:9,39 [11] Await.cshtml) + IntermediateToken - (192:9,39 [11] Await.cshtml) - CSharp - await Foo() + HtmlContent - (203:9,50 [42] Await.cshtml) + IntermediateToken - (203:9,50 [4] Await.cshtml) - Html -

        + IntermediateToken - (207:9,54 [6] Await.cshtml) - Html - \n + IntermediateToken - (213:10,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (216:10,7 [29] Await.cshtml) - Html - Basic Asynchronous Template: + CSharpExpression - (247:10,38 [11] Await.cshtml) + IntermediateToken - (247:10,38 [11] Await.cshtml) - CSharp - await Foo() + HtmlContent - (259:10,50 [43] Await.cshtml) + IntermediateToken - (259:10,50 [4] Await.cshtml) - Html -

        + IntermediateToken - (263:10,54 [6] Await.cshtml) - Html - \n + IntermediateToken - (269:11,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (272:11,7 [30] Await.cshtml) - Html - Basic Asynchronous Statement: + CSharpCode - (304:11,39 [14] Await.cshtml) + IntermediateToken - (304:11,39 [14] Await.cshtml) - CSharp - await Foo(); + HtmlContent - (319:11,54 [50] Await.cshtml) + IntermediateToken - (319:11,54 [4] Await.cshtml) - Html -

        + IntermediateToken - (323:11,58 [6] Await.cshtml) - Html - \n + IntermediateToken - (329:12,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (332:12,7 [37] Await.cshtml) - Html - Basic Asynchronous Statement Nested: + HtmlContent - (371:12,46 [4] Await.cshtml) + IntermediateToken - (371:12,46 [1] Await.cshtml) - Html - + IntermediateToken - (372:12,47 [2] Await.cshtml) - Html - + CSharpExpression - (376:12,51 [11] Await.cshtml) + IntermediateToken - (376:12,51 [11] Await.cshtml) - CSharp - await Foo() + HtmlContent - (387:12,62 [5] Await.cshtml) + IntermediateToken - (387:12,62 [4] Await.cshtml) - Html - + IntermediateToken - (391:12,66 [1] Await.cshtml) - Html - + CSharpCode - (392:12,67 [0] Await.cshtml) + IntermediateToken - (392:12,67 [0] Await.cshtml) - CSharp - + HtmlContent - (393:12,68 [54] Await.cshtml) + IntermediateToken - (393:12,68 [4] Await.cshtml) - Html -

        + IntermediateToken - (397:12,72 [6] Await.cshtml) - Html - \n + IntermediateToken - (403:13,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (406:13,7 [41] Await.cshtml) - Html - Basic Incomplete Asynchronous Statement: + CSharpExpression - (448:13,49 [5] Await.cshtml) + IntermediateToken - (448:13,49 [5] Await.cshtml) - CSharp - await + HtmlContent - (453:13,54 [124] Await.cshtml) + IntermediateToken - (453:13,54 [4] Await.cshtml) - Html -

        + IntermediateToken - (457:13,58 [2] Await.cshtml) - Html - \n + IntermediateToken - (459:14,0 [10] Await.cshtml) - Html -
        + IntermediateToken - (469:14,10 [4] Await.cshtml) - Html - \n\n + IntermediateToken - (473:16,0 [8] Await.cshtml) - Html -
        + IntermediateToken - (482:16,9 [6] Await.cshtml) - Html - \n + IntermediateToken - (488:17,4 [3] Await.cshtml) - Html -

        + IntermediateToken - (492:17,8 [37] Await.cshtml) - Html - Advanced Asynchronous Expression Test + IntermediateToken - (529:17,45 [5] Await.cshtml) - Html -

        + IntermediateToken - (534:17,50 [6] Await.cshtml) - Html - \n + IntermediateToken - (540:18,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (543:18,7 [34] Await.cshtml) - Html - Advanced Asynchronous Expression: + CSharpExpression - (578:18,42 [15] Await.cshtml) + IntermediateToken - (578:18,42 [15] Await.cshtml) - CSharp - await Foo(1, 2) + HtmlContent - (593:18,57 [56] Await.cshtml) + IntermediateToken - (593:18,57 [4] Await.cshtml) - Html -

        + IntermediateToken - (597:18,61 [6] Await.cshtml) - Html - \n + IntermediateToken - (603:19,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (606:19,7 [43] Await.cshtml) - Html - Advanced Asynchronous Expression Extended: + CSharpExpression - (650:19,51 [19] Await.cshtml) + IntermediateToken - (650:19,51 [19] Await.cshtml) - CSharp - await Foo.Bar(1, 2) + HtmlContent - (669:19,70 [45] Await.cshtml) + IntermediateToken - (669:19,70 [4] Await.cshtml) - Html -

        + IntermediateToken - (673:19,74 [6] Await.cshtml) - Html - \n + IntermediateToken - (679:20,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (682:20,7 [32] Await.cshtml) - Html - Advanced Asynchronous Template: + CSharpExpression - (716:20,41 [22] Await.cshtml) + IntermediateToken - (716:20,41 [22] Await.cshtml) - CSharp - await Foo("bob", true) + HtmlContent - (739:20,64 [46] Await.cshtml) + IntermediateToken - (739:20,64 [4] Await.cshtml) - Html -

        + IntermediateToken - (743:20,68 [6] Await.cshtml) - Html - \n + IntermediateToken - (749:21,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (752:21,7 [33] Await.cshtml) - Html - Advanced Asynchronous Statement: + CSharpCode - (787:21,42 [39] Await.cshtml) + IntermediateToken - (787:21,42 [39] Await.cshtml) - CSharp - await Foo(something, hello: "world"); + HtmlContent - (827:21,82 [55] Await.cshtml) + IntermediateToken - (827:21,82 [4] Await.cshtml) - Html -

        + IntermediateToken - (831:21,86 [6] Await.cshtml) - Html - \n + IntermediateToken - (837:22,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (840:22,7 [42] Await.cshtml) - Html - Advanced Asynchronous Statement Extended: + CSharpCode - (884:22,51 [21] Await.cshtml) + IntermediateToken - (884:22,51 [21] Await.cshtml) - CSharp - await Foo.Bar(1, 2) + HtmlContent - (906:22,73 [53] Await.cshtml) + IntermediateToken - (906:22,73 [4] Await.cshtml) - Html -

        + IntermediateToken - (910:22,77 [6] Await.cshtml) - Html - \n + IntermediateToken - (916:23,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (919:23,7 [40] Await.cshtml) - Html - Advanced Asynchronous Statement Nested: + HtmlContent - (961:23,49 [4] Await.cshtml) + IntermediateToken - (961:23,49 [1] Await.cshtml) - Html - + IntermediateToken - (962:23,50 [2] Await.cshtml) - Html - + CSharpExpression - (966:23,54 [27] Await.cshtml) + IntermediateToken - (966:23,54 [27] Await.cshtml) - CSharp - await Foo(boolValue: false) + HtmlContent - (993:23,81 [5] Await.cshtml) + IntermediateToken - (993:23,81 [4] Await.cshtml) - Html - + IntermediateToken - (997:23,85 [1] Await.cshtml) - Html - + CSharpCode - (998:23,86 [0] Await.cshtml) + IntermediateToken - (998:23,86 [0] Await.cshtml) - CSharp - + HtmlContent - (999:23,87 [57] Await.cshtml) + IntermediateToken - (999:23,87 [4] Await.cshtml) - Html -

        + IntermediateToken - (1003:23,91 [6] Await.cshtml) - Html - \n + IntermediateToken - (1009:24,4 [2] Await.cshtml) - Html -

        + IntermediateToken - (1012:24,7 [44] Await.cshtml) - Html - Advanced Incomplete Asynchronous Statement: + CSharpExpression - (1057:24,52 [19] Await.cshtml) + IntermediateToken - (1057:24,52 [19] Await.cshtml) - CSharp - await ("wrrronggg") + HtmlContent - (1076:24,71 [16] Await.cshtml) + IntermediateToken - (1076:24,71 [4] Await.cshtml) - Html -

        + IntermediateToken - (1080:24,75 [2] Await.cshtml) - Html - \n + IntermediateToken - (1082:25,0 [10] Await.cshtml) - Html -
        + CSharpCode - (12:0,12 [76] Await.cshtml) + IntermediateToken - (12:0,12 [76] Await.cshtml) - CSharp - \n public async Task Foo()\n {\n return "Bar";\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml new file mode 100644 index 0000000000..b58b6b44ff --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml @@ -0,0 +1,9 @@ +@addTagHelper "*, TestAssembly" + +
        +

        +

        + + +

        +
        \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_DesignTime.codegen.cs new file mode 100644 index 0000000000..a3f054b732 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_DesignTime.codegen.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_DesignTime + { + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __TestNamespace_PTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml" + __o = ViewBag.DefaultInterval; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper.Type = "text"; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __TestNamespace_InputTagHelper.Type = "checkbox"; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable + __TestNamespace_PTagHelper = CreateTagHelper(); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_DesignTime.ir.txt new file mode 100644 index 0000000000..38d793eaeb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_DesignTime.ir.txt @@ -0,0 +1,84 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + DesignTimeDirective - + DirectiveToken - (14:0,14 [17] BasicTagHelpers.cshtml) - "*, TestAssembly" + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:0,31 [73] BasicTagHelpers.cshtml) + IntermediateToken - (31:0,31 [4] BasicTagHelpers.cshtml) - Html - \n\n + IntermediateToken - (35:2,0 [4] BasicTagHelpers.cshtml) - Html -
        + IntermediateToken - (98:2,63 [6] BasicTagHelpers.cshtml) - Html - \n + TagHelper - (104:3,4 [216] BasicTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (145:3,45 [10] BasicTagHelpers.cshtml) + IntermediateToken - (145:3,45 [10] BasicTagHelpers.cshtml) - Html - \n + TagHelper - (155:4,8 [25] BasicTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperHtmlAttribute - - data - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (164:4,17 [10] BasicTagHelpers.cshtml) + IntermediateToken - (164:4,17 [10] BasicTagHelpers.cshtml) - Html - -delay1000 + DefaultTagHelperExecute - + HtmlContent - (180:4,33 [10] BasicTagHelpers.cshtml) + IntermediateToken - (180:4,33 [10] BasicTagHelpers.cshtml) - Html - \n + TagHelper - (190:5,8 [71] BasicTagHelpers.cshtml) - input - TagMode.StartTagOnly + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperHtmlAttribute - - data-interval - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (212:5,30 [7] BasicTagHelpers.cshtml) + IntermediateToken - (212:5,30 [7] BasicTagHelpers.cshtml) - Html - 2000 + + CSharpExpression - (220:5,38 [23] BasicTagHelpers.cshtml) + IntermediateToken - (220:5,38 [23] BasicTagHelpers.cshtml) - CSharp - ViewBag.DefaultInterval + HtmlContent - (243:5,61 [4] BasicTagHelpers.cshtml) + IntermediateToken - (243:5,61 [4] BasicTagHelpers.cshtml) - Html - + 1 + DefaultTagHelperProperty - (255:5,73 [4] BasicTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (255:5,73 [4] BasicTagHelpers.cshtml) + IntermediateToken - (255:5,73 [4] BasicTagHelpers.cshtml) - Html - text + DefaultTagHelperProperty - (255:5,73 [4] BasicTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (255:5,73 [4] BasicTagHelpers.cshtml) + IntermediateToken - (255:5,73 [4] BasicTagHelpers.cshtml) - Html - text + DefaultTagHelperExecute - + HtmlContent - (261:5,79 [10] BasicTagHelpers.cshtml) + IntermediateToken - (261:5,79 [10] BasicTagHelpers.cshtml) - Html - \n + TagHelper - (271:6,8 [39] BasicTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (284:6,21 [8] BasicTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (284:6,21 [8] BasicTagHelpers.cshtml) + IntermediateToken - (284:6,21 [8] BasicTagHelpers.cshtml) - Html - checkbox + DefaultTagHelperProperty - (284:6,21 [8] BasicTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (284:6,21 [8] BasicTagHelpers.cshtml) + IntermediateToken - (284:6,21 [8] BasicTagHelpers.cshtml) - Html - checkbox + DefaultTagHelperProperty - (303:6,40 [4] BasicTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (303:6,40 [4] BasicTagHelpers.cshtml) - CSharp - true + DefaultTagHelperExecute - + HtmlContent - (310:6,47 [6] BasicTagHelpers.cshtml) + IntermediateToken - (310:6,47 [6] BasicTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (114:3,14 [11] BasicTagHelpers.cshtml) + IntermediateToken - (114:3,14 [11] BasicTagHelpers.cshtml) - Html - Hello World + DefaultTagHelperHtmlAttribute - - data-delay - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (139:3,39 [4] BasicTagHelpers.cshtml) + IntermediateToken - (139:3,39 [4] BasicTagHelpers.cshtml) - Html - 1000 + DefaultTagHelperExecute - + HtmlContent - (320:7,8 [8] BasicTagHelpers.cshtml) + IntermediateToken - (320:7,8 [2] BasicTagHelpers.cshtml) - Html - \n + IntermediateToken - (322:8,0 [6] BasicTagHelpers.cshtml) - Html -
        diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_DesignTime.mappings.txt new file mode 100644 index 0000000000..f639597507 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_DesignTime.mappings.txt @@ -0,0 +1,15 @@ +Source Location: (14:0,14 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml) +|"*, TestAssembly"| +Generated Location: (783:15,37 [17] ) +|"*, TestAssembly"| + +Source Location: (220:5,38 [23] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml) +|ViewBag.DefaultInterval| +Generated Location: (1618:35,38 [23] ) +|ViewBag.DefaultInterval| + +Source Location: (303:6,40 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml) +|true| +Generated Location: (2354:48,42 [4] ) +|true| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml new file mode 100644 index 0000000000..089363600c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml @@ -0,0 +1,10 @@ +@tagHelperPrefix "THS" +@addTagHelper "*, TestAssembly" + + + +

        + + +
        +
        \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_DesignTime.codegen.cs new file mode 100644 index 0000000000..85b8e6f1d9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_DesignTime.codegen.cs @@ -0,0 +1,57 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Prefixed_DesignTime + { + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml" +global::System.Object __typeHelper = "THS"; + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __TestNamespace_InputTagHelper.Type = "checkbox"; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml" + __TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable + __TestNamespace_PTagHelper = CreateTagHelper(); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_DesignTime.ir.txt new file mode 100644 index 0000000000..837de656c0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_DesignTime.ir.txt @@ -0,0 +1,60 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Prefixed_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + DesignTimeDirective - + DirectiveToken - (17:0,17 [5] BasicTagHelpers_Prefixed.cshtml) - "THS" + DirectiveToken - (38:1,14 [17] BasicTagHelpers_Prefixed.cshtml) - "*, TestAssembly" + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (22:0,22 [2] BasicTagHelpers_Prefixed.cshtml) + IntermediateToken - (22:0,22 [2] BasicTagHelpers_Prefixed.cshtml) - Html - \n + HtmlContent - (55:1,31 [54] BasicTagHelpers_Prefixed.cshtml) + IntermediateToken - (55:1,31 [4] BasicTagHelpers_Prefixed.cshtml) - Html - \n\n + IntermediateToken - (59:3,0 [7] BasicTagHelpers_Prefixed.cshtml) - Html - + IntermediateToken - (103:3,44 [6] BasicTagHelpers_Prefixed.cshtml) - Html - \n + TagHelper - (109:4,4 [136] BasicTagHelpers_Prefixed.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (135:4,30 [56] BasicTagHelpers_Prefixed.cshtml) + IntermediateToken - (135:4,30 [10] BasicTagHelpers_Prefixed.cshtml) - Html - \n + IntermediateToken - (145:5,8 [2] BasicTagHelpers_Prefixed.cshtml) - Html -

        + IntermediateToken - (148:5,11 [4] BasicTagHelpers_Prefixed.cshtml) - Html -

        + IntermediateToken - (152:5,15 [10] BasicTagHelpers_Prefixed.cshtml) - Html - \n + IntermediateToken - (162:6,8 [6] BasicTagHelpers_Prefixed.cshtml) - Html - + IntermediateToken - (181:6,27 [10] BasicTagHelpers_Prefixed.cshtml) - Html - \n + TagHelper - (191:7,8 [41] BasicTagHelpers_Prefixed.cshtml) - input - TagMode.StartTagOnly + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (207:7,24 [8] BasicTagHelpers_Prefixed.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (207:7,24 [8] BasicTagHelpers_Prefixed.cshtml) + IntermediateToken - (207:7,24 [8] BasicTagHelpers_Prefixed.cshtml) - Html - checkbox + DefaultTagHelperProperty - (207:7,24 [8] BasicTagHelpers_Prefixed.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (207:7,24 [8] BasicTagHelpers_Prefixed.cshtml) + IntermediateToken - (207:7,24 [8] BasicTagHelpers_Prefixed.cshtml) - Html - checkbox + DefaultTagHelperProperty - (226:7,43 [4] BasicTagHelpers_Prefixed.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (226:7,43 [4] BasicTagHelpers_Prefixed.cshtml) - CSharp - true + DefaultTagHelperExecute - + HtmlContent - (232:7,49 [6] BasicTagHelpers_Prefixed.cshtml) + IntermediateToken - (232:7,49 [6] BasicTagHelpers_Prefixed.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (122:4,17 [11] BasicTagHelpers_Prefixed.cshtml) + IntermediateToken - (122:4,17 [11] BasicTagHelpers_Prefixed.cshtml) - Html - Hello World + DefaultTagHelperExecute - + HtmlContent - (245:8,11 [11] BasicTagHelpers_Prefixed.cshtml) + IntermediateToken - (245:8,11 [2] BasicTagHelpers_Prefixed.cshtml) - Html - \n + IntermediateToken - (247:9,0 [9] BasicTagHelpers_Prefixed.cshtml) - Html -
        diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_DesignTime.mappings.txt new file mode 100644 index 0000000000..3758937b4c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_DesignTime.mappings.txt @@ -0,0 +1,15 @@ +Source Location: (17:0,17 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml) +|"THS"| +Generated Location: (801:15,37 [5] ) +|"THS"| + +Source Location: (38:1,14 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml) +|"*, TestAssembly"| +Generated Location: (1075:25,37 [17] ) +|"*, TestAssembly"| + +Source Location: (226:7,43 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml) +|true| +Generated Location: (1981:46,43 [4] ) +|true| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_Runtime.codegen.cs new file mode 100644 index 0000000000..4983c36dd6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_Runtime.codegen.cs @@ -0,0 +1,84 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "b7372519d2a9b45537aba0e7d34309526d3014c3" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Prefixed_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"b7372519d2a9b45537aba0e7d34309526d3014c3", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Prefixed_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "checkbox", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("\r\n

        \r\n \r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagOnly, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml" +__TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n
        "); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_Runtime.ir.txt new file mode 100644 index 0000000000..ce074408ae --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed_Runtime.ir.txt @@ -0,0 +1,47 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Prefixed_Runtime - - + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_0 - type - checkbox - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_1 - class - Hello World - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (57:2,0 [52] BasicTagHelpers_Prefixed.cshtml) + IntermediateToken - (57:2,0 [2] BasicTagHelpers_Prefixed.cshtml) - Html - \n + IntermediateToken - (59:3,0 [7] BasicTagHelpers_Prefixed.cshtml) - Html - + IntermediateToken - (103:3,44 [6] BasicTagHelpers_Prefixed.cshtml) - Html - \n + TagHelper - (109:4,4 [136] BasicTagHelpers_Prefixed.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (135:4,30 [56] BasicTagHelpers_Prefixed.cshtml) + IntermediateToken - (135:4,30 [10] BasicTagHelpers_Prefixed.cshtml) - Html - \n + IntermediateToken - (145:5,8 [2] BasicTagHelpers_Prefixed.cshtml) - Html -

        + IntermediateToken - (148:5,11 [4] BasicTagHelpers_Prefixed.cshtml) - Html -

        + IntermediateToken - (152:5,15 [10] BasicTagHelpers_Prefixed.cshtml) - Html - \n + IntermediateToken - (162:6,8 [6] BasicTagHelpers_Prefixed.cshtml) - Html - + IntermediateToken - (181:6,27 [10] BasicTagHelpers_Prefixed.cshtml) - Html - \n + TagHelper - (191:7,8 [41] BasicTagHelpers_Prefixed.cshtml) - input - TagMode.StartTagOnly + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + PreallocatedTagHelperProperty - (207:7,24 [8] BasicTagHelpers_Prefixed.cshtml) - __tagHelperAttribute_0 - type - Type + PreallocatedTagHelperProperty - (207:7,24 [8] BasicTagHelpers_Prefixed.cshtml) - __tagHelperAttribute_0 - type - Type + DefaultTagHelperProperty - (226:7,43 [4] BasicTagHelpers_Prefixed.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (226:7,43 [4] BasicTagHelpers_Prefixed.cshtml) - CSharp - true + DefaultTagHelperExecute - + HtmlContent - (232:7,49 [6] BasicTagHelpers_Prefixed.cshtml) + IntermediateToken - (232:7,49 [6] BasicTagHelpers_Prefixed.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 + DefaultTagHelperExecute - + HtmlContent - (245:8,11 [11] BasicTagHelpers_Prefixed.cshtml) + IntermediateToken - (245:8,11 [2] BasicTagHelpers_Prefixed.cshtml) - Html - \n + IntermediateToken - (247:9,0 [9] BasicTagHelpers_Prefixed.cshtml) - Html -
        diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper.cshtml new file mode 100644 index 0000000000..56ac77231a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper.cshtml @@ -0,0 +1,10 @@ +@addTagHelper "*, TestAssembly" +@removeTagHelper "doesntmatter, nice" + +
        +

        +

        + + +

        +
        \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper_Runtime.codegen.cs new file mode 100644 index 0000000000..66850f8043 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper_Runtime.codegen.cs @@ -0,0 +1,117 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "2e30c5c6e01a148ccf4ed5dd4a81939641312a17" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_RemoveTagHelper_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"2e30c5c6e01a148ccf4ed5dd4a81939641312a17", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_RemoveTagHelper_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "text", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "checkbox", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n
        \r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_1.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_1.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1); +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper.cshtml" +__TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n
        "); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper_Runtime.ir.txt new file mode 100644 index 0000000000..ef78c52e75 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper_Runtime.ir.txt @@ -0,0 +1,55 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_RemoveTagHelper_Runtime - - + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_0 - type - text - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_1 - type - checkbox - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_2 - class - Hello World - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (72:2,0 [49] BasicTagHelpers_RemoveTagHelper.cshtml) + IntermediateToken - (72:2,0 [2] BasicTagHelpers_RemoveTagHelper.cshtml) - Html - \n + IntermediateToken - (74:3,0 [4] BasicTagHelpers_RemoveTagHelper.cshtml) - Html -
        + IntermediateToken - (115:3,41 [6] BasicTagHelpers_RemoveTagHelper.cshtml) - Html - \n + TagHelper - (121:4,4 [130] BasicTagHelpers_RemoveTagHelper.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (144:4,27 [10] BasicTagHelpers_RemoveTagHelper.cshtml) + IntermediateToken - (144:4,27 [10] BasicTagHelpers_RemoveTagHelper.cshtml) - Html - \n + TagHelper - (154:5,8 [7] BasicTagHelpers_RemoveTagHelper.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperExecute - + HtmlContent - (161:5,15 [10] BasicTagHelpers_RemoveTagHelper.cshtml) + IntermediateToken - (161:5,15 [10] BasicTagHelpers_RemoveTagHelper.cshtml) - Html - \n + TagHelper - (171:6,8 [21] BasicTagHelpers_RemoveTagHelper.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + PreallocatedTagHelperProperty - (184:6,21 [4] BasicTagHelpers_RemoveTagHelper.cshtml) - __tagHelperAttribute_0 - type - Type + PreallocatedTagHelperProperty - (184:6,21 [4] BasicTagHelpers_RemoveTagHelper.cshtml) - __tagHelperAttribute_0 - type - Type + DefaultTagHelperExecute - + HtmlContent - (192:6,29 [10] BasicTagHelpers_RemoveTagHelper.cshtml) + IntermediateToken - (192:6,29 [10] BasicTagHelpers_RemoveTagHelper.cshtml) - Html - \n + TagHelper - (202:7,8 [39] BasicTagHelpers_RemoveTagHelper.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + PreallocatedTagHelperProperty - (215:7,21 [8] BasicTagHelpers_RemoveTagHelper.cshtml) - __tagHelperAttribute_1 - type - Type + PreallocatedTagHelperProperty - (215:7,21 [8] BasicTagHelpers_RemoveTagHelper.cshtml) - __tagHelperAttribute_1 - type - Type + DefaultTagHelperProperty - (234:7,40 [4] BasicTagHelpers_RemoveTagHelper.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (234:7,40 [4] BasicTagHelpers_RemoveTagHelper.cshtml) - CSharp - true + DefaultTagHelperExecute - + HtmlContent - (241:7,47 [6] BasicTagHelpers_RemoveTagHelper.cshtml) + IntermediateToken - (241:7,47 [6] BasicTagHelpers_RemoveTagHelper.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 + DefaultTagHelperExecute - + HtmlContent - (251:8,8 [8] BasicTagHelpers_RemoveTagHelper.cshtml) + IntermediateToken - (251:8,8 [2] BasicTagHelpers_RemoveTagHelper.cshtml) - Html - \n + IntermediateToken - (253:9,0 [6] BasicTagHelpers_RemoveTagHelper.cshtml) - Html -
        diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Runtime.codegen.cs new file mode 100644 index 0000000000..593460da0e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Runtime.codegen.cs @@ -0,0 +1,133 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "2775a5b97b6aa9fc7b162124fddb7400ec1e2472" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"2775a5b97b6aa9fc7b162124fddb7400ec1e2472", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data", new global::Microsoft.AspNetCore.Html.HtmlString("-delay1000"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "text", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "checkbox", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-delay", new global::Microsoft.AspNetCore.Html.HtmlString("1000"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n
        \r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagOnly, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + BeginWriteTagHelperAttribute(); + WriteLiteral("2000 + "); +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml" + Write(ViewBag.DefaultInterval); + +#line default +#line hidden +#nullable disable + WriteLiteral(" + 1"); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("data-interval", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_1.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_1.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_2.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_2.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2); +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n
        "); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Runtime.ir.txt new file mode 100644 index 0000000000..ce7caef785 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Runtime.ir.txt @@ -0,0 +1,69 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Runtime - - + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_0 - data - -delay1000 - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_1 - type - text - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_2 - type - checkbox - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_3 - class - Hello World - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_4 - data-delay - 1000 - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (33:1,0 [71] BasicTagHelpers.cshtml) + IntermediateToken - (33:1,0 [2] BasicTagHelpers.cshtml) - Html - \n + IntermediateToken - (35:2,0 [4] BasicTagHelpers.cshtml) - Html -
        + IntermediateToken - (98:2,63 [6] BasicTagHelpers.cshtml) - Html - \n + TagHelper - (104:3,4 [216] BasicTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (145:3,45 [10] BasicTagHelpers.cshtml) + IntermediateToken - (145:3,45 [10] BasicTagHelpers.cshtml) - Html - \n + TagHelper - (155:4,8 [25] BasicTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.PTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 + DefaultTagHelperExecute - + HtmlContent - (180:4,33 [10] BasicTagHelpers.cshtml) + IntermediateToken - (180:4,33 [10] BasicTagHelpers.cshtml) - Html - \n + TagHelper - (190:5,8 [71] BasicTagHelpers.cshtml) - input - TagMode.StartTagOnly + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperHtmlAttribute - - data-interval - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (212:5,30 [7] BasicTagHelpers.cshtml) + IntermediateToken - (212:5,30 [7] BasicTagHelpers.cshtml) - Html - 2000 + + CSharpExpression - (220:5,38 [23] BasicTagHelpers.cshtml) + IntermediateToken - (220:5,38 [23] BasicTagHelpers.cshtml) - CSharp - ViewBag.DefaultInterval + HtmlContent - (243:5,61 [4] BasicTagHelpers.cshtml) + IntermediateToken - (243:5,61 [4] BasicTagHelpers.cshtml) - Html - + 1 + PreallocatedTagHelperProperty - (255:5,73 [4] BasicTagHelpers.cshtml) - __tagHelperAttribute_1 - type - Type + PreallocatedTagHelperProperty - (255:5,73 [4] BasicTagHelpers.cshtml) - __tagHelperAttribute_1 - type - Type + DefaultTagHelperExecute - + HtmlContent - (261:5,79 [10] BasicTagHelpers.cshtml) + IntermediateToken - (261:5,79 [10] BasicTagHelpers.cshtml) - Html - \n + TagHelper - (271:6,8 [39] BasicTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + PreallocatedTagHelperProperty - (284:6,21 [8] BasicTagHelpers.cshtml) - __tagHelperAttribute_2 - type - Type + PreallocatedTagHelperProperty - (284:6,21 [8] BasicTagHelpers.cshtml) - __tagHelperAttribute_2 - type - Type + DefaultTagHelperProperty - (303:6,40 [4] BasicTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (303:6,40 [4] BasicTagHelpers.cshtml) - CSharp - true + DefaultTagHelperExecute - + HtmlContent - (310:6,47 [6] BasicTagHelpers.cshtml) + IntermediateToken - (310:6,47 [6] BasicTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_3 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_4 + DefaultTagHelperExecute - + HtmlContent - (320:7,8 [8] BasicTagHelpers.cshtml) + IntermediateToken - (320:7,8 [2] BasicTagHelpers.cshtml) - Html - \n + IntermediateToken - (322:8,0 [6] BasicTagHelpers.cshtml) - Html -
        diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml new file mode 100644 index 0000000000..8d27de89cc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml @@ -0,0 +1,37 @@ +@{ + int i = 1; +} + +@while(i <= 10) { +

        Hello from C#, #@(i)

        + i += 1; +} + +@if(i == 11) { +

        We wrote 10 lines!

        +} + +@switch(i) { + case 11: +

        No really, we wrote 10 lines!

        + break; + default: +

        Actually, we didn't...

        + break; +} + +@for(int j = 1; j <= 10; j += 2) { +

        Hello again from C#, #@(j)

        +} + +@try { +

        That time, we wrote 5 lines!

        +} catch(Exception ex) { +

        Oh no! An error occurred: @(ex.Message)

        +} + +

        i is now @i

        + +@lock(new object()) { +

        This block is locked, for your security!

        +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_DesignTime.codegen.cs new file mode 100644 index 0000000000..e4fa8fb5e6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_DesignTime.codegen.cs @@ -0,0 +1,176 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Blocks_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + + int i = 1; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + while(i <= 10) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + __o = i; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + + i += 1; +} + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + if(i == 11) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + +} + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + switch(i) { + case 11: + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + + break; + default: + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + + break; +} + +#line default +#line hidden +#nullable disable +#nullable restore +#line 23 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + for(int j = 1; j <= 10; j += 2) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + __o = j; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + +} + +#line default +#line hidden +#nullable disable +#nullable restore +#line 27 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + try { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 28 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + +} catch(Exception ex) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 30 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + __o = ex.Message; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 30 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + +} + +#line default +#line hidden +#nullable disable +#nullable restore +#line 33 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + __o = i; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 35 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + lock(new object()) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 36 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_DesignTime.ir.txt new file mode 100644 index 0000000000..d7ad6ccc2c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_DesignTime.ir.txt @@ -0,0 +1,110 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Blocks_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [18] Blocks.cshtml) + IntermediateToken - (2:0,2 [18] Blocks.cshtml) - CSharp - \n int i = 1;\n + HtmlContent - (23:3,0 [2] Blocks.cshtml) + IntermediateToken - (23:3,0 [2] Blocks.cshtml) - Html - \n + CSharpCode - (26:4,1 [22] Blocks.cshtml) + IntermediateToken - (26:4,1 [22] Blocks.cshtml) - CSharp - while(i <= 10) {\n + HtmlContent - (48:5,4 [19] Blocks.cshtml) + IntermediateToken - (48:5,4 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (51:5,7 [16] Blocks.cshtml) - Html - Hello from C#, # + CSharpExpression - (69:5,25 [1] Blocks.cshtml) + IntermediateToken - (69:5,25 [1] Blocks.cshtml) - CSharp - i + HtmlContent - (71:5,27 [4] Blocks.cshtml) + IntermediateToken - (71:5,27 [4] Blocks.cshtml) - Html -

        + CSharpCode - (75:5,31 [16] Blocks.cshtml) + IntermediateToken - (75:5,31 [16] Blocks.cshtml) - CSharp - \n i += 1;\n} + HtmlContent - (91:7,1 [4] Blocks.cshtml) + IntermediateToken - (91:7,1 [4] Blocks.cshtml) - Html - \n\n + CSharpCode - (96:9,1 [19] Blocks.cshtml) + IntermediateToken - (96:9,1 [19] Blocks.cshtml) - CSharp - if(i == 11) {\n + HtmlContent - (115:10,4 [25] Blocks.cshtml) + IntermediateToken - (115:10,4 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (118:10,7 [18] Blocks.cshtml) - Html - We wrote 10 lines! + IntermediateToken - (136:10,25 [4] Blocks.cshtml) - Html -

        + CSharpCode - (140:10,29 [3] Blocks.cshtml) + IntermediateToken - (140:10,29 [3] Blocks.cshtml) - CSharp - \n} + HtmlContent - (143:11,1 [4] Blocks.cshtml) + IntermediateToken - (143:11,1 [4] Blocks.cshtml) - Html - \n\n + CSharpCode - (148:13,1 [35] Blocks.cshtml) + IntermediateToken - (148:13,1 [35] Blocks.cshtml) - CSharp - switch(i) {\n case 11:\n + HtmlContent - (183:15,8 [36] Blocks.cshtml) + IntermediateToken - (183:15,8 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (186:15,11 [29] Blocks.cshtml) - Html - No really, we wrote 10 lines! + IntermediateToken - (215:15,40 [4] Blocks.cshtml) - Html -

        + CSharpCode - (219:15,44 [40] Blocks.cshtml) + IntermediateToken - (219:15,44 [40] Blocks.cshtml) - CSharp - \n break;\n default:\n + HtmlContent - (259:18,8 [29] Blocks.cshtml) + IntermediateToken - (259:18,8 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (262:18,11 [22] Blocks.cshtml) - Html - Actually, we didn't... + IntermediateToken - (284:18,33 [4] Blocks.cshtml) - Html -

        + CSharpCode - (288:18,37 [19] Blocks.cshtml) + IntermediateToken - (288:18,37 [19] Blocks.cshtml) - CSharp - \n break;\n} + HtmlContent - (307:20,1 [4] Blocks.cshtml) + IntermediateToken - (307:20,1 [4] Blocks.cshtml) - Html - \n\n + CSharpCode - (312:22,1 [39] Blocks.cshtml) + IntermediateToken - (312:22,1 [39] Blocks.cshtml) - CSharp - for(int j = 1; j <= 10; j += 2) {\n + HtmlContent - (351:23,4 [25] Blocks.cshtml) + IntermediateToken - (351:23,4 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (354:23,7 [22] Blocks.cshtml) - Html - Hello again from C#, # + CSharpExpression - (378:23,31 [1] Blocks.cshtml) + IntermediateToken - (378:23,31 [1] Blocks.cshtml) - CSharp - j + HtmlContent - (380:23,33 [4] Blocks.cshtml) + IntermediateToken - (380:23,33 [4] Blocks.cshtml) - Html -

        + CSharpCode - (384:23,37 [3] Blocks.cshtml) + IntermediateToken - (384:23,37 [3] Blocks.cshtml) - CSharp - \n} + HtmlContent - (387:24,1 [4] Blocks.cshtml) + IntermediateToken - (387:24,1 [4] Blocks.cshtml) - Html - \n\n + CSharpCode - (392:26,1 [11] Blocks.cshtml) + IntermediateToken - (392:26,1 [11] Blocks.cshtml) - CSharp - try {\n + HtmlContent - (403:27,4 [35] Blocks.cshtml) + IntermediateToken - (403:27,4 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (406:27,7 [28] Blocks.cshtml) - Html - That time, we wrote 5 lines! + IntermediateToken - (434:27,35 [4] Blocks.cshtml) - Html -

        + CSharpCode - (438:27,39 [31] Blocks.cshtml) + IntermediateToken - (438:27,39 [31] Blocks.cshtml) - CSharp - \n} catch(Exception ex) {\n + HtmlContent - (469:29,4 [29] Blocks.cshtml) + IntermediateToken - (469:29,4 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (472:29,7 [26] Blocks.cshtml) - Html - Oh no! An error occurred: + CSharpExpression - (500:29,35 [10] Blocks.cshtml) + IntermediateToken - (500:29,35 [10] Blocks.cshtml) - CSharp - ex.Message + HtmlContent - (511:29,46 [4] Blocks.cshtml) + IntermediateToken - (511:29,46 [4] Blocks.cshtml) - Html -

        + CSharpCode - (515:29,50 [3] Blocks.cshtml) + IntermediateToken - (515:29,50 [3] Blocks.cshtml) - CSharp - \n} + HtmlContent - (518:30,1 [16] Blocks.cshtml) + IntermediateToken - (518:30,1 [4] Blocks.cshtml) - Html - \n\n + IntermediateToken - (522:32,0 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (525:32,3 [9] Blocks.cshtml) - Html - i is now + CSharpExpression - (535:32,13 [1] Blocks.cshtml) + IntermediateToken - (535:32,13 [1] Blocks.cshtml) - CSharp - i + HtmlContent - (536:32,14 [8] Blocks.cshtml) + IntermediateToken - (536:32,14 [4] Blocks.cshtml) - Html -

        + IntermediateToken - (540:32,18 [4] Blocks.cshtml) - Html - \n\n + CSharpCode - (545:34,1 [26] Blocks.cshtml) + IntermediateToken - (545:34,1 [26] Blocks.cshtml) - CSharp - lock(new object()) {\n + HtmlContent - (571:35,4 [47] Blocks.cshtml) + IntermediateToken - (571:35,4 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (574:35,7 [40] Blocks.cshtml) - Html - This block is locked, for your security! + IntermediateToken - (614:35,47 [4] Blocks.cshtml) - Html -

        + CSharpCode - (618:35,51 [3] Blocks.cshtml) + IntermediateToken - (618:35,51 [3] Blocks.cshtml) - CSharp - \n} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_DesignTime.mappings.txt new file mode 100644 index 0000000000..111f6a27e6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_DesignTime.mappings.txt @@ -0,0 +1,139 @@ +Source Location: (2:0,2 [18] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +| + int i = 1; +| +Generated Location: (732:19,2 [18] ) +| + int i = 1; +| + +Source Location: (26:4,1 [22] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +|while(i <= 10) { + | +Generated Location: (902:27,1 [22] ) +|while(i <= 10) { + | + +Source Location: (69:5,25 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +|i| +Generated Location: (1102:35,25 [1] ) +|i| + +Source Location: (75:5,31 [16] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +| + i += 1; +}| +Generated Location: (1288:42,31 [16] ) +| + i += 1; +}| + +Source Location: (96:9,1 [19] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +|if(i == 11) { + | +Generated Location: (1459:51,1 [19] ) +|if(i == 11) { + | + +Source Location: (140:10,29 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +| +}| +Generated Location: (1661:59,29 [3] ) +| +}| + +Source Location: (148:13,1 [35] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +|switch(i) { + case 11: + | +Generated Location: (1819:67,1 [35] ) +|switch(i) { + case 11: + | + +Source Location: (219:15,44 [40] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +| + break; + default: + | +Generated Location: (2052:76,44 [40] ) +| + break; + default: + | + +Source Location: (288:18,37 [19] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +| + break; +}| +Generated Location: (2283:86,37 [19] ) +| + break; +}| + +Source Location: (312:22,1 [39] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +|for(int j = 1; j <= 10; j += 2) { + | +Generated Location: (2457:95,1 [39] ) +|for(int j = 1; j <= 10; j += 2) { + | + +Source Location: (378:23,31 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +|j| +Generated Location: (2681:103,31 [1] ) +|j| + +Source Location: (384:23,37 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +| +}| +Generated Location: (2874:110,37 [3] ) +| +}| + +Source Location: (392:26,1 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +|try { + | +Generated Location: (3032:118,1 [11] ) +|try { + | + +Source Location: (438:27,39 [31] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +| +} catch(Exception ex) { + | +Generated Location: (3236:126,39 [31] ) +| +} catch(Exception ex) { + | + +Source Location: (500:29,35 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +|ex.Message| +Generated Location: (3456:135,35 [10] ) +|ex.Message| + +Source Location: (515:29,50 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +| +}| +Generated Location: (3671:142,50 [3] ) +| +}| + +Source Location: (535:32,13 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +|i| +Generated Location: (3841:150,13 [1] ) +|i| + +Source Location: (545:34,1 [26] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +|lock(new object()) { + | +Generated Location: (3998:157,1 [26] ) +|lock(new object()) { + | + +Source Location: (618:35,51 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml) +| +}| +Generated Location: (4229:165,51 [3] ) +| +}| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_Runtime.codegen.cs new file mode 100644 index 0000000000..ce6adeb982 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_Runtime.codegen.cs @@ -0,0 +1,174 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "ed55fda2b7b0b96b044fc45da658dc062479924f" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Blocks_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"ed55fda2b7b0b96b044fc45da658dc062479924f", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Blocks_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + + int i = 1; + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + while(i <= 10) { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        Hello from C#, #"); +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + Write(i); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n"); +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + i += 1; +} + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + if(i == 11) { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        We wrote 10 lines!

        \r\n"); +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" +} + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + switch(i) { + case 11: + +#line default +#line hidden +#nullable disable + WriteLiteral("

        No really, we wrote 10 lines!

        \r\n"); +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + break; + default: + +#line default +#line hidden +#nullable disable + WriteLiteral("

        Actually, we didn\'t...

        \r\n"); +#nullable restore +#line 20 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + break; +} + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 23 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + for(int j = 1; j <= 10; j += 2) { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        Hello again from C#, #"); +#nullable restore +#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + Write(j); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n"); +#nullable restore +#line 25 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" +} + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 27 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + try { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        That time, we wrote 5 lines!

        \r\n"); +#nullable restore +#line 29 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" +} catch(Exception ex) { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        Oh no! An error occurred: "); +#nullable restore +#line 30 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + Write(ex.Message); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n"); +#nullable restore +#line 31 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" +} + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n

        i is now "); +#nullable restore +#line 33 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + Write(i); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n\r\n"); +#nullable restore +#line 35 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" + lock(new object()) { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        This block is locked, for your security!

        \r\n"); +#nullable restore +#line 37 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_Runtime.ir.txt new file mode 100644 index 0000000000..36e2a8f3c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_Runtime.ir.txt @@ -0,0 +1,121 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Blocks_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [18] Blocks.cshtml) + IntermediateToken - (2:0,2 [18] Blocks.cshtml) - CSharp - \n int i = 1;\n + HtmlContent - (23:3,0 [2] Blocks.cshtml) + IntermediateToken - (23:3,0 [2] Blocks.cshtml) - Html - \n + CSharpCode - (26:4,1 [18] Blocks.cshtml) + IntermediateToken - (26:4,1 [18] Blocks.cshtml) - CSharp - while(i <= 10) {\n + HtmlContent - (44:5,0 [23] Blocks.cshtml) + IntermediateToken - (44:5,0 [4] Blocks.cshtml) - Html - + IntermediateToken - (48:5,4 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (51:5,7 [16] Blocks.cshtml) - Html - Hello from C#, # + CSharpExpression - (69:5,25 [1] Blocks.cshtml) + IntermediateToken - (69:5,25 [1] Blocks.cshtml) - CSharp - i + HtmlContent - (71:5,27 [6] Blocks.cshtml) + IntermediateToken - (71:5,27 [4] Blocks.cshtml) - Html -

        + IntermediateToken - (75:5,31 [2] Blocks.cshtml) - Html - \n + CSharpCode - (77:6,0 [16] Blocks.cshtml) + IntermediateToken - (77:6,0 [16] Blocks.cshtml) - CSharp - i += 1;\n}\n + HtmlContent - (93:8,0 [2] Blocks.cshtml) + IntermediateToken - (93:8,0 [2] Blocks.cshtml) - Html - \n + CSharpCode - (96:9,1 [15] Blocks.cshtml) + IntermediateToken - (96:9,1 [15] Blocks.cshtml) - CSharp - if(i == 11) {\n + HtmlContent - (111:10,0 [31] Blocks.cshtml) + IntermediateToken - (111:10,0 [4] Blocks.cshtml) - Html - + IntermediateToken - (115:10,4 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (118:10,7 [18] Blocks.cshtml) - Html - We wrote 10 lines! + IntermediateToken - (136:10,25 [4] Blocks.cshtml) - Html -

        + IntermediateToken - (140:10,29 [2] Blocks.cshtml) - Html - \n + CSharpCode - (142:11,0 [3] Blocks.cshtml) + IntermediateToken - (142:11,0 [3] Blocks.cshtml) - CSharp - }\n + HtmlContent - (145:12,0 [2] Blocks.cshtml) + IntermediateToken - (145:12,0 [2] Blocks.cshtml) - Html - \n + CSharpCode - (148:13,1 [27] Blocks.cshtml) + IntermediateToken - (148:13,1 [27] Blocks.cshtml) - CSharp - switch(i) {\n case 11:\n + HtmlContent - (175:15,0 [46] Blocks.cshtml) + IntermediateToken - (175:15,0 [8] Blocks.cshtml) - Html - + IntermediateToken - (183:15,8 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (186:15,11 [29] Blocks.cshtml) - Html - No really, we wrote 10 lines! + IntermediateToken - (215:15,40 [4] Blocks.cshtml) - Html -

        + IntermediateToken - (219:15,44 [2] Blocks.cshtml) - Html - \n + CSharpCode - (221:16,0 [30] Blocks.cshtml) + IntermediateToken - (221:16,0 [30] Blocks.cshtml) - CSharp - break;\n default:\n + HtmlContent - (251:18,0 [39] Blocks.cshtml) + IntermediateToken - (251:18,0 [8] Blocks.cshtml) - Html - + IntermediateToken - (259:18,8 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (262:18,11 [22] Blocks.cshtml) - Html - Actually, we didn't... + IntermediateToken - (284:18,33 [4] Blocks.cshtml) - Html -

        + IntermediateToken - (288:18,37 [2] Blocks.cshtml) - Html - \n + CSharpCode - (290:19,0 [19] Blocks.cshtml) + IntermediateToken - (290:19,0 [19] Blocks.cshtml) - CSharp - break;\n}\n + HtmlContent - (309:21,0 [2] Blocks.cshtml) + IntermediateToken - (309:21,0 [2] Blocks.cshtml) - Html - \n + CSharpCode - (312:22,1 [35] Blocks.cshtml) + IntermediateToken - (312:22,1 [35] Blocks.cshtml) - CSharp - for(int j = 1; j <= 10; j += 2) {\n + HtmlContent - (347:23,0 [29] Blocks.cshtml) + IntermediateToken - (347:23,0 [4] Blocks.cshtml) - Html - + IntermediateToken - (351:23,4 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (354:23,7 [22] Blocks.cshtml) - Html - Hello again from C#, # + CSharpExpression - (378:23,31 [1] Blocks.cshtml) + IntermediateToken - (378:23,31 [1] Blocks.cshtml) - CSharp - j + HtmlContent - (380:23,33 [6] Blocks.cshtml) + IntermediateToken - (380:23,33 [4] Blocks.cshtml) - Html -

        + IntermediateToken - (384:23,37 [2] Blocks.cshtml) - Html - \n + CSharpCode - (386:24,0 [3] Blocks.cshtml) + IntermediateToken - (386:24,0 [3] Blocks.cshtml) - CSharp - }\n + HtmlContent - (389:25,0 [2] Blocks.cshtml) + IntermediateToken - (389:25,0 [2] Blocks.cshtml) - Html - \n + CSharpCode - (392:26,1 [7] Blocks.cshtml) + IntermediateToken - (392:26,1 [7] Blocks.cshtml) - CSharp - try {\n + HtmlContent - (399:27,0 [41] Blocks.cshtml) + IntermediateToken - (399:27,0 [4] Blocks.cshtml) - Html - + IntermediateToken - (403:27,4 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (406:27,7 [28] Blocks.cshtml) - Html - That time, we wrote 5 lines! + IntermediateToken - (434:27,35 [4] Blocks.cshtml) - Html -

        + IntermediateToken - (438:27,39 [2] Blocks.cshtml) - Html - \n + CSharpCode - (440:28,0 [25] Blocks.cshtml) + IntermediateToken - (440:28,0 [25] Blocks.cshtml) - CSharp - } catch(Exception ex) {\n + HtmlContent - (465:29,0 [33] Blocks.cshtml) + IntermediateToken - (465:29,0 [4] Blocks.cshtml) - Html - + IntermediateToken - (469:29,4 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (472:29,7 [26] Blocks.cshtml) - Html - Oh no! An error occurred: + CSharpExpression - (500:29,35 [10] Blocks.cshtml) + IntermediateToken - (500:29,35 [10] Blocks.cshtml) - CSharp - ex.Message + HtmlContent - (511:29,46 [6] Blocks.cshtml) + IntermediateToken - (511:29,46 [4] Blocks.cshtml) - Html -

        + IntermediateToken - (515:29,50 [2] Blocks.cshtml) - Html - \n + CSharpCode - (517:30,0 [3] Blocks.cshtml) + IntermediateToken - (517:30,0 [3] Blocks.cshtml) - CSharp - }\n + HtmlContent - (520:31,0 [14] Blocks.cshtml) + IntermediateToken - (520:31,0 [2] Blocks.cshtml) - Html - \n + IntermediateToken - (522:32,0 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (525:32,3 [9] Blocks.cshtml) - Html - i is now + CSharpExpression - (535:32,13 [1] Blocks.cshtml) + IntermediateToken - (535:32,13 [1] Blocks.cshtml) - CSharp - i + HtmlContent - (536:32,14 [8] Blocks.cshtml) + IntermediateToken - (536:32,14 [4] Blocks.cshtml) - Html -

        + IntermediateToken - (540:32,18 [4] Blocks.cshtml) - Html - \n\n + CSharpCode - (545:34,1 [22] Blocks.cshtml) + IntermediateToken - (545:34,1 [22] Blocks.cshtml) - CSharp - lock(new object()) {\n + HtmlContent - (567:35,0 [53] Blocks.cshtml) + IntermediateToken - (567:35,0 [4] Blocks.cshtml) - Html - + IntermediateToken - (571:35,4 [2] Blocks.cshtml) - Html -

        + IntermediateToken - (574:35,7 [40] Blocks.cshtml) - Html - This block is locked, for your security! + IntermediateToken - (614:35,47 [4] Blocks.cshtml) - Html -

        + IntermediateToken - (618:35,51 [2] Blocks.cshtml) - Html - \n + CSharpCode - (620:36,0 [1] Blocks.cshtml) + IntermediateToken - (620:36,0 [1] Blocks.cshtml) - CSharp - } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml new file mode 100644 index 0000000000..e2c134767e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml @@ -0,0 +1,43 @@ + + @{ + var nameLookup = new Dictionary() + { + ["John Doe"] = ("John", "Doe", true) + }; + + @* This is all C# 7 bits that should work. *@ + + int Sixteen = 0b0001_0000; + long BillionsAndBillions = 100_000_000_000; + double AvogadroConstant = 6.022_140_857_747_474e23; + decimal GoldenRatio = 1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M; + } + + @if (nameLookup.TryGetValue("John Doe", out var entry)) + { + if (entry.Extra is bool alive) + { + // Do Something + } + } +

        + Here's a very unique number: @(1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M) +

        + +
        + @((First: "John", Last: "Doe").First) @* Value Tuples *@ +
        + + @switch (entry.Extra) + { + case int age: + // Do something + break; + case IEnumerable childrenNames: + // Do more something + break; + case null: + // Do even more of something + break; + } + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_DesignTime.codegen.cs new file mode 100644 index 0000000000..d72f3f599f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_DesignTime.codegen.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CSharp7_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml" + + var nameLookup = new Dictionary() + { + ["John Doe"] = ("John", "Doe", true) + }; + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml" + + + int Sixteen = 0b0001_0000; + long BillionsAndBillions = 100_000_000_000; + double AvogadroConstant = 6.022_140_857_747_474e23; + decimal GoldenRatio = 1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M; + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml" + if (nameLookup.TryGetValue("John Doe", out var entry)) + { + if (entry.Extra is bool alive) + { + // Do Something + } + } + +#line default +#line hidden +#nullable disable +#nullable restore +#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml" + __o = 1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 28 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml" + __o = (First: "John", Last: "Doe").First; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 31 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml" + switch (entry.Extra) + { + case int age: + // Do something + break; + case IEnumerable childrenNames: + // Do more something + break; + case null: + // Do even more of something + break; + } + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_DesignTime.ir.txt new file mode 100644 index 0000000000..88f3ed74c4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_DesignTime.ir.txt @@ -0,0 +1,50 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CSharp7_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [12] CSharp7.cshtml) + IntermediateToken - (0:0,0 [5] CSharp7.cshtml) - Html - + IntermediateToken - (6:0,6 [6] CSharp7.cshtml) - Html - \n + CSharpCode - (14:1,6 [187] CSharp7.cshtml) + IntermediateToken - (14:1,6 [187] CSharp7.cshtml) - CSharp - \n var nameLookup = new Dictionary()\n {\n ["John Doe"] = ("John", "Doe", true)\n };\n\n + CSharpCode - (246:7,53 [253] CSharp7.cshtml) + IntermediateToken - (246:7,53 [253] CSharp7.cshtml) - CSharp - \n\n int Sixteen = 0b0001_0000;\n long BillionsAndBillions = 100_000_000_000;\n double AvogadroConstant = 6.022_140_857_747_474e23;\n decimal GoldenRatio = 1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M;\n + HtmlContent - (502:14,0 [6] CSharp7.cshtml) + IntermediateToken - (502:14,0 [6] CSharp7.cshtml) - Html - \n + CSharpCode - (509:15,5 [159] CSharp7.cshtml) + IntermediateToken - (509:15,5 [159] CSharp7.cshtml) - CSharp - if (nameLookup.TryGetValue("John Doe", out var entry))\n {\n if (entry.Extra is bool alive)\n {\n // Do Something\n }\n } + HtmlContent - (668:21,5 [48] CSharp7.cshtml) + IntermediateToken - (668:21,5 [6] CSharp7.cshtml) - Html - \n + IntermediateToken - (674:22,4 [2] CSharp7.cshtml) - Html -

        + IntermediateToken - (677:22,7 [39] CSharp7.cshtml) - Html - \n Here's a very unique number: + CSharpExpression - (718:23,39 [62] CSharp7.cshtml) + IntermediateToken - (718:23,39 [62] CSharp7.cshtml) - CSharp - 1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M + HtmlContent - (781:23,102 [33] CSharp7.cshtml) + IntermediateToken - (781:23,102 [6] CSharp7.cshtml) - Html - \n + IntermediateToken - (787:24,4 [4] CSharp7.cshtml) - Html -

        + IntermediateToken - (791:24,8 [8] CSharp7.cshtml) - Html - \n\n + IntermediateToken - (799:26,4 [4] CSharp7.cshtml) - Html -
        + IntermediateToken - (804:26,9 [10] CSharp7.cshtml) - Html - \n + CSharpExpression - (816:27,10 [34] CSharp7.cshtml) + IntermediateToken - (816:27,10 [34] CSharp7.cshtml) - CSharp - (First: "John", Last: "Doe").First + HtmlContent - (851:27,45 [1] CSharp7.cshtml) + IntermediateToken - (851:27,45 [1] CSharp7.cshtml) - Html - + HtmlContent - (870:27,64 [20] CSharp7.cshtml) + IntermediateToken - (870:27,64 [6] CSharp7.cshtml) - Html - \n + IntermediateToken - (876:28,4 [6] CSharp7.cshtml) - Html -
        + IntermediateToken - (882:28,10 [8] CSharp7.cshtml) - Html - \n\n + CSharpCode - (891:30,5 [291] CSharp7.cshtml) + IntermediateToken - (891:30,5 [291] CSharp7.cshtml) - CSharp - switch (entry.Extra)\n {\n case int age:\n // Do something\n break;\n case IEnumerable childrenNames:\n // Do more something\n break;\n case null:\n // Do even more of something\n break;\n } + HtmlContent - (1182:41,5 [9] CSharp7.cshtml) + IntermediateToken - (1182:41,5 [2] CSharp7.cshtml) - Html - \n + IntermediateToken - (1184:42,0 [7] CSharp7.cshtml) - Html - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_DesignTime.mappings.txt new file mode 100644 index 0000000000..ad00d2d80d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_DesignTime.mappings.txt @@ -0,0 +1,88 @@ +Source Location: (14:1,6 [187] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml) +| + var nameLookup = new Dictionary() + { + ["John Doe"] = ("John", "Doe", true) + }; + + | +Generated Location: (738:19,6 [187] ) +| + var nameLookup = new Dictionary() + { + ["John Doe"] = ("John", "Doe", true) + }; + + | + +Source Location: (246:7,53 [253] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml) +| + + int Sixteen = 0b0001_0000; + long BillionsAndBillions = 100_000_000_000; + double AvogadroConstant = 6.022_140_857_747_474e23; + decimal GoldenRatio = 1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M; + | +Generated Location: (1132:32,53 [253] ) +| + + int Sixteen = 0b0001_0000; + long BillionsAndBillions = 100_000_000_000; + double AvogadroConstant = 6.022_140_857_747_474e23; + decimal GoldenRatio = 1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M; + | + +Source Location: (509:15,5 [159] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml) +|if (nameLookup.TryGetValue("John Doe", out var entry)) + { + if (entry.Extra is bool alive) + { + // Do Something + } + }| +Generated Location: (1545:45,5 [159] ) +|if (nameLookup.TryGetValue("John Doe", out var entry)) + { + if (entry.Extra is bool alive) + { + // Do Something + } + }| + +Source Location: (718:23,39 [62] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml) +|1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M| +Generated Location: (1898:58,39 [62] ) +|1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M| + +Source Location: (816:27,10 [34] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml) +|(First: "John", Last: "Doe").First| +Generated Location: (2126:65,10 [34] ) +|(First: "John", Last: "Doe").First| + +Source Location: (891:30,5 [291] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml) +|switch (entry.Extra) + { + case int age: + // Do something + break; + case IEnumerable childrenNames: + // Do more something + break; + case null: + // Do even more of something + break; + }| +Generated Location: (2321:72,5 [291] ) +|switch (entry.Extra) + { + case int age: + // Do something + break; + case IEnumerable childrenNames: + // Do more something + break; + case null: + // Do even more of something + break; + }| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_Runtime.codegen.cs new file mode 100644 index 0000000000..cf2fd1a3bd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_Runtime.codegen.cs @@ -0,0 +1,96 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "69466b91f73ea9f94ccef045495a0da11bb763c6" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CSharp7_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"69466b91f73ea9f94ccef045495a0da11bb763c6", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CSharp7_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml" + + var nameLookup = new Dictionary() + { + ["John Doe"] = ("John", "Doe", true) + }; + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml" + + + int Sixteen = 0b0001_0000; + long BillionsAndBillions = 100_000_000_000; + double AvogadroConstant = 6.022_140_857_747_474e23; + decimal GoldenRatio = 1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M; + + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml" + if (nameLookup.TryGetValue("John Doe", out var entry)) + { + if (entry.Extra is bool alive) + { + // Do Something + } + } + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n Here\'s a very unique number: "); +#nullable restore +#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml" + Write(1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M); + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n

        \r\n\r\n
        \r\n "); +#nullable restore +#line 28 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml" + Write((First: "John", Last: "Doe").First); + +#line default +#line hidden +#nullable disable + WriteLiteral(" "); + WriteLiteral("\r\n
        \r\n\r\n"); +#nullable restore +#line 31 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml" + switch (entry.Extra) + { + case int age: + // Do something + break; + case IEnumerable childrenNames: + // Do more something + break; + case null: + // Do even more of something + break; + } + +#line default +#line hidden +#nullable disable + WriteLiteral(""); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_Runtime.ir.txt new file mode 100644 index 0000000000..b6cb7face8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7_Runtime.ir.txt @@ -0,0 +1,51 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CSharp7_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [8] CSharp7.cshtml) + IntermediateToken - (0:0,0 [5] CSharp7.cshtml) - Html - + IntermediateToken - (6:0,6 [2] CSharp7.cshtml) - Html - \n + CSharpCode - (8:1,0 [4] CSharp7.cshtml) + IntermediateToken - (8:1,0 [4] CSharp7.cshtml) - CSharp - + CSharpCode - (14:1,6 [187] CSharp7.cshtml) + IntermediateToken - (14:1,6 [187] CSharp7.cshtml) - CSharp - \n var nameLookup = new Dictionary()\n {\n ["John Doe"] = ("John", "Doe", true)\n };\n\n + CSharpCode - (246:7,53 [253] CSharp7.cshtml) + IntermediateToken - (246:7,53 [253] CSharp7.cshtml) - CSharp - \n\n int Sixteen = 0b0001_0000;\n long BillionsAndBillions = 100_000_000_000;\n double AvogadroConstant = 6.022_140_857_747_474e23;\n decimal GoldenRatio = 1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M;\n + HtmlContent - (502:14,0 [2] CSharp7.cshtml) + IntermediateToken - (502:14,0 [2] CSharp7.cshtml) - Html - \n + CSharpCode - (504:15,0 [4] CSharp7.cshtml) + IntermediateToken - (504:15,0 [4] CSharp7.cshtml) - CSharp - + CSharpCode - (509:15,5 [161] CSharp7.cshtml) + IntermediateToken - (509:15,5 [161] CSharp7.cshtml) - CSharp - if (nameLookup.TryGetValue("John Doe", out var entry))\n {\n if (entry.Extra is bool alive)\n {\n // Do Something\n }\n }\n + HtmlContent - (670:22,0 [46] CSharp7.cshtml) + IntermediateToken - (670:22,0 [4] CSharp7.cshtml) - Html - + IntermediateToken - (674:22,4 [2] CSharp7.cshtml) - Html -

        + IntermediateToken - (677:22,7 [39] CSharp7.cshtml) - Html - \n Here's a very unique number: + CSharpExpression - (718:23,39 [62] CSharp7.cshtml) + IntermediateToken - (718:23,39 [62] CSharp7.cshtml) - CSharp - 1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M + HtmlContent - (781:23,102 [33] CSharp7.cshtml) + IntermediateToken - (781:23,102 [6] CSharp7.cshtml) - Html - \n + IntermediateToken - (787:24,4 [4] CSharp7.cshtml) - Html -

        + IntermediateToken - (791:24,8 [8] CSharp7.cshtml) - Html - \n\n + IntermediateToken - (799:26,4 [4] CSharp7.cshtml) - Html -
        + IntermediateToken - (804:26,9 [2] CSharp7.cshtml) - Html - \n + IntermediateToken - (806:27,0 [8] CSharp7.cshtml) - Html - + CSharpExpression - (816:27,10 [34] CSharp7.cshtml) + IntermediateToken - (816:27,10 [34] CSharp7.cshtml) - CSharp - (First: "John", Last: "Doe").First + HtmlContent - (851:27,45 [1] CSharp7.cshtml) + IntermediateToken - (851:27,45 [1] CSharp7.cshtml) - Html - + HtmlContent - (870:27,64 [16] CSharp7.cshtml) + IntermediateToken - (870:27,64 [6] CSharp7.cshtml) - Html - \n + IntermediateToken - (876:28,4 [6] CSharp7.cshtml) - Html -
        + IntermediateToken - (882:28,10 [4] CSharp7.cshtml) - Html - \n\n + CSharpCode - (886:30,0 [4] CSharp7.cshtml) + IntermediateToken - (886:30,0 [4] CSharp7.cshtml) - CSharp - + CSharpCode - (891:30,5 [293] CSharp7.cshtml) + IntermediateToken - (891:30,5 [293] CSharp7.cshtml) - CSharp - switch (entry.Extra)\n {\n case int age:\n // Do something\n break;\n case IEnumerable childrenNames:\n // Do more something\n break;\n case null:\n // Do even more of something\n break;\n }\n + HtmlContent - (1184:42,0 [7] CSharp7.cshtml) + IntermediateToken - (1184:42,0 [7] CSharp7.cshtml) - Html - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml new file mode 100644 index 0000000000..55a1f9f763 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml @@ -0,0 +1,52 @@ +@using System.Collections.Generic + +@{ + IAsyncEnumerable GetAsyncEnumerable() + { + return null; + } + + await foreach (var val in GetAsyncEnumerable()) + { + + } + + Range range = 1..5; + using var disposable = GetLastDisposableInRange(range); + + var words = Array.Empty(); + var testEnum = GetEnum(); + static TestEnum GetEnum() + { + return TestEnum.First; + } +} + +@words[1..2] +@(words[^2..^0]) + +@(testEnum switch +{ + TestEnum.First => "The First!", + TestEnum.Second => "The Second!", + _ => "The others", +}) + +@await foreach (var val in GetAsyncEnumerable()) +{ + @val +} + +@functions { + enum TestEnum + { + First, + Second + } + + IDisposable GetLastDisposableInRange(Range range) + { + var disposables = (IDisposable[])ViewData["disposables"]; + return disposables[range][^1]; + } +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_DesignTime.codegen.cs new file mode 100644 index 0000000000..a324d77c3d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_DesignTime.codegen.cs @@ -0,0 +1,123 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" +using System.Collections.Generic; + +#line default +#line hidden +#nullable disable + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CSharp8_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" + + IAsyncEnumerable GetAsyncEnumerable() + { + return null; + } + + await foreach (var val in GetAsyncEnumerable()) + { + + } + + Range range = 1..5; + using var disposable = GetLastDisposableInRange(range); + + var words = Array.Empty(); + var testEnum = GetEnum(); + static TestEnum GetEnum() + { + return TestEnum.First; + } + +#line default +#line hidden +#nullable disable +#nullable restore +#line 25 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" +__o = words[1..2]; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 26 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" +__o = words[^2..^0]; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 28 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" +__o = testEnum switch +{ + TestEnum.First => "The First!", + TestEnum.Second => "The Second!", + _ => "The others", +}; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 35 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" + await foreach (var val in GetAsyncEnumerable()) +{ + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 37 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" +__o = val; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 37 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" + +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 +#nullable restore +#line 40 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" + + enum TestEnum + { + First, + Second + } + + IDisposable GetLastDisposableInRange(Range range) + { + var disposables = (IDisposable[])ViewData["disposables"]; + return disposables[range][^1]; + } + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_DesignTime.ir.txt new file mode 100644 index 0000000000..d88c704ac3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_DesignTime.ir.txt @@ -0,0 +1,40 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + UsingDirective - (1:0,1 [32] CSharp8.cshtml) - System.Collections.Generic + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CSharp8_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (33:0,33 [4] CSharp8.cshtml) + IntermediateToken - (33:0,33 [4] CSharp8.cshtml) - Html - \n\n + CSharpCode - (39:2,2 [396] CSharp8.cshtml) + IntermediateToken - (39:2,2 [396] CSharp8.cshtml) - CSharp - \n IAsyncEnumerable GetAsyncEnumerable()\n {\n return null;\n }\n\n await foreach (var val in GetAsyncEnumerable())\n {\n\n }\n\n Range range = 1..5;\n using var disposable = GetLastDisposableInRange(range);\n\n var words = Array.Empty();\n var testEnum = GetEnum();\n static TestEnum GetEnum()\n {\n return TestEnum.First;\n }\n + HtmlContent - (438:23,0 [2] CSharp8.cshtml) + IntermediateToken - (438:23,0 [2] CSharp8.cshtml) - Html - \n + CSharpExpression - (441:24,1 [11] CSharp8.cshtml) + IntermediateToken - (441:24,1 [11] CSharp8.cshtml) - CSharp - words[1..2] + HtmlContent - (452:24,12 [2] CSharp8.cshtml) + IntermediateToken - (452:24,12 [2] CSharp8.cshtml) - Html - \n + CSharpExpression - (456:25,2 [13] CSharp8.cshtml) + IntermediateToken - (456:25,2 [13] CSharp8.cshtml) - CSharp - words[^2..^0] + HtmlContent - (470:25,16 [4] CSharp8.cshtml) + IntermediateToken - (470:25,16 [4] CSharp8.cshtml) - Html - \n\n + CSharpExpression - (476:27,2 [121] CSharp8.cshtml) + IntermediateToken - (476:27,2 [121] CSharp8.cshtml) - CSharp - testEnum switch\n{\n TestEnum.First => "The First!",\n TestEnum.Second => "The Second!",\n _ => "The others",\n} + HtmlContent - (598:32,2 [4] CSharp8.cshtml) + IntermediateToken - (598:32,2 [4] CSharp8.cshtml) - Html - \n\n + CSharpCode - (603:34,1 [56] CSharp8.cshtml) + IntermediateToken - (603:34,1 [56] CSharp8.cshtml) - CSharp - await foreach (var val in GetAsyncEnumerable())\n{\n + CSharpExpression - (660:36,5 [3] CSharp8.cshtml) + IntermediateToken - (660:36,5 [3] CSharp8.cshtml) - CSharp - val + CSharpCode - (663:36,8 [3] CSharp8.cshtml) + IntermediateToken - (663:36,8 [3] CSharp8.cshtml) - CSharp - \n} + HtmlContent - (666:37,1 [4] CSharp8.cshtml) + IntermediateToken - (666:37,1 [4] CSharp8.cshtml) - Html - \n\n + CSharpCode - (682:39,12 [245] CSharp8.cshtml) + IntermediateToken - (682:39,12 [245] CSharp8.cshtml) - CSharp - \n enum TestEnum\n {\n First,\n Second\n }\n\n IDisposable GetLastDisposableInRange(Range range)\n {\n var disposables = (IDisposable[])ViewData["disposables"];\n return disposables[range][^1];\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_DesignTime.mappings.txt new file mode 100644 index 0000000000..dda962d084 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_DesignTime.mappings.txt @@ -0,0 +1,125 @@ +Source Location: (1:0,1 [32] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml) +|using System.Collections.Generic| +Generated Location: (249:7,0 [32] ) +|using System.Collections.Generic| + +Source Location: (39:2,2 [396] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml) +| + IAsyncEnumerable GetAsyncEnumerable() + { + return null; + } + + await foreach (var val in GetAsyncEnumerable()) + { + + } + + Range range = 1..5; + using var disposable = GetLastDisposableInRange(range); + + var words = Array.Empty(); + var testEnum = GetEnum(); + static TestEnum GetEnum() + { + return TestEnum.First; + } +| +Generated Location: (921:26,2 [396] ) +| + IAsyncEnumerable GetAsyncEnumerable() + { + return null; + } + + await foreach (var val in GetAsyncEnumerable()) + { + + } + + Range range = 1..5; + using var disposable = GetLastDisposableInRange(range); + + var words = Array.Empty(); + var testEnum = GetEnum(); + static TestEnum GetEnum() + { + return TestEnum.First; + } +| + +Source Location: (441:24,1 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml) +|words[1..2]| +Generated Location: (1476:52,6 [11] ) +|words[1..2]| + +Source Location: (456:25,2 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml) +|words[^2..^0]| +Generated Location: (1649:59,6 [13] ) +|words[^2..^0]| + +Source Location: (476:27,2 [121] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml) +|testEnum switch +{ + TestEnum.First => "The First!", + TestEnum.Second => "The Second!", + _ => "The others", +}| +Generated Location: (1824:66,6 [121] ) +|testEnum switch +{ + TestEnum.First => "The First!", + TestEnum.Second => "The Second!", + _ => "The others", +}| + +Source Location: (603:34,1 [56] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml) +|await foreach (var val in GetAsyncEnumerable()) +{ + | +Generated Location: (2102:78,1 [56] ) +|await foreach (var val in GetAsyncEnumerable()) +{ + | + +Source Location: (660:36,5 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml) +|val| +Generated Location: (2319:87,6 [3] ) +|val| + +Source Location: (663:36,8 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml) +| +}| +Generated Location: (2486:94,8 [3] ) +| +}| + +Source Location: (682:39,12 [245] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml) +| + enum TestEnum + { + First, + Second + } + + IDisposable GetLastDisposableInRange(Range range) + { + var disposables = (IDisposable[])ViewData["disposables"]; + return disposables[range][^1]; + } +| +Generated Location: (2705:104,12 [245] ) +| + enum TestEnum + { + First, + Second + } + + IDisposable GetLastDisposableInRange(Range range) + { + var disposables = (IDisposable[])ViewData["disposables"]; + return disposables[range][^1]; + } +| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_Runtime.codegen.cs new file mode 100644 index 0000000000..444b967afa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_Runtime.codegen.cs @@ -0,0 +1,125 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "fee381e8889cc49d7a4b1dea29510c0fc9ac44c9" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CSharp8_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" +using System.Collections.Generic; + +#line default +#line hidden +#nullable disable + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"fee381e8889cc49d7a4b1dea29510c0fc9ac44c9", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CSharp8_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" + + IAsyncEnumerable GetAsyncEnumerable() + { + return null; + } + + await foreach (var val in GetAsyncEnumerable()) + { + + } + + Range range = 1..5; + using var disposable = GetLastDisposableInRange(range); + + var words = Array.Empty(); + var testEnum = GetEnum(); + static TestEnum GetEnum() + { + return TestEnum.First; + } + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 25 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" +Write(words[1..2]); + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 26 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" +Write(words[^2..^0]); + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n\r\n"); +#nullable restore +#line 28 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" +Write(testEnum switch +{ + TestEnum.First => "The First!", + TestEnum.Second => "The Second!", + _ => "The others", +}); + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n\r\n"); +#nullable restore +#line 35 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" + await foreach (var val in GetAsyncEnumerable()) +{ + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 37 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" +Write(val); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 37 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" + +} + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); + } + #pragma warning restore 1998 +#nullable restore +#line 40 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8.cshtml" + + enum TestEnum + { + First, + Second + } + + IDisposable GetLastDisposableInRange(Range range) + { + var disposables = (IDisposable[])ViewData["disposables"]; + return disposables[range][^1]; + } + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_Runtime.ir.txt new file mode 100644 index 0000000000..4c29c1f76f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp8_Runtime.ir.txt @@ -0,0 +1,35 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + UsingDirective - (1:0,1 [34] CSharp8.cshtml) - System.Collections.Generic + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CSharp8_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (35:1,0 [2] CSharp8.cshtml) + IntermediateToken - (35:1,0 [2] CSharp8.cshtml) - Html - \n + CSharpCode - (39:2,2 [396] CSharp8.cshtml) + IntermediateToken - (39:2,2 [396] CSharp8.cshtml) - CSharp - \n IAsyncEnumerable GetAsyncEnumerable()\n {\n return null;\n }\n\n await foreach (var val in GetAsyncEnumerable())\n {\n\n }\n\n Range range = 1..5;\n using var disposable = GetLastDisposableInRange(range);\n\n var words = Array.Empty();\n var testEnum = GetEnum();\n static TestEnum GetEnum()\n {\n return TestEnum.First;\n }\n + HtmlContent - (438:23,0 [2] CSharp8.cshtml) + IntermediateToken - (438:23,0 [2] CSharp8.cshtml) - Html - \n + CSharpExpression - (441:24,1 [11] CSharp8.cshtml) + IntermediateToken - (441:24,1 [11] CSharp8.cshtml) - CSharp - words[1..2] + HtmlContent - (452:24,12 [2] CSharp8.cshtml) + IntermediateToken - (452:24,12 [2] CSharp8.cshtml) - Html - \n + CSharpExpression - (456:25,2 [13] CSharp8.cshtml) + IntermediateToken - (456:25,2 [13] CSharp8.cshtml) - CSharp - words[^2..^0] + HtmlContent - (470:25,16 [4] CSharp8.cshtml) + IntermediateToken - (470:25,16 [4] CSharp8.cshtml) - Html - \n\n + CSharpExpression - (476:27,2 [121] CSharp8.cshtml) + IntermediateToken - (476:27,2 [121] CSharp8.cshtml) - CSharp - testEnum switch\n{\n TestEnum.First => "The First!",\n TestEnum.Second => "The Second!",\n _ => "The others",\n} + HtmlContent - (598:32,2 [4] CSharp8.cshtml) + IntermediateToken - (598:32,2 [4] CSharp8.cshtml) - Html - \n\n + CSharpCode - (603:34,1 [56] CSharp8.cshtml) + IntermediateToken - (603:34,1 [56] CSharp8.cshtml) - CSharp - await foreach (var val in GetAsyncEnumerable())\n{\n + CSharpExpression - (660:36,5 [3] CSharp8.cshtml) + IntermediateToken - (660:36,5 [3] CSharp8.cshtml) - CSharp - val + CSharpCode - (663:36,8 [5] CSharp8.cshtml) + IntermediateToken - (663:36,8 [5] CSharp8.cshtml) - CSharp - \n}\n + HtmlContent - (668:38,0 [2] CSharp8.cshtml) + IntermediateToken - (668:38,0 [2] CSharp8.cshtml) - Html - \n + CSharpCode - (682:39,12 [245] CSharp8.cshtml) + IntermediateToken - (682:39,12 [245] CSharp8.cshtml) - CSharp - \n enum TestEnum\n {\n First,\n Second\n }\n\n IDisposable GetLastDisposableInRange(Range range)\n {\n var disposables = (IDisposable[])ViewData["disposables"];\n return disposables[range][^1];\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock.cshtml new file mode 100644 index 0000000000..1c78883a10 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock.cshtml @@ -0,0 +1,5 @@ +@{ + for(int i = 1; i <= 10; i++) { + Output.Write("

        Hello from C#, #" + i.ToString() + "

        "); + } +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF.cshtml new file mode 100644 index 0000000000..38417d481c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF.cshtml @@ -0,0 +1 @@ +@{ \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.codegen.cs new file mode 100644 index 0000000000..3c1f46fb0e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.codegen.cs @@ -0,0 +1,29 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockAtEOF_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF.cshtml" + + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.diagnostics.txt new file mode 100644 index 0000000000..c3072c6248 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.diagnostics.txt @@ -0,0 +1 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF.cshtml(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.ir.txt new file mode 100644 index 0000000000..764d204441 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.ir.txt @@ -0,0 +1,13 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockAtEOF_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [0] CodeBlockAtEOF.cshtml) + IntermediateToken - (2:0,2 [0] CodeBlockAtEOF.cshtml) - CSharp - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.mappings.txt new file mode 100644 index 0000000000..8500fe260a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.mappings.txt @@ -0,0 +1,5 @@ +Source Location: (2:0,2 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF.cshtml) +|| +Generated Location: (748:19,2 [0] ) +|| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_Runtime.codegen.cs new file mode 100644 index 0000000000..95ce16e337 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_Runtime.codegen.cs @@ -0,0 +1,18 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "b4fbc3b07404cc5be74ae0ba920a16e9cf39a378" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockAtEOF_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"b4fbc3b07404cc5be74ae0ba920a16e9cf39a378", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockAtEOF_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_Runtime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_Runtime.diagnostics.txt new file mode 100644 index 0000000000..c3072c6248 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_Runtime.diagnostics.txt @@ -0,0 +1 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF.cshtml(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_Runtime.ir.txt new file mode 100644 index 0000000000..daf2692204 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_Runtime.ir.txt @@ -0,0 +1,8 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockAtEOF_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [0] CodeBlockAtEOF.cshtml) + IntermediateToken - (2:0,2 [0] CodeBlockAtEOF.cshtml) - CSharp - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml new file mode 100644 index 0000000000..9c34a940eb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml @@ -0,0 +1,4 @@ +@{ + var a = 1; foo + var b = 1; bar @(a+b) +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.codegen.cs new file mode 100644 index 0000000000..b887486ba1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.codegen.cs @@ -0,0 +1,52 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockWithTextElement_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml" + + var a = 1; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml" + + var b = 1; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml" + __o = a+b; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml" + + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.ir.txt new file mode 100644 index 0000000000..8a220afc95 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.ir.txt @@ -0,0 +1,23 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockWithTextElement_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [17] CodeBlockWithTextElement.cshtml) + IntermediateToken - (2:0,2 [17] CodeBlockWithTextElement.cshtml) - CSharp - \n var a = 1; + HtmlContent - (25:1,21 [3] CodeBlockWithTextElement.cshtml) + IntermediateToken - (25:1,21 [3] CodeBlockWithTextElement.cshtml) - Html - foo + CSharpCode - (35:1,31 [22] CodeBlockWithTextElement.cshtml) + IntermediateToken - (35:1,31 [22] CodeBlockWithTextElement.cshtml) - CSharp - \n var b = 1; + HtmlContent - (63:2,23 [4] CodeBlockWithTextElement.cshtml) + IntermediateToken - (63:2,23 [4] CodeBlockWithTextElement.cshtml) - Html - bar + CSharpExpression - (69:2,29 [3] CodeBlockWithTextElement.cshtml) + IntermediateToken - (69:2,29 [3] CodeBlockWithTextElement.cshtml) - CSharp - a+b + CSharpCode - (80:2,40 [2] CodeBlockWithTextElement.cshtml) + IntermediateToken - (80:2,40 [2] CodeBlockWithTextElement.cshtml) - CSharp - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.mappings.txt new file mode 100644 index 0000000000..3705416169 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.mappings.txt @@ -0,0 +1,26 @@ +Source Location: (2:0,2 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml) +| + var a = 1; | +Generated Location: (768:19,2 [17] ) +| + var a = 1; | + +Source Location: (35:1,31 [22] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml) +| + var b = 1; | +Generated Location: (987:27,31 [22] ) +| + var b = 1; | + +Source Location: (69:2,29 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml) +|a+b| +Generated Location: (1218:35,38 [3] ) +|a+b| + +Source Location: (80:2,40 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml) +| +| +Generated Location: (1442:42,49 [2] ) +| +| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_Runtime.codegen.cs new file mode 100644 index 0000000000..59764e3772 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_Runtime.codegen.cs @@ -0,0 +1,43 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "b794c71d64ba4731b2802f7d0dae1f863a9f9dd9" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockWithTextElement_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"b794c71d64ba4731b2802f7d0dae1f863a9f9dd9", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockWithTextElement_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml" + + var a = 1; + +#line default +#line hidden +#nullable disable + WriteLiteral("foo"); +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml" + + var b = 1; + +#line default +#line hidden +#nullable disable + WriteLiteral("bar "); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml" + Write(a+b); + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_Runtime.ir.txt new file mode 100644 index 0000000000..0c163f3a41 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_Runtime.ir.txt @@ -0,0 +1,18 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockWithTextElement_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [17] CodeBlockWithTextElement.cshtml) + IntermediateToken - (2:0,2 [17] CodeBlockWithTextElement.cshtml) - CSharp - \n var a = 1; + HtmlContent - (25:1,21 [3] CodeBlockWithTextElement.cshtml) + IntermediateToken - (25:1,21 [3] CodeBlockWithTextElement.cshtml) - Html - foo + CSharpCode - (35:1,31 [22] CodeBlockWithTextElement.cshtml) + IntermediateToken - (35:1,31 [22] CodeBlockWithTextElement.cshtml) - CSharp - \n var b = 1; + HtmlContent - (63:2,23 [4] CodeBlockWithTextElement.cshtml) + IntermediateToken - (63:2,23 [4] CodeBlockWithTextElement.cshtml) - Html - bar + CSharpExpression - (69:2,29 [3] CodeBlockWithTextElement.cshtml) + IntermediateToken - (69:2,29 [3] CodeBlockWithTextElement.cshtml) - CSharp - a+b + CSharpCode - (80:2,40 [2] CodeBlockWithTextElement.cshtml) + IntermediateToken - (80:2,40 [2] CodeBlockWithTextElement.cshtml) - CSharp - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_DesignTime.codegen.cs new file mode 100644 index 0000000000..49483b617e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_DesignTime.codegen.cs @@ -0,0 +1,32 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlock_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock.cshtml" + + for(int i = 1; i <= 10; i++) { + Output.Write("

        Hello from C#, #" + i.ToString() + "

        "); + } + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_DesignTime.ir.txt new file mode 100644 index 0000000000..2dadb8d1fa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_DesignTime.ir.txt @@ -0,0 +1,13 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlock_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [115] CodeBlock.cshtml) + IntermediateToken - (2:0,2 [115] CodeBlock.cshtml) - CSharp - \n for(int i = 1; i <= 10; i++) {\n Output.Write("

        Hello from C#, #" + i.ToString() + "

        ");\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_DesignTime.mappings.txt new file mode 100644 index 0000000000..6d4378fb88 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_DesignTime.mappings.txt @@ -0,0 +1,13 @@ +Source Location: (2:0,2 [115] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock.cshtml) +| + for(int i = 1; i <= 10; i++) { + Output.Write("

        Hello from C#, #" + i.ToString() + "

        "); + } +| +Generated Location: (738:19,2 [115] ) +| + for(int i = 1; i <= 10; i++) { + Output.Write("

        Hello from C#, #" + i.ToString() + "

        "); + } +| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_Runtime.codegen.cs new file mode 100644 index 0000000000..d3255c7b03 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_Runtime.codegen.cs @@ -0,0 +1,28 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "d570564dcb19afbfb9fcd1b8a7e339d22c0d0c97" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlock_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"d570564dcb19afbfb9fcd1b8a7e339d22c0d0c97", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlock_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock.cshtml" + + for(int i = 1; i <= 10; i++) { + Output.Write("

        Hello from C#, #" + i.ToString() + "

        "); + } + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_Runtime.ir.txt new file mode 100644 index 0000000000..f700c27032 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_Runtime.ir.txt @@ -0,0 +1,8 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlock_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [115] CodeBlock.cshtml) + IntermediateToken - (2:0,2 [115] CodeBlock.cshtml) - CSharp - \n for(int i = 1; i <= 10; i++) {\n Output.Write("

        Hello from C#, #" + i.ToString() + "

        ");\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml new file mode 100644 index 0000000000..546906282c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml @@ -0,0 +1,38 @@ +@addTagHelper "*, TestAssembly" + +@if (true) +{ + var checkbox = "checkbox"; + +
        +

        +

        +

        Set Time:

        + @if (false) + { +

        New Time:

        + } + else + { +

        Current Time:

        + + + } +

        +

        + @{ var @object = false;} + +

        +

        + +

        +

        + +

        +

        + +

        + @someMethod(@

        ) +

        +
        +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.codegen.cs new file mode 100644 index 0000000000..c60c5aac81 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.codegen.cs @@ -0,0 +1,283 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ComplexTagHelpers_DesignTime + { + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + if (true) +{ + var checkbox = "checkbox"; + + + +#line default +#line hidden +#nullable disable + __TestNamespace_PTagHelper = CreateTagHelper(); +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_PTagHelper.Age = @@(1+2); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + if (false) + { + + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __TestNamespace_InputTagHelper.Type = "text"; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; + __TestNamespace_PTagHelper = CreateTagHelper(); +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + + } + else + { + + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + __o = checkbox; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper.Type = string.Empty; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + __TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable + __TestNamespace_PTagHelper = CreateTagHelper(); +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + + + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); +#nullable restore +#line 18 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + __o = true ? "checkbox" : "anything"; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper.Type = string.Empty; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; +#nullable restore +#line 18 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + + + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + if(true) { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + } else { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + } + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper.Type = string.Empty; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + + } + +#line default +#line hidden +#nullable disable + __TestNamespace_PTagHelper = CreateTagHelper(); +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + __o = DateTime.Now; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 23 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + var @object = false; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); +#nullable restore +#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = (@object); + +#line default +#line hidden +#nullable disable + __TestNamespace_PTagHelper = CreateTagHelper(); +#nullable restore +#line 22 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + __TestNamespace_PTagHelper.Age = DateTimeOffset.Now.Year - 1970; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); +#nullable restore +#line 27 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + __TestNamespace_InputTagHelper2.Checked = (DateTimeOffset.Now.Year > 2014); + +#line default +#line hidden +#nullable disable + __TestNamespace_PTagHelper = CreateTagHelper(); +#nullable restore +#line 26 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_PTagHelper.Age = -1970 + @DateTimeOffset.Now.Year; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); +#nullable restore +#line 30 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = DateTimeOffset.Now.Year > 2014; + +#line default +#line hidden +#nullable disable + __TestNamespace_PTagHelper = CreateTagHelper(); +#nullable restore +#line 29 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_PTagHelper.Age = DateTimeOffset.Now.Year - 1970; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); +#nullable restore +#line 33 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = @( DateTimeOffset.Now.Year ) > 2014 ; + +#line default +#line hidden +#nullable disable + __TestNamespace_PTagHelper = CreateTagHelper(); +#nullable restore +#line 32 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_PTagHelper.Age = ("My age is this long.".Length); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 35 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + __o = someMethod(item => new Template(async(__razor_template_writer) => { + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); +#nullable restore +#line 35 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + __TestNamespace_InputTagHelper2.Checked = checked; + +#line default +#line hidden +#nullable disable + __TestNamespace_PTagHelper = CreateTagHelper(); +#nullable restore +#line 35 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_PTagHelper.Age = 123; + +#line default +#line hidden +#nullable disable +} +)); + +#line default +#line hidden +#nullable disable + __TestNamespace_PTagHelper = CreateTagHelper(); +#nullable restore +#line 36 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_PTagHelper.Age = ; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 37 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.diagnostics.txt new file mode 100644 index 0000000000..fe2b80c9e0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.diagnostics.txt @@ -0,0 +1,2 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml(36,17): Error RZ2006: Code blocks (e.g. @{var variable = 23;}) must not appear in non-string tag helper attribute values. + Already in an expression (code) context. If necessary an explicit expression (e.g. @(@readonly)) may be used. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.ir.txt new file mode 100644 index 0000000000..30f540a77d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.ir.txt @@ -0,0 +1,308 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ComplexTagHelpers_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + DesignTimeDirective - + DirectiveToken - (14:0,14 [17] ComplexTagHelpers.cshtml) - "*, TestAssembly" + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:0,31 [4] ComplexTagHelpers.cshtml) + IntermediateToken - (31:0,31 [4] ComplexTagHelpers.cshtml) - Html - \n\n + CSharpCode - (36:2,1 [52] ComplexTagHelpers.cshtml) + IntermediateToken - (36:2,1 [52] ComplexTagHelpers.cshtml) - CSharp - if (true)\n{\n var checkbox = "checkbox";\n\n + HtmlContent - (88:6,4 [51] ComplexTagHelpers.cshtml) + IntermediateToken - (88:6,4 [4] ComplexTagHelpers.cshtml) - Html -
        + IntermediateToken - (129:6,45 [10] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (139:7,8 [39] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (147:7,16 [8] ComplexTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (147:7,16 [1] ComplexTagHelpers.cshtml) - CSharp - @ + IntermediateToken - (149:7,18 [0] ComplexTagHelpers.cshtml) - CSharp - + CSharpExpression - (149:7,18 [6] ComplexTagHelpers.cshtml) + IntermediateToken - (149:7,18 [1] ComplexTagHelpers.cshtml) - CSharp - @ + IntermediateToken - (150:7,19 [1] ComplexTagHelpers.cshtml) - CSharp - ( + IntermediateToken - (151:7,20 [3] ComplexTagHelpers.cshtml) - CSharp - 1+2 + IntermediateToken - (154:7,23 [1] ComplexTagHelpers.cshtml) - CSharp - ) + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (164:7,33 [1] ComplexTagHelpers.cshtml) + IntermediateToken - (164:7,33 [1] ComplexTagHelpers.cshtml) - Html - @ + HtmlContent - (166:7,35 [6] ComplexTagHelpers.cshtml) + IntermediateToken - (166:7,35 [6] ComplexTagHelpers.cshtml) - Html - string + DefaultTagHelperExecute - + HtmlContent - (178:7,47 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (178:7,47 [10] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (188:8,8 [531] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (226:8,46 [46] ComplexTagHelpers.cshtml) + IntermediateToken - (226:8,46 [14] ComplexTagHelpers.cshtml) - Html - \n + IntermediateToken - (240:9,12 [3] ComplexTagHelpers.cshtml) - Html -

        + IntermediateToken - (244:9,16 [9] ComplexTagHelpers.cshtml) - Html - Set Time: + IntermediateToken - (253:9,25 [5] ComplexTagHelpers.cshtml) - Html -

        + IntermediateToken - (258:9,30 [14] ComplexTagHelpers.cshtml) - Html - \n + CSharpCode - (273:10,13 [43] ComplexTagHelpers.cshtml) + IntermediateToken - (273:10,13 [43] ComplexTagHelpers.cshtml) - CSharp - if (false)\n {\n + TagHelper - (316:12,16 [83] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (319:12,19 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (319:12,19 [10] ComplexTagHelpers.cshtml) - Html - New Time: + TagHelper - (329:12,29 [66] ComplexTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (342:12,42 [4] ComplexTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (342:12,42 [4] ComplexTagHelpers.cshtml) + IntermediateToken - (342:12,42 [4] ComplexTagHelpers.cshtml) - Html - text + DefaultTagHelperProperty - (342:12,42 [4] ComplexTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (342:12,42 [4] ComplexTagHelpers.cshtml) + IntermediateToken - (342:12,42 [4] ComplexTagHelpers.cshtml) - Html - text + DefaultTagHelperHtmlAttribute - - value - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (355:12,55 [0] ComplexTagHelpers.cshtml) + IntermediateToken - (355:12,55 [0] ComplexTagHelpers.cshtml) - Html - + DefaultTagHelperHtmlAttribute - - placeholder - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (370:12,70 [22] ComplexTagHelpers.cshtml) + IntermediateToken - (370:12,70 [22] ComplexTagHelpers.cshtml) - Html - Enter in a new time... + DefaultTagHelperExecute - + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperExecute - + CSharpCode - (399:12,99 [66] ComplexTagHelpers.cshtml) + IntermediateToken - (399:12,99 [66] ComplexTagHelpers.cshtml) - CSharp - \n }\n else\n {\n + TagHelper - (465:16,16 [58] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (468:16,19 [14] ComplexTagHelpers.cshtml) + IntermediateToken - (468:16,19 [14] ComplexTagHelpers.cshtml) - Html - Current Time: + TagHelper - (482:16,33 [37] ComplexTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (494:16,45 [9] ComplexTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (495:16,46 [8] ComplexTagHelpers.cshtml) + IntermediateToken - (495:16,46 [8] ComplexTagHelpers.cshtml) - CSharp - checkbox + DefaultTagHelperProperty - (494:16,45 [9] ComplexTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (495:16,46 [8] ComplexTagHelpers.cshtml) + IntermediateToken - (495:16,46 [8] ComplexTagHelpers.cshtml) - CSharp - checkbox + DefaultTagHelperProperty - (512:16,63 [4] ComplexTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (512:16,63 [4] ComplexTagHelpers.cshtml) - CSharp - true + DefaultTagHelperExecute - + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperExecute - + CSharpCode - (523:16,74 [18] ComplexTagHelpers.cshtml) + IntermediateToken - (523:16,74 [18] ComplexTagHelpers.cshtml) - CSharp - \n + TagHelper - (541:17,16 [50] ComplexTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (554:17,29 [33] ComplexTagHelpers.cshtml) - tYPe - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.SingleQuotes + CSharpExpression - (556:17,31 [30] ComplexTagHelpers.cshtml) + IntermediateToken - (556:17,31 [30] ComplexTagHelpers.cshtml) - CSharp - true ? "checkbox" : "anything" + DefaultTagHelperProperty - (554:17,29 [33] ComplexTagHelpers.cshtml) - tYPe - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.SingleQuotes + CSharpExpression - (556:17,31 [30] ComplexTagHelpers.cshtml) + IntermediateToken - (556:17,31 [30] ComplexTagHelpers.cshtml) - CSharp - true ? "checkbox" : "anything" + DefaultTagHelperExecute - + CSharpCode - (591:17,66 [18] ComplexTagHelpers.cshtml) + IntermediateToken - (591:17,66 [18] ComplexTagHelpers.cshtml) - CSharp - \n + TagHelper - (609:18,16 [81] ComplexTagHelpers.cshtml) - input - TagMode.StartTagOnly + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (622:18,29 [66] ComplexTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.SingleQuotes + CSharpCode - (623:18,30 [11] ComplexTagHelpers.cshtml) + IntermediateToken - (623:18,30 [11] ComplexTagHelpers.cshtml) - CSharp - if(true) { + HtmlContent - (640:18,47 [8] ComplexTagHelpers.cshtml) + IntermediateToken - (640:18,47 [8] ComplexTagHelpers.cshtml) - Html - checkbox + CSharpCode - (655:18,62 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (655:18,62 [10] ComplexTagHelpers.cshtml) - CSharp - } else { + HtmlContent - (671:18,78 [8] ComplexTagHelpers.cshtml) + IntermediateToken - (671:18,78 [8] ComplexTagHelpers.cshtml) - Html - anything + CSharpCode - (686:18,93 [2] ComplexTagHelpers.cshtml) + IntermediateToken - (686:18,93 [2] ComplexTagHelpers.cshtml) - CSharp - } + DefaultTagHelperProperty - (622:18,29 [66] ComplexTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.SingleQuotes + CSharpCode - (623:18,30 [11] ComplexTagHelpers.cshtml) + IntermediateToken - (623:18,30 [11] ComplexTagHelpers.cshtml) - CSharp - if(true) { + HtmlContent - (640:18,47 [8] ComplexTagHelpers.cshtml) + IntermediateToken - (640:18,47 [8] ComplexTagHelpers.cshtml) - Html - checkbox + CSharpCode - (655:18,62 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (655:18,62 [10] ComplexTagHelpers.cshtml) - CSharp - } else { + HtmlContent - (671:18,78 [8] ComplexTagHelpers.cshtml) + IntermediateToken - (671:18,78 [8] ComplexTagHelpers.cshtml) - Html - anything + CSharpCode - (686:18,93 [2] ComplexTagHelpers.cshtml) + IntermediateToken - (686:18,93 [2] ComplexTagHelpers.cshtml) - CSharp - } + DefaultTagHelperExecute - + CSharpCode - (690:18,97 [15] ComplexTagHelpers.cshtml) + IntermediateToken - (690:18,97 [15] ComplexTagHelpers.cshtml) - CSharp - \n } + HtmlContent - (705:19,13 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (705:19,13 [10] ComplexTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperHtmlAttribute - - time - HtmlAttributeValueStyle.DoubleQuotes + HtmlAttributeValue - (197:8,17 [7] ComplexTagHelpers.cshtml) - + IntermediateToken - (197:8,17 [7] ComplexTagHelpers.cshtml) - Html - Current + HtmlAttributeValue - (204:8,24 [6] ComplexTagHelpers.cshtml) - + IntermediateToken - (205:8,25 [5] ComplexTagHelpers.cshtml) - Html - Time: + CSharpExpressionAttributeValue - (210:8,30 [14] ComplexTagHelpers.cshtml) - + IntermediateToken - (212:8,32 [12] ComplexTagHelpers.cshtml) - CSharp - DateTime.Now + DefaultTagHelperExecute - + HtmlContent - (719:20,12 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (719:20,12 [10] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (729:21,8 [181] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (816:21,95 [14] ComplexTagHelpers.cshtml) + IntermediateToken - (816:21,95 [14] ComplexTagHelpers.cshtml) - Html - \n + CSharpCode - (832:22,14 [21] ComplexTagHelpers.cshtml) + IntermediateToken - (832:22,14 [21] ComplexTagHelpers.cshtml) - CSharp - var @object = false; + HtmlContent - (856:23,0 [12] ComplexTagHelpers.cshtml) + IntermediateToken - (856:23,0 [12] ComplexTagHelpers.cshtml) - Html - + TagHelper - (868:23,12 [28] ComplexTagHelpers.cshtml) - input - TagMode.StartTagOnly + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (884:23,28 [10] ComplexTagHelpers.cshtml) - ChecKED - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (885:23,29 [9] ComplexTagHelpers.cshtml) + IntermediateToken - (885:23,29 [1] ComplexTagHelpers.cshtml) - CSharp - ( + IntermediateToken - (886:23,30 [7] ComplexTagHelpers.cshtml) - CSharp - @object + IntermediateToken - (893:23,37 [1] ComplexTagHelpers.cshtml) - CSharp - ) + DefaultTagHelperExecute - + HtmlContent - (896:23,40 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (896:23,40 [10] ComplexTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (741:21,20 [11] ComplexTagHelpers.cshtml) + IntermediateToken - (741:21,20 [11] ComplexTagHelpers.cshtml) - Html - first value + DefaultTagHelperProperty - (759:21,38 [31] ComplexTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (760:21,39 [23] ComplexTagHelpers.cshtml) + IntermediateToken - (760:21,39 [23] ComplexTagHelpers.cshtml) - CSharp - DateTimeOffset.Now.Year + IntermediateToken - (783:21,62 [2] ComplexTagHelpers.cshtml) - CSharp - - + IntermediateToken - (785:21,64 [5] ComplexTagHelpers.cshtml) - CSharp - 1970 + DefaultTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (801:21,80 [12] ComplexTagHelpers.cshtml) + IntermediateToken - (801:21,80 [12] ComplexTagHelpers.cshtml) - Html - second value + DefaultTagHelperExecute - + HtmlContent - (910:24,12 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (910:24,12 [10] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (920:25,8 [155] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (962:25,50 [14] ComplexTagHelpers.cshtml) + IntermediateToken - (962:25,50 [14] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (976:26,12 [85] ComplexTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (992:26,28 [5] ComplexTagHelpers.cshtml) + IntermediateToken - (992:26,28 [5] ComplexTagHelpers.cshtml) - Html - hello + DefaultTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (1008:26,44 [5] ComplexTagHelpers.cshtml) + IntermediateToken - (1008:26,44 [5] ComplexTagHelpers.cshtml) - Html - world + DefaultTagHelperProperty - (1024:26,60 [33] ComplexTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (1025:26,61 [32] ComplexTagHelpers.cshtml) + IntermediateToken - (1025:26,61 [1] ComplexTagHelpers.cshtml) - CSharp - ( + IntermediateToken - (1026:26,62 [30] ComplexTagHelpers.cshtml) - CSharp - DateTimeOffset.Now.Year > 2014 + IntermediateToken - (1056:26,92 [1] ComplexTagHelpers.cshtml) - CSharp - ) + DefaultTagHelperExecute - + HtmlContent - (1061:26,97 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (1061:26,97 [10] ComplexTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (928:25,16 [32] ComplexTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (928:25,16 [5] ComplexTagHelpers.cshtml) - CSharp - -1970 + IntermediateToken - (933:25,21 [2] ComplexTagHelpers.cshtml) - CSharp - + + IntermediateToken - (935:25,23 [1] ComplexTagHelpers.cshtml) - CSharp - + CSharpExpression - (936:25,24 [24] ComplexTagHelpers.cshtml) + IntermediateToken - (936:25,24 [1] ComplexTagHelpers.cshtml) - CSharp - @ + IntermediateToken - (937:25,25 [23] ComplexTagHelpers.cshtml) - CSharp - DateTimeOffset.Now.Year + DefaultTagHelperExecute - + HtmlContent - (1075:27,12 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (1075:27,12 [10] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (1085:28,8 [116] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (1125:28,48 [14] ComplexTagHelpers.cshtml) + IntermediateToken - (1125:28,48 [14] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (1139:29,12 [48] ComplexTagHelpers.cshtml) - input - TagMode.StartTagOnly + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (1155:29,28 [30] ComplexTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (1155:29,28 [30] ComplexTagHelpers.cshtml) - CSharp - DateTimeOffset.Now.Year > 2014 + DefaultTagHelperExecute - + HtmlContent - (1187:29,60 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (1187:29,60 [10] ComplexTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (1093:28,16 [30] ComplexTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (1093:28,16 [30] ComplexTagHelpers.cshtml) - CSharp - DateTimeOffset.Now.Year\-1970 + DefaultTagHelperExecute - + HtmlContent - (1201:30,12 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (1201:30,12 [10] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (1211:31,8 [133] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (1253:31,50 [14] ComplexTagHelpers.cshtml) + IntermediateToken - (1253:31,50 [14] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (1267:32,12 [63] ComplexTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (1283:32,28 [43] ComplexTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (1283:32,28 [3] ComplexTagHelpers.cshtml) - CSharp - + CSharpExpression - (1286:32,31 [30] ComplexTagHelpers.cshtml) + IntermediateToken - (1286:32,31 [1] ComplexTagHelpers.cshtml) - CSharp - @ + IntermediateToken - (1287:32,32 [1] ComplexTagHelpers.cshtml) - CSharp - ( + IntermediateToken - (1288:32,33 [27] ComplexTagHelpers.cshtml) - CSharp - DateTimeOffset.Now.Year + IntermediateToken - (1315:32,60 [1] ComplexTagHelpers.cshtml) - CSharp - ) + IntermediateToken - (1316:32,61 [2] ComplexTagHelpers.cshtml) - CSharp - > + IntermediateToken - (1318:32,63 [5] ComplexTagHelpers.cshtml) - CSharp - 2014 + IntermediateToken - (1323:32,68 [3] ComplexTagHelpers.cshtml) - CSharp - + DefaultTagHelperExecute - + HtmlContent - (1330:32,75 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (1330:32,75 [10] ComplexTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (1219:31,16 [32] ComplexTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (1220:31,17 [31] ComplexTagHelpers.cshtml) + IntermediateToken - (1220:31,17 [1] ComplexTagHelpers.cshtml) - CSharp - ( + IntermediateToken - (1221:31,18 [29] ComplexTagHelpers.cshtml) - CSharp - "My age is this long.".Length + IntermediateToken - (1250:31,47 [1] ComplexTagHelpers.cshtml) - CSharp - ) + DefaultTagHelperExecute - + HtmlContent - (1344:33,12 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (1344:33,12 [10] ComplexTagHelpers.cshtml) - Html - \n + CSharpExpression - (1355:34,9 [69] ComplexTagHelpers.cshtml) + IntermediateToken - (1355:34,9 [11] ComplexTagHelpers.cshtml) - CSharp - someMethod( + Template - (1367:34,21 [57] ComplexTagHelpers.cshtml) + TagHelper - (1367:34,21 [57] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + TagHelper - (1394:34,48 [26] ComplexTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (1409:34,63 [8] ComplexTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (1410:34,64 [7] ComplexTagHelpers.cshtml) + IntermediateToken - (1410:34,64 [7] ComplexTagHelpers.cshtml) - CSharp - checked + DefaultTagHelperExecute - + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (1375:34,29 [3] ComplexTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (1375:34,29 [3] ComplexTagHelpers.cshtml) - CSharp - 123 + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (1387:34,41 [5] ComplexTagHelpers.cshtml) + IntermediateToken - (1387:34,41 [5] ComplexTagHelpers.cshtml) - Html - hello + DefaultTagHelperExecute - + IntermediateToken - (1424:34,78 [1] ComplexTagHelpers.cshtml) - CSharp - ) + HtmlContent - (1425:34,79 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (1425:34,79 [10] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (1435:35,8 [22] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (1443:35,16 [8] ComplexTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + CSharpCode - (1445:35,18 [5] ComplexTagHelpers.cshtml) + IntermediateToken - (1445:35,18 [5] ComplexTagHelpers.cshtml) - CSharp - 1 + 2 + DefaultTagHelperExecute - + HtmlContent - (1457:35,30 [12] ComplexTagHelpers.cshtml) + IntermediateToken - (1457:35,30 [6] ComplexTagHelpers.cshtml) - Html - \n + IntermediateToken - (1463:36,4 [6] ComplexTagHelpers.cshtml) - Html -
        + CSharpCode - (1469:36,10 [3] ComplexTagHelpers.cshtml) + IntermediateToken - (1469:36,10 [3] ComplexTagHelpers.cshtml) - CSharp - \n} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.mappings.txt new file mode 100644 index 0000000000..f3ec2cf8fc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_DesignTime.mappings.txt @@ -0,0 +1,293 @@ +Source Location: (14:0,14 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|"*, TestAssembly"| +Generated Location: (787:15,37 [17] ) +|"*, TestAssembly"| + +Source Location: (36:2,1 [52] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|if (true) +{ + var checkbox = "checkbox"; + + | +Generated Location: (1284:32,1 [52] ) +|if (true) +{ + var checkbox = "checkbox"; + + | + +Source Location: (147:7,16 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|@| +Generated Location: (1628:44,33 [1] ) +|@| + +Source Location: (149:7,18 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|| +Generated Location: (1629:44,34 [0] ) +|| + +Source Location: (149:7,18 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|@| +Generated Location: (1629:44,34 [1] ) +|@| + +Source Location: (150:7,19 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|(| +Generated Location: (1630:44,35 [1] ) +|(| + +Source Location: (151:7,20 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|1+2| +Generated Location: (1631:44,36 [3] ) +|1+2| + +Source Location: (154:7,23 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|)| +Generated Location: (1634:44,39 [1] ) +|)| + +Source Location: (273:10,13 [43] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|if (false) + { + | +Generated Location: (1814:51,13 [43] ) +|if (false) + { + | + +Source Location: (399:12,99 [66] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +| + } + else + { + | +Generated Location: (2572:65,99 [66] ) +| + } + else + { + | + +Source Location: (495:16,46 [8] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|checkbox| +Generated Location: (3057:78,46 [8] ) +|checkbox| + +Source Location: (512:16,63 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|true| +Generated Location: (3448:87,63 [4] ) +|true| + +Source Location: (523:16,74 [18] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +| + | +Generated Location: (3787:95,74 [18] ) +| + | + +Source Location: (556:17,31 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|true ? "checkbox" : "anything"| +Generated Location: (4209:105,31 [30] ) +|true ? "checkbox" : "anything"| + +Source Location: (591:17,66 [18] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +| + | +Generated Location: (4625:114,66 [18] ) +| + | + +Source Location: (623:18,30 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|if(true) { | +Generated Location: (5046:124,30 [11] ) +|if(true) { | + +Source Location: (655:18,62 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +| } else { | +Generated Location: (5284:131,62 [10] ) +| } else { | + +Source Location: (686:18,93 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +| }| +Generated Location: (5552:138,93 [2] ) +| }| + +Source Location: (690:18,97 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +| + }| +Generated Location: (5970:147,97 [15] ) +| + }| + +Source Location: (212:8,32 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|DateTime.Now| +Generated Location: (6276:156,32 [12] ) +|DateTime.Now| + +Source Location: (832:22,14 [21] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +| var @object = false;| +Generated Location: (6468:163,14 [21] ) +| var @object = false;| + +Source Location: (885:23,29 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|(| +Generated Location: (6904:172,42 [1] ) +|(| + +Source Location: (886:23,30 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|@object| +Generated Location: (6905:172,43 [7] ) +|@object| + +Source Location: (893:23,37 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|)| +Generated Location: (6912:172,50 [1] ) +|)| + +Source Location: (760:21,39 [23] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|DateTimeOffset.Now.Year| +Generated Location: (7212:180,38 [23] ) +|DateTimeOffset.Now.Year| + +Source Location: (783:21,62 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +| -| +Generated Location: (7235:180,61 [2] ) +| -| + +Source Location: (785:21,64 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +| 1970| +Generated Location: (7237:180,63 [5] ) +| 1970| + +Source Location: (1025:26,61 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|(| +Generated Location: (7676:189,60 [1] ) +|(| + +Source Location: (1026:26,62 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|DateTimeOffset.Now.Year > 2014| +Generated Location: (7677:189,61 [30] ) +|DateTimeOffset.Now.Year > 2014| + +Source Location: (1056:26,92 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|)| +Generated Location: (7707:189,91 [1] ) +|)| + +Source Location: (928:25,16 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|-1970| +Generated Location: (8002:197,33 [5] ) +|-1970| + +Source Location: (933:25,21 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +| +| +Generated Location: (8007:197,38 [2] ) +| +| + +Source Location: (935:25,23 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +| | +Generated Location: (8009:197,40 [1] ) +| | + +Source Location: (936:25,24 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|@| +Generated Location: (8010:197,41 [1] ) +|@| + +Source Location: (937:25,25 [23] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|DateTimeOffset.Now.Year| +Generated Location: (8011:197,42 [23] ) +|DateTimeOffset.Now.Year| + +Source Location: (1155:29,28 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|DateTimeOffset.Now.Year > 2014| +Generated Location: (8450:206,42 [30] ) +|DateTimeOffset.Now.Year > 2014| + +Source Location: (1093:28,16 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|DateTimeOffset.Now.Year - 1970| +Generated Location: (8774:214,33 [30] ) +|DateTimeOffset.Now.Year - 1970| + +Source Location: (1283:32,28 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +| | +Generated Location: (9220:223,42 [3] ) +| | + +Source Location: (1286:32,31 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|@| +Generated Location: (9223:223,45 [1] ) +|@| + +Source Location: (1287:32,32 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|(| +Generated Location: (9224:223,46 [1] ) +|(| + +Source Location: (1288:32,33 [27] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +| DateTimeOffset.Now.Year | +Generated Location: (9225:223,47 [27] ) +| DateTimeOffset.Now.Year | + +Source Location: (1315:32,60 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|)| +Generated Location: (9252:223,74 [1] ) +|)| + +Source Location: (1316:32,61 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +| >| +Generated Location: (9253:223,75 [2] ) +| >| + +Source Location: (1318:32,63 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +| 2014| +Generated Location: (9255:223,77 [5] ) +| 2014| + +Source Location: (1323:32,68 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +| | +Generated Location: (9260:223,82 [3] ) +| | + +Source Location: (1220:31,17 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|(| +Generated Location: (9557:231,33 [1] ) +|(| + +Source Location: (1221:31,18 [29] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|"My age is this long.".Length| +Generated Location: (9558:231,34 [29] ) +|"My age is this long.".Length| + +Source Location: (1250:31,47 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|)| +Generated Location: (9587:231,63 [1] ) +|)| + +Source Location: (1355:34,9 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|someMethod(| +Generated Location: (9763:238,9 [11] ) +|someMethod(| + +Source Location: (1410:34,64 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|checked| +Generated Location: (10200:243,63 [7] ) +|checked| + +Source Location: (1375:34,29 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|123| +Generated Location: (10493:251,33 [3] ) +|123| + +Source Location: (1424:34,78 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +|)| +Generated Location: (10553:257,1 [1] ) +|)| + +Source Location: (1469:36,10 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml) +| +}| +Generated Location: (11024:272,10 [3] ) +| +}| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_Runtime.codegen.cs new file mode 100644 index 0000000000..1ca3b103ee --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_Runtime.codegen.cs @@ -0,0 +1,564 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "ab167e80e48e48d9984ecd76158a2d87f90f3460" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ComplexTagHelpers_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"ab167e80e48e48d9984ecd76158a2d87f90f3460", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ComplexTagHelpers_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "text", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("value", new global::Microsoft.AspNetCore.Html.HtmlString(""), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("placeholder", new global::Microsoft.AspNetCore.Html.HtmlString("Enter in a new time..."), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("unbound", new global::Microsoft.AspNetCore.Html.HtmlString("first value"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("unbound", new global::Microsoft.AspNetCore.Html.HtmlString("second value"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_5 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("unbound", new global::Microsoft.AspNetCore.Html.HtmlString("hello"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_6 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("unbound", new global::Microsoft.AspNetCore.Html.HtmlString("world"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_7 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("hello"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + if (true) +{ + var checkbox = "checkbox"; + + +#line default +#line hidden +#nullable disable + WriteLiteral("
        \r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_PTagHelper.Age = @@(1+2); + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + BeginWriteTagHelperAttribute(); + WriteLiteral("@"); + WriteLiteral("string"); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("\r\n

        Set Time:

        \r\n"); +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + if (false) + { + +#line default +#line hidden +#nullable disable + WriteLiteral(" "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("New Time: "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + } + else + { + +#line default +#line hidden +#nullable disable + WriteLiteral(" "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("Current Time: "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + BeginWriteTagHelperAttribute(); +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + WriteLiteral(checkbox); + +#line default +#line hidden +#nullable disable + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer; + __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + BeginWriteTagHelperAttribute(); +#nullable restore +#line 18 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + WriteLiteral(true ? "checkbox" : "anything"); + +#line default +#line hidden +#nullable disable + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer; + __tagHelperExecutionContext.AddTagHelperAttribute("tYPe", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes); + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagOnly, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + BeginWriteTagHelperAttribute(); +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + if(true) { + +#line default +#line hidden +#nullable disable + WriteLiteral("checkbox"); +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + } else { + +#line default +#line hidden +#nullable disable + WriteLiteral("anything"); +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + } + +#line default +#line hidden +#nullable disable + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer; + __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes); + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); +#nullable restore +#line 20 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + } + +#line default +#line hidden +#nullable disable + WriteLiteral(" "); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); + BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "time", 3, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + AddHtmlAttributeValue("", 197, "Current", 197, 7, true); + AddHtmlAttributeValue(" ", 204, "Time:", 205, 6, true); +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +AddHtmlAttributeValue(" ", 210, DateTime.Now, 211, 13, false); + +#line default +#line hidden +#nullable disable + EndAddHtmlAttributeValues(__tagHelperExecutionContext); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("\r\n"); +#nullable restore +#line 23 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + var @object = false; + +#line default +#line hidden +#nullable disable + WriteLiteral(" "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagOnly, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); +#nullable restore +#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = (@object); + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("ChecKED", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); +#nullable restore +#line 22 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_PTagHelper.Age = DateTimeOffset.Now.Year - 1970; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_6); +#nullable restore +#line 27 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = (DateTimeOffset.Now.Year > 2014); + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); +#nullable restore +#line 26 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_PTagHelper.Age = -1970 + @DateTimeOffset.Now.Year; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagOnly, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); +#nullable restore +#line 30 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = DateTimeOffset.Now.Year > 2014; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); +#nullable restore +#line 29 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_PTagHelper.Age = DateTimeOffset.Now.Year - 1970; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); +#nullable restore +#line 33 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = @( DateTimeOffset.Now.Year ) > 2014 ; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); +#nullable restore +#line 32 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_PTagHelper.Age = ("My age is this long.".Length); + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); +#nullable restore +#line 35 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" + Write(someMethod(item => new Template(async(__razor_template_writer) => { + PushWriter(__razor_template_writer); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); +#nullable restore +#line 35 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = checked; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); +#nullable restore +#line 35 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_PTagHelper.Age = 123; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_7); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + PopWriter(); +} +))); + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); +#nullable restore +#line 36 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +__TestNamespace_PTagHelper.Age = ; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n
        \r\n"); +#nullable restore +#line 38 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_Runtime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_Runtime.diagnostics.txt new file mode 100644 index 0000000000..fe2b80c9e0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_Runtime.diagnostics.txt @@ -0,0 +1,2 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml(36,17): Error RZ2006: Code blocks (e.g. @{var variable = 23;}) must not appear in non-string tag helper attribute values. + Already in an expression (code) context. If necessary an explicit expression (e.g. @(@readonly)) may be used. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_Runtime.ir.txt new file mode 100644 index 0000000000..79168e02ad --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers_Runtime.ir.txt @@ -0,0 +1,309 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ComplexTagHelpers_Runtime - - + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_0 - type - text - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_1 - value - - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_2 - placeholder - Enter in a new time... - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_3 - unbound - first value - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_4 - unbound - second value - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_5 - unbound - hello - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_6 - unbound - world - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_7 - class - hello - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (33:1,0 [2] ComplexTagHelpers.cshtml) + IntermediateToken - (33:1,0 [2] ComplexTagHelpers.cshtml) - Html - \n + CSharpCode - (36:2,1 [48] ComplexTagHelpers.cshtml) + IntermediateToken - (36:2,1 [48] ComplexTagHelpers.cshtml) - CSharp - if (true)\n{\n var checkbox = "checkbox";\n\n + HtmlContent - (84:6,0 [55] ComplexTagHelpers.cshtml) + IntermediateToken - (84:6,0 [4] ComplexTagHelpers.cshtml) - Html - + IntermediateToken - (88:6,4 [4] ComplexTagHelpers.cshtml) - Html -
        + IntermediateToken - (129:6,45 [10] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (139:7,8 [39] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (147:7,16 [8] ComplexTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (147:7,16 [1] ComplexTagHelpers.cshtml) - CSharp - @ + IntermediateToken - (149:7,18 [0] ComplexTagHelpers.cshtml) - CSharp - + CSharpExpression - (149:7,18 [6] ComplexTagHelpers.cshtml) + IntermediateToken - (149:7,18 [1] ComplexTagHelpers.cshtml) - CSharp - @ + IntermediateToken - (150:7,19 [1] ComplexTagHelpers.cshtml) - CSharp - ( + IntermediateToken - (151:7,20 [3] ComplexTagHelpers.cshtml) - CSharp - 1+2 + IntermediateToken - (154:7,23 [1] ComplexTagHelpers.cshtml) - CSharp - ) + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (164:7,33 [1] ComplexTagHelpers.cshtml) + IntermediateToken - (164:7,33 [1] ComplexTagHelpers.cshtml) - Html - @ + HtmlContent - (166:7,35 [6] ComplexTagHelpers.cshtml) + IntermediateToken - (166:7,35 [6] ComplexTagHelpers.cshtml) - Html - string + DefaultTagHelperExecute - + HtmlContent - (178:7,47 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (178:7,47 [10] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (188:8,8 [531] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (226:8,46 [34] ComplexTagHelpers.cshtml) + IntermediateToken - (226:8,46 [14] ComplexTagHelpers.cshtml) - Html - \n + IntermediateToken - (240:9,12 [3] ComplexTagHelpers.cshtml) - Html -

        + IntermediateToken - (244:9,16 [9] ComplexTagHelpers.cshtml) - Html - Set Time: + IntermediateToken - (253:9,25 [5] ComplexTagHelpers.cshtml) - Html -

        + IntermediateToken - (258:9,30 [2] ComplexTagHelpers.cshtml) - Html - \n + CSharpCode - (260:10,0 [12] ComplexTagHelpers.cshtml) + IntermediateToken - (260:10,0 [12] ComplexTagHelpers.cshtml) - CSharp - + CSharpCode - (273:10,13 [27] ComplexTagHelpers.cshtml) + IntermediateToken - (273:10,13 [27] ComplexTagHelpers.cshtml) - CSharp - if (false)\n {\n + HtmlContent - (300:12,0 [16] ComplexTagHelpers.cshtml) + IntermediateToken - (300:12,0 [16] ComplexTagHelpers.cshtml) - Html - + TagHelper - (316:12,16 [83] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (319:12,19 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (319:12,19 [10] ComplexTagHelpers.cshtml) - Html - New Time: + TagHelper - (329:12,29 [66] ComplexTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + PreallocatedTagHelperProperty - (342:12,42 [4] ComplexTagHelpers.cshtml) - __tagHelperAttribute_0 - type - Type + PreallocatedTagHelperProperty - (342:12,42 [4] ComplexTagHelpers.cshtml) - __tagHelperAttribute_0 - type - Type + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 + DefaultTagHelperExecute - + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperExecute - + HtmlContent - (399:12,99 [2] ComplexTagHelpers.cshtml) + IntermediateToken - (399:12,99 [2] ComplexTagHelpers.cshtml) - Html - \n + CSharpCode - (401:13,0 [48] ComplexTagHelpers.cshtml) + IntermediateToken - (401:13,0 [48] ComplexTagHelpers.cshtml) - CSharp - }\n else\n {\n + HtmlContent - (449:16,0 [16] ComplexTagHelpers.cshtml) + IntermediateToken - (449:16,0 [16] ComplexTagHelpers.cshtml) - Html - + TagHelper - (465:16,16 [58] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (468:16,19 [14] ComplexTagHelpers.cshtml) + IntermediateToken - (468:16,19 [14] ComplexTagHelpers.cshtml) - Html - Current Time: + TagHelper - (482:16,33 [37] ComplexTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (494:16,45 [9] ComplexTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (495:16,46 [8] ComplexTagHelpers.cshtml) + IntermediateToken - (495:16,46 [8] ComplexTagHelpers.cshtml) - CSharp - checkbox + DefaultTagHelperProperty - (494:16,45 [9] ComplexTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (495:16,46 [8] ComplexTagHelpers.cshtml) + IntermediateToken - (495:16,46 [8] ComplexTagHelpers.cshtml) - CSharp - checkbox + DefaultTagHelperProperty - (512:16,63 [4] ComplexTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (512:16,63 [4] ComplexTagHelpers.cshtml) - CSharp - true + DefaultTagHelperExecute - + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperExecute - + HtmlContent - (523:16,74 [18] ComplexTagHelpers.cshtml) + IntermediateToken - (523:16,74 [2] ComplexTagHelpers.cshtml) - Html - \n + IntermediateToken - (525:17,0 [16] ComplexTagHelpers.cshtml) - Html - + TagHelper - (541:17,16 [50] ComplexTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (554:17,29 [33] ComplexTagHelpers.cshtml) - tYPe - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.SingleQuotes + CSharpExpression - (556:17,31 [30] ComplexTagHelpers.cshtml) + IntermediateToken - (556:17,31 [30] ComplexTagHelpers.cshtml) - CSharp - true ? "checkbox" : "anything" + DefaultTagHelperProperty - (554:17,29 [33] ComplexTagHelpers.cshtml) - tYPe - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.SingleQuotes + CSharpExpression - (556:17,31 [30] ComplexTagHelpers.cshtml) + IntermediateToken - (556:17,31 [30] ComplexTagHelpers.cshtml) - CSharp - true ? "checkbox" : "anything" + DefaultTagHelperExecute - + HtmlContent - (591:17,66 [18] ComplexTagHelpers.cshtml) + IntermediateToken - (591:17,66 [2] ComplexTagHelpers.cshtml) - Html - \n + IntermediateToken - (593:18,0 [16] ComplexTagHelpers.cshtml) - Html - + TagHelper - (609:18,16 [81] ComplexTagHelpers.cshtml) - input - TagMode.StartTagOnly + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (622:18,29 [66] ComplexTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.SingleQuotes + CSharpCode - (623:18,30 [11] ComplexTagHelpers.cshtml) + IntermediateToken - (623:18,30 [11] ComplexTagHelpers.cshtml) - CSharp - if(true) { + HtmlContent - (640:18,47 [8] ComplexTagHelpers.cshtml) + IntermediateToken - (640:18,47 [8] ComplexTagHelpers.cshtml) - Html - checkbox + CSharpCode - (655:18,62 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (655:18,62 [10] ComplexTagHelpers.cshtml) - CSharp - } else { + HtmlContent - (671:18,78 [8] ComplexTagHelpers.cshtml) + IntermediateToken - (671:18,78 [8] ComplexTagHelpers.cshtml) - Html - anything + CSharpCode - (686:18,93 [2] ComplexTagHelpers.cshtml) + IntermediateToken - (686:18,93 [2] ComplexTagHelpers.cshtml) - CSharp - } + DefaultTagHelperProperty - (622:18,29 [66] ComplexTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.SingleQuotes + CSharpCode - (623:18,30 [11] ComplexTagHelpers.cshtml) + IntermediateToken - (623:18,30 [11] ComplexTagHelpers.cshtml) - CSharp - if(true) { + HtmlContent - (640:18,47 [8] ComplexTagHelpers.cshtml) + IntermediateToken - (640:18,47 [8] ComplexTagHelpers.cshtml) - Html - checkbox + CSharpCode - (655:18,62 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (655:18,62 [10] ComplexTagHelpers.cshtml) - CSharp - } else { + HtmlContent - (671:18,78 [8] ComplexTagHelpers.cshtml) + IntermediateToken - (671:18,78 [8] ComplexTagHelpers.cshtml) - Html - anything + CSharpCode - (686:18,93 [2] ComplexTagHelpers.cshtml) + IntermediateToken - (686:18,93 [2] ComplexTagHelpers.cshtml) - CSharp - } + DefaultTagHelperExecute - + HtmlContent - (690:18,97 [2] ComplexTagHelpers.cshtml) + IntermediateToken - (690:18,97 [2] ComplexTagHelpers.cshtml) - Html - \n + CSharpCode - (692:19,0 [15] ComplexTagHelpers.cshtml) + IntermediateToken - (692:19,0 [15] ComplexTagHelpers.cshtml) - CSharp - }\n + HtmlContent - (707:20,0 [8] ComplexTagHelpers.cshtml) + IntermediateToken - (707:20,0 [8] ComplexTagHelpers.cshtml) - Html - + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperHtmlAttribute - - time - HtmlAttributeValueStyle.DoubleQuotes + HtmlAttributeValue - (197:8,17 [7] ComplexTagHelpers.cshtml) - + IntermediateToken - (197:8,17 [7] ComplexTagHelpers.cshtml) - Html - Current + HtmlAttributeValue - (204:8,24 [6] ComplexTagHelpers.cshtml) - + IntermediateToken - (205:8,25 [5] ComplexTagHelpers.cshtml) - Html - Time: + CSharpExpressionAttributeValue - (210:8,30 [14] ComplexTagHelpers.cshtml) - + IntermediateToken - (212:8,32 [12] ComplexTagHelpers.cshtml) - CSharp - DateTime.Now + DefaultTagHelperExecute - + HtmlContent - (719:20,12 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (719:20,12 [10] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (729:21,8 [181] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (816:21,95 [2] ComplexTagHelpers.cshtml) + IntermediateToken - (816:21,95 [2] ComplexTagHelpers.cshtml) - Html - \n + CSharpCode - (818:22,0 [12] ComplexTagHelpers.cshtml) + IntermediateToken - (818:22,0 [12] ComplexTagHelpers.cshtml) - CSharp - + CSharpCode - (832:22,14 [21] ComplexTagHelpers.cshtml) + IntermediateToken - (832:22,14 [21] ComplexTagHelpers.cshtml) - CSharp - var @object = false; + HtmlContent - (856:23,0 [12] ComplexTagHelpers.cshtml) + IntermediateToken - (856:23,0 [12] ComplexTagHelpers.cshtml) - Html - + TagHelper - (868:23,12 [28] ComplexTagHelpers.cshtml) - input - TagMode.StartTagOnly + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (884:23,28 [10] ComplexTagHelpers.cshtml) - ChecKED - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (885:23,29 [9] ComplexTagHelpers.cshtml) + IntermediateToken - (885:23,29 [1] ComplexTagHelpers.cshtml) - CSharp - ( + IntermediateToken - (886:23,30 [7] ComplexTagHelpers.cshtml) - CSharp - @object + IntermediateToken - (893:23,37 [1] ComplexTagHelpers.cshtml) - CSharp - ) + DefaultTagHelperExecute - + HtmlContent - (896:23,40 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (896:23,40 [10] ComplexTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_3 + DefaultTagHelperProperty - (759:21,38 [31] ComplexTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (760:21,39 [23] ComplexTagHelpers.cshtml) + IntermediateToken - (760:21,39 [23] ComplexTagHelpers.cshtml) - CSharp - DateTimeOffset.Now.Year + IntermediateToken - (783:21,62 [2] ComplexTagHelpers.cshtml) - CSharp - - + IntermediateToken - (785:21,64 [5] ComplexTagHelpers.cshtml) - CSharp - 1970 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_4 + DefaultTagHelperExecute - + HtmlContent - (910:24,12 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (910:24,12 [10] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (920:25,8 [155] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (962:25,50 [14] ComplexTagHelpers.cshtml) + IntermediateToken - (962:25,50 [14] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (976:26,12 [85] ComplexTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_5 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_6 + DefaultTagHelperProperty - (1024:26,60 [33] ComplexTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (1025:26,61 [32] ComplexTagHelpers.cshtml) + IntermediateToken - (1025:26,61 [1] ComplexTagHelpers.cshtml) - CSharp - ( + IntermediateToken - (1026:26,62 [30] ComplexTagHelpers.cshtml) - CSharp - DateTimeOffset.Now.Year > 2014 + IntermediateToken - (1056:26,92 [1] ComplexTagHelpers.cshtml) - CSharp - ) + DefaultTagHelperExecute - + HtmlContent - (1061:26,97 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (1061:26,97 [10] ComplexTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (928:25,16 [32] ComplexTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (928:25,16 [5] ComplexTagHelpers.cshtml) - CSharp - -1970 + IntermediateToken - (933:25,21 [2] ComplexTagHelpers.cshtml) - CSharp - + + IntermediateToken - (935:25,23 [1] ComplexTagHelpers.cshtml) - CSharp - + CSharpExpression - (936:25,24 [24] ComplexTagHelpers.cshtml) + IntermediateToken - (936:25,24 [1] ComplexTagHelpers.cshtml) - CSharp - @ + IntermediateToken - (937:25,25 [23] ComplexTagHelpers.cshtml) - CSharp - DateTimeOffset.Now.Year + DefaultTagHelperExecute - + HtmlContent - (1075:27,12 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (1075:27,12 [10] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (1085:28,8 [116] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (1125:28,48 [14] ComplexTagHelpers.cshtml) + IntermediateToken - (1125:28,48 [14] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (1139:29,12 [48] ComplexTagHelpers.cshtml) - input - TagMode.StartTagOnly + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (1155:29,28 [30] ComplexTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (1155:29,28 [30] ComplexTagHelpers.cshtml) - CSharp - DateTimeOffset.Now.Year > 2014 + DefaultTagHelperExecute - + HtmlContent - (1187:29,60 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (1187:29,60 [10] ComplexTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (1093:28,16 [30] ComplexTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (1093:28,16 [30] ComplexTagHelpers.cshtml) - CSharp - DateTimeOffset.Now.Year\-1970 + DefaultTagHelperExecute - + HtmlContent - (1201:30,12 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (1201:30,12 [10] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (1211:31,8 [133] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (1253:31,50 [14] ComplexTagHelpers.cshtml) + IntermediateToken - (1253:31,50 [14] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (1267:32,12 [63] ComplexTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (1283:32,28 [43] ComplexTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (1283:32,28 [3] ComplexTagHelpers.cshtml) - CSharp - + CSharpExpression - (1286:32,31 [30] ComplexTagHelpers.cshtml) + IntermediateToken - (1286:32,31 [1] ComplexTagHelpers.cshtml) - CSharp - @ + IntermediateToken - (1287:32,32 [1] ComplexTagHelpers.cshtml) - CSharp - ( + IntermediateToken - (1288:32,33 [27] ComplexTagHelpers.cshtml) - CSharp - DateTimeOffset.Now.Year + IntermediateToken - (1315:32,60 [1] ComplexTagHelpers.cshtml) - CSharp - ) + IntermediateToken - (1316:32,61 [2] ComplexTagHelpers.cshtml) - CSharp - > + IntermediateToken - (1318:32,63 [5] ComplexTagHelpers.cshtml) - CSharp - 2014 + IntermediateToken - (1323:32,68 [3] ComplexTagHelpers.cshtml) - CSharp - + DefaultTagHelperExecute - + HtmlContent - (1330:32,75 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (1330:32,75 [10] ComplexTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (1219:31,16 [32] ComplexTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (1220:31,17 [31] ComplexTagHelpers.cshtml) + IntermediateToken - (1220:31,17 [1] ComplexTagHelpers.cshtml) - CSharp - ( + IntermediateToken - (1221:31,18 [29] ComplexTagHelpers.cshtml) - CSharp - "My age is this long.".Length + IntermediateToken - (1250:31,47 [1] ComplexTagHelpers.cshtml) - CSharp - ) + DefaultTagHelperExecute - + HtmlContent - (1344:33,12 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (1344:33,12 [2] ComplexTagHelpers.cshtml) - Html - \n + IntermediateToken - (1346:34,0 [8] ComplexTagHelpers.cshtml) - Html - + CSharpExpression - (1355:34,9 [69] ComplexTagHelpers.cshtml) + IntermediateToken - (1355:34,9 [11] ComplexTagHelpers.cshtml) - CSharp - someMethod( + Template - (1367:34,21 [57] ComplexTagHelpers.cshtml) + TagHelper - (1367:34,21 [57] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + TagHelper - (1394:34,48 [26] ComplexTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (1409:34,63 [8] ComplexTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (1410:34,64 [7] ComplexTagHelpers.cshtml) + IntermediateToken - (1410:34,64 [7] ComplexTagHelpers.cshtml) - CSharp - checked + DefaultTagHelperExecute - + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (1375:34,29 [3] ComplexTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (1375:34,29 [3] ComplexTagHelpers.cshtml) - CSharp - 123 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_7 + DefaultTagHelperExecute - + IntermediateToken - (1424:34,78 [1] ComplexTagHelpers.cshtml) - CSharp - ) + HtmlContent - (1425:34,79 [10] ComplexTagHelpers.cshtml) + IntermediateToken - (1425:34,79 [10] ComplexTagHelpers.cshtml) - Html - \n + TagHelper - (1435:35,8 [22] ComplexTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (1443:35,16 [8] ComplexTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + CSharpCode - (1445:35,18 [5] ComplexTagHelpers.cshtml) + IntermediateToken - (1445:35,18 [5] ComplexTagHelpers.cshtml) - CSharp - 1 + 2 + DefaultTagHelperExecute - + HtmlContent - (1457:35,30 [14] ComplexTagHelpers.cshtml) + IntermediateToken - (1457:35,30 [6] ComplexTagHelpers.cshtml) - Html - \n + IntermediateToken - (1463:36,4 [6] ComplexTagHelpers.cshtml) - Html -
        + IntermediateToken - (1469:36,10 [2] ComplexTagHelpers.cshtml) - Html - \n + CSharpCode - (1471:37,0 [1] ComplexTagHelpers.cshtml) + IntermediateToken - (1471:37,0 [1] ComplexTagHelpers.cshtml) - CSharp - } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml new file mode 100644 index 0000000000..be1a9c2079 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml @@ -0,0 +1,15 @@ +@{ + var ch = true; + var cls = "bar"; +
        +

        +

        +

        + + +

        + + + + +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.codegen.cs new file mode 100644 index 0000000000..d34404fec1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.codegen.cs @@ -0,0 +1,189 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ConditionalAttributes_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + var ch = true; + var cls = "bar"; + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + __o = cls; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + __o = cls; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + __o = cls; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + __o = ch; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + __o = ch; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + if(cls != null) { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + __o = cls; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + } + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + __o = Url.Content("~/Scripts/jquery-1.6.2.min.js"); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + __o = Url.Content("~/Scripts/modernizr-2.0.6-development-only.js"); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.ir.txt new file mode 100644 index 0000000000..64a6847890 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.ir.txt @@ -0,0 +1,128 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ConditionalAttributes_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [48] ConditionalAttributes.cshtml) + IntermediateToken - (2:0,2 [48] ConditionalAttributes.cshtml) - CSharp - \n var ch = true;\n var cls = "bar";\n + HtmlContent - (50:3,4 [16] ConditionalAttributes.cshtml) + IntermediateToken - (50:3,4 [2] ConditionalAttributes.cshtml) - Html - + CSharpCode - (66:3,20 [6] ConditionalAttributes.cshtml) + IntermediateToken - (66:3,20 [6] ConditionalAttributes.cshtml) - CSharp - \n + HtmlContent - (72:4,4 [2] ConditionalAttributes.cshtml) + IntermediateToken - (72:4,4 [2] ConditionalAttributes.cshtml) - Html -

        + CSharpCode - (90:4,22 [6] ConditionalAttributes.cshtml) + IntermediateToken - (90:4,22 [6] ConditionalAttributes.cshtml) - CSharp - \n + HtmlContent - (96:5,4 [2] ConditionalAttributes.cshtml) + IntermediateToken - (96:5,4 [2] ConditionalAttributes.cshtml) - Html -

        + CSharpCode - (118:5,26 [6] ConditionalAttributes.cshtml) + IntermediateToken - (118:5,26 [6] ConditionalAttributes.cshtml) - CSharp - \n + HtmlContent - (124:6,4 [2] ConditionalAttributes.cshtml) + IntermediateToken - (124:6,4 [2] ConditionalAttributes.cshtml) - Html -

        + CSharpCode - (146:6,26 [6] ConditionalAttributes.cshtml) + IntermediateToken - (146:6,26 [6] ConditionalAttributes.cshtml) - CSharp - \n + HtmlContent - (152:7,4 [22] ConditionalAttributes.cshtml) + IntermediateToken - (152:7,4 [6] ConditionalAttributes.cshtml) - Html - + CSharpCode - (191:7,43 [6] ConditionalAttributes.cshtml) + IntermediateToken - (191:7,43 [6] ConditionalAttributes.cshtml) - CSharp - \n + HtmlContent - (197:8,4 [22] ConditionalAttributes.cshtml) + IntermediateToken - (197:8,4 [6] ConditionalAttributes.cshtml) - Html - + CSharpCode - (240:8,47 [6] ConditionalAttributes.cshtml) + IntermediateToken - (240:8,47 [6] ConditionalAttributes.cshtml) - CSharp - \n + HtmlContent - (246:9,4 [2] ConditionalAttributes.cshtml) + IntermediateToken - (246:9,4 [2] ConditionalAttributes.cshtml) - Html -

        + CSharpCode - (285:9,43 [6] ConditionalAttributes.cshtml) + IntermediateToken - (285:9,43 [6] ConditionalAttributes.cshtml) - CSharp - \n + HtmlContent - (291:10,4 [18] ConditionalAttributes.cshtml) + IntermediateToken - (291:10,4 [2] ConditionalAttributes.cshtml) - Html - + CSharpCode - (309:10,22 [6] ConditionalAttributes.cshtml) + IntermediateToken - (309:10,22 [6] ConditionalAttributes.cshtml) - CSharp - \n + HtmlContent - (315:11,4 [7] ConditionalAttributes.cshtml) + IntermediateToken - (315:11,4 [7] ConditionalAttributes.cshtml) - Html - + CSharpCode - (407:11,96 [6] ConditionalAttributes.cshtml) + IntermediateToken - (407:11,96 [6] ConditionalAttributes.cshtml) - CSharp - \n + HtmlContent - (413:12,4 [7] ConditionalAttributes.cshtml) + IntermediateToken - (413:12,4 [7] ConditionalAttributes.cshtml) - Html - + CSharpCode - (521:12,112 [6] ConditionalAttributes.cshtml) + IntermediateToken - (521:12,112 [6] ConditionalAttributes.cshtml) - CSharp - \n + HtmlContent - (527:13,4 [111] ConditionalAttributes.cshtml) + IntermediateToken - (527:13,4 [7] ConditionalAttributes.cshtml) - Html - + CSharpCode - (638:13,115 [2] ConditionalAttributes.cshtml) + IntermediateToken - (638:13,115 [2] ConditionalAttributes.cshtml) - CSharp - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.mappings.txt new file mode 100644 index 0000000000..688c94ed16 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.mappings.txt @@ -0,0 +1,138 @@ +Source Location: (2:0,2 [48] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +| + var ch = true; + var cls = "bar"; + | +Generated Location: (762:19,2 [48] ) +| + var ch = true; + var cls = "bar"; + | + +Source Location: (66:3,20 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +| + | +Generated Location: (998:29,20 [6] ) +| + | + +Source Location: (83:4,15 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +|cls| +Generated Location: (1187:37,15 [3] ) +|cls| + +Source Location: (90:4,22 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +| + | +Generated Location: (1381:44,22 [6] ) +| + | + +Source Location: (111:5,19 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +|cls| +Generated Location: (1574:52,19 [3] ) +|cls| + +Source Location: (118:5,26 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +| + | +Generated Location: (1772:59,26 [6] ) +| + | + +Source Location: (135:6,15 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +|cls| +Generated Location: (1961:67,15 [3] ) +|cls| + +Source Location: (146:6,26 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +| + | +Generated Location: (2159:74,26 [6] ) +| + | + +Source Location: (185:7,37 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +|ch| +Generated Location: (2370:82,37 [2] ) +|ch| + +Source Location: (191:7,43 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +| + | +Generated Location: (2584:89,43 [6] ) +| + | + +Source Location: (234:8,41 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +|ch| +Generated Location: (2799:97,41 [2] ) +|ch| + +Source Location: (240:8,47 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +| + | +Generated Location: (3017:104,47 [6] ) +| + | + +Source Location: (257:9,15 [18] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +|if(cls != null) { | +Generated Location: (3207:112,15 [18] ) +|if(cls != null) { | + +Source Location: (276:9,34 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +|cls| +Generated Location: (3428:119,34 [3] ) +|cls| + +Source Location: (279:9,37 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +| }| +Generated Location: (3638:126,37 [2] ) +| }| + +Source Location: (285:9,43 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +| + | +Generated Location: (3852:133,43 [6] ) +| + | + +Source Location: (309:10,22 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +| + | +Generated Location: (4049:141,22 [6] ) +| + | + +Source Location: (329:11,18 [44] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +|Url.Content("~/Scripts/jquery-1.6.2.min.js")| +Generated Location: (4242:149,18 [44] ) +|Url.Content("~/Scripts/jquery-1.6.2.min.js")| + +Source Location: (407:11,96 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +| + | +Generated Location: (4552:156,96 [6] ) +| + | + +Source Location: (427:12,18 [60] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +|Url.Content("~/Scripts/modernizr-2.0.6-development-only.js")| +Generated Location: (4745:164,18 [60] ) +|Url.Content("~/Scripts/modernizr-2.0.6-development-only.js")| + +Source Location: (521:12,112 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +| + | +Generated Location: (5087:171,112 [6] ) +| + | + +Source Location: (638:13,115 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml) +| +| +Generated Location: (5377:179,115 [2] ) +| +| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_Runtime.codegen.cs new file mode 100644 index 0000000000..af91e920b0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_Runtime.codegen.cs @@ -0,0 +1,130 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "f0a97e23ecfbaaaa77b528650156cb123ebdbe60" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ConditionalAttributes_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"f0a97e23ecfbaaaa77b528650156cb123ebdbe60", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ConditionalAttributes_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" + + var ch = true; + var cls = "bar"; + +#line default +#line hidden +#nullable disable + WriteLiteral(" \r\n \r\n + IntermediateToken - (66:3,20 [2] ConditionalAttributes.cshtml) - Html - \n + IntermediateToken - (68:4,0 [4] ConditionalAttributes.cshtml) - Html - + IntermediateToken - (72:4,4 [2] ConditionalAttributes.cshtml) - Html -

        + IntermediateToken - (90:4,22 [2] ConditionalAttributes.cshtml) - Html - \n + IntermediateToken - (92:5,0 [4] ConditionalAttributes.cshtml) - Html - + IntermediateToken - (96:5,4 [2] ConditionalAttributes.cshtml) - Html -

        + IntermediateToken - (118:5,26 [2] ConditionalAttributes.cshtml) - Html - \n + IntermediateToken - (120:6,0 [4] ConditionalAttributes.cshtml) - Html - + IntermediateToken - (124:6,4 [2] ConditionalAttributes.cshtml) - Html -

        + IntermediateToken - (146:6,26 [2] ConditionalAttributes.cshtml) - Html - \n + IntermediateToken - (148:7,0 [4] ConditionalAttributes.cshtml) - Html - + IntermediateToken - (152:7,4 [6] ConditionalAttributes.cshtml) - Html - + IntermediateToken - (191:7,43 [2] ConditionalAttributes.cshtml) - Html - \n + IntermediateToken - (193:8,0 [4] ConditionalAttributes.cshtml) - Html - + IntermediateToken - (197:8,4 [6] ConditionalAttributes.cshtml) - Html - + IntermediateToken - (240:8,47 [2] ConditionalAttributes.cshtml) - Html - \n + IntermediateToken - (242:9,0 [4] ConditionalAttributes.cshtml) - Html - + IntermediateToken - (246:9,4 [2] ConditionalAttributes.cshtml) - Html -

        + IntermediateToken - (285:9,43 [2] ConditionalAttributes.cshtml) - Html - \n + IntermediateToken - (287:10,0 [4] ConditionalAttributes.cshtml) - Html - + IntermediateToken - (291:10,4 [2] ConditionalAttributes.cshtml) - Html - + IntermediateToken - (309:10,22 [2] ConditionalAttributes.cshtml) - Html - \n + IntermediateToken - (311:11,0 [4] ConditionalAttributes.cshtml) - Html - + IntermediateToken - (315:11,4 [7] ConditionalAttributes.cshtml) - Html - + IntermediateToken - (407:11,96 [2] ConditionalAttributes.cshtml) - Html - \n + IntermediateToken - (409:12,0 [4] ConditionalAttributes.cshtml) - Html - + IntermediateToken - (413:12,4 [7] ConditionalAttributes.cshtml) - Html - + IntermediateToken - (521:12,112 [2] ConditionalAttributes.cshtml) - Html - \n + IntermediateToken - (523:13,0 [4] ConditionalAttributes.cshtml) - Html - + IntermediateToken - (527:13,4 [7] ConditionalAttributes.cshtml) - Html - + IntermediateToken - (638:13,115 [2] ConditionalAttributes.cshtml) - Html - \n + CSharpCode - (640:14,0 [0] ConditionalAttributes.cshtml) + IntermediateToken - (640:14,0 [0] ConditionalAttributes.cshtml) - CSharp - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes.cshtml new file mode 100644 index 0000000000..c71c637b14 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes.cshtml @@ -0,0 +1,13 @@ +@addTagHelper "*, TestAssembly" + +2 TagHelpers. +1 TagHelper. +2 TagHelpers +2 TagHelpers +0 TagHelpers. +1 TagHelper +1 TagHelper +1 TagHelper + + + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes_Runtime.codegen.cs new file mode 100644 index 0000000000..e2060a3b1f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes_Runtime.codegen.cs @@ -0,0 +1,248 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "385650281a1d9679c38ffc205756c3c26f6927e7" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CssSelectorTagHelperAttributes_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"385650281a1d9679c38ffc205756c3c26f6927e7", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CssSelectorTagHelperAttributes_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("href", new global::Microsoft.AspNetCore.Html.HtmlString("~/"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("href", new global::Microsoft.AspNetCore.Html.HtmlString("~/hello"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("href", new global::Microsoft.AspNetCore.Html.HtmlString("~/?hello=world"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("href", new global::Microsoft.AspNetCore.Html.HtmlString("~/?hello=world@false"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "text", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_5 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("value", new global::Microsoft.AspNetCore.Html.HtmlString("3 TagHelpers"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_6 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "texty", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_7 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "checkbox", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_8 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("value", new global::Microsoft.AspNetCore.Html.HtmlString("2 TagHelper"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.ATagHelper __TestNamespace_ATagHelper; + private global::TestNamespace.CatchAllTagHelper __TestNamespace_CatchAllTagHelper; + private global::TestNamespace.ATagHelperMultipleSelectors __TestNamespace_ATagHelperMultipleSelectors; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + private global::TestNamespace.CatchAllTagHelper2 __TestNamespace_CatchAllTagHelper2; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("2 TagHelpers."); + } + ); + __TestNamespace_ATagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_ATagHelper); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("1 TagHelper."); + } + ); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("2 TagHelpers"); + } + ); + __TestNamespace_ATagHelperMultipleSelectors = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_ATagHelperMultipleSelectors); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("2 TagHelpers"); + } + ); + __TestNamespace_ATagHelperMultipleSelectors = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_ATagHelperMultipleSelectors); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "href", 3, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + AddHtmlAttributeValue("", 153, "~/", 153, 2, true); +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes.cshtml" +AddHtmlAttributeValue("", 155, false, 155, 6, false); + +#line default +#line hidden +#nullable disable + AddHtmlAttributeValue("", 161, "?hello=world", 161, 12, true); + EndAddHtmlAttributeValues(__tagHelperExecutionContext); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n0 TagHelpers.\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("1 TagHelper"); + } + ); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "href", 2, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + AddHtmlAttributeValue("", 234, "~/", 234, 2, true); +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes.cshtml" +AddHtmlAttributeValue("", 236, false, 236, 6, false); + +#line default +#line hidden +#nullable disable + EndAddHtmlAttributeValues(__tagHelperExecutionContext); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("1 TagHelper"); + } + ); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("1 TagHelper"); + } + ); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "href", 2, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes); + AddHtmlAttributeValue("", 317, "~/?hello=world", 317, 14, true); +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes.cshtml" +AddHtmlAttributeValue(" ", 331, false, 332, 6, false); + +#line default +#line hidden +#nullable disable + EndAddHtmlAttributeValues(__tagHelperExecutionContext); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __TestNamespace_CatchAllTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper2); + __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_4.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_4.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __TestNamespace_CatchAllTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper2); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_6.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_6); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __TestNamespace_CatchAllTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper2); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_7.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_7); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_8); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes_Runtime.ir.txt new file mode 100644 index 0000000000..ef34c24d71 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes_Runtime.ir.txt @@ -0,0 +1,137 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CssSelectorTagHelperAttributes_Runtime - - + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_0 - href - ~/ - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_1 - href - ~/hello - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_2 - href - ~/?hello=world - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_3 - href - ~/?hello=world@false - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_4 - type - text - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_5 - value - 3 TagHelpers - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_6 - type - texty - HtmlAttributeValueStyle.SingleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_7 - type - checkbox - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_8 - value - 2 TagHelper - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.ATagHelper - __TestNamespace_ATagHelper + FieldDeclaration - - private - global::TestNamespace.CatchAllTagHelper - __TestNamespace_CatchAllTagHelper + FieldDeclaration - - private - global::TestNamespace.ATagHelperMultipleSelectors - __TestNamespace_ATagHelperMultipleSelectors + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + FieldDeclaration - - private - global::TestNamespace.CatchAllTagHelper2 - __TestNamespace_CatchAllTagHelper2 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (33:1,0 [2] CssSelectorTagHelperAttributes.cshtml) + IntermediateToken - (33:1,0 [2] CssSelectorTagHelperAttributes.cshtml) - Html - \n + TagHelper - (35:2,0 [30] CssSelectorTagHelperAttributes.cshtml) - a - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (48:2,13 [13] CssSelectorTagHelperAttributes.cshtml) + IntermediateToken - (48:2,13 [13] CssSelectorTagHelperAttributes.cshtml) - Html - 2 TagHelpers. + DefaultTagHelperCreate - - TestNamespace.ATagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 + DefaultTagHelperExecute - + HtmlContent - (65:2,30 [2] CssSelectorTagHelperAttributes.cshtml) + IntermediateToken - (65:2,30 [2] CssSelectorTagHelperAttributes.cshtml) - Html - \n + TagHelper - (67:3,0 [32] CssSelectorTagHelperAttributes.cshtml) - a - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (83:3,16 [12] CssSelectorTagHelperAttributes.cshtml) + IntermediateToken - (83:3,16 [12] CssSelectorTagHelperAttributes.cshtml) - Html - 1 TagHelper. + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 + DefaultTagHelperExecute - + HtmlContent - (99:3,32 [2] CssSelectorTagHelperAttributes.cshtml) + IntermediateToken - (99:3,32 [2] CssSelectorTagHelperAttributes.cshtml) - Html - \n + TagHelper - (101:4,0 [41] CssSelectorTagHelperAttributes.cshtml) - a - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (126:4,25 [12] CssSelectorTagHelperAttributes.cshtml) + IntermediateToken - (126:4,25 [12] CssSelectorTagHelperAttributes.cshtml) - Html - 2 TagHelpers + DefaultTagHelperCreate - - TestNamespace.ATagHelperMultipleSelectors + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 + DefaultTagHelperExecute - + HtmlContent - (142:4,41 [2] CssSelectorTagHelperAttributes.cshtml) + IntermediateToken - (142:4,41 [2] CssSelectorTagHelperAttributes.cshtml) - Html - \n + TagHelper - (144:5,0 [47] CssSelectorTagHelperAttributes.cshtml) - a - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (175:5,31 [12] CssSelectorTagHelperAttributes.cshtml) + IntermediateToken - (175:5,31 [12] CssSelectorTagHelperAttributes.cshtml) - Html - 2 TagHelpers + DefaultTagHelperCreate - - TestNamespace.ATagHelperMultipleSelectors + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - href - HtmlAttributeValueStyle.DoubleQuotes + HtmlAttributeValue - (153:5,9 [2] CssSelectorTagHelperAttributes.cshtml) - + IntermediateToken - (153:5,9 [2] CssSelectorTagHelperAttributes.cshtml) - Html - ~/ + CSharpExpressionAttributeValue - (155:5,11 [6] CssSelectorTagHelperAttributes.cshtml) - + IntermediateToken - (156:5,12 [5] CssSelectorTagHelperAttributes.cshtml) - CSharp - false + HtmlAttributeValue - (161:5,17 [12] CssSelectorTagHelperAttributes.cshtml) - + IntermediateToken - (161:5,17 [12] CssSelectorTagHelperAttributes.cshtml) - Html - ?hello=world + DefaultTagHelperExecute - + HtmlContent - (191:5,47 [35] CssSelectorTagHelperAttributes.cshtml) + IntermediateToken - (191:5,47 [2] CssSelectorTagHelperAttributes.cshtml) - Html - \n + IntermediateToken - (193:6,0 [2] CssSelectorTagHelperAttributes.cshtml) - Html - + IntermediateToken - (207:6,14 [13] CssSelectorTagHelperAttributes.cshtml) - Html - 0 TagHelpers. + IntermediateToken - (220:6,27 [4] CssSelectorTagHelperAttributes.cshtml) - Html - + IntermediateToken - (224:6,31 [2] CssSelectorTagHelperAttributes.cshtml) - Html - \n + TagHelper - (226:7,0 [32] CssSelectorTagHelperAttributes.cshtml) - a - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (243:7,17 [11] CssSelectorTagHelperAttributes.cshtml) + IntermediateToken - (243:7,17 [11] CssSelectorTagHelperAttributes.cshtml) - Html - 1 TagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - href - HtmlAttributeValueStyle.DoubleQuotes + HtmlAttributeValue - (234:7,8 [2] CssSelectorTagHelperAttributes.cshtml) - + IntermediateToken - (234:7,8 [2] CssSelectorTagHelperAttributes.cshtml) - Html - ~/ + CSharpExpressionAttributeValue - (236:7,10 [6] CssSelectorTagHelperAttributes.cshtml) - + IntermediateToken - (237:7,11 [5] CssSelectorTagHelperAttributes.cshtml) - CSharp - false + DefaultTagHelperExecute - + HtmlContent - (258:7,32 [2] CssSelectorTagHelperAttributes.cshtml) + IntermediateToken - (258:7,32 [2] CssSelectorTagHelperAttributes.cshtml) - Html - \n + TagHelper - (260:8,0 [46] CssSelectorTagHelperAttributes.cshtml) - a - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (291:8,31 [11] CssSelectorTagHelperAttributes.cshtml) + IntermediateToken - (291:8,31 [11] CssSelectorTagHelperAttributes.cshtml) - Html - 1 TagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_3 + DefaultTagHelperExecute - + HtmlContent - (306:8,46 [2] CssSelectorTagHelperAttributes.cshtml) + IntermediateToken - (306:8,46 [2] CssSelectorTagHelperAttributes.cshtml) - Html - \n + TagHelper - (308:9,0 [47] CssSelectorTagHelperAttributes.cshtml) - a - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (340:9,32 [11] CssSelectorTagHelperAttributes.cshtml) + IntermediateToken - (340:9,32 [11] CssSelectorTagHelperAttributes.cshtml) - Html - 1 TagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - href - HtmlAttributeValueStyle.SingleQuotes + HtmlAttributeValue - (317:9,9 [14] CssSelectorTagHelperAttributes.cshtml) - + IntermediateToken - (317:9,9 [14] CssSelectorTagHelperAttributes.cshtml) - Html - ~/?hello=world + CSharpExpressionAttributeValue - (331:9,23 [7] CssSelectorTagHelperAttributes.cshtml) - + IntermediateToken - (333:9,25 [5] CssSelectorTagHelperAttributes.cshtml) - CSharp - false + DefaultTagHelperExecute - + HtmlContent - (355:9,47 [2] CssSelectorTagHelperAttributes.cshtml) + IntermediateToken - (355:9,47 [2] CssSelectorTagHelperAttributes.cshtml) - Html - \n + TagHelper - (357:10,0 [42] CssSelectorTagHelperAttributes.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper2 + PreallocatedTagHelperProperty - (370:10,13 [4] CssSelectorTagHelperAttributes.cshtml) - __tagHelperAttribute_4 - type - Type + PreallocatedTagHelperProperty - (370:10,13 [4] CssSelectorTagHelperAttributes.cshtml) - __tagHelperAttribute_4 - type - Type + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_5 + DefaultTagHelperExecute - + HtmlContent - (399:10,42 [2] CssSelectorTagHelperAttributes.cshtml) + IntermediateToken - (399:10,42 [2] CssSelectorTagHelperAttributes.cshtml) - Html - \n + TagHelper - (401:11,0 [43] CssSelectorTagHelperAttributes.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper2 + PreallocatedTagHelperProperty - (414:11,13 [5] CssSelectorTagHelperAttributes.cshtml) - __tagHelperAttribute_6 - type - Type + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_5 + DefaultTagHelperExecute - + HtmlContent - (444:11,43 [2] CssSelectorTagHelperAttributes.cshtml) + IntermediateToken - (444:11,43 [2] CssSelectorTagHelperAttributes.cshtml) - Html - \n + TagHelper - (446:12,0 [45] CssSelectorTagHelperAttributes.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper2 + PreallocatedTagHelperProperty - (459:12,13 [8] CssSelectorTagHelperAttributes.cshtml) - __tagHelperAttribute_7 - type - Type + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_8 + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml new file mode 100644 index 0000000000..5dcaeebdbf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml @@ -0,0 +1,15 @@ +

        + @for(int i = 1; i <= 10; i++) { +

        This is item #@i

        + } +
        + +

        +@(Foo(Bar.Baz)) +@Foo(@

        Bar @baz Biz

        ) +

        + +@section Footer { +

        Foo

        + @bar +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime_DesignTime.codegen.cs new file mode 100644 index 0000000000..3f579629fc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime_DesignTime.codegen.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DesignTime_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml" +global::System.Object Footer = null; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml" + for(int i = 1; i <= 10; i++) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml" + __o = i; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml" + + } + +#line default +#line hidden +#nullable disable +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml" +__o = Foo(Bar.Baz); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml" +__o = Foo(item => new Template(async(__razor_template_writer) => { +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml" + __o = baz; + +#line default +#line hidden +#nullable disable +} +)); + +#line default +#line hidden +#nullable disable + DefineSection("Footer", async(__razor_section_writer) => { +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml" +__o = bar; + +#line default +#line hidden +#nullable disable + } + ); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime_DesignTime.ir.txt new file mode 100644 index 0000000000..0b8f1e8e9b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime_DesignTime.ir.txt @@ -0,0 +1,68 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DesignTime_DesignTime - - + DesignTimeDirective - + DirectiveToken - (173:11,9 [6] DesignTime.cshtml) - Footer + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [19] DesignTime.cshtml) + IntermediateToken - (0:0,0 [4] DesignTime.cshtml) - Html -
        + IntermediateToken - (5:0,5 [14] DesignTime.cshtml) - Html - \n + CSharpCode - (20:1,13 [36] DesignTime.cshtml) + IntermediateToken - (20:1,13 [36] DesignTime.cshtml) - CSharp - for(int i = 1; i <= 10; i++) {\n + HtmlContent - (56:2,4 [17] DesignTime.cshtml) + IntermediateToken - (56:2,4 [2] DesignTime.cshtml) - Html -

        + IntermediateToken - (59:2,7 [14] DesignTime.cshtml) - Html - This is item # + CSharpExpression - (74:2,22 [1] DesignTime.cshtml) + IntermediateToken - (74:2,22 [1] DesignTime.cshtml) - CSharp - i + HtmlContent - (75:2,23 [4] DesignTime.cshtml) + IntermediateToken - (75:2,23 [4] DesignTime.cshtml) - Html -

        + CSharpCode - (79:2,27 [15] DesignTime.cshtml) + IntermediateToken - (79:2,27 [15] DesignTime.cshtml) - CSharp - \n } + HtmlContent - (94:3,13 [17] DesignTime.cshtml) + IntermediateToken - (94:3,13 [2] DesignTime.cshtml) - Html - \n + IntermediateToken - (96:4,0 [6] DesignTime.cshtml) - Html -
        + IntermediateToken - (102:4,6 [4] DesignTime.cshtml) - Html - \n\n + IntermediateToken - (106:6,0 [2] DesignTime.cshtml) - Html -

        + IntermediateToken - (109:6,3 [2] DesignTime.cshtml) - Html - \n + CSharpExpression - (113:7,2 [12] DesignTime.cshtml) + IntermediateToken - (113:7,2 [12] DesignTime.cshtml) - CSharp - Foo(Bar.Baz) + HtmlContent - (126:7,15 [2] DesignTime.cshtml) + IntermediateToken - (126:7,15 [2] DesignTime.cshtml) - Html - \n + CSharpExpression - (129:8,1 [23] DesignTime.cshtml) + IntermediateToken - (129:8,1 [4] DesignTime.cshtml) - CSharp - Foo( + Template - (134:8,6 [18] DesignTime.cshtml) + HtmlContent - (134:8,6 [7] DesignTime.cshtml) + IntermediateToken - (134:8,6 [2] DesignTime.cshtml) - Html -

        + IntermediateToken - (137:8,9 [4] DesignTime.cshtml) - Html - Bar + CSharpExpression - (142:8,14 [3] DesignTime.cshtml) + IntermediateToken - (142:8,14 [3] DesignTime.cshtml) - CSharp - baz + HtmlContent - (145:8,17 [8] DesignTime.cshtml) + IntermediateToken - (145:8,17 [4] DesignTime.cshtml) - Html - Biz + IntermediateToken - (149:8,21 [4] DesignTime.cshtml) - Html -

        + IntermediateToken - (153:8,25 [1] DesignTime.cshtml) - CSharp - ) + HtmlContent - (154:8,26 [10] DesignTime.cshtml) + IntermediateToken - (154:8,26 [2] DesignTime.cshtml) - Html - \n + IntermediateToken - (156:9,0 [4] DesignTime.cshtml) - Html -

        + IntermediateToken - (160:9,4 [4] DesignTime.cshtml) - Html - \n\n + Section - - Footer + HtmlContent - (181:11,17 [22] DesignTime.cshtml) + IntermediateToken - (181:11,17 [6] DesignTime.cshtml) - Html - \n + IntermediateToken - (187:12,4 [2] DesignTime.cshtml) - Html -

        + IntermediateToken - (190:12,7 [3] DesignTime.cshtml) - Html - Foo + IntermediateToken - (193:12,10 [4] DesignTime.cshtml) - Html -

        + IntermediateToken - (197:12,14 [6] DesignTime.cshtml) - Html - \n + CSharpExpression - (204:13,5 [3] DesignTime.cshtml) + IntermediateToken - (204:13,5 [3] DesignTime.cshtml) - CSharp - bar + HtmlContent - (207:13,8 [2] DesignTime.cshtml) + IntermediateToken - (207:13,8 [2] DesignTime.cshtml) - Html - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime_DesignTime.mappings.txt new file mode 100644 index 0000000000..48c7818989 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime_DesignTime.mappings.txt @@ -0,0 +1,49 @@ +Source Location: (173:11,9 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml) +|Footer| +Generated Location: (507:12,22 [6] ) +|Footer| + +Source Location: (20:1,13 [36] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml) +|for(int i = 1; i <= 10; i++) { + | +Generated Location: (1005:29,13 [36] ) +|for(int i = 1; i <= 10; i++) { + | + +Source Location: (74:2,22 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml) +|i| +Generated Location: (1220:37,22 [1] ) +|i| + +Source Location: (79:2,27 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml) +| + }| +Generated Location: (1406:44,27 [15] ) +| + }| + +Source Location: (113:7,2 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml) +|Foo(Bar.Baz)| +Generated Location: (1584:52,6 [12] ) +|Foo(Bar.Baz)| + +Source Location: (129:8,1 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml) +|Foo(| +Generated Location: (1760:59,6 [4] ) +|Foo(| + +Source Location: (142:8,14 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml) +|baz| +Generated Location: (1941:62,14 [3] ) +|baz| + +Source Location: (153:8,25 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml) +|)| +Generated Location: (2001:68,1 [1] ) +|)| + +Source Location: (204:13,5 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime.cshtml) +|bar| +Generated Location: (2239:76,6 [3] ) +|bar| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml new file mode 100644 index 0000000000..369558994e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml @@ -0,0 +1,7 @@ +@addTagHelper "*, TestAssembly" + +

        + + + +

        \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_DesignTime.codegen.cs new file mode 100644 index 0000000000..786d7ea756 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_DesignTime.codegen.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DuplicateAttributeTagHelpers_DesignTime + { + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __TestNamespace_InputTagHelper.Type = "button"; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __TestNamespace_InputTagHelper.Type = "button"; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __TestNamespace_InputTagHelper.Type = "button"; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable + __TestNamespace_PTagHelper = CreateTagHelper(); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml" +__TestNamespace_PTagHelper.Age = 3; + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_DesignTime.ir.txt new file mode 100644 index 0000000000..63264fc10d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_DesignTime.ir.txt @@ -0,0 +1,96 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DuplicateAttributeTagHelpers_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + DesignTimeDirective - + DirectiveToken - (14:0,14 [17] DuplicateAttributeTagHelpers.cshtml) - "*, TestAssembly" + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:0,31 [4] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (31:0,31 [4] DuplicateAttributeTagHelpers.cshtml) - Html - \n\n + TagHelper - (35:2,0 [259] DuplicateAttributeTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (65:2,30 [6] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (65:2,30 [6] DuplicateAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (71:3,4 [39] DuplicateAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (84:3,17 [6] DuplicateAttributeTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (84:3,17 [6] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (84:3,17 [6] DuplicateAttributeTagHelpers.cshtml) - Html - button + DefaultTagHelperProperty - (84:3,17 [6] DuplicateAttributeTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (84:3,17 [6] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (84:3,17 [6] DuplicateAttributeTagHelpers.cshtml) - Html - button + DefaultTagHelperHtmlAttribute - - TYPE - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (98:3,31 [8] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (98:3,31 [8] DuplicateAttributeTagHelpers.cshtml) - Html - checkbox + DefaultTagHelperExecute - + HtmlContent - (110:3,43 [6] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (110:3,43 [6] DuplicateAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (116:4,4 [70] DuplicateAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (129:4,17 [6] DuplicateAttributeTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (129:4,17 [6] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (129:4,17 [6] DuplicateAttributeTagHelpers.cshtml) - Html - button + DefaultTagHelperProperty - (129:4,17 [6] DuplicateAttributeTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (129:4,17 [6] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (129:4,17 [6] DuplicateAttributeTagHelpers.cshtml) - Html - button + DefaultTagHelperProperty - (146:4,34 [4] DuplicateAttributeTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (146:4,34 [4] DuplicateAttributeTagHelpers.cshtml) - CSharp - true + DefaultTagHelperHtmlAttribute - - type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (158:4,46 [8] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (158:4,46 [8] DuplicateAttributeTagHelpers.cshtml) - Html - checkbox + DefaultTagHelperHtmlAttribute - - checked - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (177:4,65 [5] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (177:4,65 [5] DuplicateAttributeTagHelpers.cshtml) - Html - false + DefaultTagHelperExecute - + HtmlContent - (186:4,74 [6] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (186:4,74 [6] DuplicateAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (192:5,4 [96] DuplicateAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (205:5,17 [6] DuplicateAttributeTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.SingleQuotes + HtmlContent - (205:5,17 [6] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (205:5,17 [6] DuplicateAttributeTagHelpers.cshtml) - Html - button + DefaultTagHelperProperty - (205:5,17 [6] DuplicateAttributeTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.SingleQuotes + HtmlContent - (205:5,17 [6] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (205:5,17 [6] DuplicateAttributeTagHelpers.cshtml) - Html - button + DefaultTagHelperProperty - (222:5,34 [4] DuplicateAttributeTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (222:5,34 [4] DuplicateAttributeTagHelpers.cshtml) - CSharp - true + DefaultTagHelperHtmlAttribute - - type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (233:5,45 [8] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (233:5,45 [8] DuplicateAttributeTagHelpers.cshtml) - Html - checkbox + DefaultTagHelperHtmlAttribute - - checked - HtmlAttributeValueStyle.SingleQuotes + HtmlContent - (251:5,63 [4] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (251:5,63 [4] DuplicateAttributeTagHelpers.cshtml) - Html - true + DefaultTagHelperHtmlAttribute - - type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (263:5,75 [8] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (263:5,75 [8] DuplicateAttributeTagHelpers.cshtml) - Html - checkbox + DefaultTagHelperHtmlAttribute - - checked - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (281:5,93 [4] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (281:5,93 [4] DuplicateAttributeTagHelpers.cshtml) - Html - true + DefaultTagHelperExecute - + HtmlContent - (288:5,100 [2] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (288:5,100 [2] DuplicateAttributeTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (43:2,8 [1] DuplicateAttributeTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (43:2,8 [1] DuplicateAttributeTagHelpers.cshtml) - CSharp - 3 + DefaultTagHelperHtmlAttribute - - AGE - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (51:2,16 [2] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (51:2,16 [2] DuplicateAttributeTagHelpers.cshtml) - Html - 40 + DefaultTagHelperHtmlAttribute - - Age - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (60:2,25 [3] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (60:2,25 [3] DuplicateAttributeTagHelpers.cshtml) - Html - 500 + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_DesignTime.mappings.txt new file mode 100644 index 0000000000..0d93eb694d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_DesignTime.mappings.txt @@ -0,0 +1,20 @@ +Source Location: (14:0,14 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml) +|"*, TestAssembly"| +Generated Location: (809:15,37 [17] ) +|"*, TestAssembly"| + +Source Location: (146:4,34 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml) +|true| +Generated Location: (2074:40,42 [4] ) +|true| + +Source Location: (222:5,34 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml) +|true| +Generated Location: (2654:51,42 [4] ) +|true| + +Source Location: (43:2,8 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml) +|3| +Generated Location: (2962:59,33 [1] ) +|3| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_Runtime.codegen.cs new file mode 100644 index 0000000000..490f283767 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_Runtime.codegen.cs @@ -0,0 +1,152 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "4dc2ea6fc4bd045c34a90867a6a72183a3d01323" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DuplicateAttributeTagHelpers_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"4dc2ea6fc4bd045c34a90867a6a72183a3d01323", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DuplicateAttributeTagHelpers_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "button", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("TYPE", new global::Microsoft.AspNetCore.Html.HtmlString("checkbox"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("checkbox"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("checked", new global::Microsoft.AspNetCore.Html.HtmlString("false"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "button", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_5 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("checked", new global::Microsoft.AspNetCore.Html.HtmlString("true"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_6 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("checked", new global::Microsoft.AspNetCore.Html.HtmlString("true"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_7 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("AGE", new global::Microsoft.AspNetCore.Html.HtmlString("40"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_8 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("Age", new global::Microsoft.AspNetCore.Html.HtmlString("500"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_4.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_4.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4); +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_6); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml" +__TestNamespace_PTagHelper.Age = 3; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_7); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_8); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_Runtime.ir.txt new file mode 100644 index 0000000000..f2e84ead91 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers_Runtime.ir.txt @@ -0,0 +1,69 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DuplicateAttributeTagHelpers_Runtime - - + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_0 - type - button - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_1 - TYPE - checkbox - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_2 - type - checkbox - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_3 - checked - false - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_4 - type - button - HtmlAttributeValueStyle.SingleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_5 - checked - true - HtmlAttributeValueStyle.SingleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_6 - checked - true - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_7 - AGE - 40 - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_8 - Age - 500 - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (33:1,0 [2] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (33:1,0 [2] DuplicateAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (35:2,0 [259] DuplicateAttributeTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (65:2,30 [6] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (65:2,30 [6] DuplicateAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (71:3,4 [39] DuplicateAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + PreallocatedTagHelperProperty - (84:3,17 [6] DuplicateAttributeTagHelpers.cshtml) - __tagHelperAttribute_0 - type - Type + PreallocatedTagHelperProperty - (84:3,17 [6] DuplicateAttributeTagHelpers.cshtml) - __tagHelperAttribute_0 - type - Type + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 + DefaultTagHelperExecute - + HtmlContent - (110:3,43 [6] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (110:3,43 [6] DuplicateAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (116:4,4 [70] DuplicateAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + PreallocatedTagHelperProperty - (129:4,17 [6] DuplicateAttributeTagHelpers.cshtml) - __tagHelperAttribute_0 - type - Type + PreallocatedTagHelperProperty - (129:4,17 [6] DuplicateAttributeTagHelpers.cshtml) - __tagHelperAttribute_0 - type - Type + DefaultTagHelperProperty - (146:4,34 [4] DuplicateAttributeTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (146:4,34 [4] DuplicateAttributeTagHelpers.cshtml) - CSharp - true + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_3 + DefaultTagHelperExecute - + HtmlContent - (186:4,74 [6] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (186:4,74 [6] DuplicateAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (192:5,4 [96] DuplicateAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + PreallocatedTagHelperProperty - (205:5,17 [6] DuplicateAttributeTagHelpers.cshtml) - __tagHelperAttribute_4 - type - Type + PreallocatedTagHelperProperty - (205:5,17 [6] DuplicateAttributeTagHelpers.cshtml) - __tagHelperAttribute_4 - type - Type + DefaultTagHelperProperty - (222:5,34 [4] DuplicateAttributeTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (222:5,34 [4] DuplicateAttributeTagHelpers.cshtml) - CSharp - true + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_5 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_6 + DefaultTagHelperExecute - + HtmlContent - (288:5,100 [2] DuplicateAttributeTagHelpers.cshtml) + IntermediateToken - (288:5,100 [2] DuplicateAttributeTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (43:2,8 [1] DuplicateAttributeTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (43:2,8 [1] DuplicateAttributeTagHelpers.cshtml) - CSharp - 3 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_7 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_8 + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml new file mode 100644 index 0000000000..9963a14d5e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml @@ -0,0 +1,3 @@ +@addTagHelper "*, TestAssembly" + + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_DesignTime.codegen.cs new file mode 100644 index 0000000000..4f58773c89 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_DesignTime.codegen.cs @@ -0,0 +1,46 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DuplicateTargetTagHelper_DesignTime + { + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.CatchAllTagHelper __TestNamespace_CatchAllTagHelper; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper.Type = "checkbox"; + __TestNamespace_CatchAllTagHelper.Type = __TestNamespace_InputTagHelper.Type; +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml" +__TestNamespace_InputTagHelper.Checked = true; + +#line default +#line hidden +#nullable disable + __TestNamespace_CatchAllTagHelper.Checked = __TestNamespace_InputTagHelper.Checked; + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_DesignTime.ir.txt new file mode 100644 index 0000000000..2ea133100c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_DesignTime.ir.txt @@ -0,0 +1,32 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DuplicateTargetTagHelper_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.CatchAllTagHelper - __TestNamespace_CatchAllTagHelper + DesignTimeDirective - + DirectiveToken - (14:0,14 [17] DuplicateTargetTagHelper.cshtml) - "*, TestAssembly" + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:0,31 [4] DuplicateTargetTagHelper.cshtml) + IntermediateToken - (31:0,31 [4] DuplicateTargetTagHelper.cshtml) - Html - \n\n + TagHelper - (35:2,0 [40] DuplicateTargetTagHelper.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperProperty - (48:2,13 [8] DuplicateTargetTagHelper.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (48:2,13 [8] DuplicateTargetTagHelper.cshtml) + IntermediateToken - (48:2,13 [8] DuplicateTargetTagHelper.cshtml) - Html - checkbox + DefaultTagHelperProperty - (48:2,13 [8] DuplicateTargetTagHelper.cshtml) - type - string TestNamespace.CatchAllTagHelper.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (48:2,13 [8] DuplicateTargetTagHelper.cshtml) + IntermediateToken - (48:2,13 [8] DuplicateTargetTagHelper.cshtml) - Html - checkbox + DefaultTagHelperProperty - (67:2,32 [4] DuplicateTargetTagHelper.cshtml) - checked - bool TestNamespace.InputTagHelper.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (67:2,32 [4] DuplicateTargetTagHelper.cshtml) - CSharp - true + DefaultTagHelperProperty - (67:2,32 [4] DuplicateTargetTagHelper.cshtml) - checked - bool TestNamespace.CatchAllTagHelper.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (67:2,32 [4] DuplicateTargetTagHelper.cshtml) - CSharp - true + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_DesignTime.mappings.txt new file mode 100644 index 0000000000..a73f5a033a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_DesignTime.mappings.txt @@ -0,0 +1,10 @@ +Source Location: (14:0,14 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml) +|"*, TestAssembly"| +Generated Location: (727:14,37 [17] ) +|"*, TestAssembly"| + +Source Location: (67:2,32 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml) +|true| +Generated Location: (1637:35,41 [4] ) +|true| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_Runtime.codegen.cs new file mode 100644 index 0000000000..83916da164 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_Runtime.codegen.cs @@ -0,0 +1,67 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "97a60a6d99646ce1d67aab46447cc8f582f6f03a" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DuplicateTargetTagHelper_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"97a60a6d99646ce1d67aab46447cc8f582f6f03a", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DuplicateTargetTagHelper_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "checkbox", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.CatchAllTagHelper __TestNamespace_CatchAllTagHelper; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); + __TestNamespace_CatchAllTagHelper.Type = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml" +__TestNamespace_InputTagHelper.Checked = true; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __TestNamespace_CatchAllTagHelper.Checked = __TestNamespace_InputTagHelper.Checked; + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_Runtime.ir.txt new file mode 100644 index 0000000000..d86a4d2b8c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper_Runtime.ir.txt @@ -0,0 +1,23 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DuplicateTargetTagHelper_Runtime - - + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_0 - type - checkbox - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.CatchAllTagHelper - __TestNamespace_CatchAllTagHelper + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (33:1,0 [2] DuplicateTargetTagHelper.cshtml) + IntermediateToken - (33:1,0 [2] DuplicateTargetTagHelper.cshtml) - Html - \n + TagHelper - (35:2,0 [40] DuplicateTargetTagHelper.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + PreallocatedTagHelperProperty - (48:2,13 [8] DuplicateTargetTagHelper.cshtml) - __tagHelperAttribute_0 - type - Type + PreallocatedTagHelperProperty - (48:2,13 [8] DuplicateTargetTagHelper.cshtml) - __tagHelperAttribute_0 - type - Type + DefaultTagHelperProperty - (67:2,32 [4] DuplicateTargetTagHelper.cshtml) - checked - bool TestNamespace.InputTagHelper.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (67:2,32 [4] DuplicateTargetTagHelper.cshtml) - CSharp - true + DefaultTagHelperProperty - (67:2,32 [4] DuplicateTargetTagHelper.cshtml) - checked - bool TestNamespace.CatchAllTagHelper.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (67:2,32 [4] DuplicateTargetTagHelper.cshtml) - CSharp - true + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml new file mode 100644 index 0000000000..5e69ed1d81 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml @@ -0,0 +1,14 @@ +@addTagHelper "*, TestAssembly" + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_DesignTime.codegen.cs new file mode 100644 index 0000000000..ba9c0b7eb9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_DesignTime.codegen.cs @@ -0,0 +1,251 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DynamicAttributeTagHelpers_DesignTime + { + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __TestNamespace_InputTagHelper = CreateTagHelper(); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = DateTime.Now; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + if (true) { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = string.Empty; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + } else { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = false; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + } + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = DateTime.Now; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper.Bound = string.Empty; +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = DateTime.Now; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = long.MinValue; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + if (true) { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = string.Empty; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + } else { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = false; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + } + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = int.MaxValue; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper.Bound = string.Empty; +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = long.MinValue; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + if (true) { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = string.Empty; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + } else { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = false; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + } + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = int.MaxValue; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = long.MinValue; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = DateTime.Now; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = int.MaxValue; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + if (true) { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = string.Empty; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + } else { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + __o = false; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + } + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_DesignTime.ir.txt new file mode 100644 index 0000000000..76f7d9c916 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_DesignTime.ir.txt @@ -0,0 +1,133 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DynamicAttributeTagHelpers_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + DesignTimeDirective - + DirectiveToken - (14:0,14 [17] DynamicAttributeTagHelpers.cshtml) - "*, TestAssembly" + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:0,31 [4] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (31:0,31 [4] DynamicAttributeTagHelpers.cshtml) - Html - \n\n + TagHelper - (35:2,0 [40] DynamicAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes + HtmlAttributeValue - (51:2,16 [6] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (51:2,16 [6] DynamicAttributeTagHelpers.cshtml) - Html - prefix + CSharpExpressionAttributeValue - (57:2,22 [14] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (59:2,24 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - DateTime.Now + DefaultTagHelperExecute - + HtmlContent - (75:2,40 [4] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (75:2,40 [4] DynamicAttributeTagHelpers.cshtml) - Html - \n\n + TagHelper - (79:4,0 [71] DynamicAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes + CSharpCodeAttributeValue - (95:4,16 [44] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (96:4,17 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - if (true) { + CSharpExpression - (109:4,30 [12] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (109:4,30 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - string.Empty + IntermediateToken - (121:4,42 [10] DynamicAttributeTagHelpers.cshtml) - CSharp - } else { + CSharpExpression - (132:4,53 [5] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (132:4,53 [5] DynamicAttributeTagHelpers.cshtml) - CSharp - false + IntermediateToken - (137:4,58 [2] DynamicAttributeTagHelpers.cshtml) - CSharp - } + HtmlAttributeValue - (139:4,60 [7] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (140:4,61 [6] DynamicAttributeTagHelpers.cshtml) - Html - suffix + DefaultTagHelperExecute - + HtmlContent - (150:4,71 [4] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (150:4,71 [4] DynamicAttributeTagHelpers.cshtml) - Html - \n\n + TagHelper - (154:6,0 [83] DynamicAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperProperty - (168:6,14 [27] DynamicAttributeTagHelpers.cshtml) - bound - string TestNamespace.InputTagHelper.Bound - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (168:6,14 [7] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (168:6,14 [6] DynamicAttributeTagHelpers.cshtml) - Html - prefix + IntermediateToken - (174:6,20 [1] DynamicAttributeTagHelpers.cshtml) - Html - + CSharpExpression - (176:6,22 [12] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (176:6,22 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - DateTime.Now + HtmlContent - (188:6,34 [7] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (188:6,34 [7] DynamicAttributeTagHelpers.cshtml) - Html - suffix + DefaultTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes + HtmlAttributeValue - (206:6,52 [6] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (206:6,52 [6] DynamicAttributeTagHelpers.cshtml) - Html - prefix + CSharpExpressionAttributeValue - (212:6,58 [14] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (214:6,60 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - DateTime.Now + HtmlAttributeValue - (226:6,72 [7] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (227:6,73 [6] DynamicAttributeTagHelpers.cshtml) - Html - suffix + DefaultTagHelperExecute - + HtmlContent - (237:6,83 [4] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (237:6,83 [4] DynamicAttributeTagHelpers.cshtml) - Html - \n\n + TagHelper - (241:8,0 [183] DynamicAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperProperty - (255:8,14 [73] DynamicAttributeTagHelpers.cshtml) - bound - string TestNamespace.InputTagHelper.Bound - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (256:8,15 [13] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (256:8,15 [13] DynamicAttributeTagHelpers.cshtml) - CSharp - long.MinValue + HtmlContent - (269:8,28 [1] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (269:8,28 [1] DynamicAttributeTagHelpers.cshtml) - Html - + CSharpCode - (271:8,30 [12] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (271:8,30 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - if (true) { + CSharpExpression - (284:8,43 [12] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (284:8,43 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - string.Empty + CSharpCode - (296:8,55 [10] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (296:8,55 [10] DynamicAttributeTagHelpers.cshtml) - CSharp - } else { + CSharpExpression - (307:8,66 [5] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (307:8,66 [5] DynamicAttributeTagHelpers.cshtml) - CSharp - false + CSharpCode - (312:8,71 [2] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (312:8,71 [2] DynamicAttributeTagHelpers.cshtml) - CSharp - } + HtmlContent - (314:8,73 [1] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (314:8,73 [1] DynamicAttributeTagHelpers.cshtml) - Html - + CSharpExpression - (316:8,75 [12] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (316:8,75 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - int.MaxValue + DefaultTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpressionAttributeValue - (347:9,16 [14] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (348:9,17 [13] DynamicAttributeTagHelpers.cshtml) - CSharp - long.MinValue + CSharpCodeAttributeValue - (361:9,30 [45] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (363:9,32 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - if (true) { + CSharpExpression - (376:9,45 [12] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (376:9,45 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - string.Empty + IntermediateToken - (388:9,57 [10] DynamicAttributeTagHelpers.cshtml) - CSharp - } else { + CSharpExpression - (399:9,68 [5] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (399:9,68 [5] DynamicAttributeTagHelpers.cshtml) - CSharp - false + IntermediateToken - (404:9,73 [2] DynamicAttributeTagHelpers.cshtml) - CSharp - } + CSharpExpressionAttributeValue - (406:9,75 [14] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (408:9,77 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - int.MaxValue + DefaultTagHelperExecute - + HtmlContent - (424:9,93 [4] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (424:9,93 [4] DynamicAttributeTagHelpers.cshtml) - Html - \n\n + TagHelper - (428:11,0 [80] DynamicAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpressionAttributeValue - (444:11,16 [14] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (445:11,17 [13] DynamicAttributeTagHelpers.cshtml) - CSharp - long.MinValue + CSharpExpressionAttributeValue - (458:11,30 [14] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (460:11,32 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - DateTime.Now + HtmlAttributeValue - (472:11,44 [7] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (473:11,45 [6] DynamicAttributeTagHelpers.cshtml) - Html - static + HtmlAttributeValue - (479:11,51 [11] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (483:11,55 [7] DynamicAttributeTagHelpers.cshtml) - Html - content + CSharpExpressionAttributeValue - (490:11,62 [14] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (492:11,64 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - int.MaxValue + DefaultTagHelperExecute - + HtmlContent - (508:11,80 [4] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (508:11,80 [4] DynamicAttributeTagHelpers.cshtml) - Html - \n\n + TagHelper - (512:13,0 [64] DynamicAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes + CSharpCodeAttributeValue - (528:13,16 [44] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (529:13,17 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - if (true) { + CSharpExpression - (542:13,30 [12] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (542:13,30 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - string.Empty + IntermediateToken - (554:13,42 [10] DynamicAttributeTagHelpers.cshtml) - CSharp - } else { + CSharpExpression - (565:13,53 [5] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (565:13,53 [5] DynamicAttributeTagHelpers.cshtml) - CSharp - false + IntermediateToken - (570:13,58 [2] DynamicAttributeTagHelpers.cshtml) - CSharp - } + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_DesignTime.mappings.txt new file mode 100644 index 0000000000..fb3faa5204 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_DesignTime.mappings.txt @@ -0,0 +1,155 @@ +Source Location: (14:0,14 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|"*, TestAssembly"| +Generated Location: (639:13,37 [17] ) +|"*, TestAssembly"| + +Source Location: (59:2,24 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|DateTime.Now| +Generated Location: (1271:31,24 [12] ) +|DateTime.Now| + +Source Location: (96:4,17 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|if (true) { | +Generated Location: (1577:39,17 [12] ) +|if (true) { | + +Source Location: (109:4,30 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|string.Empty| +Generated Location: (1792:46,30 [12] ) +|string.Empty| + +Source Location: (121:4,42 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +| } else { | +Generated Location: (2020:53,42 [10] ) +| } else { | + +Source Location: (132:4,53 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|false| +Generated Location: (2256:60,53 [5] ) +|false| + +Source Location: (137:4,58 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +| }| +Generated Location: (2493:67,58 [2] ) +| }| + +Source Location: (176:6,22 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|DateTime.Now| +Generated Location: (2793:75,22 [12] ) +|DateTime.Now| + +Source Location: (214:6,60 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|DateTime.Now| +Generated Location: (3105:83,60 [12] ) +|DateTime.Now| + +Source Location: (256:8,15 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|long.MinValue| +Generated Location: (3409:91,15 [13] ) +|long.MinValue| + +Source Location: (271:8,30 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|if (true) { | +Generated Location: (3626:98,30 [12] ) +|if (true) { | + +Source Location: (284:8,43 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|string.Empty| +Generated Location: (3854:105,43 [12] ) +|string.Empty| + +Source Location: (296:8,55 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +| } else { | +Generated Location: (4095:112,55 [10] ) +| } else { | + +Source Location: (307:8,66 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|false| +Generated Location: (4344:119,66 [5] ) +|false| + +Source Location: (312:8,71 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +| }| +Generated Location: (4594:126,71 [2] ) +| }| + +Source Location: (316:8,75 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|int.MaxValue| +Generated Location: (4844:133,75 [12] ) +|int.MaxValue| + +Source Location: (348:9,17 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|long.MinValue| +Generated Location: (5114:141,17 [13] ) +|long.MinValue| + +Source Location: (363:9,32 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|if (true) { | +Generated Location: (5334:148,32 [12] ) +|if (true) { | + +Source Location: (376:9,45 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|string.Empty| +Generated Location: (5565:155,45 [12] ) +|string.Empty| + +Source Location: (388:9,57 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +| } else { | +Generated Location: (5809:162,57 [10] ) +| } else { | + +Source Location: (399:9,68 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|false| +Generated Location: (6061:169,68 [5] ) +|false| + +Source Location: (404:9,73 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +| }| +Generated Location: (6314:176,73 [2] ) +| }| + +Source Location: (408:9,77 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|int.MaxValue| +Generated Location: (6567:183,77 [12] ) +|int.MaxValue| + +Source Location: (445:11,17 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|long.MinValue| +Generated Location: (6874:191,17 [13] ) +|long.MinValue| + +Source Location: (460:11,32 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|DateTime.Now| +Generated Location: (7094:198,32 [12] ) +|DateTime.Now| + +Source Location: (492:11,64 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|int.MaxValue| +Generated Location: (7345:205,64 [12] ) +|int.MaxValue| + +Source Location: (529:13,17 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|if (true) { | +Generated Location: (7652:213,17 [12] ) +|if (true) { | + +Source Location: (542:13,30 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|string.Empty| +Generated Location: (7868:220,30 [12] ) +|string.Empty| + +Source Location: (554:13,42 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +| } else { | +Generated Location: (8097:227,42 [10] ) +| } else { | + +Source Location: (565:13,53 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +|false| +Generated Location: (8334:234,53 [5] ) +|false| + +Source Location: (570:13,58 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml) +| }| +Generated Location: (8572:241,58 [2] ) +| }| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_Runtime.codegen.cs new file mode 100644 index 0000000000..a1f0c76bac --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_Runtime.codegen.cs @@ -0,0 +1,370 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "42f11f2c52ff2e658e61f6c5caace4347c07ca48" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DynamicAttributeTagHelpers_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"42f11f2c52ff2e658e61f6c5caace4347c07ca48", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DynamicAttributeTagHelpers_Runtime + { + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 2, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + AddHtmlAttributeValue("", 51, "prefix", 51, 6, true); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" +AddHtmlAttributeValue(" ", 57, DateTime.Now, 58, 13, false); + +#line default +#line hidden +#nullable disable + EndAddHtmlAttributeValues(__tagHelperExecutionContext); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 2, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + AddHtmlAttributeValue("", 95, new Microsoft.AspNetCore.Mvc.Razor.HelperResult(async(__razor_attribute_value_writer) => { + PushWriter(__razor_attribute_value_writer); +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + if (true) { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + Write(string.Empty); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + } else { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + Write(false); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + } + +#line default +#line hidden +#nullable disable + PopWriter(); + } + ), 95, 44, false); + AddHtmlAttributeValue(" ", 139, "suffix", 140, 7, true); + EndAddHtmlAttributeValues(__tagHelperExecutionContext); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + BeginWriteTagHelperAttribute(); + WriteLiteral("prefix "); +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + WriteLiteral(DateTime.Now); + +#line default +#line hidden +#nullable disable + WriteLiteral(" suffix"); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __TestNamespace_InputTagHelper.Bound = __tagHelperStringValueBuffer; + __tagHelperExecutionContext.AddTagHelperAttribute("bound", __TestNamespace_InputTagHelper.Bound, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 3, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + AddHtmlAttributeValue("", 206, "prefix", 206, 6, true); +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" +AddHtmlAttributeValue(" ", 212, DateTime.Now, 213, 13, false); + +#line default +#line hidden +#nullable disable + AddHtmlAttributeValue(" ", 226, "suffix", 227, 7, true); + EndAddHtmlAttributeValues(__tagHelperExecutionContext); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + BeginWriteTagHelperAttribute(); +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + WriteLiteral(long.MinValue); + +#line default +#line hidden +#nullable disable + WriteLiteral(" "); +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + if (true) { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + WriteLiteral(string.Empty); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + } else { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + WriteLiteral(false); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + } + +#line default +#line hidden +#nullable disable + WriteLiteral(" "); +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + WriteLiteral(int.MaxValue); + +#line default +#line hidden +#nullable disable + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __TestNamespace_InputTagHelper.Bound = __tagHelperStringValueBuffer; + __tagHelperExecutionContext.AddTagHelperAttribute("bound", __TestNamespace_InputTagHelper.Bound, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 3, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" +AddHtmlAttributeValue("", 347, long.MinValue, 347, 14, false); + +#line default +#line hidden +#nullable disable + AddHtmlAttributeValue(" ", 361, new Microsoft.AspNetCore.Mvc.Razor.HelperResult(async(__razor_attribute_value_writer) => { + PushWriter(__razor_attribute_value_writer); +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + if (true) { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + Write(string.Empty); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + } else { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + Write(false); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + } + +#line default +#line hidden +#nullable disable + PopWriter(); + } + ), 362, 44, false); +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" +AddHtmlAttributeValue(" ", 406, int.MaxValue, 407, 13, false); + +#line default +#line hidden +#nullable disable + EndAddHtmlAttributeValues(__tagHelperExecutionContext); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 5, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" +AddHtmlAttributeValue("", 444, long.MinValue, 444, 14, false); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" +AddHtmlAttributeValue(" ", 458, DateTime.Now, 459, 13, false); + +#line default +#line hidden +#nullable disable + AddHtmlAttributeValue(" ", 472, "static", 473, 7, true); + AddHtmlAttributeValue(" ", 479, "content", 483, 11, true); +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" +AddHtmlAttributeValue(" ", 490, int.MaxValue, 491, 13, false); + +#line default +#line hidden +#nullable disable + EndAddHtmlAttributeValues(__tagHelperExecutionContext); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + AddHtmlAttributeValue("", 528, new Microsoft.AspNetCore.Mvc.Razor.HelperResult(async(__razor_attribute_value_writer) => { + PushWriter(__razor_attribute_value_writer); +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + if (true) { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + Write(string.Empty); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + } else { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + Write(false); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" + } + +#line default +#line hidden +#nullable disable + PopWriter(); + } + ), 528, 44, false); + EndAddHtmlAttributeValues(__tagHelperExecutionContext); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_Runtime.ir.txt new file mode 100644 index 0000000000..72a0832670 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers_Runtime.ir.txt @@ -0,0 +1,127 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DynamicAttributeTagHelpers_Runtime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (33:1,0 [2] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (33:1,0 [2] DynamicAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (35:2,0 [40] DynamicAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes + HtmlAttributeValue - (51:2,16 [6] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (51:2,16 [6] DynamicAttributeTagHelpers.cshtml) - Html - prefix + CSharpExpressionAttributeValue - (57:2,22 [14] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (59:2,24 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - DateTime.Now + DefaultTagHelperExecute - + HtmlContent - (75:2,40 [4] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (75:2,40 [4] DynamicAttributeTagHelpers.cshtml) - Html - \n\n + TagHelper - (79:4,0 [71] DynamicAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes + CSharpCodeAttributeValue - (95:4,16 [44] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (96:4,17 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - if (true) { + CSharpExpression - (109:4,30 [12] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (109:4,30 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - string.Empty + IntermediateToken - (121:4,42 [10] DynamicAttributeTagHelpers.cshtml) - CSharp - } else { + CSharpExpression - (132:4,53 [5] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (132:4,53 [5] DynamicAttributeTagHelpers.cshtml) - CSharp - false + IntermediateToken - (137:4,58 [2] DynamicAttributeTagHelpers.cshtml) - CSharp - } + HtmlAttributeValue - (139:4,60 [7] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (140:4,61 [6] DynamicAttributeTagHelpers.cshtml) - Html - suffix + DefaultTagHelperExecute - + HtmlContent - (150:4,71 [4] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (150:4,71 [4] DynamicAttributeTagHelpers.cshtml) - Html - \n\n + TagHelper - (154:6,0 [83] DynamicAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperProperty - (168:6,14 [27] DynamicAttributeTagHelpers.cshtml) - bound - string TestNamespace.InputTagHelper.Bound - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (168:6,14 [7] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (168:6,14 [6] DynamicAttributeTagHelpers.cshtml) - Html - prefix + IntermediateToken - (174:6,20 [1] DynamicAttributeTagHelpers.cshtml) - Html - + CSharpExpression - (176:6,22 [12] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (176:6,22 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - DateTime.Now + HtmlContent - (188:6,34 [7] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (188:6,34 [7] DynamicAttributeTagHelpers.cshtml) - Html - suffix + DefaultTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes + HtmlAttributeValue - (206:6,52 [6] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (206:6,52 [6] DynamicAttributeTagHelpers.cshtml) - Html - prefix + CSharpExpressionAttributeValue - (212:6,58 [14] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (214:6,60 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - DateTime.Now + HtmlAttributeValue - (226:6,72 [7] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (227:6,73 [6] DynamicAttributeTagHelpers.cshtml) - Html - suffix + DefaultTagHelperExecute - + HtmlContent - (237:6,83 [4] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (237:6,83 [4] DynamicAttributeTagHelpers.cshtml) - Html - \n\n + TagHelper - (241:8,0 [183] DynamicAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperProperty - (255:8,14 [73] DynamicAttributeTagHelpers.cshtml) - bound - string TestNamespace.InputTagHelper.Bound - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (256:8,15 [13] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (256:8,15 [13] DynamicAttributeTagHelpers.cshtml) - CSharp - long.MinValue + HtmlContent - (269:8,28 [1] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (269:8,28 [1] DynamicAttributeTagHelpers.cshtml) - Html - + CSharpCode - (271:8,30 [12] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (271:8,30 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - if (true) { + CSharpExpression - (284:8,43 [12] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (284:8,43 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - string.Empty + CSharpCode - (296:8,55 [10] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (296:8,55 [10] DynamicAttributeTagHelpers.cshtml) - CSharp - } else { + CSharpExpression - (307:8,66 [5] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (307:8,66 [5] DynamicAttributeTagHelpers.cshtml) - CSharp - false + CSharpCode - (312:8,71 [2] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (312:8,71 [2] DynamicAttributeTagHelpers.cshtml) - CSharp - } + HtmlContent - (314:8,73 [1] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (314:8,73 [1] DynamicAttributeTagHelpers.cshtml) - Html - + CSharpExpression - (316:8,75 [12] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (316:8,75 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - int.MaxValue + DefaultTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpressionAttributeValue - (347:9,16 [14] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (348:9,17 [13] DynamicAttributeTagHelpers.cshtml) - CSharp - long.MinValue + CSharpCodeAttributeValue - (361:9,30 [45] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (363:9,32 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - if (true) { + CSharpExpression - (376:9,45 [12] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (376:9,45 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - string.Empty + IntermediateToken - (388:9,57 [10] DynamicAttributeTagHelpers.cshtml) - CSharp - } else { + CSharpExpression - (399:9,68 [5] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (399:9,68 [5] DynamicAttributeTagHelpers.cshtml) - CSharp - false + IntermediateToken - (404:9,73 [2] DynamicAttributeTagHelpers.cshtml) - CSharp - } + CSharpExpressionAttributeValue - (406:9,75 [14] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (408:9,77 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - int.MaxValue + DefaultTagHelperExecute - + HtmlContent - (424:9,93 [4] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (424:9,93 [4] DynamicAttributeTagHelpers.cshtml) - Html - \n\n + TagHelper - (428:11,0 [80] DynamicAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpressionAttributeValue - (444:11,16 [14] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (445:11,17 [13] DynamicAttributeTagHelpers.cshtml) - CSharp - long.MinValue + CSharpExpressionAttributeValue - (458:11,30 [14] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (460:11,32 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - DateTime.Now + HtmlAttributeValue - (472:11,44 [7] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (473:11,45 [6] DynamicAttributeTagHelpers.cshtml) - Html - static + HtmlAttributeValue - (479:11,51 [11] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (483:11,55 [7] DynamicAttributeTagHelpers.cshtml) - Html - content + CSharpExpressionAttributeValue - (490:11,62 [14] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (492:11,64 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - int.MaxValue + DefaultTagHelperExecute - + HtmlContent - (508:11,80 [4] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (508:11,80 [4] DynamicAttributeTagHelpers.cshtml) - Html - \n\n + TagHelper - (512:13,0 [64] DynamicAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes + CSharpCodeAttributeValue - (528:13,16 [44] DynamicAttributeTagHelpers.cshtml) - + IntermediateToken - (529:13,17 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - if (true) { + CSharpExpression - (542:13,30 [12] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (542:13,30 [12] DynamicAttributeTagHelpers.cshtml) - CSharp - string.Empty + IntermediateToken - (554:13,42 [10] DynamicAttributeTagHelpers.cshtml) - CSharp - } else { + CSharpExpression - (565:13,53 [5] DynamicAttributeTagHelpers.cshtml) + IntermediateToken - (565:13,53 [5] DynamicAttributeTagHelpers.cshtml) - CSharp - false + IntermediateToken - (570:13,58 [2] DynamicAttributeTagHelpers.cshtml) - CSharp - } + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml new file mode 100644 index 0000000000..d68f666f72 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml @@ -0,0 +1,8 @@ +@addTagHelper *, TestAssembly + +
        + +

        + +

        +
        \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_DesignTime.codegen.cs new file mode 100644 index 0000000000..34c56f0832 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_DesignTime.codegen.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyAttributeTagHelpers_DesignTime + { + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __TestNamespace_InputTagHelper.Type = ""; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = ; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __TestNamespace_InputTagHelper.Type = ""; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = ; + +#line default +#line hidden +#nullable disable + __TestNamespace_PTagHelper = CreateTagHelper(); +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml" +__TestNamespace_PTagHelper.Age = ; + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_DesignTime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_DesignTime.diagnostics.txt new file mode 100644 index 0000000000..0b20997aff --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_DesignTime.diagnostics.txt @@ -0,0 +1,3 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml(4,18): Error RZ2008: Attribute 'checked' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml(5,8): Error RZ2008: Attribute 'age' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml(6,23): Error RZ2008: Attribute 'checked' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_DesignTime.ir.txt new file mode 100644 index 0000000000..2f02db5b87 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_DesignTime.ir.txt @@ -0,0 +1,68 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyAttributeTagHelpers_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + DesignTimeDirective - + DirectiveToken - (14:0,14 [15] EmptyAttributeTagHelpers.cshtml) - *, TestAssembly + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (29:0,29 [15] EmptyAttributeTagHelpers.cshtml) + IntermediateToken - (29:0,29 [4] EmptyAttributeTagHelpers.cshtml) - Html - \n\n + IntermediateToken - (33:2,0 [4] EmptyAttributeTagHelpers.cshtml) - Html -
        + IntermediateToken - (38:2,5 [6] EmptyAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (44:3,4 [34] EmptyAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (56:3,16 [0] EmptyAttributeTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (56:3,16 [0] EmptyAttributeTagHelpers.cshtml) + IntermediateToken - (56:3,16 [0] EmptyAttributeTagHelpers.cshtml) - Html - + DefaultTagHelperProperty - (56:3,16 [0] EmptyAttributeTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (56:3,16 [0] EmptyAttributeTagHelpers.cshtml) + IntermediateToken - (56:3,16 [0] EmptyAttributeTagHelpers.cshtml) - Html - + DefaultTagHelperProperty - (66:3,26 [0] EmptyAttributeTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (66:3,26 [0] EmptyAttributeTagHelpers.cshtml) - CSharp - + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (74:3,34 [0] EmptyAttributeTagHelpers.cshtml) + IntermediateToken - (74:3,34 [0] EmptyAttributeTagHelpers.cshtml) - Html - + DefaultTagHelperExecute - + HtmlContent - (78:3,38 [6] EmptyAttributeTagHelpers.cshtml) + IntermediateToken - (78:3,38 [6] EmptyAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (84:4,4 [64] EmptyAttributeTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (94:4,14 [10] EmptyAttributeTagHelpers.cshtml) + IntermediateToken - (94:4,14 [10] EmptyAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (104:5,8 [34] EmptyAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (117:5,21 [0] EmptyAttributeTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (117:5,21 [0] EmptyAttributeTagHelpers.cshtml) + IntermediateToken - (117:5,21 [0] EmptyAttributeTagHelpers.cshtml) - Html - + DefaultTagHelperProperty - (117:5,21 [0] EmptyAttributeTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (117:5,21 [0] EmptyAttributeTagHelpers.cshtml) + IntermediateToken - (117:5,21 [0] EmptyAttributeTagHelpers.cshtml) - Html - + DefaultTagHelperProperty - (126:5,30 [0] EmptyAttributeTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (126:5,30 [0] EmptyAttributeTagHelpers.cshtml) - CSharp - + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (134:5,38 [0] EmptyAttributeTagHelpers.cshtml) + IntermediateToken - (134:5,38 [0] EmptyAttributeTagHelpers.cshtml) - Html - + DefaultTagHelperExecute - + HtmlContent - (138:5,42 [6] EmptyAttributeTagHelpers.cshtml) + IntermediateToken - (138:5,42 [6] EmptyAttributeTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (92:4,12 [0] EmptyAttributeTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.SingleQuotes + IntermediateToken - (92:4,12 [0] EmptyAttributeTagHelpers.cshtml) - CSharp - + DefaultTagHelperExecute - + HtmlContent - (148:6,8 [8] EmptyAttributeTagHelpers.cshtml) + IntermediateToken - (148:6,8 [2] EmptyAttributeTagHelpers.cshtml) - Html - \n + IntermediateToken - (150:7,0 [6] EmptyAttributeTagHelpers.cshtml) - Html -
        diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_DesignTime.mappings.txt new file mode 100644 index 0000000000..d1f300d541 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_DesignTime.mappings.txt @@ -0,0 +1,20 @@ +Source Location: (14:0,14 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml) +|*, TestAssembly| +Generated Location: (802:15,38 [15] ) +|*, TestAssembly| + +Source Location: (66:3,26 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml) +|| +Generated Location: (1698:36,42 [0] ) +|| + +Source Location: (126:5,30 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml) +|| +Generated Location: (2264:47,42 [0] ) +|| + +Source Location: (92:4,12 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml) +|| +Generated Location: (2564:55,33 [0] ) +|| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_Runtime.codegen.cs new file mode 100644 index 0000000000..4c9ace1134 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_Runtime.codegen.cs @@ -0,0 +1,120 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "9c86b0d6e2a590a85271afa26a21f39597a68e3f" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyAttributeTagHelpers_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"9c86b0d6e2a590a85271afa26a21f39597a68e3f", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyAttributeTagHelpers_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString(""), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n
        \r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = ; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = ; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml" +__TestNamespace_PTagHelper.Age = ; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n
        "); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_Runtime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_Runtime.diagnostics.txt new file mode 100644 index 0000000000..0b20997aff --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_Runtime.diagnostics.txt @@ -0,0 +1,3 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml(4,18): Error RZ2008: Attribute 'checked' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml(5,8): Error RZ2008: Attribute 'age' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml(6,23): Error RZ2008: Attribute 'checked' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_Runtime.ir.txt new file mode 100644 index 0000000000..19769026c0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers_Runtime.ir.txt @@ -0,0 +1,52 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyAttributeTagHelpers_Runtime - - + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_0 - type - - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_1 - class - - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:1,0 [13] EmptyAttributeTagHelpers.cshtml) + IntermediateToken - (31:1,0 [2] EmptyAttributeTagHelpers.cshtml) - Html - \n + IntermediateToken - (33:2,0 [4] EmptyAttributeTagHelpers.cshtml) - Html -
        + IntermediateToken - (38:2,5 [6] EmptyAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (44:3,4 [34] EmptyAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + PreallocatedTagHelperProperty - (56:3,16 [0] EmptyAttributeTagHelpers.cshtml) - __tagHelperAttribute_0 - type - Type + PreallocatedTagHelperProperty - (56:3,16 [0] EmptyAttributeTagHelpers.cshtml) - __tagHelperAttribute_0 - type - Type + DefaultTagHelperProperty - (66:3,26 [0] EmptyAttributeTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (66:3,26 [0] EmptyAttributeTagHelpers.cshtml) - CSharp - + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 + DefaultTagHelperExecute - + HtmlContent - (78:3,38 [6] EmptyAttributeTagHelpers.cshtml) + IntermediateToken - (78:3,38 [6] EmptyAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (84:4,4 [64] EmptyAttributeTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (94:4,14 [10] EmptyAttributeTagHelpers.cshtml) + IntermediateToken - (94:4,14 [10] EmptyAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (104:5,8 [34] EmptyAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + PreallocatedTagHelperProperty - (117:5,21 [0] EmptyAttributeTagHelpers.cshtml) - __tagHelperAttribute_0 - type - Type + PreallocatedTagHelperProperty - (117:5,21 [0] EmptyAttributeTagHelpers.cshtml) - __tagHelperAttribute_0 - type - Type + DefaultTagHelperProperty - (126:5,30 [0] EmptyAttributeTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (126:5,30 [0] EmptyAttributeTagHelpers.cshtml) - CSharp - + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 + DefaultTagHelperExecute - + HtmlContent - (138:5,42 [6] EmptyAttributeTagHelpers.cshtml) + IntermediateToken - (138:5,42 [6] EmptyAttributeTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (92:4,12 [0] EmptyAttributeTagHelpers.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.SingleQuotes + IntermediateToken - (92:4,12 [0] EmptyAttributeTagHelpers.cshtml) - CSharp - + DefaultTagHelperExecute - + HtmlContent - (148:6,8 [8] EmptyAttributeTagHelpers.cshtml) + IntermediateToken - (148:6,8 [2] EmptyAttributeTagHelpers.cshtml) - Html - \n + IntermediateToken - (150:7,0 [6] EmptyAttributeTagHelpers.cshtml) - Html -
        diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock.cshtml new file mode 100644 index 0000000000..0366199cd5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock.cshtml @@ -0,0 +1,3 @@ +This is markup + +@{} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.codegen.cs new file mode 100644 index 0000000000..147fb7b23a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.codegen.cs @@ -0,0 +1,29 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyCodeBlock_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock.cshtml" + + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.ir.txt new file mode 100644 index 0000000000..1da8246eee --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.ir.txt @@ -0,0 +1,15 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyCodeBlock_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] EmptyCodeBlock.cshtml) + IntermediateToken - (0:0,0 [18] EmptyCodeBlock.cshtml) - Html - This is markup\n\n + CSharpCode - (20:2,2 [0] EmptyCodeBlock.cshtml) + IntermediateToken - (20:2,2 [0] EmptyCodeBlock.cshtml) - CSharp - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.mappings.txt new file mode 100644 index 0000000000..c2efdcaf76 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.mappings.txt @@ -0,0 +1,5 @@ +Source Location: (20:2,2 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock.cshtml) +|| +Generated Location: (748:19,2 [0] ) +|| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_Runtime.codegen.cs new file mode 100644 index 0000000000..d7513d8023 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_Runtime.codegen.cs @@ -0,0 +1,19 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "fdc98942fed24e572b86269f89a808b0c606cef1" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyCodeBlock_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"fdc98942fed24e572b86269f89a808b0c606cef1", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyCodeBlock_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("This is markup\r\n\r\n"); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_Runtime.ir.txt new file mode 100644 index 0000000000..75e7307e0f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_Runtime.ir.txt @@ -0,0 +1,10 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyCodeBlock_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] EmptyCodeBlock.cshtml) + IntermediateToken - (0:0,0 [18] EmptyCodeBlock.cshtml) - Html - This is markup\n\n + CSharpCode - (20:2,2 [0] EmptyCodeBlock.cshtml) + IntermediateToken - (20:2,2 [0] EmptyCodeBlock.cshtml) - CSharp - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression.cshtml new file mode 100644 index 0000000000..6790c7eba2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression.cshtml @@ -0,0 +1,3 @@ +This is markup + +@() \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.codegen.cs new file mode 100644 index 0000000000..a4e6956477 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.codegen.cs @@ -0,0 +1,29 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyExplicitExpression_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression.cshtml" +__o = ; + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.ir.txt new file mode 100644 index 0000000000..cca09001e8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.ir.txt @@ -0,0 +1,15 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyExplicitExpression_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] EmptyExplicitExpression.cshtml) + IntermediateToken - (0:0,0 [18] EmptyExplicitExpression.cshtml) - Html - This is markup\n\n + CSharpExpression - (20:2,2 [0] EmptyExplicitExpression.cshtml) + IntermediateToken - (20:2,2 [0] EmptyExplicitExpression.cshtml) - CSharp - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.mappings.txt new file mode 100644 index 0000000000..3f7d10ade3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.mappings.txt @@ -0,0 +1,5 @@ +Source Location: (20:2,2 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression.cshtml) +|| +Generated Location: (770:19,6 [0] ) +|| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.codegen.cs new file mode 100644 index 0000000000..60274099a9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.codegen.cs @@ -0,0 +1,26 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "25dc9cf13110b5af9a1ca31a8f02abdc45a37244" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyExplicitExpression_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"25dc9cf13110b5af9a1ca31a8f02abdc45a37244", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyExplicitExpression_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("This is markup\r\n\r\n"); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression.cshtml" +Write(); + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.ir.txt new file mode 100644 index 0000000000..c3daa8feb5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.ir.txt @@ -0,0 +1,10 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyExplicitExpression_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] EmptyExplicitExpression.cshtml) + IntermediateToken - (0:0,0 [18] EmptyExplicitExpression.cshtml) - Html - This is markup\n\n + CSharpExpression - (20:2,2 [0] EmptyExplicitExpression.cshtml) + IntermediateToken - (20:2,2 [0] EmptyExplicitExpression.cshtml) - CSharp - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression.cshtml new file mode 100644 index 0000000000..021306da6b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression.cshtml @@ -0,0 +1,3 @@ +This is markup + +@! \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml new file mode 100644 index 0000000000..a1db8cd602 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml @@ -0,0 +1,3 @@ +@{ + @ +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.codegen.cs new file mode 100644 index 0000000000..eaaeed80bc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.codegen.cs @@ -0,0 +1,44 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyImplicitExpressionInCode_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml" +__o = ; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml" + + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.diagnostics.txt new file mode 100644 index 0000000000..84ac278f6d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.diagnostics.txt @@ -0,0 +1 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml(2,6): Error RZ1003: A space or line break was encountered after the "@" character. Only valid identifiers, keywords, comments, "(" and "{" are valid at the start of a code block and they must occur immediately following "@" with no space in between. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.ir.txt new file mode 100644 index 0000000000..d167e2f6b9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.ir.txt @@ -0,0 +1,17 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyImplicitExpressionInCode_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [6] EmptyImplicitExpressionInCode.cshtml) + IntermediateToken - (2:0,2 [6] EmptyImplicitExpressionInCode.cshtml) - CSharp - \n + CSharpExpression - (9:1,5 [0] EmptyImplicitExpressionInCode.cshtml) + IntermediateToken - (9:1,5 [0] EmptyImplicitExpressionInCode.cshtml) - CSharp - + CSharpCode - (9:1,5 [2] EmptyImplicitExpressionInCode.cshtml) + IntermediateToken - (9:1,5 [2] EmptyImplicitExpressionInCode.cshtml) - CSharp - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.mappings.txt new file mode 100644 index 0000000000..9ba6343fc1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.mappings.txt @@ -0,0 +1,19 @@ +Source Location: (2:0,2 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml) +| + | +Generated Location: (778:19,2 [6] ) +| + | + +Source Location: (9:1,5 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml) +|| +Generated Location: (966:27,6 [0] ) +|| + +Source Location: (9:1,5 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml) +| +| +Generated Location: (1148:34,5 [2] ) +| +| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.codegen.cs new file mode 100644 index 0000000000..fb302c2676 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.codegen.cs @@ -0,0 +1,25 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "bf754c5b319ea54f6c9636bd2815d4b47d11886d" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyImplicitExpressionInCode_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"bf754c5b319ea54f6c9636bd2815d4b47d11886d", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyImplicitExpressionInCode_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml" +Write(); + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.diagnostics.txt new file mode 100644 index 0000000000..84ac278f6d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.diagnostics.txt @@ -0,0 +1 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml(2,6): Error RZ1003: A space or line break was encountered after the "@" character. Only valid identifiers, keywords, comments, "(" and "{" are valid at the start of a code block and they must occur immediately following "@" with no space in between. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.ir.txt new file mode 100644 index 0000000000..b910f3841c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.ir.txt @@ -0,0 +1,12 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyImplicitExpressionInCode_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [6] EmptyImplicitExpressionInCode.cshtml) + IntermediateToken - (2:0,2 [6] EmptyImplicitExpressionInCode.cshtml) - CSharp - \n + CSharpExpression - (9:1,5 [0] EmptyImplicitExpressionInCode.cshtml) + IntermediateToken - (9:1,5 [0] EmptyImplicitExpressionInCode.cshtml) - CSharp - + CSharpCode - (9:1,5 [2] EmptyImplicitExpressionInCode.cshtml) + IntermediateToken - (9:1,5 [2] EmptyImplicitExpressionInCode.cshtml) - CSharp - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.codegen.cs new file mode 100644 index 0000000000..cccfe56121 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.codegen.cs @@ -0,0 +1,29 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyImplicitExpression_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression.cshtml" +__o = ; + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.diagnostics.txt new file mode 100644 index 0000000000..5524460d0c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.diagnostics.txt @@ -0,0 +1 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression.cshtml(3,2): Error RZ1005: "!" is not valid at the start of a code block. Only identifiers, keywords, comments, "(" and "{" are valid. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.ir.txt new file mode 100644 index 0000000000..60189098dc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.ir.txt @@ -0,0 +1,17 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyImplicitExpression_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] EmptyImplicitExpression.cshtml) + IntermediateToken - (0:0,0 [18] EmptyImplicitExpression.cshtml) - Html - This is markup\n\n + CSharpExpression - (19:2,1 [0] EmptyImplicitExpression.cshtml) + IntermediateToken - (19:2,1 [0] EmptyImplicitExpression.cshtml) - CSharp - + HtmlContent - (19:2,1 [1] EmptyImplicitExpression.cshtml) + IntermediateToken - (19:2,1 [1] EmptyImplicitExpression.cshtml) - Html - ! diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.mappings.txt new file mode 100644 index 0000000000..d3539655ec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.mappings.txt @@ -0,0 +1,5 @@ +Source Location: (19:2,1 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression.cshtml) +|| +Generated Location: (770:19,6 [0] ) +|| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.codegen.cs new file mode 100644 index 0000000000..9506f47a3e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.codegen.cs @@ -0,0 +1,27 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "4c215c8ff3e726be334183020106682e47cf8ace" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyImplicitExpression_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"4c215c8ff3e726be334183020106682e47cf8ace", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyImplicitExpression_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("This is markup\r\n\r\n"); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression.cshtml" +Write(); + +#line default +#line hidden +#nullable disable + WriteLiteral("!"); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.diagnostics.txt new file mode 100644 index 0000000000..5524460d0c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.diagnostics.txt @@ -0,0 +1 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression.cshtml(3,2): Error RZ1005: "!" is not valid at the start of a code block. Only identifiers, keywords, comments, "(" and "{" are valid. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.ir.txt new file mode 100644 index 0000000000..e4187049bb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.ir.txt @@ -0,0 +1,12 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyImplicitExpression_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] EmptyImplicitExpression.cshtml) + IntermediateToken - (0:0,0 [18] EmptyImplicitExpression.cshtml) - Html - This is markup\n\n + CSharpExpression - (19:2,1 [0] EmptyImplicitExpression.cshtml) + IntermediateToken - (19:2,1 [0] EmptyImplicitExpression.cshtml) - CSharp - + HtmlContent - (19:2,1 [1] EmptyImplicitExpression.cshtml) + IntermediateToken - (19:2,1 [1] EmptyImplicitExpression.cshtml) - Html - ! diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml new file mode 100644 index 0000000000..d949682156 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml @@ -0,0 +1,11 @@ +@addTagHelper "*, TestAssembly" + +@{ + var enumValue = MyEnum.MyValue; +} + + + + + + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_DesignTime.codegen.cs new file mode 100644 index 0000000000..44a0cfabe6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_DesignTime.codegen.cs @@ -0,0 +1,101 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EnumTagHelpers_DesignTime + { + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.CatchAllTagHelper __TestNamespace_CatchAllTagHelper; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" + + var enumValue = MyEnum.MyValue; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" +__TestNamespace_InputTagHelper.Value = MyEnum.MyValue; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" + __o = MyEnum.MySecondValue; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" +__TestNamespace_InputTagHelper.Value = global::Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum.MyValue; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" +__TestNamespace_InputTagHelper.Value = global::Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum.MySecondValue; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" +__TestNamespace_CatchAllTagHelper.CatchAll = global::Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum.MyValue; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" +__TestNamespace_InputTagHelper.Value = enumValue; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" +__TestNamespace_CatchAllTagHelper.CatchAll = enumValue; + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_DesignTime.ir.txt new file mode 100644 index 0000000000..2418da2ba7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_DesignTime.ir.txt @@ -0,0 +1,74 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EnumTagHelpers_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.CatchAllTagHelper - __TestNamespace_CatchAllTagHelper + DesignTimeDirective - + DirectiveToken - (14:0,14 [17] EnumTagHelpers.cshtml) - "*, TestAssembly" + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:0,31 [4] EnumTagHelpers.cshtml) + IntermediateToken - (31:0,31 [4] EnumTagHelpers.cshtml) - Html - \n\n + CSharpCode - (37:2,2 [39] EnumTagHelpers.cshtml) + IntermediateToken - (37:2,2 [39] EnumTagHelpers.cshtml) - CSharp - \n var enumValue = MyEnum.MyValue;\n + HtmlContent - (79:5,0 [2] EnumTagHelpers.cshtml) + IntermediateToken - (79:5,0 [2] EnumTagHelpers.cshtml) - Html - \n + TagHelper - (81:6,0 [33] EnumTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperProperty - (95:6,14 [15] EnumTagHelpers.cshtml) - value - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum TestNamespace.InputTagHelper.Value - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (96:6,15 [14] EnumTagHelpers.cshtml) + IntermediateToken - (96:6,15 [14] EnumTagHelpers.cshtml) - CSharp - MyEnum.MyValue + DefaultTagHelperExecute - + HtmlContent - (114:6,33 [2] EnumTagHelpers.cshtml) + IntermediateToken - (114:6,33 [2] EnumTagHelpers.cshtml) - Html - \n + TagHelper - (116:7,0 [39] EnumTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpressionAttributeValue - (130:7,14 [21] EnumTagHelpers.cshtml) - + IntermediateToken - (131:7,15 [20] EnumTagHelpers.cshtml) - CSharp - MyEnum.MySecondValue + DefaultTagHelperExecute - + HtmlContent - (155:7,39 [2] EnumTagHelpers.cshtml) + IntermediateToken - (155:7,39 [2] EnumTagHelpers.cshtml) - Html - \n + TagHelper - (157:8,0 [25] EnumTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperProperty - (171:8,14 [7] EnumTagHelpers.cshtml) - value - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum TestNamespace.InputTagHelper.Value - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (171:8,14 [7] EnumTagHelpers.cshtml) - CSharp - MyValue + DefaultTagHelperExecute - + HtmlContent - (182:8,25 [2] EnumTagHelpers.cshtml) + IntermediateToken - (182:8,25 [2] EnumTagHelpers.cshtml) - Html - \n + TagHelper - (184:9,0 [50] EnumTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperProperty - (198:9,14 [13] EnumTagHelpers.cshtml) - value - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum TestNamespace.InputTagHelper.Value - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (198:9,14 [13] EnumTagHelpers.cshtml) - CSharp - MySecondValue + DefaultTagHelperProperty - (224:9,40 [7] EnumTagHelpers.cshtml) - catch-all - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum TestNamespace.CatchAllTagHelper.CatchAll - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (224:9,40 [7] EnumTagHelpers.cshtml) - CSharp - MyValue + DefaultTagHelperExecute - + HtmlContent - (234:9,50 [2] EnumTagHelpers.cshtml) + IntermediateToken - (234:9,50 [2] EnumTagHelpers.cshtml) - Html - \n + TagHelper - (236:10,0 [51] EnumTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperProperty - (250:10,14 [10] EnumTagHelpers.cshtml) - value - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum TestNamespace.InputTagHelper.Value - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (251:10,15 [9] EnumTagHelpers.cshtml) + IntermediateToken - (251:10,15 [9] EnumTagHelpers.cshtml) - CSharp - enumValue + DefaultTagHelperProperty - (273:10,37 [10] EnumTagHelpers.cshtml) - catch-all - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum TestNamespace.CatchAllTagHelper.CatchAll - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (274:10,38 [9] EnumTagHelpers.cshtml) + IntermediateToken - (274:10,38 [9] EnumTagHelpers.cshtml) - CSharp - enumValue + DefaultTagHelperExecute - + HtmlContent - (287:10,51 [2] EnumTagHelpers.cshtml) + IntermediateToken - (287:10,51 [2] EnumTagHelpers.cshtml) - Html - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_DesignTime.mappings.txt new file mode 100644 index 0000000000..2c8365b953 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_DesignTime.mappings.txt @@ -0,0 +1,49 @@ +Source Location: (14:0,14 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml) +|"*, TestAssembly"| +Generated Location: (707:14,37 [17] ) +|"*, TestAssembly"| + +Source Location: (37:2,2 [39] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml) +| + var enumValue = MyEnum.MyValue; +| +Generated Location: (1202:31,2 [39] ) +| + var enumValue = MyEnum.MyValue; +| + +Source Location: (96:6,15 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml) +|MyEnum.MyValue| +Generated Location: (1651:41,39 [14] ) +|MyEnum.MyValue| + +Source Location: (131:7,15 [20] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml) +|MyEnum.MySecondValue| +Generated Location: (2054:50,15 [20] ) +|MyEnum.MySecondValue| + +Source Location: (171:8,14 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml) +|MyValue| +Generated Location: (2580:59,132 [7] ) +|MyValue| + +Source Location: (198:9,14 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml) +|MySecondValue| +Generated Location: (3094:68,132 [13] ) +|MySecondValue| + +Source Location: (224:9,40 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml) +|MyValue| +Generated Location: (3408:75,138 [7] ) +|MyValue| + +Source Location: (251:10,15 [9] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml) +|enumValue| +Generated Location: (3829:84,39 [9] ) +|enumValue| + +Source Location: (274:10,38 [9] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml) +|enumValue| +Generated Location: (4046:91,45 [9] ) +|enumValue| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_Runtime.codegen.cs new file mode 100644 index 0000000000..264b4af248 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_Runtime.codegen.cs @@ -0,0 +1,180 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "a605351a30b7fef3db7e3f61a70a62e29a6badf8" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EnumTagHelpers_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"a605351a30b7fef3db7e3f61a70a62e29a6badf8", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EnumTagHelpers_Runtime + { + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.CatchAllTagHelper __TestNamespace_CatchAllTagHelper; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" + + var enumValue = MyEnum.MyValue; + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" +__TestNamespace_InputTagHelper.Value = MyEnum.MyValue; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("value", __TestNamespace_InputTagHelper.Value, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "class", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" +AddHtmlAttributeValue("", 130, MyEnum.MySecondValue, 130, 21, false); + +#line default +#line hidden +#nullable disable + EndAddHtmlAttributeValues(__tagHelperExecutionContext); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" +__TestNamespace_InputTagHelper.Value = global::Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum.MyValue; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("value", __TestNamespace_InputTagHelper.Value, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" +__TestNamespace_InputTagHelper.Value = global::Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum.MySecondValue; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("value", __TestNamespace_InputTagHelper.Value, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" +__TestNamespace_CatchAllTagHelper.CatchAll = global::Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum.MyValue; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("catch-all", __TestNamespace_CatchAllTagHelper.CatchAll, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" +__TestNamespace_InputTagHelper.Value = enumValue; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("value", __TestNamespace_InputTagHelper.Value, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" +__TestNamespace_CatchAllTagHelper.CatchAll = enumValue; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("catch-all", __TestNamespace_CatchAllTagHelper.CatchAll, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_Runtime.ir.txt new file mode 100644 index 0000000000..e38db1bbaa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers_Runtime.ir.txt @@ -0,0 +1,68 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EnumTagHelpers_Runtime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.CatchAllTagHelper - __TestNamespace_CatchAllTagHelper + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (33:1,0 [2] EnumTagHelpers.cshtml) + IntermediateToken - (33:1,0 [2] EnumTagHelpers.cshtml) - Html - \n + CSharpCode - (37:2,2 [39] EnumTagHelpers.cshtml) + IntermediateToken - (37:2,2 [39] EnumTagHelpers.cshtml) - CSharp - \n var enumValue = MyEnum.MyValue;\n + HtmlContent - (79:5,0 [2] EnumTagHelpers.cshtml) + IntermediateToken - (79:5,0 [2] EnumTagHelpers.cshtml) - Html - \n + TagHelper - (81:6,0 [33] EnumTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperProperty - (95:6,14 [15] EnumTagHelpers.cshtml) - value - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum TestNamespace.InputTagHelper.Value - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (96:6,15 [14] EnumTagHelpers.cshtml) + IntermediateToken - (96:6,15 [14] EnumTagHelpers.cshtml) - CSharp - MyEnum.MyValue + DefaultTagHelperExecute - + HtmlContent - (114:6,33 [2] EnumTagHelpers.cshtml) + IntermediateToken - (114:6,33 [2] EnumTagHelpers.cshtml) - Html - \n + TagHelper - (116:7,0 [39] EnumTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpressionAttributeValue - (130:7,14 [21] EnumTagHelpers.cshtml) - + IntermediateToken - (131:7,15 [20] EnumTagHelpers.cshtml) - CSharp - MyEnum.MySecondValue + DefaultTagHelperExecute - + HtmlContent - (155:7,39 [2] EnumTagHelpers.cshtml) + IntermediateToken - (155:7,39 [2] EnumTagHelpers.cshtml) - Html - \n + TagHelper - (157:8,0 [25] EnumTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperProperty - (171:8,14 [7] EnumTagHelpers.cshtml) - value - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum TestNamespace.InputTagHelper.Value - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (171:8,14 [7] EnumTagHelpers.cshtml) - CSharp - MyValue + DefaultTagHelperExecute - + HtmlContent - (182:8,25 [2] EnumTagHelpers.cshtml) + IntermediateToken - (182:8,25 [2] EnumTagHelpers.cshtml) - Html - \n + TagHelper - (184:9,0 [50] EnumTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperProperty - (198:9,14 [13] EnumTagHelpers.cshtml) - value - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum TestNamespace.InputTagHelper.Value - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (198:9,14 [13] EnumTagHelpers.cshtml) - CSharp - MySecondValue + DefaultTagHelperProperty - (224:9,40 [7] EnumTagHelpers.cshtml) - catch-all - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum TestNamespace.CatchAllTagHelper.CatchAll - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (224:9,40 [7] EnumTagHelpers.cshtml) - CSharp - MyValue + DefaultTagHelperExecute - + HtmlContent - (234:9,50 [2] EnumTagHelpers.cshtml) + IntermediateToken - (234:9,50 [2] EnumTagHelpers.cshtml) - Html - \n + TagHelper - (236:10,0 [51] EnumTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperProperty - (250:10,14 [10] EnumTagHelpers.cshtml) - value - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum TestNamespace.InputTagHelper.Value - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (251:10,15 [9] EnumTagHelpers.cshtml) + IntermediateToken - (251:10,15 [9] EnumTagHelpers.cshtml) - CSharp - enumValue + DefaultTagHelperProperty - (273:10,37 [10] EnumTagHelpers.cshtml) - catch-all - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestTagHelperDescriptors.MyEnum TestNamespace.CatchAllTagHelper.CatchAll - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (274:10,38 [9] EnumTagHelpers.cshtml) + IntermediateToken - (274:10,38 [9] EnumTagHelpers.cshtml) - CSharp - enumValue + DefaultTagHelperExecute - + HtmlContent - (287:10,51 [2] EnumTagHelpers.cshtml) + IntermediateToken - (287:10,51 [2] EnumTagHelpers.cshtml) - Html - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml new file mode 100644 index 0000000000..a7bc49af11 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml @@ -0,0 +1,8 @@ +@addTagHelper *, TestAssembly + + + + + Not a TagHelper: + + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_DesignTime.codegen.cs new file mode 100644 index 0000000000..d0907fd099 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_DesignTime.codegen.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EscapedTagHelpers_DesignTime + { + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml" + __o = DateTime.Now; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml" + __o = DateTime.Now; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper.Type = string.Empty; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml" + __TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_DesignTime.ir.txt new file mode 100644 index 0000000000..da8f57f185 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_DesignTime.ir.txt @@ -0,0 +1,71 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EscapedTagHelpers_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + DesignTimeDirective - + DirectiveToken - (14:0,14 [15] EscapedTagHelpers.cshtml) - *, TestAssembly + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (29:0,29 [5] EscapedTagHelpers.cshtml) + IntermediateToken - (29:0,29 [4] EscapedTagHelpers.cshtml) - Html - \n\n + IntermediateToken - (33:2,0 [1] EscapedTagHelpers.cshtml) - Html - < + HtmlContent - (35:2,2 [47] EscapedTagHelpers.cshtml) + IntermediateToken - (35:2,2 [3] EscapedTagHelpers.cshtml) - Html - div + IntermediateToken - (38:2,5 [36] EscapedTagHelpers.cshtml) - Html - class="randomNonTagHelperAttribute" + IntermediateToken - (74:2,41 [1] EscapedTagHelpers.cshtml) - Html - > + IntermediateToken - (75:2,42 [6] EscapedTagHelpers.cshtml) - Html - \n + IntermediateToken - (81:3,4 [1] EscapedTagHelpers.cshtml) - Html - < + HtmlContent - (83:3,6 [22] EscapedTagHelpers.cshtml) + IntermediateToken - (83:3,6 [1] EscapedTagHelpers.cshtml) - Html - p + IntermediateToken - (84:3,7 [20] EscapedTagHelpers.cshtml) - Html - class="Hello World" + IntermediateToken - (104:3,27 [1] EscapedTagHelpers.cshtml) - Html - + CSharpExpression - (106:3,29 [12] EscapedTagHelpers.cshtml) + IntermediateToken - (106:3,29 [12] EscapedTagHelpers.cshtml) - CSharp - DateTime.Now + HtmlContent - (118:3,41 [12] EscapedTagHelpers.cshtml) + IntermediateToken - (118:3,41 [1] EscapedTagHelpers.cshtml) - Html - > + IntermediateToken - (119:3,42 [10] EscapedTagHelpers.cshtml) - Html - \n + IntermediateToken - (129:4,8 [1] EscapedTagHelpers.cshtml) - Html - < + HtmlContent - (131:4,10 [31] EscapedTagHelpers.cshtml) + IntermediateToken - (131:4,10 [5] EscapedTagHelpers.cshtml) - Html - input + IntermediateToken - (136:4,15 [12] EscapedTagHelpers.cshtml) - Html - type="text" + IntermediateToken - (148:4,27 [1] EscapedTagHelpers.cshtml) - Html - + IntermediateToken - (149:4,28 [2] EscapedTagHelpers.cshtml) - Html - /> + IntermediateToken - (151:4,30 [10] EscapedTagHelpers.cshtml) - Html - \n + IntermediateToken - (161:5,8 [1] EscapedTagHelpers.cshtml) - Html - < + HtmlContent - (163:5,10 [22] EscapedTagHelpers.cshtml) + IntermediateToken - (163:5,10 [2] EscapedTagHelpers.cshtml) - Html - em + IntermediateToken - (165:5,12 [1] EscapedTagHelpers.cshtml) - Html - > + IntermediateToken - (166:5,13 [17] EscapedTagHelpers.cshtml) - Html - Not a TagHelper: + IntermediateToken - (183:5,30 [2] EscapedTagHelpers.cshtml) - Html - + IntermediateToken - (189:5,36 [1] EscapedTagHelpers.cshtml) - Html - + TagHelper - (190:5,37 [45] EscapedTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (203:5,50 [13] EscapedTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (204:5,51 [12] EscapedTagHelpers.cshtml) + IntermediateToken - (204:5,51 [12] EscapedTagHelpers.cshtml) - CSharp - DateTime.Now + DefaultTagHelperProperty - (203:5,50 [13] EscapedTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (204:5,51 [12] EscapedTagHelpers.cshtml) + IntermediateToken - (204:5,51 [12] EscapedTagHelpers.cshtml) - CSharp - DateTime.Now + DefaultTagHelperProperty - (227:5,74 [4] EscapedTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (227:5,74 [4] EscapedTagHelpers.cshtml) - CSharp - true + DefaultTagHelperExecute - + HtmlContent - (235:5,82 [8] EscapedTagHelpers.cshtml) + IntermediateToken - (235:5,82 [6] EscapedTagHelpers.cshtml) - Html - \n + IntermediateToken - (241:6,4 [2] EscapedTagHelpers.cshtml) - Html - + IntermediateToken - (246:6,9 [2] EscapedTagHelpers.cshtml) - Html - \n + IntermediateToken - (248:7,0 [2] EscapedTagHelpers.cshtml) - Html - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_DesignTime.mappings.txt new file mode 100644 index 0000000000..716a9799a4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_DesignTime.mappings.txt @@ -0,0 +1,20 @@ +Source Location: (14:0,14 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml) +|*, TestAssembly| +Generated Location: (710:14,38 [15] ) +|*, TestAssembly| + +Source Location: (106:3,29 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml) +|DateTime.Now| +Generated Location: (1234:31,29 [12] ) +|DateTime.Now| + +Source Location: (204:5,51 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml) +|DateTime.Now| +Generated Location: (1670:40,51 [12] ) +|DateTime.Now| + +Source Location: (227:5,74 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml) +|true| +Generated Location: (2075:49,74 [4] ) +|true| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_Runtime.codegen.cs new file mode 100644 index 0000000000..06a2adfcde --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_Runtime.codegen.cs @@ -0,0 +1,89 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "c1489e9dd98dc3e29bfbfd9a3f271ddec5134446" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EscapedTagHelpers_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"c1489e9dd98dc3e29bfbfd9a3f271ddec5134446", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EscapedTagHelpers_Runtime + { + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n<"); + WriteLiteral("div class=\"randomNonTagHelperAttribute\">\r\n <"); + WriteLiteral("p class=\"Hello World\" "); +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml" + Write(DateTime.Now); + +#line default +#line hidden +#nullable disable + WriteLiteral(">\r\n <"); + WriteLiteral("input type=\"text\" />\r\n <"); + WriteLiteral("em>Not a TagHelper: "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + BeginWriteTagHelperAttribute(); +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml" + WriteLiteral(DateTime.Now); + +#line default +#line hidden +#nullable disable + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer; + __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml" +__TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n \r\n"); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_Runtime.ir.txt new file mode 100644 index 0000000000..10ad7acf39 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers_Runtime.ir.txt @@ -0,0 +1,65 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EscapedTagHelpers_Runtime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:1,0 [3] EscapedTagHelpers.cshtml) + IntermediateToken - (31:1,0 [2] EscapedTagHelpers.cshtml) - Html - \n + IntermediateToken - (33:2,0 [1] EscapedTagHelpers.cshtml) - Html - < + HtmlContent - (35:2,2 [47] EscapedTagHelpers.cshtml) + IntermediateToken - (35:2,2 [3] EscapedTagHelpers.cshtml) - Html - div + IntermediateToken - (38:2,5 [36] EscapedTagHelpers.cshtml) - Html - class="randomNonTagHelperAttribute" + IntermediateToken - (74:2,41 [1] EscapedTagHelpers.cshtml) - Html - > + IntermediateToken - (75:2,42 [6] EscapedTagHelpers.cshtml) - Html - \n + IntermediateToken - (81:3,4 [1] EscapedTagHelpers.cshtml) - Html - < + HtmlContent - (83:3,6 [22] EscapedTagHelpers.cshtml) + IntermediateToken - (83:3,6 [1] EscapedTagHelpers.cshtml) - Html - p + IntermediateToken - (84:3,7 [20] EscapedTagHelpers.cshtml) - Html - class="Hello World" + IntermediateToken - (104:3,27 [1] EscapedTagHelpers.cshtml) - Html - + CSharpExpression - (106:3,29 [12] EscapedTagHelpers.cshtml) + IntermediateToken - (106:3,29 [12] EscapedTagHelpers.cshtml) - CSharp - DateTime.Now + HtmlContent - (118:3,41 [12] EscapedTagHelpers.cshtml) + IntermediateToken - (118:3,41 [1] EscapedTagHelpers.cshtml) - Html - > + IntermediateToken - (119:3,42 [10] EscapedTagHelpers.cshtml) - Html - \n + IntermediateToken - (129:4,8 [1] EscapedTagHelpers.cshtml) - Html - < + HtmlContent - (131:4,10 [31] EscapedTagHelpers.cshtml) + IntermediateToken - (131:4,10 [5] EscapedTagHelpers.cshtml) - Html - input + IntermediateToken - (136:4,15 [12] EscapedTagHelpers.cshtml) - Html - type="text" + IntermediateToken - (148:4,27 [1] EscapedTagHelpers.cshtml) - Html - + IntermediateToken - (149:4,28 [2] EscapedTagHelpers.cshtml) - Html - /> + IntermediateToken - (151:4,30 [10] EscapedTagHelpers.cshtml) - Html - \n + IntermediateToken - (161:5,8 [1] EscapedTagHelpers.cshtml) - Html - < + HtmlContent - (163:5,10 [22] EscapedTagHelpers.cshtml) + IntermediateToken - (163:5,10 [2] EscapedTagHelpers.cshtml) - Html - em + IntermediateToken - (165:5,12 [1] EscapedTagHelpers.cshtml) - Html - > + IntermediateToken - (166:5,13 [17] EscapedTagHelpers.cshtml) - Html - Not a TagHelper: + IntermediateToken - (183:5,30 [2] EscapedTagHelpers.cshtml) - Html - + IntermediateToken - (189:5,36 [1] EscapedTagHelpers.cshtml) - Html - + TagHelper - (190:5,37 [45] EscapedTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (203:5,50 [13] EscapedTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (204:5,51 [12] EscapedTagHelpers.cshtml) + IntermediateToken - (204:5,51 [12] EscapedTagHelpers.cshtml) - CSharp - DateTime.Now + DefaultTagHelperProperty - (203:5,50 [13] EscapedTagHelpers.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (204:5,51 [12] EscapedTagHelpers.cshtml) + IntermediateToken - (204:5,51 [12] EscapedTagHelpers.cshtml) - CSharp - DateTime.Now + DefaultTagHelperProperty - (227:5,74 [4] EscapedTagHelpers.cshtml) - checked - bool TestNamespace.InputTagHelper2.Checked - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (227:5,74 [4] EscapedTagHelpers.cshtml) - CSharp - true + DefaultTagHelperExecute - + HtmlContent - (235:5,82 [8] EscapedTagHelpers.cshtml) + IntermediateToken - (235:5,82 [6] EscapedTagHelpers.cshtml) - Html - \n + IntermediateToken - (241:6,4 [2] EscapedTagHelpers.cshtml) - Html - + IntermediateToken - (246:6,9 [2] EscapedTagHelpers.cshtml) - Html - \n + IntermediateToken - (248:7,0 [2] EscapedTagHelpers.cshtml) - Html - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression.cshtml new file mode 100644 index 0000000000..10730f1114 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression.cshtml @@ -0,0 +1 @@ +1 + 1 = @(1+1) \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF.cshtml new file mode 100644 index 0000000000..a0fdfc9a21 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF.cshtml @@ -0,0 +1,3 @@ +This is markup + +@( \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.codegen.cs new file mode 100644 index 0000000000..07bdbbe86b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.codegen.cs @@ -0,0 +1,29 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpressionAtEOF_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF.cshtml" +__o = ; + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.diagnostics.txt new file mode 100644 index 0000000000..4e0bfb131d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.diagnostics.txt @@ -0,0 +1 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF.cshtml(3,2): Error RZ1006: The explicit expression block is missing a closing ")" character. Make sure you have a matching ")" character for all the "(" characters within this block, and that none of the ")" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.ir.txt new file mode 100644 index 0000000000..947b28d727 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.ir.txt @@ -0,0 +1,15 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpressionAtEOF_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] ExplicitExpressionAtEOF.cshtml) + IntermediateToken - (0:0,0 [18] ExplicitExpressionAtEOF.cshtml) - Html - This is markup\n\n + CSharpExpression - (20:2,2 [0] ExplicitExpressionAtEOF.cshtml) + IntermediateToken - (20:2,2 [0] ExplicitExpressionAtEOF.cshtml) - CSharp - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.mappings.txt new file mode 100644 index 0000000000..a4208a7ee2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.mappings.txt @@ -0,0 +1,5 @@ +Source Location: (20:2,2 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF.cshtml) +|| +Generated Location: (770:19,6 [0] ) +|| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.codegen.cs new file mode 100644 index 0000000000..d3d9989be5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.codegen.cs @@ -0,0 +1,26 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "e8e095026beaca454b3a8d02b1548fa001d08214" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpressionAtEOF_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"e8e095026beaca454b3a8d02b1548fa001d08214", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpressionAtEOF_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("This is markup\r\n\r\n"); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF.cshtml" +Write(); + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.diagnostics.txt new file mode 100644 index 0000000000..4e0bfb131d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.diagnostics.txt @@ -0,0 +1 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF.cshtml(3,2): Error RZ1006: The explicit expression block is missing a closing ")" character. Make sure you have a matching ")" character for all the "(" characters within this block, and that none of the ")" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.ir.txt new file mode 100644 index 0000000000..5f459014c8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.ir.txt @@ -0,0 +1,10 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpressionAtEOF_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] ExplicitExpressionAtEOF.cshtml) + IntermediateToken - (0:0,0 [18] ExplicitExpressionAtEOF.cshtml) - Html - This is markup\n\n + CSharpExpression - (20:2,2 [0] ExplicitExpressionAtEOF.cshtml) + IntermediateToken - (20:2,2 [0] ExplicitExpressionAtEOF.cshtml) - CSharp - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup.cshtml new file mode 100644 index 0000000000..70d8cefd95 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup.cshtml @@ -0,0 +1 @@ +
        @(@
        \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.codegen.cs new file mode 100644 index 0000000000..2cc76e8ce5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.codegen.cs @@ -0,0 +1,31 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpressionWithMarkup_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup.cshtml" + __o = item => new Template(async(__razor_template_writer) => { +} +); + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.diagnostics.txt new file mode 100644 index 0000000000..16ad2a09d5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.diagnostics.txt @@ -0,0 +1,2 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup.cshtml(1,11): Error RZ1026: Encountered end tag "div" with no matching start tag. Are your start/end tags properly balanced? +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup.cshtml(1,7): Error RZ1006: The explicit expression block is missing a closing ")" character. Make sure you have a matching ")" character for all the "(" characters within this block, and that none of the ")" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.ir.txt new file mode 100644 index 0000000000..b38906f249 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.ir.txt @@ -0,0 +1,19 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpressionWithMarkup_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [5] ExplicitExpressionWithMarkup.cshtml) + IntermediateToken - (0:0,0 [4] ExplicitExpressionWithMarkup.cshtml) - Html -
        + CSharpExpression - (8:0,8 [6] ExplicitExpressionWithMarkup.cshtml) + Template - (8:0,8 [6] ExplicitExpressionWithMarkup.cshtml) + HtmlContent - (8:0,8 [6] ExplicitExpressionWithMarkup.cshtml) + IntermediateToken - (8:0,8 [6] ExplicitExpressionWithMarkup.cshtml) - Html -
        + IntermediateToken - (14:0,14 [0] ExplicitExpressionWithMarkup.cshtml) - CSharp - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.mappings.txt new file mode 100644 index 0000000000..62cc130627 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.mappings.txt @@ -0,0 +1,5 @@ +Source Location: (14:0,14 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup.cshtml) +|| +Generated Location: (844:21,1 [0] ) +|| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_Runtime.codegen.cs new file mode 100644 index 0000000000..fcdf711df5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_Runtime.codegen.cs @@ -0,0 +1,31 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "47d858755c07db489bd8824b7eaee760bb858bcb" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpressionWithMarkup_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"47d858755c07db489bd8824b7eaee760bb858bcb", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpressionWithMarkup_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("
        "); +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup.cshtml" + Write(item => new Template(async(__razor_template_writer) => { + PushWriter(__razor_template_writer); + WriteLiteral("
        "); + PopWriter(); +} +)); + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_Runtime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_Runtime.diagnostics.txt new file mode 100644 index 0000000000..16ad2a09d5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_Runtime.diagnostics.txt @@ -0,0 +1,2 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup.cshtml(1,11): Error RZ1026: Encountered end tag "div" with no matching start tag. Are your start/end tags properly balanced? +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup.cshtml(1,7): Error RZ1006: The explicit expression block is missing a closing ")" character. Make sure you have a matching ")" character for all the "(" characters within this block, and that none of the ")" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_Runtime.ir.txt new file mode 100644 index 0000000000..8764a82186 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_Runtime.ir.txt @@ -0,0 +1,14 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpressionWithMarkup_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [5] ExplicitExpressionWithMarkup.cshtml) + IntermediateToken - (0:0,0 [4] ExplicitExpressionWithMarkup.cshtml) - Html -
        + CSharpExpression - (8:0,8 [6] ExplicitExpressionWithMarkup.cshtml) + Template - (8:0,8 [6] ExplicitExpressionWithMarkup.cshtml) + HtmlContent - (8:0,8 [6] ExplicitExpressionWithMarkup.cshtml) + IntermediateToken - (8:0,8 [6] ExplicitExpressionWithMarkup.cshtml) - Html -
        + IntermediateToken - (14:0,14 [0] ExplicitExpressionWithMarkup.cshtml) - CSharp - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_DesignTime.codegen.cs new file mode 100644 index 0000000000..7b344876fd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_DesignTime.codegen.cs @@ -0,0 +1,29 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpression_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression.cshtml" + __o = 1+1; + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_DesignTime.ir.txt new file mode 100644 index 0000000000..b2f22a261b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_DesignTime.ir.txt @@ -0,0 +1,15 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpression_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [8] ExplicitExpression.cshtml) + IntermediateToken - (0:0,0 [8] ExplicitExpression.cshtml) - Html - 1 + 1 = + CSharpExpression - (10:0,10 [3] ExplicitExpression.cshtml) + IntermediateToken - (10:0,10 [3] ExplicitExpression.cshtml) - CSharp - 1+1 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_DesignTime.mappings.txt new file mode 100644 index 0000000000..e4720d0660 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_DesignTime.mappings.txt @@ -0,0 +1,5 @@ +Source Location: (10:0,10 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression.cshtml) +|1+1| +Generated Location: (764:19,10 [3] ) +|1+1| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_Runtime.codegen.cs new file mode 100644 index 0000000000..8f6c52477e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_Runtime.codegen.cs @@ -0,0 +1,26 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "0fa6894c606c7426da1d8cacfbacf8be971c777f" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpression_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"0fa6894c606c7426da1d8cacfbacf8be971c777f", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpression_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("1 + 1 = "); +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression.cshtml" + Write(1+1); + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_Runtime.ir.txt new file mode 100644 index 0000000000..c1867efbb6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_Runtime.ir.txt @@ -0,0 +1,10 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpression_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [8] ExplicitExpression.cshtml) + IntermediateToken - (0:0,0 [8] ExplicitExpression.cshtml) - Html - 1 + 1 = + CSharpExpression - (10:0,10 [3] ExplicitExpression.cshtml) + IntermediateToken - (10:0,10 [3] ExplicitExpression.cshtml) - CSharp - 1+1 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml new file mode 100644 index 0000000000..a4d4caa007 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml @@ -0,0 +1,16 @@ +@{ + object foo = null; + string bar = "Foo"; +} + +@if(foo != null) { + @foo +} else { +

        Foo is Null!

        +} + +

        +@if(!String.IsNullOrEmpty(bar)) { + @(bar.Replace("F", "B")) +} +

        \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_DesignTime.codegen.cs new file mode 100644 index 0000000000..d0cd34cc74 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_DesignTime.codegen.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExpressionsInCode_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml" + + object foo = null; + string bar = "Foo"; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml" + if(foo != null) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml" +__o = foo; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml" + +} else { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml" + +} + +#line default +#line hidden +#nullable disable +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml" + if(!String.IsNullOrEmpty(bar)) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml" +__o = bar.Replace("F", "B"); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml" + +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_DesignTime.ir.txt new file mode 100644 index 0000000000..358e6bc788 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_DesignTime.ir.txt @@ -0,0 +1,42 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExpressionsInCode_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [51] ExpressionsInCode.cshtml) + IntermediateToken - (2:0,2 [51] ExpressionsInCode.cshtml) - CSharp - \n object foo = null;\n string bar = "Foo";\n + HtmlContent - (56:4,0 [2] ExpressionsInCode.cshtml) + IntermediateToken - (56:4,0 [2] ExpressionsInCode.cshtml) - Html - \n + CSharpCode - (59:5,1 [23] ExpressionsInCode.cshtml) + IntermediateToken - (59:5,1 [23] ExpressionsInCode.cshtml) - CSharp - if(foo != null) {\n + CSharpExpression - (83:6,5 [3] ExpressionsInCode.cshtml) + IntermediateToken - (83:6,5 [3] ExpressionsInCode.cshtml) - CSharp - foo + CSharpCode - (86:6,8 [16] ExpressionsInCode.cshtml) + IntermediateToken - (86:6,8 [16] ExpressionsInCode.cshtml) - CSharp - \n} else {\n + HtmlContent - (102:8,4 [19] ExpressionsInCode.cshtml) + IntermediateToken - (102:8,4 [2] ExpressionsInCode.cshtml) - Html -

        + IntermediateToken - (105:8,7 [12] ExpressionsInCode.cshtml) - Html - Foo is Null! + IntermediateToken - (117:8,19 [4] ExpressionsInCode.cshtml) - Html -

        + CSharpCode - (121:8,23 [3] ExpressionsInCode.cshtml) + IntermediateToken - (121:8,23 [3] ExpressionsInCode.cshtml) - CSharp - \n} + HtmlContent - (124:9,1 [9] ExpressionsInCode.cshtml) + IntermediateToken - (124:9,1 [4] ExpressionsInCode.cshtml) - Html - \n\n + IntermediateToken - (128:11,0 [2] ExpressionsInCode.cshtml) - Html -

        + IntermediateToken - (131:11,3 [2] ExpressionsInCode.cshtml) - Html - \n + CSharpCode - (134:12,1 [38] ExpressionsInCode.cshtml) + IntermediateToken - (134:12,1 [38] ExpressionsInCode.cshtml) - CSharp - if(!String.IsNullOrEmpty(bar)) {\n + CSharpExpression - (174:13,6 [21] ExpressionsInCode.cshtml) + IntermediateToken - (174:13,6 [21] ExpressionsInCode.cshtml) - CSharp - bar.Replace("F", "B") + CSharpCode - (196:13,28 [3] ExpressionsInCode.cshtml) + IntermediateToken - (196:13,28 [3] ExpressionsInCode.cshtml) - CSharp - \n} + HtmlContent - (199:14,1 [6] ExpressionsInCode.cshtml) + IntermediateToken - (199:14,1 [2] ExpressionsInCode.cshtml) - Html - \n + IntermediateToken - (201:15,0 [4] ExpressionsInCode.cshtml) - Html -

        diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_DesignTime.mappings.txt new file mode 100644 index 0000000000..0db3796826 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_DesignTime.mappings.txt @@ -0,0 +1,58 @@ +Source Location: (2:0,2 [51] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml) +| + object foo = null; + string bar = "Foo"; +| +Generated Location: (754:19,2 [51] ) +| + object foo = null; + string bar = "Foo"; +| + +Source Location: (59:5,1 [23] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml) +|if(foo != null) { + | +Generated Location: (968:28,1 [23] ) +|if(foo != null) { + | + +Source Location: (83:6,5 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml) +|foo| +Generated Location: (1161:36,6 [3] ) +|foo| + +Source Location: (86:6,8 [16] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml) +| +} else { + | +Generated Location: (1337:43,8 [16] ) +| +} else { + | + +Source Location: (121:8,23 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml) +| +}| +Generated Location: (1540:52,23 [3] ) +| +}| + +Source Location: (134:12,1 [38] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml) +|if(!String.IsNullOrEmpty(bar)) { + | +Generated Location: (1709:60,1 [38] ) +|if(!String.IsNullOrEmpty(bar)) { + | + +Source Location: (174:13,6 [21] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml) +|bar.Replace("F", "B")| +Generated Location: (1918:68,6 [21] ) +|bar.Replace("F", "B")| + +Source Location: (196:13,28 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml) +| +}| +Generated Location: (2133:75,28 [3] ) +| +}| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_Runtime.codegen.cs new file mode 100644 index 0000000000..f5c181ecb9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_Runtime.codegen.cs @@ -0,0 +1,84 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "3ccb5b16f61b84dd82d7402e4a17870a39d09ca9" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExpressionsInCode_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"3ccb5b16f61b84dd82d7402e4a17870a39d09ca9", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExpressionsInCode_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml" + + object foo = null; + string bar = "Foo"; + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml" + if(foo != null) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml" +Write(foo); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml" + +} else { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        Foo is Null!

        \r\n"); +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml" +} + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n

        \r\n"); +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml" + if(!String.IsNullOrEmpty(bar)) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml" +Write(bar.Replace("F", "B")); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode.cshtml" + +} + +#line default +#line hidden +#nullable disable + WriteLiteral("

        "); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_Runtime.ir.txt new file mode 100644 index 0000000000..57aeaa556b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_Runtime.ir.txt @@ -0,0 +1,38 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExpressionsInCode_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [51] ExpressionsInCode.cshtml) + IntermediateToken - (2:0,2 [51] ExpressionsInCode.cshtml) - CSharp - \n object foo = null;\n string bar = "Foo";\n + HtmlContent - (56:4,0 [2] ExpressionsInCode.cshtml) + IntermediateToken - (56:4,0 [2] ExpressionsInCode.cshtml) - Html - \n + CSharpCode - (59:5,1 [23] ExpressionsInCode.cshtml) + IntermediateToken - (59:5,1 [23] ExpressionsInCode.cshtml) - CSharp - if(foo != null) {\n + CSharpExpression - (83:6,5 [3] ExpressionsInCode.cshtml) + IntermediateToken - (83:6,5 [3] ExpressionsInCode.cshtml) - CSharp - foo + CSharpCode - (86:6,8 [12] ExpressionsInCode.cshtml) + IntermediateToken - (86:6,8 [12] ExpressionsInCode.cshtml) - CSharp - \n} else {\n + HtmlContent - (98:8,0 [25] ExpressionsInCode.cshtml) + IntermediateToken - (98:8,0 [4] ExpressionsInCode.cshtml) - Html - + IntermediateToken - (102:8,4 [2] ExpressionsInCode.cshtml) - Html -

        + IntermediateToken - (105:8,7 [12] ExpressionsInCode.cshtml) - Html - Foo is Null! + IntermediateToken - (117:8,19 [4] ExpressionsInCode.cshtml) - Html -

        + IntermediateToken - (121:8,23 [2] ExpressionsInCode.cshtml) - Html - \n + CSharpCode - (123:9,0 [3] ExpressionsInCode.cshtml) + IntermediateToken - (123:9,0 [3] ExpressionsInCode.cshtml) - CSharp - }\n + HtmlContent - (126:10,0 [7] ExpressionsInCode.cshtml) + IntermediateToken - (126:10,0 [2] ExpressionsInCode.cshtml) - Html - \n + IntermediateToken - (128:11,0 [2] ExpressionsInCode.cshtml) - Html -

        + IntermediateToken - (131:11,3 [2] ExpressionsInCode.cshtml) - Html - \n + CSharpCode - (134:12,1 [38] ExpressionsInCode.cshtml) + IntermediateToken - (134:12,1 [38] ExpressionsInCode.cshtml) - CSharp - if(!String.IsNullOrEmpty(bar)) {\n + CSharpExpression - (174:13,6 [21] ExpressionsInCode.cshtml) + IntermediateToken - (174:13,6 [21] ExpressionsInCode.cshtml) - CSharp - bar.Replace("F", "B") + CSharpCode - (196:13,28 [5] ExpressionsInCode.cshtml) + IntermediateToken - (196:13,28 [5] ExpressionsInCode.cshtml) - CSharp - \n}\n + HtmlContent - (201:15,0 [4] ExpressionsInCode.cshtml) + IntermediateToken - (201:15,0 [4] ExpressionsInCode.cshtml) - Html -

        diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock.cshtml new file mode 100644 index 0000000000..5d06b37224 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock.cshtml @@ -0,0 +1,12 @@ +@functions { + +} + +@functions { + Random _rand = new Random(); + private int RandomInt() { + return _rand.Next(); + } +} + +Here's a random number: @RandomInt() \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal.cshtml new file mode 100644 index 0000000000..6b3de50b2c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal.cshtml @@ -0,0 +1,7 @@ + + + @functions{ +string foo(string input) { + return input + "!"; +} +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_DesignTime.codegen.cs new file mode 100644 index 0000000000..6447c907bb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_DesignTime.codegen.cs @@ -0,0 +1,32 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_FunctionsBlockMinimal_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + } + #pragma warning restore 1998 +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal.cshtml" + +string foo(string input) { + return input + "!"; +} + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_DesignTime.ir.txt new file mode 100644 index 0000000000..f460329dab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_DesignTime.ir.txt @@ -0,0 +1,15 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_FunctionsBlockMinimal_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [5] FunctionsBlockMinimal.cshtml) + IntermediateToken - (0:0,0 [5] FunctionsBlockMinimal.cshtml) - Html - \n\n + CSharpCode - (16:2,12 [55] FunctionsBlockMinimal.cshtml) + IntermediateToken - (16:2,12 [55] FunctionsBlockMinimal.cshtml) - CSharp - \nstring foo(string input) {\n return input + "!";\n}\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_DesignTime.mappings.txt new file mode 100644 index 0000000000..e09fcdf23f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_DesignTime.mappings.txt @@ -0,0 +1,13 @@ +Source Location: (16:2,12 [55] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal.cshtml) +| +string foo(string input) { + return input + "!"; +} +| +Generated Location: (824:21,15 [55] ) +| +string foo(string input) { + return input + "!"; +} +| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_Runtime.codegen.cs new file mode 100644 index 0000000000..9dd9ba4e53 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_Runtime.codegen.cs @@ -0,0 +1,29 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "5ba3477b8f10b5207bb9f610499189ac0d50aaa0" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_FunctionsBlockMinimal_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"5ba3477b8f10b5207bb9f610499189ac0d50aaa0", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_FunctionsBlockMinimal_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n\r\n"); + } + #pragma warning restore 1998 +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal.cshtml" + +string foo(string input) { + return input + "!"; +} + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_Runtime.ir.txt new file mode 100644 index 0000000000..5efffb2706 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_Runtime.ir.txt @@ -0,0 +1,10 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_FunctionsBlockMinimal_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [4] FunctionsBlockMinimal.cshtml) + IntermediateToken - (0:0,0 [4] FunctionsBlockMinimal.cshtml) - Html - \n\n + CSharpCode - (16:2,12 [55] FunctionsBlockMinimal.cshtml) + IntermediateToken - (16:2,12 [55] FunctionsBlockMinimal.cshtml) - CSharp - \nstring foo(string input) {\n return input + "!";\n}\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.codegen.cs new file mode 100644 index 0000000000..762e0b2a01 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.codegen.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_FunctionsBlock_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock.cshtml" + __o = RandomInt(); + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock.cshtml" + + Random _rand = new Random(); + private int RandomInt() { + return _rand.Next(); + } + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.ir.txt new file mode 100644 index 0000000000..e71b8ed6a9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.ir.txt @@ -0,0 +1,21 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_FunctionsBlock_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (17:2,1 [4] FunctionsBlock.cshtml) + IntermediateToken - (17:2,1 [4] FunctionsBlock.cshtml) - Html - \n\n + HtmlContent - (138:9,1 [28] FunctionsBlock.cshtml) + IntermediateToken - (138:9,1 [28] FunctionsBlock.cshtml) - Html - \n\nHere's a random number: + CSharpExpression - (167:11,25 [11] FunctionsBlock.cshtml) + IntermediateToken - (167:11,25 [11] FunctionsBlock.cshtml) - CSharp - RandomInt() + CSharpCode - (12:0,12 [4] FunctionsBlock.cshtml) + IntermediateToken - (12:0,12 [4] FunctionsBlock.cshtml) - CSharp - \n\n + CSharpCode - (33:4,12 [104] FunctionsBlock.cshtml) + IntermediateToken - (33:4,12 [104] FunctionsBlock.cshtml) - CSharp - \n Random _rand = new Random();\n private int RandomInt() {\n return _rand.Next();\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.mappings.txt new file mode 100644 index 0000000000..d2d8522163 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.mappings.txt @@ -0,0 +1,29 @@ +Source Location: (167:11,25 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock.cshtml) +|RandomInt()| +Generated Location: (772:19,25 [11] ) +|RandomInt()| + +Source Location: (12:0,12 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock.cshtml) +| + +| +Generated Location: (1006:28,12 [4] ) +| + +| + +Source Location: (33:4,12 [104] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock.cshtml) +| + Random _rand = new Random(); + private int RandomInt() { + return _rand.Next(); + } +| +Generated Location: (1181:36,12 [104] ) +| + Random _rand = new Random(); + private int RandomInt() { + return _rand.Next(); + } +| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_Runtime.codegen.cs new file mode 100644 index 0000000000..f005acdd93 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_Runtime.codegen.cs @@ -0,0 +1,38 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "e6a053bfeb65ba3e17885a8ae1523f28a3483258" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_FunctionsBlock_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"e6a053bfeb65ba3e17885a8ae1523f28a3483258", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_FunctionsBlock_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); + WriteLiteral("\r\nHere\'s a random number: "); +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock.cshtml" + Write(RandomInt()); + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock.cshtml" + + Random _rand = new Random(); + private int RandomInt() { + return _rand.Next(); + } + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_Runtime.ir.txt new file mode 100644 index 0000000000..4b05dbcc3d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_Runtime.ir.txt @@ -0,0 +1,16 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_FunctionsBlock_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (19:3,0 [2] FunctionsBlock.cshtml) + IntermediateToken - (19:3,0 [2] FunctionsBlock.cshtml) - Html - \n + HtmlContent - (140:10,0 [26] FunctionsBlock.cshtml) + IntermediateToken - (140:10,0 [26] FunctionsBlock.cshtml) - Html - \nHere's a random number: + CSharpExpression - (167:11,25 [11] FunctionsBlock.cshtml) + IntermediateToken - (167:11,25 [11] FunctionsBlock.cshtml) - CSharp - RandomInt() + CSharpCode - (12:0,12 [4] FunctionsBlock.cshtml) + IntermediateToken - (12:0,12 [4] FunctionsBlock.cshtml) - CSharp - \n\n + CSharpCode - (33:4,12 [104] FunctionsBlock.cshtml) + IntermediateToken - (33:4,12 [104] FunctionsBlock.cshtml) - CSharp - \n Random _rand = new Random();\n private int RandomInt() {\n return _rand.Next();\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode.cshtml new file mode 100644 index 0000000000..a6addbe97c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode.cshtml @@ -0,0 +1,3 @@ +@{ + @@Da +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.codegen.cs new file mode 100644 index 0000000000..7e2f26e97e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.codegen.cs @@ -0,0 +1,37 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HiddenSpansInCode_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode.cshtml" + @Da + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.ir.txt new file mode 100644 index 0000000000..6c3f2a9d41 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.ir.txt @@ -0,0 +1,15 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HiddenSpansInCode_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [6] HiddenSpansInCode.cshtml) + IntermediateToken - (2:0,2 [6] HiddenSpansInCode.cshtml) - CSharp - \n + CSharpCode - (9:1,5 [5] HiddenSpansInCode.cshtml) + IntermediateToken - (9:1,5 [5] HiddenSpansInCode.cshtml) - CSharp - @Da\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.mappings.txt new file mode 100644 index 0000000000..b073a2350b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.mappings.txt @@ -0,0 +1,14 @@ +Source Location: (2:0,2 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode.cshtml) +| + | +Generated Location: (754:19,2 [6] ) +| + | + +Source Location: (9:1,5 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode.cshtml) +|@Da +| +Generated Location: (929:27,5 [5] ) +|@Da +| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_Runtime.codegen.cs new file mode 100644 index 0000000000..a39b51584d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_Runtime.codegen.cs @@ -0,0 +1,25 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "9bc7458ab052e80d9c977bfce0f0c7e8aef0d80f" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HiddenSpansInCode_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"9bc7458ab052e80d9c977bfce0f0c7e8aef0d80f", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HiddenSpansInCode_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode.cshtml" + @Da + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_Runtime.ir.txt new file mode 100644 index 0000000000..92fc13fef7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_Runtime.ir.txt @@ -0,0 +1,10 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HiddenSpansInCode_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [6] HiddenSpansInCode.cshtml) + IntermediateToken - (2:0,2 [6] HiddenSpansInCode.cshtml) - CSharp - \n + CSharpCode - (9:1,5 [5] HiddenSpansInCode.cshtml) + IntermediateToken - (9:1,5 [5] HiddenSpansInCode.cshtml) - CSharp - @Da\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double.cshtml new file mode 100644 index 0000000000..6a99437910 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double.cshtml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_DesignTime.codegen.cs new file mode 100644 index 0000000000..6add10d801 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_DesignTime.codegen.cs @@ -0,0 +1,22 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HtmlCommentWithQuote_Double_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_DesignTime.ir.txt new file mode 100644 index 0000000000..4d1b62bfcc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_DesignTime.ir.txt @@ -0,0 +1,20 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HtmlCommentWithQuote_Double_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [45] HtmlCommentWithQuote_Double.cshtml) + IntermediateToken - (0:0,0 [4] HtmlCommentWithQuote_Double.cshtml) - Html - + IntermediateToken - (10:0,10 [2] HtmlCommentWithQuote_Double.cshtml) - Html - \n + IntermediateToken - (12:1,0 [4] HtmlCommentWithQuote_Double.cshtml) - Html - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_DesignTime.mappings.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_Runtime.codegen.cs new file mode 100644 index 0000000000..fb924e6327 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_Runtime.codegen.cs @@ -0,0 +1,19 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "520aebbcdbdb163b131356be8f3aef0eb0809c47" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HtmlCommentWithQuote_Double_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"520aebbcdbdb163b131356be8f3aef0eb0809c47", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HtmlCommentWithQuote_Double_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_Runtime.ir.txt new file mode 100644 index 0000000000..4408836bd2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_Runtime.ir.txt @@ -0,0 +1,15 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HtmlCommentWithQuote_Double_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [45] HtmlCommentWithQuote_Double.cshtml) + IntermediateToken - (0:0,0 [4] HtmlCommentWithQuote_Double.cshtml) - Html - + IntermediateToken - (10:0,10 [2] HtmlCommentWithQuote_Double.cshtml) - Html - \n + IntermediateToken - (12:1,0 [4] HtmlCommentWithQuote_Double.cshtml) - Html - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single.cshtml new file mode 100644 index 0000000000..dc1b21a546 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single.cshtml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_DesignTime.codegen.cs new file mode 100644 index 0000000000..e20af5e1ca --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_DesignTime.codegen.cs @@ -0,0 +1,22 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HtmlCommentWithQuote_Single_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_DesignTime.ir.txt new file mode 100644 index 0000000000..4445841a71 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_DesignTime.ir.txt @@ -0,0 +1,20 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HtmlCommentWithQuote_Single_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [45] HtmlCommentWithQuote_Single.cshtml) + IntermediateToken - (0:0,0 [4] HtmlCommentWithQuote_Single.cshtml) - Html - + IntermediateToken - (10:0,10 [2] HtmlCommentWithQuote_Single.cshtml) - Html - \n + IntermediateToken - (12:1,0 [4] HtmlCommentWithQuote_Single.cshtml) - Html - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_DesignTime.mappings.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_Runtime.codegen.cs new file mode 100644 index 0000000000..1bce0936db --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_Runtime.codegen.cs @@ -0,0 +1,19 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "2080c7f4c5de3e5e7f309c11a6be5c5e8d86e75a" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HtmlCommentWithQuote_Single_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"2080c7f4c5de3e5e7f309c11a6be5c5e8d86e75a", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HtmlCommentWithQuote_Single_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_Runtime.ir.txt new file mode 100644 index 0000000000..406418bcaf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_Runtime.ir.txt @@ -0,0 +1,15 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HtmlCommentWithQuote_Single_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [45] HtmlCommentWithQuote_Single.cshtml) + IntermediateToken - (0:0,0 [4] HtmlCommentWithQuote_Single.cshtml) - Html - + IntermediateToken - (10:0,10 [2] HtmlCommentWithQuote_Single.cshtml) - Html - \n + IntermediateToken - (12:1,0 [4] HtmlCommentWithQuote_Single.cshtml) - Html - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements.cshtml new file mode 100644 index 0000000000..cc52b3487f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements.cshtml @@ -0,0 +1,5 @@ +@implements IDisposable + +@functions { + void IDisposable.Dispose() { } +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_DesignTime.codegen.cs new file mode 100644 index 0000000000..9fe4c8123d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_DesignTime.codegen.cs @@ -0,0 +1,40 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Implements_DesignTime : IDisposable + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements.cshtml" +IDisposable __typeHelper = default(IDisposable); + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + } + #pragma warning restore 1998 +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements.cshtml" + + void IDisposable.Dispose() { } + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_DesignTime.ir.txt new file mode 100644 index 0000000000..cf982456f4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_DesignTime.ir.txt @@ -0,0 +1,16 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Implements_DesignTime - - IDisposable + DesignTimeDirective - + DirectiveToken - (12:0,12 [11] Implements.cshtml) - IDisposable + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (25:1,0 [2] Implements.cshtml) + IntermediateToken - (25:1,0 [2] Implements.cshtml) - Html - \n + CSharpCode - (39:2,12 [38] Implements.cshtml) + IntermediateToken - (39:2,12 [38] Implements.cshtml) - CSharp - \n void IDisposable.Dispose() { }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_DesignTime.mappings.txt new file mode 100644 index 0000000000..8b369c1249 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_DesignTime.mappings.txt @@ -0,0 +1,14 @@ +Source Location: (12:0,12 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements.cshtml) +|IDisposable| +Generated Location: (498:12,0 [11] ) +|IDisposable| + +Source Location: (39:2,12 [38] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements.cshtml) +| + void IDisposable.Dispose() { } +| +Generated Location: (1078:31,12 [38] ) +| + void IDisposable.Dispose() { } +| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_Runtime.codegen.cs new file mode 100644 index 0000000000..0cab554528 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_Runtime.codegen.cs @@ -0,0 +1,27 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "46e30222edb02ded9cda34df5c2593e760643d53" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Implements_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"46e30222edb02ded9cda34df5c2593e760643d53", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Implements_Runtime : IDisposable + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); + } + #pragma warning restore 1998 +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements.cshtml" + + void IDisposable.Dispose() { } + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_Runtime.ir.txt new file mode 100644 index 0000000000..1ee182d674 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Implements_Runtime.ir.txt @@ -0,0 +1,10 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Implements_Runtime - - IDisposable + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (25:1,0 [2] Implements.cshtml) + IntermediateToken - (25:1,0 [2] Implements.cshtml) - Html - \n + CSharpCode - (39:2,12 [38] Implements.cshtml) + IntermediateToken - (39:2,12 [38] Implements.cshtml) - CSharp - \n void IDisposable.Dispose() { }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression.cshtml new file mode 100644 index 0000000000..dcce7fa572 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression.cshtml @@ -0,0 +1,3 @@ +@for(int i = 1; i <= 10; i++) { +

        This is item #@i

        +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF.cshtml new file mode 100644 index 0000000000..365d20e003 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF.cshtml @@ -0,0 +1,3 @@ +This is markup + +@ \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.codegen.cs new file mode 100644 index 0000000000..24e9343452 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.codegen.cs @@ -0,0 +1,29 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ImplicitExpressionAtEOF_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF.cshtml" +__o = ; + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.diagnostics.txt new file mode 100644 index 0000000000..e2a8c29095 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.diagnostics.txt @@ -0,0 +1 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF.cshtml(3,2): Error RZ1004: End-of-file was found after the "@" character. "@" must be followed by a valid code block. If you want to output an "@", escape it using the sequence: "@@" diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.ir.txt new file mode 100644 index 0000000000..19598b5d7e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.ir.txt @@ -0,0 +1,15 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ImplicitExpressionAtEOF_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] ImplicitExpressionAtEOF.cshtml) + IntermediateToken - (0:0,0 [18] ImplicitExpressionAtEOF.cshtml) - Html - This is markup\n\n + CSharpExpression - (19:2,1 [0] ImplicitExpressionAtEOF.cshtml) + IntermediateToken - (19:2,1 [0] ImplicitExpressionAtEOF.cshtml) - CSharp - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.mappings.txt new file mode 100644 index 0000000000..2fb787f40e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.mappings.txt @@ -0,0 +1,5 @@ +Source Location: (19:2,1 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF.cshtml) +|| +Generated Location: (770:19,6 [0] ) +|| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.codegen.cs new file mode 100644 index 0000000000..09e806ccbc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.codegen.cs @@ -0,0 +1,26 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "94cd2b5a8281fc76002fc745485949cf3952a058" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ImplicitExpressionAtEOF_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"94cd2b5a8281fc76002fc745485949cf3952a058", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ImplicitExpressionAtEOF_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("This is markup\r\n\r\n"); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF.cshtml" +Write(); + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.diagnostics.txt new file mode 100644 index 0000000000..e2a8c29095 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.diagnostics.txt @@ -0,0 +1 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF.cshtml(3,2): Error RZ1004: End-of-file was found after the "@" character. "@" must be followed by a valid code block. If you want to output an "@", escape it using the sequence: "@@" diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.ir.txt new file mode 100644 index 0000000000..b2ac3e3520 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.ir.txt @@ -0,0 +1,10 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ImplicitExpressionAtEOF_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] ImplicitExpressionAtEOF.cshtml) + IntermediateToken - (0:0,0 [18] ImplicitExpressionAtEOF.cshtml) - Html - This is markup\n\n + CSharpExpression - (19:2,1 [0] ImplicitExpressionAtEOF.cshtml) + IntermediateToken - (19:2,1 [0] ImplicitExpressionAtEOF.cshtml) - CSharp - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_DesignTime.codegen.cs new file mode 100644 index 0000000000..2f981797eb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_DesignTime.codegen.cs @@ -0,0 +1,45 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ImplicitExpression_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression.cshtml" + for(int i = 1; i <= 10; i++) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression.cshtml" + __o = i; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression.cshtml" + +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_DesignTime.ir.txt new file mode 100644 index 0000000000..f082ae44b6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_DesignTime.ir.txt @@ -0,0 +1,23 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ImplicitExpression_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (1:0,1 [36] ImplicitExpression.cshtml) + IntermediateToken - (1:0,1 [36] ImplicitExpression.cshtml) - CSharp - for(int i = 1; i <= 10; i++) {\n + HtmlContent - (37:1,4 [17] ImplicitExpression.cshtml) + IntermediateToken - (37:1,4 [2] ImplicitExpression.cshtml) - Html -

        + IntermediateToken - (40:1,7 [14] ImplicitExpression.cshtml) - Html - This is item # + CSharpExpression - (55:1,22 [1] ImplicitExpression.cshtml) + IntermediateToken - (55:1,22 [1] ImplicitExpression.cshtml) - CSharp - i + HtmlContent - (56:1,23 [4] ImplicitExpression.cshtml) + IntermediateToken - (56:1,23 [4] ImplicitExpression.cshtml) - Html -

        + CSharpCode - (60:1,27 [3] ImplicitExpression.cshtml) + IntermediateToken - (60:1,27 [3] ImplicitExpression.cshtml) - CSharp - \n} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_DesignTime.mappings.txt new file mode 100644 index 0000000000..b0b0d935f5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_DesignTime.mappings.txt @@ -0,0 +1,19 @@ +Source Location: (1:0,1 [36] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression.cshtml) +|for(int i = 1; i <= 10; i++) { + | +Generated Location: (755:19,1 [36] ) +|for(int i = 1; i <= 10; i++) { + | + +Source Location: (55:1,22 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression.cshtml) +|i| +Generated Location: (978:27,22 [1] ) +|i| + +Source Location: (60:1,27 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression.cshtml) +| +}| +Generated Location: (1172:34,27 [3] ) +| +}| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_Runtime.codegen.cs new file mode 100644 index 0000000000..1cc29a9c8c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_Runtime.codegen.cs @@ -0,0 +1,41 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "68460c577f1cb90794f25535a35a82ff2aa4c193" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ImplicitExpression_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"68460c577f1cb90794f25535a35a82ff2aa4c193", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ImplicitExpression_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression.cshtml" + for(int i = 1; i <= 10; i++) { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        This is item #"); +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression.cshtml" + Write(i); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n"); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression.cshtml" +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_Runtime.ir.txt new file mode 100644 index 0000000000..3804c925f8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_Runtime.ir.txt @@ -0,0 +1,20 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ImplicitExpression_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (1:0,1 [32] ImplicitExpression.cshtml) + IntermediateToken - (1:0,1 [32] ImplicitExpression.cshtml) - CSharp - for(int i = 1; i <= 10; i++) {\n + HtmlContent - (33:1,0 [21] ImplicitExpression.cshtml) + IntermediateToken - (33:1,0 [4] ImplicitExpression.cshtml) - Html - + IntermediateToken - (37:1,4 [2] ImplicitExpression.cshtml) - Html -

        + IntermediateToken - (40:1,7 [14] ImplicitExpression.cshtml) - Html - This is item # + CSharpExpression - (55:1,22 [1] ImplicitExpression.cshtml) + IntermediateToken - (55:1,22 [1] ImplicitExpression.cshtml) - CSharp - i + HtmlContent - (56:1,23 [6] ImplicitExpression.cshtml) + IntermediateToken - (56:1,23 [4] ImplicitExpression.cshtml) - Html -

        + IntermediateToken - (60:1,27 [2] ImplicitExpression.cshtml) - Html - \n + CSharpCode - (62:2,0 [1] ImplicitExpression.cshtml) + IntermediateToken - (62:2,0 [1] ImplicitExpression.cshtml) - CSharp - } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml new file mode 100644 index 0000000000..3b56f0b173 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml @@ -0,0 +1,25 @@ +@* These test files validate that end-to-end, incomplete directives don't throw. *@ + +@addTagHelper +@addTagHelper +@addTagHelper " + +@removeTagHelper +@removeTagHelper +@removeTagHelper " + +@tagHelperPrefix +@tagHelperPrefix +@tagHelperPrefix " + +@inherits +@inherits + +@functions +@functions + +@section +@section + +@section { +@functions { \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.codegen.cs new file mode 100644 index 0000000000..3e7ab835c7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.codegen.cs @@ -0,0 +1,159 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" +global::System.Object __typeHelper = ""; + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" +global::System.Object __typeHelper = ""; + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" +global::System.Object __typeHelper = "; + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" +global::System.Object __typeHelper = ""; + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" +global::System.Object __typeHelper = ""; + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" +global::System.Object __typeHelper = "; + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" +global::System.Object __typeHelper = ""; + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" +global::System.Object __typeHelper = ""; + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" +global::System.Object __typeHelper = "; + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 15 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" + + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" + + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 21 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" + + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 22 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" + + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 25 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" + + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.diagnostics.txt new file mode 100644 index 0000000000..1eb0531be3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.diagnostics.txt @@ -0,0 +1,27 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,2): Error RZ1018: Directive 'addTagHelper' must have a value. +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 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 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 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 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 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. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(13,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(13,1): Error RZ2001: The 'tagHelperPrefix' directive may only occur once per document. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(13,18): Error RZ1020: Invalid tag helper directive 'tagHelperPrefix' value. '"' is not allowed in prefix '"'. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(15,10): Error RZ1013: The 'inherits' directive expects a type name. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(16,1): Error RZ2001: The 'inherits' directive may only occur once per document. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(16,11): Error RZ1013: The 'inherits' directive expects a type name. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(19,1): Error RZ1017: Unexpected literal following the 'functions' directive. Expected '{'. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(21,1): Error RZ1017: Unexpected literal following the 'functions' directive. Expected '{'. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(21,9): Error RZ1015: The 'section' directive expects an identifier. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(22,10): Error RZ1015: The 'section' directive expects an identifier. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(24,10): Error RZ1015: The 'section' directive expects an identifier. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(25,12): Error RZ1006: The functions block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.ir.txt new file mode 100644 index 0000000000..3300ad1af0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.ir.txt @@ -0,0 +1,86 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives_DesignTime - - + DesignTimeDirective - + DirectiveToken - (100:2,13 [0] IncompleteDirectives.cshtml) - + DirectiveToken - (116:3,14 [0] IncompleteDirectives.cshtml) - + DirectiveToken - (132:4,14 [1] IncompleteDirectives.cshtml) - " + DirectiveToken - (153:6,16 [0] IncompleteDirectives.cshtml) - + DirectiveToken - (172:7,17 [0] IncompleteDirectives.cshtml) - + DirectiveToken - (191:8,17 [1] IncompleteDirectives.cshtml) - " + DirectiveToken - (212:10,16 [0] IncompleteDirectives.cshtml) - + DirectiveToken - (231:11,17 [0] IncompleteDirectives.cshtml) - + DirectiveToken - (250:12,17 [1] IncompleteDirectives.cshtml) - " + DirectiveToken - (264:14,9 [0] IncompleteDirectives.cshtml) - + DirectiveToken - (276:15,10 [0] IncompleteDirectives.cshtml) - + DirectiveToken - (315:20,8 [0] IncompleteDirectives.cshtml) - + DirectiveToken - (326:21,9 [0] IncompleteDirectives.cshtml) - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (85:1,0 [2] IncompleteDirectives.cshtml) + IntermediateToken - (85:1,0 [2] IncompleteDirectives.cshtml) - Html - \n + MalformedDirective - (100:2,13 [0] IncompleteDirectives.cshtml) - addTagHelper + DirectiveToken - (100:2,13 [0] IncompleteDirectives.cshtml) - + HtmlContent - (100:2,13 [2] IncompleteDirectives.cshtml) + IntermediateToken - (100:2,13 [2] IncompleteDirectives.cshtml) - Html - \n + MalformedDirective - (116:3,14 [0] IncompleteDirectives.cshtml) - addTagHelper + DirectiveToken - (116:3,14 [0] IncompleteDirectives.cshtml) - + HtmlContent - (116:3,14 [2] IncompleteDirectives.cshtml) + IntermediateToken - (116:3,14 [2] IncompleteDirectives.cshtml) - Html - \n + MalformedDirective - (132:4,14 [1] IncompleteDirectives.cshtml) - addTagHelper + DirectiveToken - (132:4,14 [1] IncompleteDirectives.cshtml) - " + HtmlContent - (133:4,15 [4] IncompleteDirectives.cshtml) + IntermediateToken - (133:4,15 [4] IncompleteDirectives.cshtml) - Html - \n\n + MalformedDirective - (153:6,16 [0] IncompleteDirectives.cshtml) - removeTagHelper + DirectiveToken - (153:6,16 [0] IncompleteDirectives.cshtml) - + HtmlContent - (153:6,16 [2] IncompleteDirectives.cshtml) + IntermediateToken - (153:6,16 [2] IncompleteDirectives.cshtml) - Html - \n + MalformedDirective - (172:7,17 [0] IncompleteDirectives.cshtml) - removeTagHelper + DirectiveToken - (172:7,17 [0] IncompleteDirectives.cshtml) - + HtmlContent - (172:7,17 [2] IncompleteDirectives.cshtml) + IntermediateToken - (172:7,17 [2] IncompleteDirectives.cshtml) - Html - \n + MalformedDirective - (191:8,17 [1] IncompleteDirectives.cshtml) - removeTagHelper + DirectiveToken - (191:8,17 [1] IncompleteDirectives.cshtml) - " + HtmlContent - (192:8,18 [4] IncompleteDirectives.cshtml) + IntermediateToken - (192:8,18 [4] IncompleteDirectives.cshtml) - Html - \n\n + MalformedDirective - (212:10,16 [0] IncompleteDirectives.cshtml) - tagHelperPrefix + DirectiveToken - (212:10,16 [0] IncompleteDirectives.cshtml) - + HtmlContent - (212:10,16 [2] IncompleteDirectives.cshtml) + IntermediateToken - (212:10,16 [2] IncompleteDirectives.cshtml) - Html - \n + MalformedDirective - (231:11,17 [0] IncompleteDirectives.cshtml) - tagHelperPrefix + DirectiveToken - (231:11,17 [0] IncompleteDirectives.cshtml) - + HtmlContent - (231:11,17 [2] IncompleteDirectives.cshtml) + IntermediateToken - (231:11,17 [2] IncompleteDirectives.cshtml) - Html - \n + MalformedDirective - (250:12,17 [1] IncompleteDirectives.cshtml) - tagHelperPrefix + DirectiveToken - (250:12,17 [1] IncompleteDirectives.cshtml) - " + HtmlContent - (251:12,18 [4] IncompleteDirectives.cshtml) + IntermediateToken - (251:12,18 [4] IncompleteDirectives.cshtml) - Html - \n\n + MalformedDirective - (255:14,0 [9] IncompleteDirectives.cshtml) - inherits + DirectiveToken - (264:14,9 [0] IncompleteDirectives.cshtml) - + HtmlContent - (264:14,9 [2] IncompleteDirectives.cshtml) + IntermediateToken - (264:14,9 [2] IncompleteDirectives.cshtml) - Html - \n + MalformedDirective - (266:15,0 [10] IncompleteDirectives.cshtml) - inherits + DirectiveToken - (276:15,10 [0] IncompleteDirectives.cshtml) - + HtmlContent - (276:15,10 [4] IncompleteDirectives.cshtml) + IntermediateToken - (276:15,10 [4] IncompleteDirectives.cshtml) - Html - \n\n + MalformedDirective - (280:17,0 [12] IncompleteDirectives.cshtml) - functions + MalformedDirective - (292:18,0 [15] IncompleteDirectives.cshtml) - functions + MalformedDirective - (307:20,0 [8] IncompleteDirectives.cshtml) - section + DirectiveToken - (315:20,8 [0] IncompleteDirectives.cshtml) - + HtmlContent - (315:20,8 [2] IncompleteDirectives.cshtml) + IntermediateToken - (315:20,8 [2] IncompleteDirectives.cshtml) - Html - \n + MalformedDirective - (317:21,0 [9] IncompleteDirectives.cshtml) - section + DirectiveToken - (326:21,9 [0] IncompleteDirectives.cshtml) - + HtmlContent - (326:21,9 [4] IncompleteDirectives.cshtml) + IntermediateToken - (326:21,9 [4] IncompleteDirectives.cshtml) - Html - \n\n + MalformedDirective - (330:23,0 [9] IncompleteDirectives.cshtml) - section + HtmlContent - (339:23,9 [3] IncompleteDirectives.cshtml) + IntermediateToken - (339:23,9 [3] IncompleteDirectives.cshtml) - Html - {\n + MalformedDirective - (342:24,0 [12] IncompleteDirectives.cshtml) - functions + CSharpCode - (354:24,12 [0] IncompleteDirectives.cshtml) + IntermediateToken - (354:24,12 [0] IncompleteDirectives.cshtml) - CSharp - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.mappings.txt new file mode 100644 index 0000000000..4859dfc0ea --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.mappings.txt @@ -0,0 +1,70 @@ +Source Location: (100:2,13 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml) +|| +Generated Location: (542:12,38 [0] ) +|| + +Source Location: (116:3,14 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml) +|| +Generated Location: (809:22,38 [0] ) +|| + +Source Location: (132:4,14 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml) +|"| +Generated Location: (1075:32,37 [1] ) +|"| + +Source Location: (153:6,16 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml) +|| +Generated Location: (1342:42,38 [0] ) +|| + +Source Location: (172:7,17 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml) +|| +Generated Location: (1609:52,38 [0] ) +|| + +Source Location: (191:8,17 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml) +|"| +Generated Location: (1875:62,37 [1] ) +|"| + +Source Location: (212:10,16 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml) +|| +Generated Location: (2143:72,38 [0] ) +|| + +Source Location: (231:11,17 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml) +|| +Generated Location: (2411:82,38 [0] ) +|| + +Source Location: (250:12,17 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml) +|"| +Generated Location: (2678:92,37 [1] ) +|"| + +Source Location: (264:14,9 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml) +|| +Generated Location: (2908:102,0 [0] ) +|| + +Source Location: (276:15,10 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml) +|| +Generated Location: (3137:112,0 [0] ) +|| + +Source Location: (315:20,8 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml) +|| +Generated Location: (3366:122,0 [0] ) +|| + +Source Location: (326:21,9 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml) +|| +Generated Location: (3595:132,0 [0] ) +|| + +Source Location: (354:24,12 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml) +|| +Generated Location: (4090:149,12 [0] ) +|| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.codegen.cs new file mode 100644 index 0000000000..c3973b444b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.codegen.cs @@ -0,0 +1,27 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "41721dbbbcb64df19057144a2095a3e1f7466401" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"41721dbbbcb64df19057144a2095a3e1f7466401", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); + WriteLiteral("\r\n"); + WriteLiteral("\r\n"); + WriteLiteral("\r\n"); + WriteLiteral("\r\n"); + WriteLiteral("\r\n\r\n"); + WriteLiteral("\r\n"); + WriteLiteral("\r\n\r\n"); + WriteLiteral("{\r\n"); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.diagnostics.txt new file mode 100644 index 0000000000..1eb0531be3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.diagnostics.txt @@ -0,0 +1,27 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,2): Error RZ1018: Directive 'addTagHelper' must have a value. +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 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 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 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 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 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. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(13,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(13,1): Error RZ2001: The 'tagHelperPrefix' directive may only occur once per document. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(13,18): Error RZ1020: Invalid tag helper directive 'tagHelperPrefix' value. '"' is not allowed in prefix '"'. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(15,10): Error RZ1013: The 'inherits' directive expects a type name. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(16,1): Error RZ2001: The 'inherits' directive may only occur once per document. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(16,11): Error RZ1013: The 'inherits' directive expects a type name. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(19,1): Error RZ1017: Unexpected literal following the 'functions' directive. Expected '{'. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(21,1): Error RZ1017: Unexpected literal following the 'functions' directive. Expected '{'. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(21,9): Error RZ1015: The 'section' directive expects an identifier. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(22,10): Error RZ1015: The 'section' directive expects an identifier. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(24,10): Error RZ1015: The 'section' directive expects an identifier. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(25,12): Error RZ1006: The functions block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.ir.txt new file mode 100644 index 0000000000..675151be4e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.ir.txt @@ -0,0 +1,56 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (85:1,0 [2] IncompleteDirectives.cshtml) + IntermediateToken - (85:1,0 [2] IncompleteDirectives.cshtml) - Html - \n + MalformedDirective - (100:2,13 [2] IncompleteDirectives.cshtml) - addTagHelper + DirectiveToken - (100:2,13 [2] IncompleteDirectives.cshtml) - + MalformedDirective - (116:3,14 [2] IncompleteDirectives.cshtml) - addTagHelper + DirectiveToken - (116:3,14 [2] IncompleteDirectives.cshtml) - + MalformedDirective - (132:4,14 [3] IncompleteDirectives.cshtml) - addTagHelper + DirectiveToken - (132:4,14 [3] IncompleteDirectives.cshtml) - " + HtmlContent - (135:5,0 [2] IncompleteDirectives.cshtml) + IntermediateToken - (135:5,0 [2] IncompleteDirectives.cshtml) - Html - \n + MalformedDirective - (153:6,16 [2] IncompleteDirectives.cshtml) - removeTagHelper + DirectiveToken - (153:6,16 [2] IncompleteDirectives.cshtml) - + MalformedDirective - (172:7,17 [2] IncompleteDirectives.cshtml) - removeTagHelper + DirectiveToken - (172:7,17 [2] IncompleteDirectives.cshtml) - + MalformedDirective - (191:8,17 [3] IncompleteDirectives.cshtml) - removeTagHelper + DirectiveToken - (191:8,17 [3] IncompleteDirectives.cshtml) - " + HtmlContent - (194:9,0 [2] IncompleteDirectives.cshtml) + IntermediateToken - (194:9,0 [2] IncompleteDirectives.cshtml) - Html - \n + MalformedDirective - (212:10,16 [2] IncompleteDirectives.cshtml) - tagHelperPrefix + DirectiveToken - (212:10,16 [2] IncompleteDirectives.cshtml) - + MalformedDirective - (231:11,17 [2] IncompleteDirectives.cshtml) - tagHelperPrefix + DirectiveToken - (231:11,17 [2] IncompleteDirectives.cshtml) - + MalformedDirective - (250:12,17 [3] IncompleteDirectives.cshtml) - tagHelperPrefix + DirectiveToken - (250:12,17 [3] IncompleteDirectives.cshtml) - " + HtmlContent - (253:13,0 [2] IncompleteDirectives.cshtml) + IntermediateToken - (253:13,0 [2] IncompleteDirectives.cshtml) - Html - \n + MalformedDirective - (255:14,0 [9] IncompleteDirectives.cshtml) - inherits + DirectiveToken - (264:14,9 [0] IncompleteDirectives.cshtml) - + HtmlContent - (264:14,9 [2] IncompleteDirectives.cshtml) + IntermediateToken - (264:14,9 [2] IncompleteDirectives.cshtml) - Html - \n + MalformedDirective - (266:15,0 [10] IncompleteDirectives.cshtml) - inherits + DirectiveToken - (276:15,10 [0] IncompleteDirectives.cshtml) - + HtmlContent - (276:15,10 [4] IncompleteDirectives.cshtml) + IntermediateToken - (276:15,10 [4] IncompleteDirectives.cshtml) - Html - \n\n + MalformedDirective - (280:17,0 [12] IncompleteDirectives.cshtml) - functions + MalformedDirective - (292:18,0 [15] IncompleteDirectives.cshtml) - functions + MalformedDirective - (307:20,0 [8] IncompleteDirectives.cshtml) - section + DirectiveToken - (315:20,8 [0] IncompleteDirectives.cshtml) - + HtmlContent - (315:20,8 [2] IncompleteDirectives.cshtml) + IntermediateToken - (315:20,8 [2] IncompleteDirectives.cshtml) - Html - \n + MalformedDirective - (317:21,0 [9] IncompleteDirectives.cshtml) - section + DirectiveToken - (326:21,9 [0] IncompleteDirectives.cshtml) - + HtmlContent - (326:21,9 [4] IncompleteDirectives.cshtml) + IntermediateToken - (326:21,9 [4] IncompleteDirectives.cshtml) - Html - \n\n + MalformedDirective - (330:23,0 [9] IncompleteDirectives.cshtml) - section + HtmlContent - (339:23,9 [3] IncompleteDirectives.cshtml) + IntermediateToken - (339:23,9 [3] IncompleteDirectives.cshtml) - Html - {\n + MalformedDirective - (342:24,0 [12] IncompleteDirectives.cshtml) - functions + CSharpCode - (354:24,12 [0] IncompleteDirectives.cshtml) + IntermediateToken - (354:24,12 [0] IncompleteDirectives.cshtml) - CSharp - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteTagHelper.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteTagHelper.cshtml new file mode 100644 index 0000000000..022784f426 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteTagHelper.cshtml @@ -0,0 +1,3 @@ +@addTagHelper "*, TestAssembly" + +

        Bar

        ; + @:Hello, World +

        Hello, World

        +} + +@while(i <= 10) { +

        Hello from C#, #@(i)

        + i += 1; +} + +@if(i == 11) { +

        We wrote 10 lines!

        +} + +@switch(i) { + case 11: +

        No really, we wrote 10 lines!

        + break; + default: +

        Actually, we didn't...

        + break; +} + +@for(int j = 1; j <= 10; j += 2) { +

        Hello again from C#, #@(j)

        +} + +@try { +

        That time, we wrote 5 lines!

        +} catch(Exception ex) { +

        Oh no! An error occurred: @(ex.Message)

        +} + +@lock(new object()) { +

        This block is locked, for your security!

        +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.codegen.cs new file mode 100644 index 0000000000..554c75fbc5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.codegen.cs @@ -0,0 +1,195 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Instrumented_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + + int i = 1; + var foo = + +#line default +#line hidden +#nullable disable + item => new Template(async(__razor_template_writer) => { + } + ) +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + ; + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + while(i <= 10) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + __o = i; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + + i += 1; +} + +#line default +#line hidden +#nullable disable +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + if(i == 11) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + +} + +#line default +#line hidden +#nullable disable +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + switch(i) { + case 11: + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + + break; + default: + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 22 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + + break; +} + +#line default +#line hidden +#nullable disable +#nullable restore +#line 26 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + for(int j = 1; j <= 10; j += 2) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 27 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + __o = j; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 27 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + +} + +#line default +#line hidden +#nullable disable +#nullable restore +#line 30 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + try { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 31 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + +} catch(Exception ex) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 33 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + __o = ex.Message; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 33 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + +} + +#line default +#line hidden +#nullable disable +#nullable restore +#line 36 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + lock(new object()) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 37 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.ir.txt new file mode 100644 index 0000000000..a20621c630 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.ir.txt @@ -0,0 +1,121 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Instrumented_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [32] Instrumented.cshtml) + IntermediateToken - (2:0,2 [32] Instrumented.cshtml) - CSharp - \n int i = 1;\n var foo = + Template - (35:2,15 [10] Instrumented.cshtml) + HtmlContent - (35:2,15 [10] Instrumented.cshtml) + IntermediateToken - (35:2,15 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (38:2,18 [3] Instrumented.cshtml) - Html - Bar + IntermediateToken - (41:2,21 [4] Instrumented.cshtml) - Html -

        + CSharpCode - (45:2,25 [7] Instrumented.cshtml) + IntermediateToken - (45:2,25 [7] Instrumented.cshtml) - CSharp - ;\n + HtmlContent - (54:3,6 [14] Instrumented.cshtml) + IntermediateToken - (54:3,6 [14] Instrumented.cshtml) - Html - Hello, World\n + CSharpCode - (68:4,0 [4] Instrumented.cshtml) + IntermediateToken - (68:4,0 [4] Instrumented.cshtml) - CSharp - + HtmlContent - (72:4,4 [19] Instrumented.cshtml) + IntermediateToken - (72:4,4 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (75:4,7 [12] Instrumented.cshtml) - Html - Hello, World + IntermediateToken - (87:4,19 [4] Instrumented.cshtml) - Html -

        + CSharpCode - (91:4,23 [2] Instrumented.cshtml) + IntermediateToken - (91:4,23 [2] Instrumented.cshtml) - CSharp - \n + HtmlContent - (96:6,0 [2] Instrumented.cshtml) + IntermediateToken - (96:6,0 [2] Instrumented.cshtml) - Html - \n + CSharpCode - (99:7,1 [22] Instrumented.cshtml) + IntermediateToken - (99:7,1 [22] Instrumented.cshtml) - CSharp - while(i <= 10) {\n + HtmlContent - (121:8,4 [19] Instrumented.cshtml) + IntermediateToken - (121:8,4 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (124:8,7 [16] Instrumented.cshtml) - Html - Hello from C#, # + CSharpExpression - (142:8,25 [1] Instrumented.cshtml) + IntermediateToken - (142:8,25 [1] Instrumented.cshtml) - CSharp - i + HtmlContent - (144:8,27 [4] Instrumented.cshtml) + IntermediateToken - (144:8,27 [4] Instrumented.cshtml) - Html -

        + CSharpCode - (148:8,31 [16] Instrumented.cshtml) + IntermediateToken - (148:8,31 [16] Instrumented.cshtml) - CSharp - \n i += 1;\n} + HtmlContent - (164:10,1 [4] Instrumented.cshtml) + IntermediateToken - (164:10,1 [4] Instrumented.cshtml) - Html - \n\n + CSharpCode - (169:12,1 [19] Instrumented.cshtml) + IntermediateToken - (169:12,1 [19] Instrumented.cshtml) - CSharp - if(i == 11) {\n + HtmlContent - (188:13,4 [25] Instrumented.cshtml) + IntermediateToken - (188:13,4 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (191:13,7 [18] Instrumented.cshtml) - Html - We wrote 10 lines! + IntermediateToken - (209:13,25 [4] Instrumented.cshtml) - Html -

        + CSharpCode - (213:13,29 [3] Instrumented.cshtml) + IntermediateToken - (213:13,29 [3] Instrumented.cshtml) - CSharp - \n} + HtmlContent - (216:14,1 [4] Instrumented.cshtml) + IntermediateToken - (216:14,1 [4] Instrumented.cshtml) - Html - \n\n + CSharpCode - (221:16,1 [35] Instrumented.cshtml) + IntermediateToken - (221:16,1 [35] Instrumented.cshtml) - CSharp - switch(i) {\n case 11:\n + HtmlContent - (256:18,8 [36] Instrumented.cshtml) + IntermediateToken - (256:18,8 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (259:18,11 [29] Instrumented.cshtml) - Html - No really, we wrote 10 lines! + IntermediateToken - (288:18,40 [4] Instrumented.cshtml) - Html -

        + CSharpCode - (292:18,44 [40] Instrumented.cshtml) + IntermediateToken - (292:18,44 [40] Instrumented.cshtml) - CSharp - \n break;\n default:\n + HtmlContent - (332:21,8 [29] Instrumented.cshtml) + IntermediateToken - (332:21,8 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (335:21,11 [22] Instrumented.cshtml) - Html - Actually, we didn't... + IntermediateToken - (357:21,33 [4] Instrumented.cshtml) - Html -

        + CSharpCode - (361:21,37 [19] Instrumented.cshtml) + IntermediateToken - (361:21,37 [19] Instrumented.cshtml) - CSharp - \n break;\n} + HtmlContent - (380:23,1 [4] Instrumented.cshtml) + IntermediateToken - (380:23,1 [4] Instrumented.cshtml) - Html - \n\n + CSharpCode - (385:25,1 [39] Instrumented.cshtml) + IntermediateToken - (385:25,1 [39] Instrumented.cshtml) - CSharp - for(int j = 1; j <= 10; j += 2) {\n + HtmlContent - (424:26,4 [25] Instrumented.cshtml) + IntermediateToken - (424:26,4 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (427:26,7 [22] Instrumented.cshtml) - Html - Hello again from C#, # + CSharpExpression - (451:26,31 [1] Instrumented.cshtml) + IntermediateToken - (451:26,31 [1] Instrumented.cshtml) - CSharp - j + HtmlContent - (453:26,33 [4] Instrumented.cshtml) + IntermediateToken - (453:26,33 [4] Instrumented.cshtml) - Html -

        + CSharpCode - (457:26,37 [3] Instrumented.cshtml) + IntermediateToken - (457:26,37 [3] Instrumented.cshtml) - CSharp - \n} + HtmlContent - (460:27,1 [4] Instrumented.cshtml) + IntermediateToken - (460:27,1 [4] Instrumented.cshtml) - Html - \n\n + CSharpCode - (465:29,1 [11] Instrumented.cshtml) + IntermediateToken - (465:29,1 [11] Instrumented.cshtml) - CSharp - try {\n + HtmlContent - (476:30,4 [35] Instrumented.cshtml) + IntermediateToken - (476:30,4 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (479:30,7 [28] Instrumented.cshtml) - Html - That time, we wrote 5 lines! + IntermediateToken - (507:30,35 [4] Instrumented.cshtml) - Html -

        + CSharpCode - (511:30,39 [31] Instrumented.cshtml) + IntermediateToken - (511:30,39 [31] Instrumented.cshtml) - CSharp - \n} catch(Exception ex) {\n + HtmlContent - (542:32,4 [29] Instrumented.cshtml) + IntermediateToken - (542:32,4 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (545:32,7 [26] Instrumented.cshtml) - Html - Oh no! An error occurred: + CSharpExpression - (573:32,35 [10] Instrumented.cshtml) + IntermediateToken - (573:32,35 [10] Instrumented.cshtml) - CSharp - ex.Message + HtmlContent - (584:32,46 [4] Instrumented.cshtml) + IntermediateToken - (584:32,46 [4] Instrumented.cshtml) - Html -

        + CSharpCode - (588:32,50 [3] Instrumented.cshtml) + IntermediateToken - (588:32,50 [3] Instrumented.cshtml) - CSharp - \n} + HtmlContent - (591:33,1 [4] Instrumented.cshtml) + IntermediateToken - (591:33,1 [4] Instrumented.cshtml) - Html - \n\n + CSharpCode - (596:35,1 [26] Instrumented.cshtml) + IntermediateToken - (596:35,1 [26] Instrumented.cshtml) - CSharp - lock(new object()) {\n + HtmlContent - (622:36,4 [47] Instrumented.cshtml) + IntermediateToken - (622:36,4 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (625:36,7 [40] Instrumented.cshtml) - Html - This block is locked, for your security! + IntermediateToken - (665:36,47 [4] Instrumented.cshtml) - Html -

        + CSharpCode - (669:36,51 [3] Instrumented.cshtml) + IntermediateToken - (669:36,51 [3] Instrumented.cshtml) - CSharp - \n} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.mappings.txt new file mode 100644 index 0000000000..250678a268 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.mappings.txt @@ -0,0 +1,153 @@ +Source Location: (2:0,2 [32] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +| + int i = 1; + var foo = | +Generated Location: (744:19,2 [32] ) +| + int i = 1; + var foo = | + +Source Location: (45:2,25 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +|; + | +Generated Location: (1060:31,25 [7] ) +|; + | + +Source Location: (68:4,0 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +| | +Generated Location: (1226:39,0 [4] ) +| | + +Source Location: (91:4,23 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +| +| +Generated Location: (1412:46,23 [2] ) +| +| + +Source Location: (99:7,1 [22] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +|while(i <= 10) { + | +Generated Location: (1572:53,1 [22] ) +|while(i <= 10) { + | + +Source Location: (142:8,25 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +|i| +Generated Location: (1778:61,25 [1] ) +|i| + +Source Location: (148:8,31 [16] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +| + i += 1; +}| +Generated Location: (1970:68,31 [16] ) +| + i += 1; +}| + +Source Location: (169:12,1 [19] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +|if(i == 11) { + | +Generated Location: (2147:77,1 [19] ) +|if(i == 11) { + | + +Source Location: (213:13,29 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +| +}| +Generated Location: (2355:85,29 [3] ) +| +}| + +Source Location: (221:16,1 [35] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +|switch(i) { + case 11: + | +Generated Location: (2519:93,1 [35] ) +|switch(i) { + case 11: + | + +Source Location: (292:18,44 [40] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +| + break; + default: + | +Generated Location: (2758:102,44 [40] ) +| + break; + default: + | + +Source Location: (361:21,37 [19] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +| + break; +}| +Generated Location: (2995:112,37 [19] ) +| + break; +}| + +Source Location: (385:25,1 [39] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +|for(int j = 1; j <= 10; j += 2) { + | +Generated Location: (3175:121,1 [39] ) +|for(int j = 1; j <= 10; j += 2) { + | + +Source Location: (451:26,31 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +|j| +Generated Location: (3405:129,31 [1] ) +|j| + +Source Location: (457:26,37 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +| +}| +Generated Location: (3604:136,37 [3] ) +| +}| + +Source Location: (465:29,1 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +|try { + | +Generated Location: (3768:144,1 [11] ) +|try { + | + +Source Location: (511:30,39 [31] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +| +} catch(Exception ex) { + | +Generated Location: (3978:152,39 [31] ) +| +} catch(Exception ex) { + | + +Source Location: (573:32,35 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +|ex.Message| +Generated Location: (4204:161,35 [10] ) +|ex.Message| + +Source Location: (588:32,50 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +| +}| +Generated Location: (4425:168,50 [3] ) +| +}| + +Source Location: (596:35,1 [26] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +|lock(new object()) { + | +Generated Location: (4589:176,1 [26] ) +|lock(new object()) { + | + +Source Location: (669:36,51 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml) +| +}| +Generated Location: (4826:184,51 [3] ) +| +}| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_Runtime.codegen.cs new file mode 100644 index 0000000000..4ece1be3bd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_Runtime.codegen.cs @@ -0,0 +1,182 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "3d0d9c94b62eeccf0a2a106b257a1ea1e22412a9" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Instrumented_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"3d0d9c94b62eeccf0a2a106b257a1ea1e22412a9", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Instrumented_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + + int i = 1; + var foo = + +#line default +#line hidden +#nullable disable + item => new Template(async(__razor_template_writer) => { + PushWriter(__razor_template_writer); + WriteLiteral("

        Bar

        "); + PopWriter(); + } + ) +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + ; + +#line default +#line hidden +#nullable disable + WriteLiteral(" "); + WriteLiteral("Hello, World\r\n

        Hello, World

        \r\n"); + WriteLiteral("\r\n"); +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + while(i <= 10) { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        Hello from C#, #"); +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + Write(i); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n"); +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + i += 1; +} + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + if(i == 11) { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        We wrote 10 lines!

        \r\n"); +#nullable restore +#line 15 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" +} + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + switch(i) { + case 11: + +#line default +#line hidden +#nullable disable + WriteLiteral("

        No really, we wrote 10 lines!

        \r\n"); +#nullable restore +#line 20 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + break; + default: + +#line default +#line hidden +#nullable disable + WriteLiteral("

        Actually, we didn\'t...

        \r\n"); +#nullable restore +#line 23 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + break; +} + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 26 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + for(int j = 1; j <= 10; j += 2) { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        Hello again from C#, #"); +#nullable restore +#line 27 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + Write(j); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n"); +#nullable restore +#line 28 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" +} + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 30 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + try { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        That time, we wrote 5 lines!

        \r\n"); +#nullable restore +#line 32 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" +} catch(Exception ex) { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        Oh no! An error occurred: "); +#nullable restore +#line 33 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + Write(ex.Message); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n"); +#nullable restore +#line 34 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" +} + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 36 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" + lock(new object()) { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        This block is locked, for your security!

        \r\n"); +#nullable restore +#line 38 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented.cshtml" +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_Runtime.ir.txt new file mode 100644 index 0000000000..ac485414f4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_Runtime.ir.txt @@ -0,0 +1,133 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Instrumented_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [32] Instrumented.cshtml) + IntermediateToken - (2:0,2 [32] Instrumented.cshtml) - CSharp - \n int i = 1;\n var foo = + Template - (35:2,15 [10] Instrumented.cshtml) + HtmlContent - (35:2,15 [10] Instrumented.cshtml) + IntermediateToken - (35:2,15 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (38:2,18 [3] Instrumented.cshtml) - Html - Bar + IntermediateToken - (41:2,21 [4] Instrumented.cshtml) - Html -

        + CSharpCode - (45:2,25 [3] Instrumented.cshtml) + IntermediateToken - (45:2,25 [3] Instrumented.cshtml) - CSharp - ;\n + HtmlContent - (48:3,0 [4] Instrumented.cshtml) + IntermediateToken - (48:3,0 [4] Instrumented.cshtml) - Html - + HtmlContent - (54:3,6 [39] Instrumented.cshtml) + IntermediateToken - (54:3,6 [14] Instrumented.cshtml) - Html - Hello, World\n + IntermediateToken - (68:4,0 [4] Instrumented.cshtml) - Html - + IntermediateToken - (72:4,4 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (75:4,7 [12] Instrumented.cshtml) - Html - Hello, World + IntermediateToken - (87:4,19 [4] Instrumented.cshtml) - Html -

        + IntermediateToken - (91:4,23 [2] Instrumented.cshtml) - Html - \n + CSharpCode - (93:5,0 [0] Instrumented.cshtml) + IntermediateToken - (93:5,0 [0] Instrumented.cshtml) - CSharp - + HtmlContent - (96:6,0 [2] Instrumented.cshtml) + IntermediateToken - (96:6,0 [2] Instrumented.cshtml) - Html - \n + CSharpCode - (99:7,1 [18] Instrumented.cshtml) + IntermediateToken - (99:7,1 [18] Instrumented.cshtml) - CSharp - while(i <= 10) {\n + HtmlContent - (117:8,0 [23] Instrumented.cshtml) + IntermediateToken - (117:8,0 [4] Instrumented.cshtml) - Html - + IntermediateToken - (121:8,4 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (124:8,7 [16] Instrumented.cshtml) - Html - Hello from C#, # + CSharpExpression - (142:8,25 [1] Instrumented.cshtml) + IntermediateToken - (142:8,25 [1] Instrumented.cshtml) - CSharp - i + HtmlContent - (144:8,27 [6] Instrumented.cshtml) + IntermediateToken - (144:8,27 [4] Instrumented.cshtml) - Html -

        + IntermediateToken - (148:8,31 [2] Instrumented.cshtml) - Html - \n + CSharpCode - (150:9,0 [16] Instrumented.cshtml) + IntermediateToken - (150:9,0 [16] Instrumented.cshtml) - CSharp - i += 1;\n}\n + HtmlContent - (166:11,0 [2] Instrumented.cshtml) + IntermediateToken - (166:11,0 [2] Instrumented.cshtml) - Html - \n + CSharpCode - (169:12,1 [15] Instrumented.cshtml) + IntermediateToken - (169:12,1 [15] Instrumented.cshtml) - CSharp - if(i == 11) {\n + HtmlContent - (184:13,0 [31] Instrumented.cshtml) + IntermediateToken - (184:13,0 [4] Instrumented.cshtml) - Html - + IntermediateToken - (188:13,4 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (191:13,7 [18] Instrumented.cshtml) - Html - We wrote 10 lines! + IntermediateToken - (209:13,25 [4] Instrumented.cshtml) - Html -

        + IntermediateToken - (213:13,29 [2] Instrumented.cshtml) - Html - \n + CSharpCode - (215:14,0 [3] Instrumented.cshtml) + IntermediateToken - (215:14,0 [3] Instrumented.cshtml) - CSharp - }\n + HtmlContent - (218:15,0 [2] Instrumented.cshtml) + IntermediateToken - (218:15,0 [2] Instrumented.cshtml) - Html - \n + CSharpCode - (221:16,1 [27] Instrumented.cshtml) + IntermediateToken - (221:16,1 [27] Instrumented.cshtml) - CSharp - switch(i) {\n case 11:\n + HtmlContent - (248:18,0 [46] Instrumented.cshtml) + IntermediateToken - (248:18,0 [8] Instrumented.cshtml) - Html - + IntermediateToken - (256:18,8 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (259:18,11 [29] Instrumented.cshtml) - Html - No really, we wrote 10 lines! + IntermediateToken - (288:18,40 [4] Instrumented.cshtml) - Html -

        + IntermediateToken - (292:18,44 [2] Instrumented.cshtml) - Html - \n + CSharpCode - (294:19,0 [30] Instrumented.cshtml) + IntermediateToken - (294:19,0 [30] Instrumented.cshtml) - CSharp - break;\n default:\n + HtmlContent - (324:21,0 [39] Instrumented.cshtml) + IntermediateToken - (324:21,0 [8] Instrumented.cshtml) - Html - + IntermediateToken - (332:21,8 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (335:21,11 [22] Instrumented.cshtml) - Html - Actually, we didn't... + IntermediateToken - (357:21,33 [4] Instrumented.cshtml) - Html -

        + IntermediateToken - (361:21,37 [2] Instrumented.cshtml) - Html - \n + CSharpCode - (363:22,0 [19] Instrumented.cshtml) + IntermediateToken - (363:22,0 [19] Instrumented.cshtml) - CSharp - break;\n}\n + HtmlContent - (382:24,0 [2] Instrumented.cshtml) + IntermediateToken - (382:24,0 [2] Instrumented.cshtml) - Html - \n + CSharpCode - (385:25,1 [35] Instrumented.cshtml) + IntermediateToken - (385:25,1 [35] Instrumented.cshtml) - CSharp - for(int j = 1; j <= 10; j += 2) {\n + HtmlContent - (420:26,0 [29] Instrumented.cshtml) + IntermediateToken - (420:26,0 [4] Instrumented.cshtml) - Html - + IntermediateToken - (424:26,4 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (427:26,7 [22] Instrumented.cshtml) - Html - Hello again from C#, # + CSharpExpression - (451:26,31 [1] Instrumented.cshtml) + IntermediateToken - (451:26,31 [1] Instrumented.cshtml) - CSharp - j + HtmlContent - (453:26,33 [6] Instrumented.cshtml) + IntermediateToken - (453:26,33 [4] Instrumented.cshtml) - Html -

        + IntermediateToken - (457:26,37 [2] Instrumented.cshtml) - Html - \n + CSharpCode - (459:27,0 [3] Instrumented.cshtml) + IntermediateToken - (459:27,0 [3] Instrumented.cshtml) - CSharp - }\n + HtmlContent - (462:28,0 [2] Instrumented.cshtml) + IntermediateToken - (462:28,0 [2] Instrumented.cshtml) - Html - \n + CSharpCode - (465:29,1 [7] Instrumented.cshtml) + IntermediateToken - (465:29,1 [7] Instrumented.cshtml) - CSharp - try {\n + HtmlContent - (472:30,0 [41] Instrumented.cshtml) + IntermediateToken - (472:30,0 [4] Instrumented.cshtml) - Html - + IntermediateToken - (476:30,4 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (479:30,7 [28] Instrumented.cshtml) - Html - That time, we wrote 5 lines! + IntermediateToken - (507:30,35 [4] Instrumented.cshtml) - Html -

        + IntermediateToken - (511:30,39 [2] Instrumented.cshtml) - Html - \n + CSharpCode - (513:31,0 [25] Instrumented.cshtml) + IntermediateToken - (513:31,0 [25] Instrumented.cshtml) - CSharp - } catch(Exception ex) {\n + HtmlContent - (538:32,0 [33] Instrumented.cshtml) + IntermediateToken - (538:32,0 [4] Instrumented.cshtml) - Html - + IntermediateToken - (542:32,4 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (545:32,7 [26] Instrumented.cshtml) - Html - Oh no! An error occurred: + CSharpExpression - (573:32,35 [10] Instrumented.cshtml) + IntermediateToken - (573:32,35 [10] Instrumented.cshtml) - CSharp - ex.Message + HtmlContent - (584:32,46 [6] Instrumented.cshtml) + IntermediateToken - (584:32,46 [4] Instrumented.cshtml) - Html -

        + IntermediateToken - (588:32,50 [2] Instrumented.cshtml) - Html - \n + CSharpCode - (590:33,0 [3] Instrumented.cshtml) + IntermediateToken - (590:33,0 [3] Instrumented.cshtml) - CSharp - }\n + HtmlContent - (593:34,0 [2] Instrumented.cshtml) + IntermediateToken - (593:34,0 [2] Instrumented.cshtml) - Html - \n + CSharpCode - (596:35,1 [22] Instrumented.cshtml) + IntermediateToken - (596:35,1 [22] Instrumented.cshtml) - CSharp - lock(new object()) {\n + HtmlContent - (618:36,0 [53] Instrumented.cshtml) + IntermediateToken - (618:36,0 [4] Instrumented.cshtml) - Html - + IntermediateToken - (622:36,4 [2] Instrumented.cshtml) - Html -

        + IntermediateToken - (625:36,7 [40] Instrumented.cshtml) - Html - This block is locked, for your security! + IntermediateToken - (665:36,47 [4] Instrumented.cshtml) - Html -

        + IntermediateToken - (669:36,51 [2] Instrumented.cshtml) - Html - \n + CSharpCode - (671:37,0 [1] Instrumented.cshtml) + IntermediateToken - (671:37,0 [1] Instrumented.cshtml) - CSharp - } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock.cshtml new file mode 100644 index 0000000000..712ef42848 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock.cshtml @@ -0,0 +1,5 @@ +@{ + for(int i = 1; i <= 10; i++) { +

        Hello from C#, #@(i.ToString())

        + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_DesignTime.codegen.cs new file mode 100644 index 0000000000..cdf9ba3334 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_DesignTime.codegen.cs @@ -0,0 +1,46 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MarkupInCodeBlock_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock.cshtml" + + for(int i = 1; i <= 10; i++) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock.cshtml" + __o = i.ToString(); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock.cshtml" + + } + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_DesignTime.ir.txt new file mode 100644 index 0000000000..1c5e460f3c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_DesignTime.ir.txt @@ -0,0 +1,23 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MarkupInCodeBlock_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [46] MarkupInCodeBlock.cshtml) + IntermediateToken - (2:0,2 [46] MarkupInCodeBlock.cshtml) - CSharp - \n for(int i = 1; i <= 10; i++) {\n + HtmlContent - (48:2,8 [19] MarkupInCodeBlock.cshtml) + IntermediateToken - (48:2,8 [2] MarkupInCodeBlock.cshtml) - Html -

        + IntermediateToken - (51:2,11 [16] MarkupInCodeBlock.cshtml) - Html - Hello from C#, # + CSharpExpression - (69:2,29 [12] MarkupInCodeBlock.cshtml) + IntermediateToken - (69:2,29 [12] MarkupInCodeBlock.cshtml) - CSharp - i.ToString() + HtmlContent - (82:2,42 [4] MarkupInCodeBlock.cshtml) + IntermediateToken - (82:2,42 [4] MarkupInCodeBlock.cshtml) - Html -

        + CSharpCode - (86:2,46 [9] MarkupInCodeBlock.cshtml) + IntermediateToken - (86:2,46 [9] MarkupInCodeBlock.cshtml) - CSharp - \n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_DesignTime.mappings.txt new file mode 100644 index 0000000000..f88beb53f4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_DesignTime.mappings.txt @@ -0,0 +1,23 @@ +Source Location: (2:0,2 [46] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock.cshtml) +| + for(int i = 1; i <= 10; i++) { + | +Generated Location: (754:19,2 [46] ) +| + for(int i = 1; i <= 10; i++) { + | + +Source Location: (69:2,29 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock.cshtml) +|i.ToString()| +Generated Location: (993:28,29 [12] ) +|i.ToString()| + +Source Location: (86:2,46 [9] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock.cshtml) +| + } +| +Generated Location: (1216:35,46 [9] ) +| + } +| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_Runtime.codegen.cs new file mode 100644 index 0000000000..a578762a04 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_Runtime.codegen.cs @@ -0,0 +1,42 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "539d5763b7091d29df375085f623b9086e7f8ad6" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MarkupInCodeBlock_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"539d5763b7091d29df375085f623b9086e7f8ad6", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MarkupInCodeBlock_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock.cshtml" + + for(int i = 1; i <= 10; i++) { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        Hello from C#, #"); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock.cshtml" + Write(i.ToString()); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n"); +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock.cshtml" + } + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_Runtime.ir.txt new file mode 100644 index 0000000000..d517c6d4ad --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_Runtime.ir.txt @@ -0,0 +1,20 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MarkupInCodeBlock_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [38] MarkupInCodeBlock.cshtml) + IntermediateToken - (2:0,2 [38] MarkupInCodeBlock.cshtml) - CSharp - \n for(int i = 1; i <= 10; i++) {\n + HtmlContent - (40:2,0 [27] MarkupInCodeBlock.cshtml) + IntermediateToken - (40:2,0 [8] MarkupInCodeBlock.cshtml) - Html - + IntermediateToken - (48:2,8 [2] MarkupInCodeBlock.cshtml) - Html -

        + IntermediateToken - (51:2,11 [16] MarkupInCodeBlock.cshtml) - Html - Hello from C#, # + CSharpExpression - (69:2,29 [12] MarkupInCodeBlock.cshtml) + IntermediateToken - (69:2,29 [12] MarkupInCodeBlock.cshtml) - CSharp - i.ToString() + HtmlContent - (82:2,42 [6] MarkupInCodeBlock.cshtml) + IntermediateToken - (82:2,42 [4] MarkupInCodeBlock.cshtml) - Html -

        + IntermediateToken - (86:2,46 [2] MarkupInCodeBlock.cshtml) - Html - \n + CSharpCode - (88:3,0 [7] MarkupInCodeBlock.cshtml) + IntermediateToken - (88:3,0 [7] MarkupInCodeBlock.cshtml) - CSharp - }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml new file mode 100644 index 0000000000..efc9795e71 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml @@ -0,0 +1,45 @@ + +@{ + var people = new Person[] + { + new Person() { Name = "Taylor", Age = 95, } + }; + + void PrintName(Person person) + { +
        @person.Name
        + } +} + +@{ PrintName(people[0]) } +@{ AnnounceBirthday(people[0]); } + +@functions { + void AnnounceBirthday(Person person) + { + var formatted = $"Mr. {person.Name}"; +
        +

        Happy birthday @(formatted)!

        +
        + +
          + @for (var i = 0; i < person.Age / 10; i++) + { +
        • @(i) Happy birthday!
        • + } +
        + + if (person.Age < 20) + { + return; + } + +

        Secret message

        + } + + class Person + { + public string Name { get; set; } + public int Age { get; set; } + } +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml new file mode 100644 index 0000000000..f294f34162 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml @@ -0,0 +1,47 @@ +@addTagHelper "*, TestAssembly" +@{ + var people = new Person[] + { + new Person() { Name = "Taylor", Age = 95, }, + }; + + void PrintName(Person person) + { +
        @person.Name
        + } +} + +@{ PrintName(people[0]); } +@{ await AnnounceBirthday(people[0]); } + +@functions { + Task AnnounceBirthday(Person person) + { + var formatted = $"Mr. {person.Name}"; +
        +

        Happy birthday @(formatted)!

        +
        + +
          + @for (var i = 0; i < person.Age / 10; i++) + { +
        • @(i) Happy birthday!
        • + } +
        + + if (person.Age < 20) + { + return Task.CompletedTask; + } + +

        Secret message

        + return Task.CompletedTask; + } + + + class Person + { + public string Name { get; set; } + public int Age { get; set; } + } +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_DesignTime.codegen.cs new file mode 100644 index 0000000000..fd06ee3e25 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_DesignTime.codegen.cs @@ -0,0 +1,160 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Markup_InCodeBlocksWithTagHelper_DesignTime + { + private global::DivTagHelper __DivTagHelper; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + + var people = new Person[] + { + new Person() { Name = "Taylor", Age = 95, }, + }; + + void PrintName(Person person) + { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + __o = person.Name; + +#line default +#line hidden +#nullable disable + __DivTagHelper = CreateTagHelper(); +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + + } + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + PrintName(people[0]); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 15 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + await AnnounceBirthday(people[0]); + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + + Task AnnounceBirthday(Person person) + { + var formatted = $"Mr. {person.Name}"; + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 22 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + __o = formatted; + +#line default +#line hidden +#nullable disable + __DivTagHelper = CreateTagHelper(); +#nullable restore +#line 23 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 26 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + for (var i = 0; i < person.Age / 10; i++) + { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 28 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + __o = i; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 28 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + + } + +#line default +#line hidden +#nullable disable +#nullable restore +#line 30 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + + + if (person.Age < 20) + { + return Task.CompletedTask; + } + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 37 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + + return Task.CompletedTask; + } + + + class Person + { + public string Name { get; set; } + public int Age { get; set; } + } + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_DesignTime.ir.txt new file mode 100644 index 0000000000..37532809ce --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_DesignTime.ir.txt @@ -0,0 +1,81 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Markup_InCodeBlocksWithTagHelper_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::DivTagHelper - __DivTagHelper + DesignTimeDirective - + DirectiveToken - (14:0,14 [17] Markup_InCodeBlocksWithTagHelper.cshtml) - "*, TestAssembly" + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:0,31 [2] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (31:0,31 [2] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - \n + CSharpCode - (35:1,2 [154] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (35:1,2 [154] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - \n var people = new Person[]\n {\n new Person() { Name = "Taylor", Age = 95, },\n };\n\n void PrintName(Person person)\n {\n + TagHelper - (189:9,8 [23] Markup_InCodeBlocksWithTagHelper.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + CSharpExpression - (195:9,14 [11] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (195:9,14 [11] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - person.Name + DefaultTagHelperCreate - - DivTagHelper + DefaultTagHelperExecute - + CSharpCode - (212:9,31 [9] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (212:9,31 [9] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - \n }\n + HtmlContent - (224:12,0 [2] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (224:12,0 [2] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - \n + CSharpCode - (228:13,2 [23] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (228:13,2 [23] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - PrintName(people[0]); + CSharpCode - (256:14,2 [36] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (256:14,2 [36] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - await AnnounceBirthday(people[0]); + HtmlContent - (295:15,0 [2] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (295:15,0 [2] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - \n + CSharpCode - (309:16,12 [106] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (309:16,12 [106] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - \n Task AnnounceBirthday(Person person)\n {\n var formatted = $"Mr. {person.Name}";\n + TagHelper - (415:20,8 [72] Markup_InCodeBlocksWithTagHelper.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (420:20,13 [33] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (420:20,13 [14] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - \n + IntermediateToken - (434:21,12 [3] Markup_InCodeBlocksWithTagHelper.cshtml) - Html -

        + IntermediateToken - (438:21,16 [15] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - Happy birthday + CSharpExpression - (455:21,33 [9] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (455:21,33 [9] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - formatted + HtmlContent - (465:21,43 [16] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (465:21,43 [1] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - ! + IntermediateToken - (466:21,44 [5] Markup_InCodeBlocksWithTagHelper.cshtml) - Html -

        + IntermediateToken - (471:21,49 [10] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - \n + DefaultTagHelperCreate - - DivTagHelper + DefaultTagHelperExecute - + CSharpCode - (487:22,14 [12] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (487:22,14 [12] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - \n\n + HtmlContent - (499:24,8 [14] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (499:24,8 [3] Markup_InCodeBlocksWithTagHelper.cshtml) - Html -
          + IntermediateToken - (503:24,12 [10] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - \n + CSharpCode - (514:25,9 [66] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (514:25,9 [66] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - for (var i = 0; i < person.Age / 10; i++)\n {\n + HtmlContent - (580:27,12 [4] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (580:27,12 [3] Markup_InCodeBlocksWithTagHelper.cshtml) - Html -
        • + CSharpExpression - (586:27,18 [1] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (586:27,18 [1] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - i + HtmlContent - (588:27,20 [21] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (588:27,20 [16] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - Happy birthday! + IntermediateToken - (604:27,36 [5] Markup_InCodeBlocksWithTagHelper.cshtml) - Html -
        • + CSharpCode - (609:27,41 [11] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (609:27,41 [11] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - \n } + HtmlContent - (620:28,9 [15] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (620:28,9 [10] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - \n + IntermediateToken - (630:29,8 [5] Markup_InCodeBlocksWithTagHelper.cshtml) - Html -
        + CSharpCode - (635:29,13 [106] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (635:29,13 [106] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - \n\n if (person.Age < 20)\n {\n return Task.CompletedTask;\n }\n\n + HtmlContent - (741:36,8 [23] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (741:36,8 [3] Markup_InCodeBlocksWithTagHelper.cshtml) - Html -

        + IntermediateToken - (745:36,12 [14] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - Secret message + IntermediateToken - (759:36,26 [5] Markup_InCodeBlocksWithTagHelper.cshtml) - Html -

        + CSharpCode - (764:36,31 [161] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (764:36,31 [161] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - \n return Task.CompletedTask;\n }\n\n\n class Person\n {\n public string Name { get; set; }\n public int Age { get; set; }\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_DesignTime.mappings.txt new file mode 100644 index 0000000000..19c772b504 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_DesignTime.mappings.txt @@ -0,0 +1,142 @@ +Source Location: (14:0,14 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml) +|"*, TestAssembly"| +Generated Location: (619:13,37 [17] ) +|"*, TestAssembly"| + +Source Location: (35:1,2 [154] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml) +| + var people = new Person[] + { + new Person() { Name = "Taylor", Age = 95, }, + }; + + void PrintName(Person person) + { + | +Generated Location: (1132:30,2 [154] ) +| + var people = new Person[] + { + new Person() { Name = "Taylor", Age = 95, }, + }; + + void PrintName(Person person) + { + | + +Source Location: (195:9,14 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml) +|person.Name| +Generated Location: (1480:45,14 [11] ) +|person.Name| + +Source Location: (212:9,31 [9] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml) +| + } +| +Generated Location: (1774:53,31 [9] ) +| + } +| + +Source Location: (228:13,2 [23] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml) +| PrintName(people[0]); | +Generated Location: (1963:61,2 [23] ) +| PrintName(people[0]); | + +Source Location: (256:14,2 [36] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml) +| await AnnounceBirthday(people[0]); | +Generated Location: (2168:68,2 [36] ) +| await AnnounceBirthday(people[0]); | + +Source Location: (309:16,12 [106] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml) +| + Task AnnounceBirthday(Person person) + { + var formatted = $"Mr. {person.Name}"; + | +Generated Location: (2445:77,12 [106] ) +| + Task AnnounceBirthday(Person person) + { + var formatted = $"Mr. {person.Name}"; + | + +Source Location: (455:21,33 [9] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml) +|formatted| +Generated Location: (2764:88,33 [9] ) +|formatted| + +Source Location: (487:22,14 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml) +| + + | +Generated Location: (3035:96,14 [12] ) +| + + | + +Source Location: (514:25,9 [66] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml) +|for (var i = 0; i < person.Age / 10; i++) + { + | +Generated Location: (3236:105,9 [66] ) +|for (var i = 0; i < person.Age / 10; i++) + { + | + +Source Location: (586:27,18 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml) +|i| +Generated Location: (3500:114,18 [1] ) +|i| + +Source Location: (609:27,41 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml) +| + }| +Generated Location: (3723:121,41 [11] ) +| + }| + +Source Location: (635:29,13 [106] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml) +| + + if (person.Age < 20) + { + return Task.CompletedTask; + } + + | +Generated Location: (3927:129,13 [106] ) +| + + if (person.Age < 20) + { + return Task.CompletedTask; + } + + | + +Source Location: (764:36,31 [161] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml) +| + return Task.CompletedTask; + } + + + class Person + { + public string Name { get; set; } + public int Age { get; set; } + } +| +Generated Location: (4244:143,31 [161] ) +| + return Task.CompletedTask; + } + + + class Person + { + public string Name { get; set; } + public int Age { get; set; } + } +| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_Runtime.codegen.cs new file mode 100644 index 0000000000..e47522dc58 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_Runtime.codegen.cs @@ -0,0 +1,182 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "ffae7582d6e0ce50a5fa046a92205df5abc84d6e" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Markup_InCodeBlocksWithTagHelper_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"ffae7582d6e0ce50a5fa046a92205df5abc84d6e", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Markup_InCodeBlocksWithTagHelper_Runtime + { + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::DivTagHelper __DivTagHelper; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + + var people = new Person[] + { + new Person() { Name = "Taylor", Age = 95, }, + }; + + void PrintName(Person person) + { + +#line default +#line hidden +#nullable disable + WriteLiteral(" "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + Write(person.Name); + +#line default +#line hidden +#nullable disable + } + ); + __DivTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__DivTagHelper); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + } + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + PrintName(people[0]); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 15 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + await AnnounceBirthday(people[0]); + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); + } + #pragma warning restore 1998 +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + + Task AnnounceBirthday(Person person) + { + var formatted = $"Mr. {person.Name}"; + +#line default +#line hidden +#nullable disable + WriteLiteral(" "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("\r\n

        Happy birthday "); +#nullable restore +#line 22 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + Write(formatted); + +#line default +#line hidden +#nullable disable + WriteLiteral("!

        \r\n "); + } + ); + __DivTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__DivTagHelper); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + WriteLiteral("
          \r\n"); +#nullable restore +#line 26 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + for (var i = 0; i < person.Age / 10; i++) + { + +#line default +#line hidden +#nullable disable + WriteLiteral("
        • "); +#nullable restore +#line 28 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + Write(i); + +#line default +#line hidden +#nullable disable + WriteLiteral(" Happy birthday!
        • \r\n"); +#nullable restore +#line 29 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + } + +#line default +#line hidden +#nullable disable + WriteLiteral("
        \r\n"); +#nullable restore +#line 31 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + + if (person.Age < 20) + { + return Task.CompletedTask; + } + + +#line default +#line hidden +#nullable disable + WriteLiteral("

        Secret message

        \r\n"); +#nullable restore +#line 38 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper.cshtml" + return Task.CompletedTask; + } + + + class Person + { + public string Name { get; set; } + public int Age { get; set; } + } + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_Runtime.ir.txt new file mode 100644 index 0000000000..4263327a2e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocksWithTagHelper_Runtime.ir.txt @@ -0,0 +1,89 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Markup_InCodeBlocksWithTagHelper_Runtime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::DivTagHelper - __DivTagHelper + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (35:1,2 [146] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (35:1,2 [146] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - \n var people = new Person[]\n {\n new Person() { Name = "Taylor", Age = 95, },\n };\n\n void PrintName(Person person)\n {\n + HtmlContent - (181:9,0 [8] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (181:9,0 [8] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - + TagHelper - (189:9,8 [23] Markup_InCodeBlocksWithTagHelper.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + CSharpExpression - (195:9,14 [11] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (195:9,14 [11] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - person.Name + DefaultTagHelperCreate - - DivTagHelper + DefaultTagHelperExecute - + HtmlContent - (212:9,31 [2] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (212:9,31 [2] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - \n + CSharpCode - (214:10,0 [7] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (214:10,0 [7] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - }\n + HtmlContent - (224:12,0 [2] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (224:12,0 [2] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - \n + CSharpCode - (228:13,2 [23] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (228:13,2 [23] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - PrintName(people[0]); + CSharpCode - (256:14,2 [36] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (256:14,2 [36] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - await AnnounceBirthday(people[0]); + HtmlContent - (295:15,0 [2] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (295:15,0 [2] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - \n + CSharpCode - (309:16,12 [98] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (309:16,12 [98] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - \n Task AnnounceBirthday(Person person)\n {\n var formatted = $"Mr. {person.Name}";\n + HtmlContent - (407:20,0 [8] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (407:20,0 [8] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - + TagHelper - (415:20,8 [72] Markup_InCodeBlocksWithTagHelper.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (420:20,13 [33] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (420:20,13 [14] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - \n + IntermediateToken - (434:21,12 [3] Markup_InCodeBlocksWithTagHelper.cshtml) - Html -

        + IntermediateToken - (438:21,16 [15] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - Happy birthday + CSharpExpression - (455:21,33 [9] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (455:21,33 [9] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - formatted + HtmlContent - (465:21,43 [16] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (465:21,43 [1] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - ! + IntermediateToken - (466:21,44 [5] Markup_InCodeBlocksWithTagHelper.cshtml) - Html -

        + IntermediateToken - (471:21,49 [10] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - \n + DefaultTagHelperCreate - - DivTagHelper + DefaultTagHelperExecute - + HtmlContent - (487:22,14 [2] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (487:22,14 [2] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - \n + CSharpCode - (489:23,0 [2] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (489:23,0 [2] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - \n + HtmlContent - (491:24,0 [14] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (491:24,0 [8] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - + IntermediateToken - (499:24,8 [3] Markup_InCodeBlocksWithTagHelper.cshtml) - Html -
          + IntermediateToken - (503:24,12 [2] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - \n + CSharpCode - (505:25,0 [8] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (505:25,0 [8] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - + CSharpCode - (514:25,9 [54] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (514:25,9 [54] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - for (var i = 0; i < person.Age / 10; i++)\n {\n + HtmlContent - (568:27,0 [16] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (568:27,0 [12] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - + IntermediateToken - (580:27,12 [3] Markup_InCodeBlocksWithTagHelper.cshtml) - Html -
        • + CSharpExpression - (586:27,18 [1] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (586:27,18 [1] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - i + HtmlContent - (588:27,20 [23] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (588:27,20 [16] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - Happy birthday! + IntermediateToken - (604:27,36 [5] Markup_InCodeBlocksWithTagHelper.cshtml) - Html -
        • + IntermediateToken - (609:27,41 [2] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - \n + CSharpCode - (611:28,0 [11] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (611:28,0 [11] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - }\n + HtmlContent - (622:29,0 [15] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (622:29,0 [8] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - + IntermediateToken - (630:29,8 [5] Markup_InCodeBlocksWithTagHelper.cshtml) - Html -
        + IntermediateToken - (635:29,13 [2] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - \n + CSharpCode - (637:30,0 [96] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (637:30,0 [96] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - \n if (person.Age < 20)\n {\n return Task.CompletedTask;\n }\n\n + HtmlContent - (733:36,0 [33] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (733:36,0 [8] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - + IntermediateToken - (741:36,8 [3] Markup_InCodeBlocksWithTagHelper.cshtml) - Html -

        + IntermediateToken - (745:36,12 [14] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - Secret message + IntermediateToken - (759:36,26 [5] Markup_InCodeBlocksWithTagHelper.cshtml) - Html -

        + IntermediateToken - (764:36,31 [2] Markup_InCodeBlocksWithTagHelper.cshtml) - Html - \n + CSharpCode - (766:37,0 [159] Markup_InCodeBlocksWithTagHelper.cshtml) + IntermediateToken - (766:37,0 [159] Markup_InCodeBlocksWithTagHelper.cshtml) - CSharp - return Task.CompletedTask;\n }\n\n\n class Person\n {\n public string Name { get; set; }\n public int Age { get; set; }\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_DesignTime.codegen.cs new file mode 100644 index 0000000000..1c7c4784f6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_DesignTime.codegen.cs @@ -0,0 +1,145 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Markup_InCodeBlocks_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + + var people = new Person[] + { + new Person() { Name = "Taylor", Age = 95, } + }; + + void PrintName(Person person) + { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + __o = person.Name; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + + } + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + PrintName(people[0]) + +#line default +#line hidden +#nullable disable +#nullable restore +#line 15 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + AnnounceBirthday(people[0]); + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + + void AnnounceBirthday(Person person) + { + var formatted = $"Mr. {person.Name}"; + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 22 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + __o = formatted; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 23 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 26 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + for (var i = 0; i < person.Age / 10; i++) + { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 28 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + __o = i; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 28 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + + } + +#line default +#line hidden +#nullable disable +#nullable restore +#line 30 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + + + if (person.Age < 20) + { + return; + } + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 37 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + + } + + class Person + { + public string Name { get; set; } + public int Age { get; set; } + } + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_DesignTime.ir.txt new file mode 100644 index 0000000000..5307e83bb5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_DesignTime.ir.txt @@ -0,0 +1,78 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Markup_InCodeBlocks_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [2] Markup_InCodeBlocks.cshtml) + IntermediateToken - (0:0,0 [2] Markup_InCodeBlocks.cshtml) - Html - \n + CSharpCode - (4:1,2 [153] Markup_InCodeBlocks.cshtml) + IntermediateToken - (4:1,2 [153] Markup_InCodeBlocks.cshtml) - CSharp - \n var people = new Person[]\n {\n new Person() { Name = "Taylor", Age = 95, }\n };\n\n void PrintName(Person person)\n {\n + HtmlContent - (157:9,8 [5] Markup_InCodeBlocks.cshtml) + IntermediateToken - (157:9,8 [4] Markup_InCodeBlocks.cshtml) - Html -
        + CSharpExpression - (163:9,14 [11] Markup_InCodeBlocks.cshtml) + IntermediateToken - (163:9,14 [11] Markup_InCodeBlocks.cshtml) - CSharp - person.Name + HtmlContent - (174:9,25 [6] Markup_InCodeBlocks.cshtml) + IntermediateToken - (174:9,25 [6] Markup_InCodeBlocks.cshtml) - Html -
        + CSharpCode - (180:9,31 [9] Markup_InCodeBlocks.cshtml) + IntermediateToken - (180:9,31 [9] Markup_InCodeBlocks.cshtml) - CSharp - \n }\n + HtmlContent - (192:12,0 [2] Markup_InCodeBlocks.cshtml) + IntermediateToken - (192:12,0 [2] Markup_InCodeBlocks.cshtml) - Html - \n + CSharpCode - (196:13,2 [22] Markup_InCodeBlocks.cshtml) + IntermediateToken - (196:13,2 [22] Markup_InCodeBlocks.cshtml) - CSharp - PrintName(people[0]) + CSharpCode - (223:14,2 [30] Markup_InCodeBlocks.cshtml) + IntermediateToken - (223:14,2 [30] Markup_InCodeBlocks.cshtml) - CSharp - AnnounceBirthday(people[0]); + HtmlContent - (256:15,0 [2] Markup_InCodeBlocks.cshtml) + IntermediateToken - (256:15,0 [2] Markup_InCodeBlocks.cshtml) - Html - \n + CSharpCode - (270:16,12 [106] Markup_InCodeBlocks.cshtml) + IntermediateToken - (270:16,12 [106] Markup_InCodeBlocks.cshtml) - CSharp - \n void AnnounceBirthday(Person person)\n {\n var formatted = $"Mr. {person.Name}";\n + HtmlContent - (376:20,8 [38] Markup_InCodeBlocks.cshtml) + IntermediateToken - (376:20,8 [4] Markup_InCodeBlocks.cshtml) - Html -
        + IntermediateToken - (381:20,13 [14] Markup_InCodeBlocks.cshtml) - Html - \n + IntermediateToken - (395:21,12 [3] Markup_InCodeBlocks.cshtml) - Html -

        + IntermediateToken - (399:21,16 [15] Markup_InCodeBlocks.cshtml) - Html - Happy birthday + CSharpExpression - (416:21,33 [9] Markup_InCodeBlocks.cshtml) + IntermediateToken - (416:21,33 [9] Markup_InCodeBlocks.cshtml) - CSharp - formatted + HtmlContent - (426:21,43 [22] Markup_InCodeBlocks.cshtml) + IntermediateToken - (426:21,43 [1] Markup_InCodeBlocks.cshtml) - Html - ! + IntermediateToken - (427:21,44 [5] Markup_InCodeBlocks.cshtml) - Html -

        + IntermediateToken - (432:21,49 [10] Markup_InCodeBlocks.cshtml) - Html - \n + IntermediateToken - (442:22,8 [6] Markup_InCodeBlocks.cshtml) - Html -
        + CSharpCode - (448:22,14 [12] Markup_InCodeBlocks.cshtml) + IntermediateToken - (448:22,14 [12] Markup_InCodeBlocks.cshtml) - CSharp - \n\n + HtmlContent - (460:24,8 [14] Markup_InCodeBlocks.cshtml) + IntermediateToken - (460:24,8 [3] Markup_InCodeBlocks.cshtml) - Html -
          + IntermediateToken - (464:24,12 [10] Markup_InCodeBlocks.cshtml) - Html - \n + CSharpCode - (475:25,9 [66] Markup_InCodeBlocks.cshtml) + IntermediateToken - (475:25,9 [66] Markup_InCodeBlocks.cshtml) - CSharp - for (var i = 0; i < person.Age / 10; i++)\n {\n + HtmlContent - (541:27,12 [4] Markup_InCodeBlocks.cshtml) + IntermediateToken - (541:27,12 [3] Markup_InCodeBlocks.cshtml) - Html -
        • + CSharpExpression - (547:27,18 [1] Markup_InCodeBlocks.cshtml) + IntermediateToken - (547:27,18 [1] Markup_InCodeBlocks.cshtml) - CSharp - i + HtmlContent - (549:27,20 [21] Markup_InCodeBlocks.cshtml) + IntermediateToken - (549:27,20 [16] Markup_InCodeBlocks.cshtml) - Html - Happy birthday! + IntermediateToken - (565:27,36 [5] Markup_InCodeBlocks.cshtml) - Html -
        • + CSharpCode - (570:27,41 [11] Markup_InCodeBlocks.cshtml) + IntermediateToken - (570:27,41 [11] Markup_InCodeBlocks.cshtml) - CSharp - \n } + HtmlContent - (581:28,9 [15] Markup_InCodeBlocks.cshtml) + IntermediateToken - (581:28,9 [10] Markup_InCodeBlocks.cshtml) - Html - \n + IntermediateToken - (591:29,8 [5] Markup_InCodeBlocks.cshtml) - Html -
        + CSharpCode - (596:29,13 [87] Markup_InCodeBlocks.cshtml) + IntermediateToken - (596:29,13 [87] Markup_InCodeBlocks.cshtml) - CSharp - \n\n if (person.Age < 20)\n {\n return;\n }\n\n + HtmlContent - (683:36,8 [23] Markup_InCodeBlocks.cshtml) + IntermediateToken - (683:36,8 [3] Markup_InCodeBlocks.cshtml) - Html -

        + IntermediateToken - (687:36,12 [14] Markup_InCodeBlocks.cshtml) - Html - Secret message + IntermediateToken - (701:36,26 [5] Markup_InCodeBlocks.cshtml) - Html -

        + CSharpCode - (706:36,31 [123] Markup_InCodeBlocks.cshtml) + IntermediateToken - (706:36,31 [123] Markup_InCodeBlocks.cshtml) - CSharp - \n }\n\n class Person\n {\n public string Name { get; set; }\n public int Age { get; set; }\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_DesignTime.mappings.txt new file mode 100644 index 0000000000..de5fb0e1d3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_DesignTime.mappings.txt @@ -0,0 +1,133 @@ +Source Location: (4:1,2 [153] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml) +| + var people = new Person[] + { + new Person() { Name = "Taylor", Age = 95, } + }; + + void PrintName(Person person) + { + | +Generated Location: (758:19,2 [153] ) +| + var people = new Person[] + { + new Person() { Name = "Taylor", Age = 95, } + }; + + void PrintName(Person person) + { + | + +Source Location: (163:9,14 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml) +|person.Name| +Generated Location: (1092:34,14 [11] ) +|person.Name| + +Source Location: (180:9,31 [9] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml) +| + } +| +Generated Location: (1302:41,31 [9] ) +| + } +| + +Source Location: (196:13,2 [22] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml) +| PrintName(people[0]) | +Generated Location: (1478:49,2 [22] ) +| PrintName(people[0]) | + +Source Location: (223:14,2 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml) +| AnnounceBirthday(people[0]); | +Generated Location: (1669:56,2 [30] ) +| AnnounceBirthday(people[0]); | + +Source Location: (270:16,12 [106] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml) +| + void AnnounceBirthday(Person person) + { + var formatted = $"Mr. {person.Name}"; + | +Generated Location: (1927:65,12 [106] ) +| + void AnnounceBirthday(Person person) + { + var formatted = $"Mr. {person.Name}"; + | + +Source Location: (416:21,33 [9] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml) +|formatted| +Generated Location: (2233:76,33 [9] ) +|formatted| + +Source Location: (448:22,14 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml) +| + + | +Generated Location: (2424:83,14 [12] ) +| + + | + +Source Location: (475:25,9 [66] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml) +|for (var i = 0; i < person.Age / 10; i++) + { + | +Generated Location: (2612:92,9 [66] ) +|for (var i = 0; i < person.Age / 10; i++) + { + | + +Source Location: (547:27,18 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml) +|i| +Generated Location: (2863:101,18 [1] ) +|i| + +Source Location: (570:27,41 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml) +| + }| +Generated Location: (3073:108,41 [11] ) +| + }| + +Source Location: (596:29,13 [87] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml) +| + + if (person.Age < 20) + { + return; + } + + | +Generated Location: (3264:116,13 [87] ) +| + + if (person.Age < 20) + { + return; + } + + | + +Source Location: (706:36,31 [123] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml) +| + } + + class Person + { + public string Name { get; set; } + public int Age { get; set; } + } +| +Generated Location: (3549:130,31 [123] ) +| + } + + class Person + { + public string Name { get; set; } + public int Age { get; set; } + } +| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_Runtime.codegen.cs new file mode 100644 index 0000000000..bf58bbc6f8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_Runtime.codegen.cs @@ -0,0 +1,136 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "2320e63391918e8389308263bcd1e9ae3cc8cc46" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Markup_InCodeBlocks_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"2320e63391918e8389308263bcd1e9ae3cc8cc46", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Markup_InCodeBlocks_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + + var people = new Person[] + { + new Person() { Name = "Taylor", Age = 95, } + }; + + void PrintName(Person person) + { + +#line default +#line hidden +#nullable disable + WriteLiteral("
        "); +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + Write(person.Name); + +#line default +#line hidden +#nullable disable + WriteLiteral("
        \r\n"); +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + } + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + PrintName(people[0]) + +#line default +#line hidden +#nullable disable +#nullable restore +#line 15 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + AnnounceBirthday(people[0]); + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); + } + #pragma warning restore 1998 +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + + void AnnounceBirthday(Person person) + { + var formatted = $"Mr. {person.Name}"; + +#line default +#line hidden +#nullable disable + WriteLiteral("
        \r\n

        Happy birthday "); +#nullable restore +#line 22 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + Write(formatted); + +#line default +#line hidden +#nullable disable + WriteLiteral("!

        \r\n
        \r\n"); + WriteLiteral("
          \r\n"); +#nullable restore +#line 26 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + for (var i = 0; i < person.Age / 10; i++) + { + +#line default +#line hidden +#nullable disable + WriteLiteral("
        • "); +#nullable restore +#line 28 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + Write(i); + +#line default +#line hidden +#nullable disable + WriteLiteral(" Happy birthday!
        • \r\n"); +#nullable restore +#line 29 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + } + +#line default +#line hidden +#nullable disable + WriteLiteral("
        \r\n"); +#nullable restore +#line 31 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + + if (person.Age < 20) + { + return; + } + + +#line default +#line hidden +#nullable disable + WriteLiteral("

        Secret message

        \r\n"); +#nullable restore +#line 38 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks.cshtml" + } + + class Person + { + public string Name { get; set; } + public int Age { get; set; } + } + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_Runtime.ir.txt new file mode 100644 index 0000000000..841e57a19a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Markup_InCodeBlocks_Runtime.ir.txt @@ -0,0 +1,85 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Markup_InCodeBlocks_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [2] Markup_InCodeBlocks.cshtml) + IntermediateToken - (0:0,0 [2] Markup_InCodeBlocks.cshtml) - Html - \n + CSharpCode - (4:1,2 [145] Markup_InCodeBlocks.cshtml) + IntermediateToken - (4:1,2 [145] Markup_InCodeBlocks.cshtml) - CSharp - \n var people = new Person[]\n {\n new Person() { Name = "Taylor", Age = 95, }\n };\n\n void PrintName(Person person)\n {\n + HtmlContent - (149:9,0 [13] Markup_InCodeBlocks.cshtml) + IntermediateToken - (149:9,0 [8] Markup_InCodeBlocks.cshtml) - Html - + IntermediateToken - (157:9,8 [4] Markup_InCodeBlocks.cshtml) - Html -
        + CSharpExpression - (163:9,14 [11] Markup_InCodeBlocks.cshtml) + IntermediateToken - (163:9,14 [11] Markup_InCodeBlocks.cshtml) - CSharp - person.Name + HtmlContent - (174:9,25 [8] Markup_InCodeBlocks.cshtml) + IntermediateToken - (174:9,25 [6] Markup_InCodeBlocks.cshtml) - Html -
        + IntermediateToken - (180:9,31 [2] Markup_InCodeBlocks.cshtml) - Html - \n + CSharpCode - (182:10,0 [7] Markup_InCodeBlocks.cshtml) + IntermediateToken - (182:10,0 [7] Markup_InCodeBlocks.cshtml) - CSharp - }\n + HtmlContent - (192:12,0 [2] Markup_InCodeBlocks.cshtml) + IntermediateToken - (192:12,0 [2] Markup_InCodeBlocks.cshtml) - Html - \n + CSharpCode - (196:13,2 [22] Markup_InCodeBlocks.cshtml) + IntermediateToken - (196:13,2 [22] Markup_InCodeBlocks.cshtml) - CSharp - PrintName(people[0]) + CSharpCode - (223:14,2 [30] Markup_InCodeBlocks.cshtml) + IntermediateToken - (223:14,2 [30] Markup_InCodeBlocks.cshtml) - CSharp - AnnounceBirthday(people[0]); + HtmlContent - (256:15,0 [2] Markup_InCodeBlocks.cshtml) + IntermediateToken - (256:15,0 [2] Markup_InCodeBlocks.cshtml) - Html - \n + CSharpCode - (270:16,12 [98] Markup_InCodeBlocks.cshtml) + IntermediateToken - (270:16,12 [98] Markup_InCodeBlocks.cshtml) - CSharp - \n void AnnounceBirthday(Person person)\n {\n var formatted = $"Mr. {person.Name}";\n + HtmlContent - (368:20,0 [46] Markup_InCodeBlocks.cshtml) + IntermediateToken - (368:20,0 [8] Markup_InCodeBlocks.cshtml) - Html - + IntermediateToken - (376:20,8 [4] Markup_InCodeBlocks.cshtml) - Html -
        + IntermediateToken - (381:20,13 [14] Markup_InCodeBlocks.cshtml) - Html - \n + IntermediateToken - (395:21,12 [3] Markup_InCodeBlocks.cshtml) - Html -

        + IntermediateToken - (399:21,16 [15] Markup_InCodeBlocks.cshtml) - Html - Happy birthday + CSharpExpression - (416:21,33 [9] Markup_InCodeBlocks.cshtml) + IntermediateToken - (416:21,33 [9] Markup_InCodeBlocks.cshtml) - CSharp - formatted + HtmlContent - (426:21,43 [24] Markup_InCodeBlocks.cshtml) + IntermediateToken - (426:21,43 [1] Markup_InCodeBlocks.cshtml) - Html - ! + IntermediateToken - (427:21,44 [5] Markup_InCodeBlocks.cshtml) - Html -

        + IntermediateToken - (432:21,49 [10] Markup_InCodeBlocks.cshtml) - Html - \n + IntermediateToken - (442:22,8 [6] Markup_InCodeBlocks.cshtml) - Html -
        + IntermediateToken - (448:22,14 [2] Markup_InCodeBlocks.cshtml) - Html - \n + CSharpCode - (450:23,0 [2] Markup_InCodeBlocks.cshtml) + IntermediateToken - (450:23,0 [2] Markup_InCodeBlocks.cshtml) - CSharp - \n + HtmlContent - (452:24,0 [14] Markup_InCodeBlocks.cshtml) + IntermediateToken - (452:24,0 [8] Markup_InCodeBlocks.cshtml) - Html - + IntermediateToken - (460:24,8 [3] Markup_InCodeBlocks.cshtml) - Html -
          + IntermediateToken - (464:24,12 [2] Markup_InCodeBlocks.cshtml) - Html - \n + CSharpCode - (466:25,0 [8] Markup_InCodeBlocks.cshtml) + IntermediateToken - (466:25,0 [8] Markup_InCodeBlocks.cshtml) - CSharp - + CSharpCode - (475:25,9 [54] Markup_InCodeBlocks.cshtml) + IntermediateToken - (475:25,9 [54] Markup_InCodeBlocks.cshtml) - CSharp - for (var i = 0; i < person.Age / 10; i++)\n {\n + HtmlContent - (529:27,0 [16] Markup_InCodeBlocks.cshtml) + IntermediateToken - (529:27,0 [12] Markup_InCodeBlocks.cshtml) - Html - + IntermediateToken - (541:27,12 [3] Markup_InCodeBlocks.cshtml) - Html -
        • + CSharpExpression - (547:27,18 [1] Markup_InCodeBlocks.cshtml) + IntermediateToken - (547:27,18 [1] Markup_InCodeBlocks.cshtml) - CSharp - i + HtmlContent - (549:27,20 [23] Markup_InCodeBlocks.cshtml) + IntermediateToken - (549:27,20 [16] Markup_InCodeBlocks.cshtml) - Html - Happy birthday! + IntermediateToken - (565:27,36 [5] Markup_InCodeBlocks.cshtml) - Html -
        • + IntermediateToken - (570:27,41 [2] Markup_InCodeBlocks.cshtml) - Html - \n + CSharpCode - (572:28,0 [11] Markup_InCodeBlocks.cshtml) + IntermediateToken - (572:28,0 [11] Markup_InCodeBlocks.cshtml) - CSharp - }\n + HtmlContent - (583:29,0 [15] Markup_InCodeBlocks.cshtml) + IntermediateToken - (583:29,0 [8] Markup_InCodeBlocks.cshtml) - Html - + IntermediateToken - (591:29,8 [5] Markup_InCodeBlocks.cshtml) - Html -
        + IntermediateToken - (596:29,13 [2] Markup_InCodeBlocks.cshtml) - Html - \n + CSharpCode - (598:30,0 [77] Markup_InCodeBlocks.cshtml) + IntermediateToken - (598:30,0 [77] Markup_InCodeBlocks.cshtml) - CSharp - \n if (person.Age < 20)\n {\n return;\n }\n\n + HtmlContent - (675:36,0 [33] Markup_InCodeBlocks.cshtml) + IntermediateToken - (675:36,0 [8] Markup_InCodeBlocks.cshtml) - Html - + IntermediateToken - (683:36,8 [3] Markup_InCodeBlocks.cshtml) - Html -

        + IntermediateToken - (687:36,12 [14] Markup_InCodeBlocks.cshtml) - Html - Secret message + IntermediateToken - (701:36,26 [5] Markup_InCodeBlocks.cshtml) - Html -

        + IntermediateToken - (706:36,31 [2] Markup_InCodeBlocks.cshtml) - Html - \n + CSharpCode - (708:37,0 [121] Markup_InCodeBlocks.cshtml) + IntermediateToken - (708:37,0 [121] Markup_InCodeBlocks.cshtml) - CSharp - }\n\n class Person\n {\n public string Name { get; set; }\n public int Age { get; set; }\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers.cshtml new file mode 100644 index 0000000000..c001d4945d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers.cshtml @@ -0,0 +1,20 @@ +@addTagHelper "*, TestAssembly" + +

        + + + + + +

        +
        Tag helper with unmatched bound boolean attributes.
        +

        \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_DesignTime.codegen.cs new file mode 100644 index 0000000000..a7f71679e9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_DesignTime.codegen.cs @@ -0,0 +1,51 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MinimizedTagHelpers_DesignTime + { + private global::TestNamespace.CatchAllTagHelper __TestNamespace_CatchAllTagHelper; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::DivTagHelper __DivTagHelper; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper.BoundRequiredString = "hello"; + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __TestNamespace_CatchAllTagHelper.BoundRequiredString = "world"; + __TestNamespace_InputTagHelper.BoundRequiredString = "hello2"; + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper.BoundRequiredString = "world"; + __DivTagHelper = CreateTagHelper(); + __DivTagHelper.BoundBoolProp = true; + __DivTagHelper.BoolDictProp["key"] = true; + __DivTagHelper = CreateTagHelper(); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_DesignTime.ir.txt new file mode 100644 index 0000000000..38941da8af --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_DesignTime.ir.txt @@ -0,0 +1,109 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MinimizedTagHelpers_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.CatchAllTagHelper - __TestNamespace_CatchAllTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::DivTagHelper - __DivTagHelper + DesignTimeDirective - + DirectiveToken - (14:0,14 [17] MinimizedTagHelpers.cshtml) - "*, TestAssembly" + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:0,31 [4] MinimizedTagHelpers.cshtml) + IntermediateToken - (31:0,31 [4] MinimizedTagHelpers.cshtml) - Html - \n\n + TagHelper - (35:2,0 [762] MinimizedTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (64:2,29 [34] MinimizedTagHelpers.cshtml) + IntermediateToken - (64:2,29 [6] MinimizedTagHelpers.cshtml) - Html - \n + IntermediateToken - (70:3,4 [6] MinimizedTagHelpers.cshtml) - Html - + IntermediateToken - (92:3,26 [6] MinimizedTagHelpers.cshtml) - Html - \n + TagHelper - (98:4,4 [59] MinimizedTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (112:4,18 [3] MinimizedTagHelpers.cshtml) + IntermediateToken - (112:4,18 [3] MinimizedTagHelpers.cshtml) - Html - btn + DefaultTagHelperHtmlAttribute - - catchall-unbound-required - HtmlAttributeValueStyle.Minimized + DefaultTagHelperExecute - + HtmlContent - (157:5,39 [6] MinimizedTagHelpers.cshtml) + IntermediateToken - (157:5,39 [6] MinimizedTagHelpers.cshtml) - Html - \n + TagHelper - (163:6,4 [119] MinimizedTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (190:7,18 [3] MinimizedTagHelpers.cshtml) + IntermediateToken - (190:7,18 [3] MinimizedTagHelpers.cshtml) - Html - btn + DefaultTagHelperHtmlAttribute - - catchall-unbound-required - HtmlAttributeValueStyle.Minimized + DefaultTagHelperHtmlAttribute - - input-unbound-required - HtmlAttributeValueStyle.Minimized + DefaultTagHelperProperty - (273:7,101 [5] MinimizedTagHelpers.cshtml) - input-bound-required-string - string TestNamespace.InputTagHelper.BoundRequiredString - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (273:7,101 [5] MinimizedTagHelpers.cshtml) + IntermediateToken - (273:7,101 [5] MinimizedTagHelpers.cshtml) - Html - hello + DefaultTagHelperExecute - + HtmlContent - (282:7,110 [6] MinimizedTagHelpers.cshtml) + IntermediateToken - (282:7,110 [6] MinimizedTagHelpers.cshtml) - Html - \n + TagHelper - (288:8,4 [176] MinimizedTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (315:9,18 [3] MinimizedTagHelpers.cshtml) + IntermediateToken - (315:9,18 [3] MinimizedTagHelpers.cshtml) - Html - btn + DefaultTagHelperHtmlAttribute - - catchall-unbound-required - HtmlAttributeValueStyle.Minimized + DefaultTagHelperHtmlAttribute - - input-unbound-required - HtmlAttributeValueStyle.Minimized + DefaultTagHelperProperty - (418:11,57 [5] MinimizedTagHelpers.cshtml) - catchall-bound-string - string TestNamespace.CatchAllTagHelper.BoundRequiredString - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (418:11,57 [5] MinimizedTagHelpers.cshtml) + IntermediateToken - (418:11,57 [5] MinimizedTagHelpers.cshtml) - Html - world + DefaultTagHelperProperty - (454:11,93 [6] MinimizedTagHelpers.cshtml) - input-bound-required-string - string TestNamespace.InputTagHelper.BoundRequiredString - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (454:11,93 [6] MinimizedTagHelpers.cshtml) + IntermediateToken - (454:11,93 [6] MinimizedTagHelpers.cshtml) - Html - hello2 + DefaultTagHelperExecute - + HtmlContent - (464:11,103 [6] MinimizedTagHelpers.cshtml) + IntermediateToken - (464:11,103 [6] MinimizedTagHelpers.cshtml) - Html - \n + TagHelper - (470:12,4 [206] MinimizedTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (484:12,18 [3] MinimizedTagHelpers.cshtml) + IntermediateToken - (484:12,18 [3] MinimizedTagHelpers.cshtml) - Html - btn + DefaultTagHelperHtmlAttribute - - catchall-unbound-required - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (529:13,38 [5] MinimizedTagHelpers.cshtml) + IntermediateToken - (529:13,38 [5] MinimizedTagHelpers.cshtml) - Html - hello + DefaultTagHelperHtmlAttribute - - input-unbound-required - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (578:14,40 [6] MinimizedTagHelpers.cshtml) + IntermediateToken - (578:14,40 [6] MinimizedTagHelpers.cshtml) - Html - hello2 + DefaultTagHelperHtmlAttribute - - catchall-unbound-required - HtmlAttributeValueStyle.Minimized + DefaultTagHelperProperty - (667:16,40 [5] MinimizedTagHelpers.cshtml) - input-bound-required-string - string TestNamespace.InputTagHelper.BoundRequiredString - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (667:16,40 [5] MinimizedTagHelpers.cshtml) + IntermediateToken - (667:16,40 [5] MinimizedTagHelpers.cshtml) - Html - world + DefaultTagHelperExecute - + HtmlContent - (676:16,49 [6] MinimizedTagHelpers.cshtml) + IntermediateToken - (676:16,49 [6] MinimizedTagHelpers.cshtml) - Html - \n + TagHelper - (682:17,4 [41] MinimizedTagHelpers.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - DivTagHelper + DefaultTagHelperProperty - - boundbool - bool DivTagHelper.BoundBoolProp - HtmlAttributeValueStyle.Minimized + DefaultTagHelperProperty - - booldict-prefix-key - System.Collections.Generic.IDictionary DivTagHelper.BoolDictProp - HtmlAttributeValueStyle.Minimized + DefaultTagHelperExecute - + HtmlContent - (723:17,45 [6] MinimizedTagHelpers.cshtml) + IntermediateToken - (723:17,45 [6] MinimizedTagHelpers.cshtml) - Html - \n + TagHelper - (729:18,4 [62] MinimizedTagHelpers.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (734:18,9 [51] MinimizedTagHelpers.cshtml) + IntermediateToken - (734:18,9 [51] MinimizedTagHelpers.cshtml) - Html - Tag helper with unmatched bound boolean attributes. + DefaultTagHelperCreate - - DivTagHelper + DefaultTagHelperExecute - + HtmlContent - (791:18,66 [2] MinimizedTagHelpers.cshtml) + IntermediateToken - (791:18,66 [2] MinimizedTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - catchall-unbound-required - HtmlAttributeValueStyle.Minimized + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_DesignTime.mappings.txt new file mode 100644 index 0000000000..e8d92fb65c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_DesignTime.mappings.txt @@ -0,0 +1,5 @@ +Source Location: (14:0,14 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers.cshtml) +|"*, TestAssembly"| +Generated Location: (771:15,37 [17] ) +|"*, TestAssembly"| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_Runtime.codegen.cs new file mode 100644 index 0000000000..df5a1eb99e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_Runtime.codegen.cs @@ -0,0 +1,188 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "29c9ea0bc587afb2f919c7ed7192d6687b534753" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MinimizedTagHelpers_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"29c9ea0bc587afb2f919c7ed7192d6687b534753", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MinimizedTagHelpers_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("btn"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("input-bound-required-string", "hello", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("catchall-bound-string", "world", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("input-bound-required-string", "hello2", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("catchall-unbound-required", new global::Microsoft.AspNetCore.Html.HtmlString("hello"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_5 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("input-unbound-required", new global::Microsoft.AspNetCore.Html.HtmlString("hello2"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_6 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("input-bound-required-string", "world", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.CatchAllTagHelper __TestNamespace_CatchAllTagHelper; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::DivTagHelper __DivTagHelper; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("\r\n \r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); + BeginWriteTagHelperAttribute(); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("catchall-unbound-required", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); + BeginWriteTagHelperAttribute(); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("catchall-unbound-required", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); + BeginWriteTagHelperAttribute(); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("input-unbound-required", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); + __TestNamespace_InputTagHelper.BoundRequiredString = (string)__tagHelperAttribute_1.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); + BeginWriteTagHelperAttribute(); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("catchall-unbound-required", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); + BeginWriteTagHelperAttribute(); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("input-unbound-required", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); + __TestNamespace_CatchAllTagHelper.BoundRequiredString = (string)__tagHelperAttribute_2.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2); + __TestNamespace_InputTagHelper.BoundRequiredString = (string)__tagHelperAttribute_3.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5); + BeginWriteTagHelperAttribute(); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("catchall-unbound-required", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); + __TestNamespace_InputTagHelper.BoundRequiredString = (string)__tagHelperAttribute_6.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_6); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + } + ); + __DivTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__DivTagHelper); + __DivTagHelper.BoundBoolProp = true; + __tagHelperExecutionContext.AddTagHelperAttribute("boundbool", __DivTagHelper.BoundBoolProp, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); + if (__DivTagHelper.BoolDictProp == null) + { + throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("booldict-prefix-key", "DivTagHelper", "BoolDictProp")); + } + __DivTagHelper.BoolDictProp["key"] = true; + __tagHelperExecutionContext.AddTagHelperAttribute("booldict-prefix-key", __DivTagHelper.BoolDictProp["key"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("Tag helper with unmatched bound boolean attributes."); + } + ); + __DivTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__DivTagHelper); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + } + ); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + BeginWriteTagHelperAttribute(); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("catchall-unbound-required", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_Runtime.ir.txt new file mode 100644 index 0000000000..0f51578f51 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MinimizedTagHelpers_Runtime.ir.txt @@ -0,0 +1,90 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MinimizedTagHelpers_Runtime - - + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_0 - class - btn - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_1 - input-bound-required-string - hello - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_2 - catchall-bound-string - world - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_3 - input-bound-required-string - hello2 - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_4 - catchall-unbound-required - hello - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_5 - input-unbound-required - hello2 - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_6 - input-bound-required-string - world - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.CatchAllTagHelper - __TestNamespace_CatchAllTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::DivTagHelper - __DivTagHelper + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (33:1,0 [2] MinimizedTagHelpers.cshtml) + IntermediateToken - (33:1,0 [2] MinimizedTagHelpers.cshtml) - Html - \n + TagHelper - (35:2,0 [762] MinimizedTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (64:2,29 [34] MinimizedTagHelpers.cshtml) + IntermediateToken - (64:2,29 [6] MinimizedTagHelpers.cshtml) - Html - \n + IntermediateToken - (70:3,4 [6] MinimizedTagHelpers.cshtml) - Html - + IntermediateToken - (92:3,26 [6] MinimizedTagHelpers.cshtml) - Html - \n + TagHelper - (98:4,4 [59] MinimizedTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 + DefaultTagHelperHtmlAttribute - - catchall-unbound-required - HtmlAttributeValueStyle.Minimized + DefaultTagHelperExecute - + HtmlContent - (157:5,39 [6] MinimizedTagHelpers.cshtml) + IntermediateToken - (157:5,39 [6] MinimizedTagHelpers.cshtml) - Html - \n + TagHelper - (163:6,4 [119] MinimizedTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 + DefaultTagHelperHtmlAttribute - - catchall-unbound-required - HtmlAttributeValueStyle.Minimized + DefaultTagHelperHtmlAttribute - - input-unbound-required - HtmlAttributeValueStyle.Minimized + PreallocatedTagHelperProperty - (273:7,101 [5] MinimizedTagHelpers.cshtml) - __tagHelperAttribute_1 - input-bound-required-string - BoundRequiredString + DefaultTagHelperExecute - + HtmlContent - (282:7,110 [6] MinimizedTagHelpers.cshtml) + IntermediateToken - (282:7,110 [6] MinimizedTagHelpers.cshtml) - Html - \n + TagHelper - (288:8,4 [176] MinimizedTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 + DefaultTagHelperHtmlAttribute - - catchall-unbound-required - HtmlAttributeValueStyle.Minimized + DefaultTagHelperHtmlAttribute - - input-unbound-required - HtmlAttributeValueStyle.Minimized + PreallocatedTagHelperProperty - (418:11,57 [5] MinimizedTagHelpers.cshtml) - __tagHelperAttribute_2 - catchall-bound-string - BoundRequiredString + PreallocatedTagHelperProperty - (454:11,93 [6] MinimizedTagHelpers.cshtml) - __tagHelperAttribute_3 - input-bound-required-string - BoundRequiredString + DefaultTagHelperExecute - + HtmlContent - (464:11,103 [6] MinimizedTagHelpers.cshtml) + IntermediateToken - (464:11,103 [6] MinimizedTagHelpers.cshtml) - Html - \n + TagHelper - (470:12,4 [206] MinimizedTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_4 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_5 + DefaultTagHelperHtmlAttribute - - catchall-unbound-required - HtmlAttributeValueStyle.Minimized + PreallocatedTagHelperProperty - (667:16,40 [5] MinimizedTagHelpers.cshtml) - __tagHelperAttribute_6 - input-bound-required-string - BoundRequiredString + DefaultTagHelperExecute - + HtmlContent - (676:16,49 [6] MinimizedTagHelpers.cshtml) + IntermediateToken - (676:16,49 [6] MinimizedTagHelpers.cshtml) - Html - \n + TagHelper - (682:17,4 [41] MinimizedTagHelpers.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - DivTagHelper + DefaultTagHelperProperty - - boundbool - bool DivTagHelper.BoundBoolProp - HtmlAttributeValueStyle.Minimized + DefaultTagHelperProperty - - booldict-prefix-key - System.Collections.Generic.IDictionary DivTagHelper.BoolDictProp - HtmlAttributeValueStyle.Minimized + DefaultTagHelperExecute - + HtmlContent - (723:17,45 [6] MinimizedTagHelpers.cshtml) + IntermediateToken - (723:17,45 [6] MinimizedTagHelpers.cshtml) - Html - \n + TagHelper - (729:18,4 [62] MinimizedTagHelpers.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (734:18,9 [51] MinimizedTagHelpers.cshtml) + IntermediateToken - (734:18,9 [51] MinimizedTagHelpers.cshtml) - Html - Tag helper with unmatched bound boolean attributes. + DefaultTagHelperCreate - - DivTagHelper + DefaultTagHelperExecute - + HtmlContent - (791:18,66 [2] MinimizedTagHelpers.cshtml) + IntermediateToken - (791:18,66 [2] MinimizedTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - catchall-unbound-required - HtmlAttributeValueStyle.Minimized + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml new file mode 100644 index 0000000000..8387e8a28a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml @@ -0,0 +1,8 @@ +@{ + @foreach (var result in (dynamic)Url) + { +
        + @result.SomeValue. +
        + } +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.codegen.cs new file mode 100644 index 0000000000..1b08e1e505 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.codegen.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedCSharp_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml" + foreach (var result in (dynamic)Url) + { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml" + __o = result.SomeValue; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml" + + } + +#line default +#line hidden +#nullable disable +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml" + + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.ir.txt new file mode 100644 index 0000000000..4644024352 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.ir.txt @@ -0,0 +1,28 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedCSharp_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [6] NestedCSharp.cshtml) + IntermediateToken - (2:0,2 [6] NestedCSharp.cshtml) - CSharp - \n + CSharpCode - (9:1,5 [53] NestedCSharp.cshtml) + IntermediateToken - (9:1,5 [53] NestedCSharp.cshtml) - CSharp - foreach (var result in (dynamic)Url)\n {\n + HtmlContent - (62:3,8 [19] NestedCSharp.cshtml) + IntermediateToken - (62:3,8 [4] NestedCSharp.cshtml) - Html -
        + IntermediateToken - (67:3,13 [14] NestedCSharp.cshtml) - Html - \n + CSharpExpression - (82:4,13 [16] NestedCSharp.cshtml) + IntermediateToken - (82:4,13 [16] NestedCSharp.cshtml) - CSharp - result.SomeValue + HtmlContent - (98:4,29 [17] NestedCSharp.cshtml) + IntermediateToken - (98:4,29 [11] NestedCSharp.cshtml) - Html - .\n + IntermediateToken - (109:5,8 [6] NestedCSharp.cshtml) - Html -
        + CSharpCode - (115:5,14 [7] NestedCSharp.cshtml) + IntermediateToken - (115:5,14 [7] NestedCSharp.cshtml) - CSharp - \n } + CSharpCode - (122:6,5 [2] NestedCSharp.cshtml) + IntermediateToken - (122:6,5 [2] NestedCSharp.cshtml) - CSharp - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.mappings.txt new file mode 100644 index 0000000000..b58d527b04 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.mappings.txt @@ -0,0 +1,35 @@ +Source Location: (2:0,2 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml) +| + | +Generated Location: (744:19,2 [6] ) +| + | + +Source Location: (9:1,5 [53] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml) +|foreach (var result in (dynamic)Url) + { + | +Generated Location: (914:27,5 [53] ) +|foreach (var result in (dynamic)Url) + { + | + +Source Location: (82:4,13 [16] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml) +|result.SomeValue| +Generated Location: (1139:36,13 [16] ) +|result.SomeValue| + +Source Location: (115:5,14 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml) +| + }| +Generated Location: (1329:43,14 [7] ) +| + }| + +Source Location: (122:6,5 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml) +| +| +Generated Location: (1500:51,5 [2] ) +| +| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_Runtime.codegen.cs new file mode 100644 index 0000000000..26ba12432c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_Runtime.codegen.cs @@ -0,0 +1,42 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "6be69a1b80bfb35325fef427f0709232182e96a8" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedCSharp_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"6be69a1b80bfb35325fef427f0709232182e96a8", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedCSharp_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml" + foreach (var result in (dynamic)Url) + { + +#line default +#line hidden +#nullable disable + WriteLiteral("
        \r\n "); +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml" + Write(result.SomeValue); + +#line default +#line hidden +#nullable disable + WriteLiteral(".\r\n
        \r\n"); +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp.cshtml" + } + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_Runtime.ir.txt new file mode 100644 index 0000000000..79a60d3403 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_Runtime.ir.txt @@ -0,0 +1,26 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedCSharp_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [6] NestedCSharp.cshtml) + IntermediateToken - (2:0,2 [6] NestedCSharp.cshtml) - CSharp - \n + CSharpCode - (9:1,5 [45] NestedCSharp.cshtml) + IntermediateToken - (9:1,5 [45] NestedCSharp.cshtml) - CSharp - foreach (var result in (dynamic)Url)\n {\n + HtmlContent - (54:3,0 [27] NestedCSharp.cshtml) + IntermediateToken - (54:3,0 [8] NestedCSharp.cshtml) - Html - + IntermediateToken - (62:3,8 [4] NestedCSharp.cshtml) - Html -
        + IntermediateToken - (67:3,13 [2] NestedCSharp.cshtml) - Html - \n + IntermediateToken - (69:4,0 [12] NestedCSharp.cshtml) - Html - + CSharpExpression - (82:4,13 [16] NestedCSharp.cshtml) + IntermediateToken - (82:4,13 [16] NestedCSharp.cshtml) - CSharp - result.SomeValue + HtmlContent - (98:4,29 [19] NestedCSharp.cshtml) + IntermediateToken - (98:4,29 [11] NestedCSharp.cshtml) - Html - .\n + IntermediateToken - (109:5,8 [6] NestedCSharp.cshtml) - Html -
        + IntermediateToken - (115:5,14 [2] NestedCSharp.cshtml) - Html - \n + CSharpCode - (117:6,0 [5] NestedCSharp.cshtml) + IntermediateToken - (117:6,0 [5] NestedCSharp.cshtml) - CSharp - } + CSharpCode - (122:6,5 [2] NestedCSharp.cshtml) + IntermediateToken - (122:6,5 [2] NestedCSharp.cshtml) - CSharp - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks.cshtml new file mode 100644 index 0000000000..070875f5fa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks.cshtml @@ -0,0 +1,4 @@ +@if(foo) { + @if(bar) { + } +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_DesignTime.codegen.cs new file mode 100644 index 0000000000..59b64e3682 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_DesignTime.codegen.cs @@ -0,0 +1,46 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedCodeBlocks_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks.cshtml" + if(foo) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks.cshtml" + if(bar) { + } + +#line default +#line hidden +#nullable disable +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks.cshtml" + +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_DesignTime.ir.txt new file mode 100644 index 0000000000..7522731b78 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_DesignTime.ir.txt @@ -0,0 +1,17 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedCodeBlocks_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (1:0,1 [15] NestedCodeBlocks.cshtml) + IntermediateToken - (1:0,1 [15] NestedCodeBlocks.cshtml) - CSharp - if(foo) {\n + CSharpCode - (17:1,5 [16] NestedCodeBlocks.cshtml) + IntermediateToken - (17:1,5 [16] NestedCodeBlocks.cshtml) - CSharp - if(bar) {\n } + CSharpCode - (33:2,5 [3] NestedCodeBlocks.cshtml) + IntermediateToken - (33:2,5 [3] NestedCodeBlocks.cshtml) - CSharp - \n} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_DesignTime.mappings.txt new file mode 100644 index 0000000000..55d683f4e5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_DesignTime.mappings.txt @@ -0,0 +1,21 @@ +Source Location: (1:0,1 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks.cshtml) +|if(foo) { + | +Generated Location: (751:19,1 [15] ) +|if(foo) { + | + +Source Location: (17:1,5 [16] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks.cshtml) +|if(bar) { + }| +Generated Location: (934:27,5 [16] ) +|if(bar) { + }| + +Source Location: (33:2,5 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks.cshtml) +| +}| +Generated Location: (1118:35,5 [3] ) +| +}| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_Runtime.codegen.cs new file mode 100644 index 0000000000..af6d6d502b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_Runtime.codegen.cs @@ -0,0 +1,42 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "d83923f86f1c84f081916ef7308513ab80a65675" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedCodeBlocks_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"d83923f86f1c84f081916ef7308513ab80a65675", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedCodeBlocks_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks.cshtml" + if(foo) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks.cshtml" + if(bar) { + } + +#line default +#line hidden +#nullable disable +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks.cshtml" + +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_Runtime.ir.txt new file mode 100644 index 0000000000..2c0030ec65 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_Runtime.ir.txt @@ -0,0 +1,12 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedCodeBlocks_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (1:0,1 [15] NestedCodeBlocks.cshtml) + IntermediateToken - (1:0,1 [15] NestedCodeBlocks.cshtml) - CSharp - if(foo) {\n + CSharpCode - (17:1,5 [16] NestedCodeBlocks.cshtml) + IntermediateToken - (17:1,5 [16] NestedCodeBlocks.cshtml) - CSharp - if(bar) {\n } + CSharpCode - (33:2,5 [3] NestedCodeBlocks.cshtml) + IntermediateToken - (33:2,5 [3] NestedCodeBlocks.cshtml) - CSharp - \n} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml new file mode 100644 index 0000000000..b5fac5a502 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml @@ -0,0 +1,16 @@ +@addTagHelper "*, TestAssembly" + + + } + +

        +
        + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_DesignTime.codegen.cs new file mode 100644 index 0000000000..d1f6fecd40 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_DesignTime.codegen.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedScriptTagTagHelpers_DesignTime + { + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml" + for(var i = 0; i < 5; i++) { + + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml" + __o = ViewBag.DefaultInterval; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper.Type = "text"; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml" + __TestNamespace_InputTagHelper2.Checked = true; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml" + + } + +#line default +#line hidden +#nullable disable + __TestNamespace_PTagHelper = CreateTagHelper(); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_DesignTime.ir.txt new file mode 100644 index 0000000000..cf49fba267 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_DesignTime.ir.txt @@ -0,0 +1,87 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedScriptTagTagHelpers_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + DesignTimeDirective - + DirectiveToken - (14:0,14 [17] NestedScriptTagTagHelpers.cshtml) - "*, TestAssembly" + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:0,31 [108] NestedScriptTagTagHelpers.cshtml) + IntermediateToken - (31:0,31 [4] NestedScriptTagTagHelpers.cshtml) - Html - \n\n + IntermediateToken - (35:2,0 [7] NestedScriptTagTagHelpers.cshtml) - Html - + CSharpCode - (422:8,25 [15] NestedScriptTagTagHelpers.cshtml) + IntermediateToken - (422:8,25 [15] NestedScriptTagTagHelpers.cshtml) - CSharp - \n } + HtmlContent - (437:9,13 [131] NestedScriptTagTagHelpers.cshtml) + IntermediateToken - (437:9,13 [14] NestedScriptTagTagHelpers.cshtml) - Html - \n + IntermediateToken - (451:10,12 [7] NestedScriptTagTagHelpers.cshtml) - Html - + IntermediateToken - (558:12,21 [10] NestedScriptTagTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (149:4,18 [11] NestedScriptTagTagHelpers.cshtml) + IntermediateToken - (149:4,18 [11] NestedScriptTagTagHelpers.cshtml) - Html - Hello World + DefaultTagHelperHtmlAttribute - - data-delay - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (174:4,43 [4] NestedScriptTagTagHelpers.cshtml) + IntermediateToken - (174:4,43 [4] NestedScriptTagTagHelpers.cshtml) - Html - 1000 + DefaultTagHelperExecute - + HtmlContent - (572:13,12 [23] NestedScriptTagTagHelpers.cshtml) + IntermediateToken - (572:13,12 [6] NestedScriptTagTagHelpers.cshtml) - Html - \n + IntermediateToken - (578:14,4 [6] NestedScriptTagTagHelpers.cshtml) - Html -
        + IntermediateToken - (584:14,10 [2] NestedScriptTagTagHelpers.cshtml) - Html - \n + IntermediateToken - (586:15,0 [9] NestedScriptTagTagHelpers.cshtml) - Html - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_DesignTime.mappings.txt new file mode 100644 index 0000000000..1c67db87bf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_DesignTime.mappings.txt @@ -0,0 +1,29 @@ +Source Location: (14:0,14 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml) +|"*, TestAssembly"| +Generated Location: (803:15,37 [17] ) +|"*, TestAssembly"| + +Source Location: (195:5,13 [46] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml) +|for(var i = 0; i < 5; i++) { + | +Generated Location: (1320:32,13 [46] ) +|for(var i = 0; i < 5; i++) { + | + +Source Location: (339:7,50 [23] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml) +|ViewBag.DefaultInterval| +Generated Location: (1796:42,50 [23] ) +|ViewBag.DefaultInterval| + +Source Location: (389:7,100 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml) +|true| +Generated Location: (2240:51,100 [4] ) +|true| + +Source Location: (422:8,25 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml) +| + }| +Generated Location: (2442:58,25 [15] ) +| + }| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_Runtime.codegen.cs new file mode 100644 index 0000000000..0be73652e6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_Runtime.codegen.cs @@ -0,0 +1,114 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "958c6fc042a8f49499906b46c11bf4b15446c89d" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedScriptTagTagHelpers_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"958c6fc042a8f49499906b46c11bf4b15446c89d", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedScriptTagTagHelpers_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "text", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-delay", new global::Microsoft.AspNetCore.Html.HtmlString("1000"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n\r\n"); +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml" + } + +#line default +#line hidden +#nullable disable + WriteLiteral(" \r\n "); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n
        \r\n"); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_Runtime.ir.txt new file mode 100644 index 0000000000..7041d3c6fc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers_Runtime.ir.txt @@ -0,0 +1,80 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedScriptTagTagHelpers_Runtime - - + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_0 - type - text - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_1 - class - Hello World - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_2 - data-delay - 1000 - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (33:1,0 [106] NestedScriptTagTagHelpers.cshtml) + IntermediateToken - (33:1,0 [2] NestedScriptTagTagHelpers.cshtml) - Html - \n + IntermediateToken - (35:2,0 [7] NestedScriptTagTagHelpers.cshtml) - Html - + IntermediateToken - (422:8,25 [2] NestedScriptTagTagHelpers.cshtml) - Html - \n + CSharpCode - (424:9,0 [15] NestedScriptTagTagHelpers.cshtml) + IntermediateToken - (424:9,0 [15] NestedScriptTagTagHelpers.cshtml) - CSharp - }\n + HtmlContent - (439:10,0 [129] NestedScriptTagTagHelpers.cshtml) + IntermediateToken - (439:10,0 [12] NestedScriptTagTagHelpers.cshtml) - Html - + IntermediateToken - (451:10,12 [7] NestedScriptTagTagHelpers.cshtml) - Html - + IntermediateToken - (558:12,21 [10] NestedScriptTagTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.PTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 + DefaultTagHelperExecute - + HtmlContent - (572:13,12 [23] NestedScriptTagTagHelpers.cshtml) + IntermediateToken - (572:13,12 [6] NestedScriptTagTagHelpers.cshtml) - Html - \n + IntermediateToken - (578:14,4 [6] NestedScriptTagTagHelpers.cshtml) - Html -
        + IntermediateToken - (584:14,10 [2] NestedScriptTagTagHelpers.cshtml) - Html - \n + IntermediateToken - (586:15,0 [9] NestedScriptTagTagHelpers.cshtml) - Html - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers.cshtml new file mode 100644 index 0000000000..e6637b03fa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers.cshtml @@ -0,0 +1,5 @@ +@addTagHelper *, TestAssembly +Hola +
        + +
        \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_DesignTime.codegen.cs new file mode 100644 index 0000000000..1d15281689 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_DesignTime.codegen.cs @@ -0,0 +1,39 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedTagHelpers_DesignTime + { + private global::SpanTagHelper __SpanTagHelper; + private global::DivTagHelper __DivTagHelper; + private global::InputTagHelper __InputTagHelper; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __SpanTagHelper = CreateTagHelper(); + __InputTagHelper = CreateTagHelper(); + __InputTagHelper.FooProp = "Hello"; + __DivTagHelper = CreateTagHelper(); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_DesignTime.ir.txt new file mode 100644 index 0000000000..4a4b5e257d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_DesignTime.ir.txt @@ -0,0 +1,48 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedTagHelpers_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::SpanTagHelper - __SpanTagHelper + FieldDeclaration - - private - global::DivTagHelper - __DivTagHelper + FieldDeclaration - - private - global::InputTagHelper - __InputTagHelper + DesignTimeDirective - + DirectiveToken - (14:0,14 [15] NestedTagHelpers.cshtml) - *, TestAssembly + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (29:0,29 [2] NestedTagHelpers.cshtml) + IntermediateToken - (29:0,29 [2] NestedTagHelpers.cshtml) - Html - \n + TagHelper - (31:1,0 [26] NestedTagHelpers.cshtml) - span - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (46:1,15 [4] NestedTagHelpers.cshtml) + IntermediateToken - (46:1,15 [4] NestedTagHelpers.cshtml) - Html - Hola + DefaultTagHelperCreate - - SpanTagHelper + DefaultTagHelperHtmlAttribute - - someattr - HtmlAttributeValueStyle.Minimized + DefaultTagHelperExecute - + HtmlContent - (57:1,26 [2] NestedTagHelpers.cshtml) + IntermediateToken - (57:1,26 [2] NestedTagHelpers.cshtml) - Html - \n + TagHelper - (59:2,0 [66] NestedTagHelpers.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (78:2,19 [6] NestedTagHelpers.cshtml) + IntermediateToken - (78:2,19 [6] NestedTagHelpers.cshtml) - Html - \n + TagHelper - (84:3,4 [33] NestedTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - InputTagHelper + DefaultTagHelperProperty - (97:3,17 [5] NestedTagHelpers.cshtml) - value - string InputTagHelper.FooProp - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (97:3,17 [5] NestedTagHelpers.cshtml) + IntermediateToken - (97:3,17 [5] NestedTagHelpers.cshtml) - Html - Hello + DefaultTagHelperHtmlAttribute - - type - HtmlAttributeValueStyle.SingleQuotes + HtmlContent - (109:3,29 [4] NestedTagHelpers.cshtml) + IntermediateToken - (109:3,29 [4] NestedTagHelpers.cshtml) - Html - text + DefaultTagHelperExecute - + HtmlContent - (117:3,37 [2] NestedTagHelpers.cshtml) + IntermediateToken - (117:3,37 [2] NestedTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - DivTagHelper + DefaultTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (73:2,14 [3] NestedTagHelpers.cshtml) + IntermediateToken - (73:2,14 [3] NestedTagHelpers.cshtml) - Html - foo + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_DesignTime.mappings.txt new file mode 100644 index 0000000000..049fa3812b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_DesignTime.mappings.txt @@ -0,0 +1,5 @@ +Source Location: (14:0,14 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers.cshtml) +|*, TestAssembly| +Generated Location: (702:15,38 [15] ) +|*, TestAssembly| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_Runtime.codegen.cs new file mode 100644 index 0000000000..d7752b8aca --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_Runtime.codegen.cs @@ -0,0 +1,89 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "5e63d5fe37100e65dfcf39dd1c542eb697b624db" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedTagHelpers_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"5e63d5fe37100e65dfcf39dd1c542eb697b624db", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedTagHelpers_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("value", "Hello", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("text"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("unbound", new global::Microsoft.AspNetCore.Html.HtmlString("foo"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::SpanTagHelper __SpanTagHelper; + private global::DivTagHelper __DivTagHelper; + private global::InputTagHelper __InputTagHelper; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("span", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("Hola"); + } + ); + __SpanTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__SpanTagHelper); + BeginWriteTagHelperAttribute(); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("someattr", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__InputTagHelper); + __InputTagHelper.FooProp = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + } + ); + __DivTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__DivTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_Runtime.ir.txt new file mode 100644 index 0000000000..f4c6001b80 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedTagHelpers_Runtime.ir.txt @@ -0,0 +1,37 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedTagHelpers_Runtime - - + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_0 - value - Hello - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_1 - type - text - HtmlAttributeValueStyle.SingleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_2 - unbound - foo - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::SpanTagHelper - __SpanTagHelper + FieldDeclaration - - private - global::DivTagHelper - __DivTagHelper + FieldDeclaration - - private - global::InputTagHelper - __InputTagHelper + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + TagHelper - (31:1,0 [26] NestedTagHelpers.cshtml) - span - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (46:1,15 [4] NestedTagHelpers.cshtml) + IntermediateToken - (46:1,15 [4] NestedTagHelpers.cshtml) - Html - Hola + DefaultTagHelperCreate - - SpanTagHelper + DefaultTagHelperHtmlAttribute - - someattr - HtmlAttributeValueStyle.Minimized + DefaultTagHelperExecute - + HtmlContent - (57:1,26 [2] NestedTagHelpers.cshtml) + IntermediateToken - (57:1,26 [2] NestedTagHelpers.cshtml) - Html - \n + TagHelper - (59:2,0 [66] NestedTagHelpers.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (78:2,19 [6] NestedTagHelpers.cshtml) + IntermediateToken - (78:2,19 [6] NestedTagHelpers.cshtml) - Html - \n + TagHelper - (84:3,4 [33] NestedTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - InputTagHelper + PreallocatedTagHelperProperty - (97:3,17 [5] NestedTagHelpers.cshtml) - __tagHelperAttribute_0 - value - FooProp + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 + DefaultTagHelperExecute - + HtmlContent - (117:3,37 [2] NestedTagHelpers.cshtml) + IntermediateToken - (117:3,37 [2] NestedTagHelpers.cshtml) - Html - \n + DefaultTagHelperCreate - - DivTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml new file mode 100644 index 0000000000..36e96c46b9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml @@ -0,0 +1,38 @@ +@{ + int i = 1; +} + +@while(i <= 10) { +

        Hello from C#, #@(i)

        + i += 1; +} + +@if(i == 11) { +

        We wrote 10 lines!

        +} + +@switch(i) { + case 11: +

        No really, we wrote 10 lines!

        + break; + default: +

        Actually, we didn't...

        + break; +} + +@for(int j = 1; j <= 10; j += 2) { +

        Hello again from C#, #@(j)

        +} + +@try { +

        That time, we wrote 5 lines!

        +} catch(Exception ex) { +

        Oh no! An error occurred: @(ex.Message)

        +} + +@* With has no equivalent in C# *@ +

        i is now @i

        + +@lock(new object()) { +

        This block is locked, for your security!

        +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.codegen.cs new file mode 100644 index 0000000000..b1d0ce4074 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.codegen.cs @@ -0,0 +1,184 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NoLinePragmas_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + + int i = 1; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + while(i <= 10) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + __o = i; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + + i += 1; +} + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + if(i == 11) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + +} + +#line default +#line hidden +#nullable disable +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + switch(i) { + case 11: + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + + break; + default: + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + + break; +} + +#line default +#line hidden +#nullable disable +#nullable restore +#line 23 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + for(int j = 1; j <= 10; j += 2) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + __o = j; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + +} + +#line default +#line hidden +#nullable disable +#nullable restore +#line 27 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + try { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 28 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + +} catch(Exception ex) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 30 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + __o = ex.Message; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 30 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + +} + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 33 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 34 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + __o = i; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 36 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + lock(new object()) { + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 37 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.ir.txt new file mode 100644 index 0000000000..c5215cb143 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.ir.txt @@ -0,0 +1,112 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NoLinePragmas_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [18] NoLinePragmas.cshtml) + IntermediateToken - (2:0,2 [18] NoLinePragmas.cshtml) - CSharp - \n int i = 1;\n + HtmlContent - (23:3,0 [2] NoLinePragmas.cshtml) + IntermediateToken - (23:3,0 [2] NoLinePragmas.cshtml) - Html - \n + CSharpCode - (26:4,1 [22] NoLinePragmas.cshtml) + IntermediateToken - (26:4,1 [22] NoLinePragmas.cshtml) - CSharp - while(i <= 10) {\n + HtmlContent - (48:5,4 [19] NoLinePragmas.cshtml) + IntermediateToken - (48:5,4 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (51:5,7 [16] NoLinePragmas.cshtml) - Html - Hello from C#, # + CSharpExpression - (69:5,25 [1] NoLinePragmas.cshtml) + IntermediateToken - (69:5,25 [1] NoLinePragmas.cshtml) - CSharp - i + HtmlContent - (71:5,27 [4] NoLinePragmas.cshtml) + IntermediateToken - (71:5,27 [4] NoLinePragmas.cshtml) - Html -

        + CSharpCode - (75:5,31 [16] NoLinePragmas.cshtml) + IntermediateToken - (75:5,31 [16] NoLinePragmas.cshtml) - CSharp - \n i += 1;\n} + HtmlContent - (91:7,1 [4] NoLinePragmas.cshtml) + IntermediateToken - (91:7,1 [4] NoLinePragmas.cshtml) - Html - \n\n + CSharpCode - (96:9,1 [19] NoLinePragmas.cshtml) + IntermediateToken - (96:9,1 [19] NoLinePragmas.cshtml) - CSharp - if(i == 11) {\n + HtmlContent - (115:10,4 [25] NoLinePragmas.cshtml) + IntermediateToken - (115:10,4 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (118:10,7 [18] NoLinePragmas.cshtml) - Html - We wrote 10 lines! + IntermediateToken - (136:10,25 [4] NoLinePragmas.cshtml) - Html -

        + CSharpCode - (140:10,29 [3] NoLinePragmas.cshtml) + IntermediateToken - (140:10,29 [3] NoLinePragmas.cshtml) - CSharp - \n} + HtmlContent - (143:11,1 [4] NoLinePragmas.cshtml) + IntermediateToken - (143:11,1 [4] NoLinePragmas.cshtml) - Html - \n\n + CSharpCode - (148:13,1 [35] NoLinePragmas.cshtml) + IntermediateToken - (148:13,1 [35] NoLinePragmas.cshtml) - CSharp - switch(i) {\n case 11:\n + HtmlContent - (183:15,8 [36] NoLinePragmas.cshtml) + IntermediateToken - (183:15,8 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (186:15,11 [29] NoLinePragmas.cshtml) - Html - No really, we wrote 10 lines! + IntermediateToken - (215:15,40 [4] NoLinePragmas.cshtml) - Html -

        + CSharpCode - (219:15,44 [40] NoLinePragmas.cshtml) + IntermediateToken - (219:15,44 [40] NoLinePragmas.cshtml) - CSharp - \n break;\n default:\n + HtmlContent - (259:18,8 [29] NoLinePragmas.cshtml) + IntermediateToken - (259:18,8 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (262:18,11 [22] NoLinePragmas.cshtml) - Html - Actually, we didn't... + IntermediateToken - (284:18,33 [4] NoLinePragmas.cshtml) - Html -

        + CSharpCode - (288:18,37 [19] NoLinePragmas.cshtml) + IntermediateToken - (288:18,37 [19] NoLinePragmas.cshtml) - CSharp - \n break;\n} + HtmlContent - (307:20,1 [4] NoLinePragmas.cshtml) + IntermediateToken - (307:20,1 [4] NoLinePragmas.cshtml) - Html - \n\n + CSharpCode - (312:22,1 [39] NoLinePragmas.cshtml) + IntermediateToken - (312:22,1 [39] NoLinePragmas.cshtml) - CSharp - for(int j = 1; j <= 10; j += 2) {\n + HtmlContent - (351:23,4 [25] NoLinePragmas.cshtml) + IntermediateToken - (351:23,4 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (354:23,7 [22] NoLinePragmas.cshtml) - Html - Hello again from C#, # + CSharpExpression - (378:23,31 [1] NoLinePragmas.cshtml) + IntermediateToken - (378:23,31 [1] NoLinePragmas.cshtml) - CSharp - j + HtmlContent - (380:23,33 [4] NoLinePragmas.cshtml) + IntermediateToken - (380:23,33 [4] NoLinePragmas.cshtml) - Html -

        + CSharpCode - (384:23,37 [3] NoLinePragmas.cshtml) + IntermediateToken - (384:23,37 [3] NoLinePragmas.cshtml) - CSharp - \n} + HtmlContent - (387:24,1 [4] NoLinePragmas.cshtml) + IntermediateToken - (387:24,1 [4] NoLinePragmas.cshtml) - Html - \n\n + CSharpCode - (392:26,1 [11] NoLinePragmas.cshtml) + IntermediateToken - (392:26,1 [11] NoLinePragmas.cshtml) - CSharp - try {\n + HtmlContent - (403:27,4 [35] NoLinePragmas.cshtml) + IntermediateToken - (403:27,4 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (406:27,7 [28] NoLinePragmas.cshtml) - Html - That time, we wrote 5 lines! + IntermediateToken - (434:27,35 [4] NoLinePragmas.cshtml) - Html -

        + CSharpCode - (438:27,39 [31] NoLinePragmas.cshtml) + IntermediateToken - (438:27,39 [31] NoLinePragmas.cshtml) - CSharp - \n} catch(Exception ex) {\n + HtmlContent - (469:29,4 [29] NoLinePragmas.cshtml) + IntermediateToken - (469:29,4 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (472:29,7 [26] NoLinePragmas.cshtml) - Html - Oh no! An error occurred: + CSharpExpression - (500:29,35 [10] NoLinePragmas.cshtml) + IntermediateToken - (500:29,35 [10] NoLinePragmas.cshtml) - CSharp - ex.Message + HtmlContent - (511:29,46 [4] NoLinePragmas.cshtml) + IntermediateToken - (511:29,46 [4] NoLinePragmas.cshtml) - Html -

        + CSharpCode - (515:29,50 [7] NoLinePragmas.cshtml) + IntermediateToken - (515:29,50 [7] NoLinePragmas.cshtml) - CSharp - \n}\n\n + CSharpCode - (556:32,34 [0] NoLinePragmas.cshtml) + IntermediateToken - (556:32,34 [0] NoLinePragmas.cshtml) - CSharp - + HtmlContent - (556:32,34 [14] NoLinePragmas.cshtml) + IntermediateToken - (556:32,34 [2] NoLinePragmas.cshtml) - Html - \n + IntermediateToken - (558:33,0 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (561:33,3 [9] NoLinePragmas.cshtml) - Html - i is now + CSharpExpression - (571:33,13 [1] NoLinePragmas.cshtml) + IntermediateToken - (571:33,13 [1] NoLinePragmas.cshtml) - CSharp - i + HtmlContent - (572:33,14 [8] NoLinePragmas.cshtml) + IntermediateToken - (572:33,14 [4] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (576:33,18 [4] NoLinePragmas.cshtml) - Html - \n\n + CSharpCode - (581:35,1 [26] NoLinePragmas.cshtml) + IntermediateToken - (581:35,1 [26] NoLinePragmas.cshtml) - CSharp - lock(new object()) {\n + HtmlContent - (607:36,4 [47] NoLinePragmas.cshtml) + IntermediateToken - (607:36,4 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (610:36,7 [40] NoLinePragmas.cshtml) - Html - This block is locked, for your security! + IntermediateToken - (650:36,47 [4] NoLinePragmas.cshtml) - Html -

        + CSharpCode - (654:36,51 [3] NoLinePragmas.cshtml) + IntermediateToken - (654:36,51 [3] NoLinePragmas.cshtml) - CSharp - \n} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.mappings.txt new file mode 100644 index 0000000000..1ba876db62 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.mappings.txt @@ -0,0 +1,148 @@ +Source Location: (2:0,2 [18] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +| + int i = 1; +| +Generated Location: (746:19,2 [18] ) +| + int i = 1; +| + +Source Location: (26:4,1 [22] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +|while(i <= 10) { + | +Generated Location: (923:27,1 [22] ) +|while(i <= 10) { + | + +Source Location: (69:5,25 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +|i| +Generated Location: (1130:35,25 [1] ) +|i| + +Source Location: (75:5,31 [16] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +| + i += 1; +}| +Generated Location: (1323:42,31 [16] ) +| + i += 1; +}| + +Source Location: (96:9,1 [19] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +|if(i == 11) { + | +Generated Location: (1501:51,1 [19] ) +|if(i == 11) { + | + +Source Location: (140:10,29 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +| +}| +Generated Location: (1710:59,29 [3] ) +| +}| + +Source Location: (148:13,1 [35] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +|switch(i) { + case 11: + | +Generated Location: (1875:67,1 [35] ) +|switch(i) { + case 11: + | + +Source Location: (219:15,44 [40] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +| + break; + default: + | +Generated Location: (2115:76,44 [40] ) +| + break; + default: + | + +Source Location: (288:18,37 [19] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +| + break; +}| +Generated Location: (2353:86,37 [19] ) +| + break; +}| + +Source Location: (312:22,1 [39] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +|for(int j = 1; j <= 10; j += 2) { + | +Generated Location: (2534:95,1 [39] ) +|for(int j = 1; j <= 10; j += 2) { + | + +Source Location: (378:23,31 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +|j| +Generated Location: (2765:103,31 [1] ) +|j| + +Source Location: (384:23,37 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +| +}| +Generated Location: (2965:110,37 [3] ) +| +}| + +Source Location: (392:26,1 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +|try { + | +Generated Location: (3130:118,1 [11] ) +|try { + | + +Source Location: (438:27,39 [31] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +| +} catch(Exception ex) { + | +Generated Location: (3341:126,39 [31] ) +| +} catch(Exception ex) { + | + +Source Location: (500:29,35 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +|ex.Message| +Generated Location: (3568:135,35 [10] ) +|ex.Message| + +Source Location: (515:29,50 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +| +} + +| +Generated Location: (3790:142,50 [7] ) +| +} + +| + +Source Location: (556:32,34 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +|| +Generated Location: (3990:151,34 [0] ) +|| + +Source Location: (571:33,13 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +|i| +Generated Location: (4164:158,13 [1] ) +|i| + +Source Location: (581:35,1 [26] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +|lock(new object()) { + | +Generated Location: (4328:165,1 [26] ) +|lock(new object()) { + | + +Source Location: (654:36,51 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml) +| +}| +Generated Location: (4566:173,51 [3] ) +| +}| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_Runtime.codegen.cs new file mode 100644 index 0000000000..c923c0ece8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_Runtime.codegen.cs @@ -0,0 +1,175 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "c6fa3992fa56644768995c97941d682d90f6d8ec" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NoLinePragmas_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"c6fa3992fa56644768995c97941d682d90f6d8ec", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NoLinePragmas_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + + int i = 1; + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + while(i <= 10) { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        Hello from C#, #"); +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + Write(i); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n"); +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + i += 1; +} + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + if(i == 11) { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        We wrote 10 lines!

        \r\n"); +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" +} + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + switch(i) { + case 11: + +#line default +#line hidden +#nullable disable + WriteLiteral("

        No really, we wrote 10 lines!

        \r\n"); +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + break; + default: + +#line default +#line hidden +#nullable disable + WriteLiteral("

        Actually, we didn\'t...

        \r\n"); +#nullable restore +#line 20 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + break; +} + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 23 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + for(int j = 1; j <= 10; j += 2) { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        Hello again from C#, #"); +#nullable restore +#line 24 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + Write(j); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n"); +#nullable restore +#line 25 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" +} + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 27 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + try { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        That time, we wrote 5 lines!

        \r\n"); +#nullable restore +#line 29 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" +} catch(Exception ex) { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        Oh no! An error occurred: "); +#nullable restore +#line 30 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + Write(ex.Message); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n"); +#nullable restore +#line 31 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" +} + + +#line default +#line hidden +#nullable disable + WriteLiteral("

        i is now "); +#nullable restore +#line 34 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + Write(i); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n\r\n"); +#nullable restore +#line 36 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" + lock(new object()) { + +#line default +#line hidden +#nullable disable + WriteLiteral("

        This block is locked, for your security!

        \r\n"); +#nullable restore +#line 38 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas.cshtml" +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_Runtime.ir.txt new file mode 100644 index 0000000000..1b8d2a8073 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_Runtime.ir.txt @@ -0,0 +1,122 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NoLinePragmas_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [18] NoLinePragmas.cshtml) + IntermediateToken - (2:0,2 [18] NoLinePragmas.cshtml) - CSharp - \n int i = 1;\n + HtmlContent - (23:3,0 [2] NoLinePragmas.cshtml) + IntermediateToken - (23:3,0 [2] NoLinePragmas.cshtml) - Html - \n + CSharpCode - (26:4,1 [18] NoLinePragmas.cshtml) + IntermediateToken - (26:4,1 [18] NoLinePragmas.cshtml) - CSharp - while(i <= 10) {\n + HtmlContent - (44:5,0 [23] NoLinePragmas.cshtml) + IntermediateToken - (44:5,0 [4] NoLinePragmas.cshtml) - Html - + IntermediateToken - (48:5,4 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (51:5,7 [16] NoLinePragmas.cshtml) - Html - Hello from C#, # + CSharpExpression - (69:5,25 [1] NoLinePragmas.cshtml) + IntermediateToken - (69:5,25 [1] NoLinePragmas.cshtml) - CSharp - i + HtmlContent - (71:5,27 [6] NoLinePragmas.cshtml) + IntermediateToken - (71:5,27 [4] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (75:5,31 [2] NoLinePragmas.cshtml) - Html - \n + CSharpCode - (77:6,0 [16] NoLinePragmas.cshtml) + IntermediateToken - (77:6,0 [16] NoLinePragmas.cshtml) - CSharp - i += 1;\n}\n + HtmlContent - (93:8,0 [2] NoLinePragmas.cshtml) + IntermediateToken - (93:8,0 [2] NoLinePragmas.cshtml) - Html - \n + CSharpCode - (96:9,1 [15] NoLinePragmas.cshtml) + IntermediateToken - (96:9,1 [15] NoLinePragmas.cshtml) - CSharp - if(i == 11) {\n + HtmlContent - (111:10,0 [31] NoLinePragmas.cshtml) + IntermediateToken - (111:10,0 [4] NoLinePragmas.cshtml) - Html - + IntermediateToken - (115:10,4 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (118:10,7 [18] NoLinePragmas.cshtml) - Html - We wrote 10 lines! + IntermediateToken - (136:10,25 [4] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (140:10,29 [2] NoLinePragmas.cshtml) - Html - \n + CSharpCode - (142:11,0 [3] NoLinePragmas.cshtml) + IntermediateToken - (142:11,0 [3] NoLinePragmas.cshtml) - CSharp - }\n + HtmlContent - (145:12,0 [2] NoLinePragmas.cshtml) + IntermediateToken - (145:12,0 [2] NoLinePragmas.cshtml) - Html - \n + CSharpCode - (148:13,1 [27] NoLinePragmas.cshtml) + IntermediateToken - (148:13,1 [27] NoLinePragmas.cshtml) - CSharp - switch(i) {\n case 11:\n + HtmlContent - (175:15,0 [46] NoLinePragmas.cshtml) + IntermediateToken - (175:15,0 [8] NoLinePragmas.cshtml) - Html - + IntermediateToken - (183:15,8 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (186:15,11 [29] NoLinePragmas.cshtml) - Html - No really, we wrote 10 lines! + IntermediateToken - (215:15,40 [4] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (219:15,44 [2] NoLinePragmas.cshtml) - Html - \n + CSharpCode - (221:16,0 [30] NoLinePragmas.cshtml) + IntermediateToken - (221:16,0 [30] NoLinePragmas.cshtml) - CSharp - break;\n default:\n + HtmlContent - (251:18,0 [39] NoLinePragmas.cshtml) + IntermediateToken - (251:18,0 [8] NoLinePragmas.cshtml) - Html - + IntermediateToken - (259:18,8 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (262:18,11 [22] NoLinePragmas.cshtml) - Html - Actually, we didn't... + IntermediateToken - (284:18,33 [4] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (288:18,37 [2] NoLinePragmas.cshtml) - Html - \n + CSharpCode - (290:19,0 [19] NoLinePragmas.cshtml) + IntermediateToken - (290:19,0 [19] NoLinePragmas.cshtml) - CSharp - break;\n}\n + HtmlContent - (309:21,0 [2] NoLinePragmas.cshtml) + IntermediateToken - (309:21,0 [2] NoLinePragmas.cshtml) - Html - \n + CSharpCode - (312:22,1 [35] NoLinePragmas.cshtml) + IntermediateToken - (312:22,1 [35] NoLinePragmas.cshtml) - CSharp - for(int j = 1; j <= 10; j += 2) {\n + HtmlContent - (347:23,0 [29] NoLinePragmas.cshtml) + IntermediateToken - (347:23,0 [4] NoLinePragmas.cshtml) - Html - + IntermediateToken - (351:23,4 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (354:23,7 [22] NoLinePragmas.cshtml) - Html - Hello again from C#, # + CSharpExpression - (378:23,31 [1] NoLinePragmas.cshtml) + IntermediateToken - (378:23,31 [1] NoLinePragmas.cshtml) - CSharp - j + HtmlContent - (380:23,33 [6] NoLinePragmas.cshtml) + IntermediateToken - (380:23,33 [4] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (384:23,37 [2] NoLinePragmas.cshtml) - Html - \n + CSharpCode - (386:24,0 [3] NoLinePragmas.cshtml) + IntermediateToken - (386:24,0 [3] NoLinePragmas.cshtml) - CSharp - }\n + HtmlContent - (389:25,0 [2] NoLinePragmas.cshtml) + IntermediateToken - (389:25,0 [2] NoLinePragmas.cshtml) - Html - \n + CSharpCode - (392:26,1 [7] NoLinePragmas.cshtml) + IntermediateToken - (392:26,1 [7] NoLinePragmas.cshtml) - CSharp - try {\n + HtmlContent - (399:27,0 [41] NoLinePragmas.cshtml) + IntermediateToken - (399:27,0 [4] NoLinePragmas.cshtml) - Html - + IntermediateToken - (403:27,4 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (406:27,7 [28] NoLinePragmas.cshtml) - Html - That time, we wrote 5 lines! + IntermediateToken - (434:27,35 [4] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (438:27,39 [2] NoLinePragmas.cshtml) - Html - \n + CSharpCode - (440:28,0 [25] NoLinePragmas.cshtml) + IntermediateToken - (440:28,0 [25] NoLinePragmas.cshtml) - CSharp - } catch(Exception ex) {\n + HtmlContent - (465:29,0 [33] NoLinePragmas.cshtml) + IntermediateToken - (465:29,0 [4] NoLinePragmas.cshtml) - Html - + IntermediateToken - (469:29,4 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (472:29,7 [26] NoLinePragmas.cshtml) - Html - Oh no! An error occurred: + CSharpExpression - (500:29,35 [10] NoLinePragmas.cshtml) + IntermediateToken - (500:29,35 [10] NoLinePragmas.cshtml) - CSharp - ex.Message + HtmlContent - (511:29,46 [6] NoLinePragmas.cshtml) + IntermediateToken - (511:29,46 [4] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (515:29,50 [2] NoLinePragmas.cshtml) - Html - \n + CSharpCode - (517:30,0 [5] NoLinePragmas.cshtml) + IntermediateToken - (517:30,0 [5] NoLinePragmas.cshtml) - CSharp - }\n\n + CSharpCode - (556:32,34 [2] NoLinePragmas.cshtml) + IntermediateToken - (556:32,34 [2] NoLinePragmas.cshtml) - CSharp - \n + HtmlContent - (558:33,0 [12] NoLinePragmas.cshtml) + IntermediateToken - (558:33,0 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (561:33,3 [9] NoLinePragmas.cshtml) - Html - i is now + CSharpExpression - (571:33,13 [1] NoLinePragmas.cshtml) + IntermediateToken - (571:33,13 [1] NoLinePragmas.cshtml) - CSharp - i + HtmlContent - (572:33,14 [8] NoLinePragmas.cshtml) + IntermediateToken - (572:33,14 [4] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (576:33,18 [4] NoLinePragmas.cshtml) - Html - \n\n + CSharpCode - (581:35,1 [22] NoLinePragmas.cshtml) + IntermediateToken - (581:35,1 [22] NoLinePragmas.cshtml) - CSharp - lock(new object()) {\n + HtmlContent - (603:36,0 [53] NoLinePragmas.cshtml) + IntermediateToken - (603:36,0 [4] NoLinePragmas.cshtml) - Html - + IntermediateToken - (607:36,4 [2] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (610:36,7 [40] NoLinePragmas.cshtml) - Html - This block is locked, for your security! + IntermediateToken - (650:36,47 [4] NoLinePragmas.cshtml) - Html -

        + IntermediateToken - (654:36,51 [2] NoLinePragmas.cshtml) - Html - \n + CSharpCode - (656:37,0 [1] NoLinePragmas.cshtml) + IntermediateToken - (656:37,0 [1] NoLinePragmas.cshtml) - CSharp - } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml new file mode 100644 index 0000000000..fa87620317 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml @@ -0,0 +1,11 @@ +@{ + @ViewBag?.Data + @ViewBag.IntIndexer?[0] + @ViewBag.StrIndexer?["key"] + @ViewBag?.Method(Value?[23]?.More)?["key"] +} + +@ViewBag?.Data +@ViewBag.IntIndexer?[0] +@ViewBag.StrIndexer?["key"] +@ViewBag?.Method(Value?[23]?.More)?["key"] \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.codegen.cs new file mode 100644 index 0000000000..d12445b465 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.codegen.cs @@ -0,0 +1,117 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NullConditionalExpressions_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" +__o = ViewBag?.Data; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" +__o = ViewBag.IntIndexer?[0]; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" +__o = ViewBag.StrIndexer?["key"]; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" +__o = ViewBag?.Method(Value?[23]?.More)?["key"]; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" +__o = ViewBag?.Data; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" +__o = ViewBag.IntIndexer?[0]; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" +__o = ViewBag.StrIndexer?["key"]; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" +__o = ViewBag?.Method(Value?[23]?.More)?["key"]; + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.ir.txt new file mode 100644 index 0000000000..58e35883ee --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.ir.txt @@ -0,0 +1,45 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NullConditionalExpressions_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [6] NullConditionalExpressions.cshtml) + IntermediateToken - (2:0,2 [6] NullConditionalExpressions.cshtml) - CSharp - \n + CSharpExpression - (9:1,5 [13] NullConditionalExpressions.cshtml) + IntermediateToken - (9:1,5 [13] NullConditionalExpressions.cshtml) - CSharp - ViewBag?.Data + CSharpCode - (22:1,18 [6] NullConditionalExpressions.cshtml) + IntermediateToken - (22:1,18 [6] NullConditionalExpressions.cshtml) - CSharp - \n + CSharpExpression - (29:2,5 [22] NullConditionalExpressions.cshtml) + IntermediateToken - (29:2,5 [22] NullConditionalExpressions.cshtml) - CSharp - ViewBag.IntIndexer?[0] + CSharpCode - (51:2,27 [6] NullConditionalExpressions.cshtml) + IntermediateToken - (51:2,27 [6] NullConditionalExpressions.cshtml) - CSharp - \n + CSharpExpression - (58:3,5 [26] NullConditionalExpressions.cshtml) + IntermediateToken - (58:3,5 [26] NullConditionalExpressions.cshtml) - CSharp - ViewBag.StrIndexer?["key"] + CSharpCode - (84:3,31 [6] NullConditionalExpressions.cshtml) + IntermediateToken - (84:3,31 [6] NullConditionalExpressions.cshtml) - CSharp - \n + CSharpExpression - (91:4,5 [41] NullConditionalExpressions.cshtml) + IntermediateToken - (91:4,5 [41] NullConditionalExpressions.cshtml) - CSharp - ViewBag?.Method(Value?[23]?.More)?["key"] + CSharpCode - (132:4,46 [2] NullConditionalExpressions.cshtml) + IntermediateToken - (132:4,46 [2] NullConditionalExpressions.cshtml) - CSharp - \n + HtmlContent - (137:6,0 [2] NullConditionalExpressions.cshtml) + IntermediateToken - (137:6,0 [2] NullConditionalExpressions.cshtml) - Html - \n + CSharpExpression - (140:7,1 [13] NullConditionalExpressions.cshtml) + IntermediateToken - (140:7,1 [13] NullConditionalExpressions.cshtml) - CSharp - ViewBag?.Data + HtmlContent - (153:7,14 [2] NullConditionalExpressions.cshtml) + IntermediateToken - (153:7,14 [2] NullConditionalExpressions.cshtml) - Html - \n + CSharpExpression - (156:8,1 [22] NullConditionalExpressions.cshtml) + IntermediateToken - (156:8,1 [22] NullConditionalExpressions.cshtml) - CSharp - ViewBag.IntIndexer?[0] + HtmlContent - (178:8,23 [2] NullConditionalExpressions.cshtml) + IntermediateToken - (178:8,23 [2] NullConditionalExpressions.cshtml) - Html - \n + CSharpExpression - (181:9,1 [26] NullConditionalExpressions.cshtml) + IntermediateToken - (181:9,1 [26] NullConditionalExpressions.cshtml) - CSharp - ViewBag.StrIndexer?["key"] + HtmlContent - (207:9,27 [2] NullConditionalExpressions.cshtml) + IntermediateToken - (207:9,27 [2] NullConditionalExpressions.cshtml) - Html - \n + CSharpExpression - (210:10,1 [41] NullConditionalExpressions.cshtml) + IntermediateToken - (210:10,1 [41] NullConditionalExpressions.cshtml) - CSharp - ViewBag?.Method(Value?[23]?.More)?["key"] diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.mappings.txt new file mode 100644 index 0000000000..c71bc3fa1a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.mappings.txt @@ -0,0 +1,75 @@ +Source Location: (2:0,2 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) +| + | +Generated Location: (772:19,2 [6] ) +| + | + +Source Location: (9:1,5 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) +|ViewBag?.Data| +Generated Location: (957:27,6 [13] ) +|ViewBag?.Data| + +Source Location: (22:1,18 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) +| + | +Generated Location: (1162:34,18 [6] ) +| + | + +Source Location: (29:2,5 [22] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) +|ViewBag.IntIndexer?[0]| +Generated Location: (1347:42,6 [22] ) +|ViewBag.IntIndexer?[0]| + +Source Location: (51:2,27 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) +| + | +Generated Location: (1570:49,27 [6] ) +| + | + +Source Location: (58:3,5 [26] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) +|ViewBag.StrIndexer?["key"]| +Generated Location: (1755:57,6 [26] ) +|ViewBag.StrIndexer?["key"]| + +Source Location: (84:3,31 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) +| + | +Generated Location: (1986:64,31 [6] ) +| + | + +Source Location: (91:4,5 [41] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) +|ViewBag?.Method(Value?[23]?.More)?["key"]| +Generated Location: (2171:72,6 [41] ) +|ViewBag?.Method(Value?[23]?.More)?["key"]| + +Source Location: (132:4,46 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) +| +| +Generated Location: (2432:79,46 [2] ) +| +| + +Source Location: (140:7,1 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) +|ViewBag?.Data| +Generated Location: (2611:86,6 [13] ) +|ViewBag?.Data| + +Source Location: (156:8,1 [22] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) +|ViewBag.IntIndexer?[0]| +Generated Location: (2804:93,6 [22] ) +|ViewBag.IntIndexer?[0]| + +Source Location: (181:9,1 [26] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) +|ViewBag.StrIndexer?["key"]| +Generated Location: (3007:100,6 [26] ) +|ViewBag.StrIndexer?["key"]| + +Source Location: (210:10,1 [41] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml) +|ViewBag?.Method(Value?[23]?.More)?["key"]| +Generated Location: (3214:107,6 [41] ) +|ViewBag?.Method(Value?[23]?.More)?["key"]| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_Runtime.codegen.cs new file mode 100644 index 0000000000..5ed8813cb2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_Runtime.codegen.cs @@ -0,0 +1,78 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "c76f9ddb44b2830babd64c0afeaa96aba6a6ae27" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NullConditionalExpressions_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"c76f9ddb44b2830babd64c0afeaa96aba6a6ae27", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NullConditionalExpressions_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" +Write(ViewBag?.Data); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" +Write(ViewBag.IntIndexer?[0]); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" +Write(ViewBag.StrIndexer?["key"]); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" +Write(ViewBag?.Method(Value?[23]?.More)?["key"]); + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" +Write(ViewBag?.Data); + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" +Write(ViewBag.IntIndexer?[0]); + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" +Write(ViewBag.StrIndexer?["key"]); + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions.cshtml" +Write(ViewBag?.Method(Value?[23]?.More)?["key"]); + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_Runtime.ir.txt new file mode 100644 index 0000000000..8fd7d3dc26 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_Runtime.ir.txt @@ -0,0 +1,40 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NullConditionalExpressions_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [6] NullConditionalExpressions.cshtml) + IntermediateToken - (2:0,2 [6] NullConditionalExpressions.cshtml) - CSharp - \n + CSharpExpression - (9:1,5 [13] NullConditionalExpressions.cshtml) + IntermediateToken - (9:1,5 [13] NullConditionalExpressions.cshtml) - CSharp - ViewBag?.Data + CSharpCode - (22:1,18 [6] NullConditionalExpressions.cshtml) + IntermediateToken - (22:1,18 [6] NullConditionalExpressions.cshtml) - CSharp - \n + CSharpExpression - (29:2,5 [22] NullConditionalExpressions.cshtml) + IntermediateToken - (29:2,5 [22] NullConditionalExpressions.cshtml) - CSharp - ViewBag.IntIndexer?[0] + CSharpCode - (51:2,27 [6] NullConditionalExpressions.cshtml) + IntermediateToken - (51:2,27 [6] NullConditionalExpressions.cshtml) - CSharp - \n + CSharpExpression - (58:3,5 [26] NullConditionalExpressions.cshtml) + IntermediateToken - (58:3,5 [26] NullConditionalExpressions.cshtml) - CSharp - ViewBag.StrIndexer?["key"] + CSharpCode - (84:3,31 [6] NullConditionalExpressions.cshtml) + IntermediateToken - (84:3,31 [6] NullConditionalExpressions.cshtml) - CSharp - \n + CSharpExpression - (91:4,5 [41] NullConditionalExpressions.cshtml) + IntermediateToken - (91:4,5 [41] NullConditionalExpressions.cshtml) - CSharp - ViewBag?.Method(Value?[23]?.More)?["key"] + CSharpCode - (132:4,46 [2] NullConditionalExpressions.cshtml) + IntermediateToken - (132:4,46 [2] NullConditionalExpressions.cshtml) - CSharp - \n + HtmlContent - (137:6,0 [2] NullConditionalExpressions.cshtml) + IntermediateToken - (137:6,0 [2] NullConditionalExpressions.cshtml) - Html - \n + CSharpExpression - (140:7,1 [13] NullConditionalExpressions.cshtml) + IntermediateToken - (140:7,1 [13] NullConditionalExpressions.cshtml) - CSharp - ViewBag?.Data + HtmlContent - (153:7,14 [2] NullConditionalExpressions.cshtml) + IntermediateToken - (153:7,14 [2] NullConditionalExpressions.cshtml) - Html - \n + CSharpExpression - (156:8,1 [22] NullConditionalExpressions.cshtml) + IntermediateToken - (156:8,1 [22] NullConditionalExpressions.cshtml) - CSharp - ViewBag.IntIndexer?[0] + HtmlContent - (178:8,23 [2] NullConditionalExpressions.cshtml) + IntermediateToken - (178:8,23 [2] NullConditionalExpressions.cshtml) - Html - \n + CSharpExpression - (181:9,1 [26] NullConditionalExpressions.cshtml) + IntermediateToken - (181:9,1 [26] NullConditionalExpressions.cshtml) - CSharp - ViewBag.StrIndexer?["key"] + HtmlContent - (207:9,27 [2] NullConditionalExpressions.cshtml) + IntermediateToken - (207:9,27 [2] NullConditionalExpressions.cshtml) - Html - \n + CSharpExpression - (210:10,1 [41] NullConditionalExpressions.cshtml) + IntermediateToken - (210:10,1 [41] NullConditionalExpressions.cshtml) - CSharp - ViewBag?.Method(Value?[23]?.More)?["key"] diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml new file mode 100644 index 0000000000..33162eb90b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml @@ -0,0 +1,5 @@ + + +@if (true) { + + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.codegen.cs new file mode 100644 index 0000000000..9049386386 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.codegen.cs @@ -0,0 +1,43 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_OpenedIf_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml" + if (true) { + +#line default +#line hidden +#nullable disable +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml" + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml" + + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.diagnostics.txt new file mode 100644 index 0000000000..49f293ec33 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.diagnostics.txt @@ -0,0 +1,3 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml(4,3): Error RZ1026: Encountered end tag "body" with no matching start tag. Are your start/end tags properly balanced? +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml(5,3): Error RZ1026: Encountered end tag "html" with no matching start tag. Are your start/end tags properly balanced? +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml(3,2): Error RZ1006: The if block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.ir.txt new file mode 100644 index 0000000000..16ff60d4df --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.ir.txt @@ -0,0 +1,28 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_OpenedIf_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [16] OpenedIf.cshtml) + IntermediateToken - (0:0,0 [5] OpenedIf.cshtml) - Html - + IntermediateToken - (6:0,6 [2] OpenedIf.cshtml) - Html - \n + IntermediateToken - (8:1,0 [5] OpenedIf.cshtml) - Html - + IntermediateToken - (14:1,6 [2] OpenedIf.cshtml) - Html - \n + CSharpCode - (17:2,1 [14] OpenedIf.cshtml) + IntermediateToken - (17:2,1 [14] OpenedIf.cshtml) - CSharp - if (true) { \n + HtmlContent - (31:3,0 [7] OpenedIf.cshtml) + IntermediateToken - (31:3,0 [7] OpenedIf.cshtml) - Html - + CSharpCode - (38:3,7 [2] OpenedIf.cshtml) + IntermediateToken - (38:3,7 [2] OpenedIf.cshtml) - CSharp - \n + HtmlContent - (40:4,0 [7] OpenedIf.cshtml) + IntermediateToken - (40:4,0 [7] OpenedIf.cshtml) - Html - + CSharpCode - (47:4,7 [0] OpenedIf.cshtml) + IntermediateToken - (47:4,7 [0] OpenedIf.cshtml) - CSharp - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.mappings.txt new file mode 100644 index 0000000000..bf39975d37 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.mappings.txt @@ -0,0 +1,19 @@ +Source Location: (17:2,1 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml) +|if (true) { +| +Generated Location: (735:19,1 [14] ) +|if (true) { +| + +Source Location: (38:3,7 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml) +| +| +Generated Location: (909:26,7 [2] ) +| +| + +Source Location: (47:4,7 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml) +|| +Generated Location: (1071:33,7 [0] ) +|| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_Runtime.codegen.cs new file mode 100644 index 0000000000..5b6c2d401d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_Runtime.codegen.cs @@ -0,0 +1,27 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "afefc9ccf10183402eae0b9e4175393b3797a27b" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_OpenedIf_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"afefc9ccf10183402eae0b9e4175393b3797a27b", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_OpenedIf_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n\r\n"); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml" + if (true) { + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_Runtime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_Runtime.diagnostics.txt new file mode 100644 index 0000000000..49f293ec33 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_Runtime.diagnostics.txt @@ -0,0 +1,3 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml(4,3): Error RZ1026: Encountered end tag "body" with no matching start tag. Are your start/end tags properly balanced? +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml(5,3): Error RZ1026: Encountered end tag "html" with no matching start tag. Are your start/end tags properly balanced? +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf.cshtml(3,2): Error RZ1006: The if block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_Runtime.ir.txt new file mode 100644 index 0000000000..4aa0558ca0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_Runtime.ir.txt @@ -0,0 +1,21 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_OpenedIf_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [16] OpenedIf.cshtml) + IntermediateToken - (0:0,0 [5] OpenedIf.cshtml) - Html - + IntermediateToken - (6:0,6 [2] OpenedIf.cshtml) - Html - \n + IntermediateToken - (8:1,0 [5] OpenedIf.cshtml) - Html - + IntermediateToken - (14:1,6 [2] OpenedIf.cshtml) - Html - \n + CSharpCode - (17:2,1 [14] OpenedIf.cshtml) + IntermediateToken - (17:2,1 [14] OpenedIf.cshtml) - CSharp - if (true) { \n + HtmlContent - (31:3,0 [16] OpenedIf.cshtml) + IntermediateToken - (31:3,0 [7] OpenedIf.cshtml) - Html - + IntermediateToken - (38:3,7 [2] OpenedIf.cshtml) - Html - \n + IntermediateToken - (40:4,0 [7] OpenedIf.cshtml) - Html - + CSharpCode - (47:4,7 [0] OpenedIf.cshtml) + IntermediateToken - (47:4,7 [0] OpenedIf.cshtml) - CSharp - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml new file mode 100644 index 0000000000..ab30e853fd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml @@ -0,0 +1,5 @@ +@{ +/* +int i =10; +int j =20; +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.codegen.cs new file mode 100644 index 0000000000..e6b9eddd15 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.codegen.cs @@ -0,0 +1,33 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ParserError_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml" + +/* +int i =10; +int j =20; +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.diagnostics.txt new file mode 100644 index 0000000000..1a25d90e26 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.diagnostics.txt @@ -0,0 +1,2 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml(2,1): Error RZ1001: End of file was reached before the end of the block comment. All comments started with "/*" sequence must be terminated with a matching "*/" sequence. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.ir.txt new file mode 100644 index 0000000000..42fae7cec7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.ir.txt @@ -0,0 +1,13 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ParserError_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [31] ParserError.cshtml) + IntermediateToken - (2:0,2 [31] ParserError.cshtml) - CSharp - \n/*\nint i =10;\nint j =20;\n} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.mappings.txt new file mode 100644 index 0000000000..c3a898b88e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.mappings.txt @@ -0,0 +1,13 @@ +Source Location: (2:0,2 [31] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml) +| +/* +int i =10; +int j =20; +}| +Generated Location: (742:19,2 [31] ) +| +/* +int i =10; +int j =20; +}| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.codegen.cs new file mode 100644 index 0000000000..27528c0e76 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.codegen.cs @@ -0,0 +1,29 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "a94df714867cbb0e2369fe24157b5d04e2e7a9cf" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ParserError_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"a94df714867cbb0e2369fe24157b5d04e2e7a9cf", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ParserError_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml" + +/* +int i =10; +int j =20; +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.diagnostics.txt new file mode 100644 index 0000000000..1a25d90e26 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.diagnostics.txt @@ -0,0 +1,2 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml(2,1): Error RZ1001: End of file was reached before the end of the block comment. All comments started with "/*" sequence must be terminated with a matching "*/" sequence. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.ir.txt new file mode 100644 index 0000000000..8f60e461b4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.ir.txt @@ -0,0 +1,8 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ParserError_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [31] ParserError.cshtml) + IntermediateToken - (2:0,2 [31] ParserError.cshtml) - CSharp - \n/*\nint i =10;\nint j =20;\n} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml new file mode 100644 index 0000000000..797a828688 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml @@ -0,0 +1,23 @@ +@addTagHelper "*, TestAssembly" + +@{ + var literate = "or illiterate"; + var intDictionary = new Dictionary + { + { "three", 3 }, + }; + var stringDictionary = new SortedDictionary + { + { "name", "value" }, + }; +} + +
        + + + + +
        \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_DesignTime.codegen.cs new file mode 100644 index 0000000000..15438555be --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_DesignTime.codegen.cs @@ -0,0 +1,145 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_PrefixedAttributeTagHelpers_DesignTime + { + private global::TestNamespace.InputTagHelper1 __TestNamespace_InputTagHelper1; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" + + var literate = "or illiterate"; + var intDictionary = new Dictionary + { + { "three", 3 }, + }; + var stringDictionary = new SortedDictionary + { + { "name", "value" }, + }; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper1 = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper1.IntDictionaryProperty = intDictionary; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper2.IntDictionaryProperty = __TestNamespace_InputTagHelper1.IntDictionaryProperty; +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" + __TestNamespace_InputTagHelper1.StringDictionaryProperty = stringDictionary; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper2.StringDictionaryProperty = __TestNamespace_InputTagHelper1.StringDictionaryProperty; + __TestNamespace_InputTagHelper1 = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper1.IntDictionaryProperty = intDictionary; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper2.IntDictionaryProperty = __TestNamespace_InputTagHelper1.IntDictionaryProperty; +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" + __TestNamespace_InputTagHelper1.IntDictionaryProperty["garlic"] = 37; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper2.IntDictionaryProperty["garlic"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["garlic"]; +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" + __TestNamespace_InputTagHelper1.IntProperty = 42; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"] = __TestNamespace_InputTagHelper1.IntProperty; + __TestNamespace_InputTagHelper1 = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper1.IntProperty = 42; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"] = __TestNamespace_InputTagHelper1.IntProperty; +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper1.IntDictionaryProperty["salt"] = 37; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper2.IntDictionaryProperty["salt"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["salt"]; +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" + __TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"] = 98; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper2.IntDictionaryProperty["pepper"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"]; + __TestNamespace_InputTagHelper1.StringProperty = "string"; + __TestNamespace_InputTagHelper2.StringDictionaryProperty["grabber"] = __TestNamespace_InputTagHelper1.StringProperty; + __TestNamespace_InputTagHelper1.StringDictionaryProperty["paprika"] = "another string"; + __TestNamespace_InputTagHelper2.StringDictionaryProperty["paprika"] = __TestNamespace_InputTagHelper1.StringDictionaryProperty["paprika"]; +#nullable restore +#line 21 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" + __o = literate; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper1.StringDictionaryProperty["cumin"] = string.Empty; + __TestNamespace_InputTagHelper2.StringDictionaryProperty["cumin"] = __TestNamespace_InputTagHelper1.StringDictionaryProperty["cumin"]; + __TestNamespace_InputTagHelper1 = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); +#nullable restore +#line 22 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper1.IntDictionaryProperty["value"] = 37; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper2.IntDictionaryProperty["value"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["value"]; + __TestNamespace_InputTagHelper1.StringDictionaryProperty["thyme"] = "string"; + __TestNamespace_InputTagHelper2.StringDictionaryProperty["thyme"] = __TestNamespace_InputTagHelper1.StringDictionaryProperty["thyme"]; + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_DesignTime.ir.txt new file mode 100644 index 0000000000..add0db7eff --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_DesignTime.ir.txt @@ -0,0 +1,136 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_PrefixedAttributeTagHelpers_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.InputTagHelper1 - __TestNamespace_InputTagHelper1 + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + DesignTimeDirective - + DirectiveToken - (14:0,14 [17] PrefixedAttributeTagHelpers.cshtml) - "*, TestAssembly" + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:0,31 [4] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (31:0,31 [4] PrefixedAttributeTagHelpers.cshtml) - Html - \n\n + CSharpCode - (37:2,2 [242] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (37:2,2 [242] PrefixedAttributeTagHelpers.cshtml) - CSharp - \n var literate = "or illiterate";\n var intDictionary = new Dictionary\n {\n { "three", 3 },\n };\n var stringDictionary = new SortedDictionary\n {\n { "name", "value" },\n };\n + HtmlContent - (282:13,0 [49] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (282:13,0 [2] PrefixedAttributeTagHelpers.cshtml) - Html - \n + IntermediateToken - (284:14,0 [4] PrefixedAttributeTagHelpers.cshtml) - Html -
        + IntermediateToken - (325:14,41 [6] PrefixedAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (331:15,4 [92] PrefixedAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper1 + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperHtmlAttribute - - type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (344:15,17 [8] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (344:15,17 [8] PrefixedAttributeTagHelpers.cshtml) - Html - checkbox + DefaultTagHelperProperty - (370:15,43 [13] PrefixedAttributeTagHelpers.cshtml) - int-dictionary - System.Collections.Generic.IDictionary TestNamespace.InputTagHelper1.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (370:15,43 [13] PrefixedAttributeTagHelpers.cshtml) - CSharp - intDictionary + DefaultTagHelperProperty - (370:15,43 [13] PrefixedAttributeTagHelpers.cshtml) - int-dictionary - int TestNamespace.InputTagHelper2.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (370:15,43 [13] PrefixedAttributeTagHelpers.cshtml) - CSharp - intDictionary + DefaultTagHelperProperty - (404:15,77 [16] PrefixedAttributeTagHelpers.cshtml) - string-dictionary - Namespace.DictionaryWithoutParameterlessConstructor TestNamespace.InputTagHelper1.StringDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (404:15,77 [16] PrefixedAttributeTagHelpers.cshtml) - CSharp - stringDictionary + DefaultTagHelperProperty - (404:15,77 [16] PrefixedAttributeTagHelpers.cshtml) - string-dictionary - Namespace.DictionaryWithoutParameterlessConstructor TestNamespace.InputTagHelper2.StringDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (404:15,77 [16] PrefixedAttributeTagHelpers.cshtml) - CSharp - stringDictionary + DefaultTagHelperExecute - + HtmlContent - (423:15,96 [6] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (423:15,96 [6] PrefixedAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (429:16,4 [103] PrefixedAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper1 + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperHtmlAttribute - - type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (442:16,17 [8] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (442:16,17 [8] PrefixedAttributeTagHelpers.cshtml) - Html - password + DefaultTagHelperProperty - (468:16,43 [13] PrefixedAttributeTagHelpers.cshtml) - int-dictionary - System.Collections.Generic.IDictionary TestNamespace.InputTagHelper1.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (468:16,43 [13] PrefixedAttributeTagHelpers.cshtml) - CSharp - intDictionary + DefaultTagHelperProperty - (468:16,43 [13] PrefixedAttributeTagHelpers.cshtml) - int-dictionary - int TestNamespace.InputTagHelper2.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (468:16,43 [13] PrefixedAttributeTagHelpers.cshtml) - CSharp - intDictionary + DefaultTagHelperProperty - (502:16,77 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-garlic - System.Collections.Generic.IDictionary TestNamespace.InputTagHelper1.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (502:16,77 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 37 + DefaultTagHelperProperty - (502:16,77 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-garlic - int TestNamespace.InputTagHelper2.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (502:16,77 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 37 + DefaultTagHelperProperty - (526:16,101 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-grabber - int TestNamespace.InputTagHelper1.IntProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (526:16,101 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 42 + DefaultTagHelperProperty - (526:16,101 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-grabber - int TestNamespace.InputTagHelper2.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (526:16,101 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 42 + DefaultTagHelperExecute - + HtmlContent - (532:16,107 [6] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (532:16,107 [6] PrefixedAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (538:17,4 [257] PrefixedAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper1 + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperHtmlAttribute - - type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (551:17,17 [5] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (551:17,17 [5] PrefixedAttributeTagHelpers.cshtml) - Html - radio + DefaultTagHelperProperty - (590:18,31 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-grabber - int TestNamespace.InputTagHelper1.IntProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (590:18,31 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 42 + DefaultTagHelperProperty - (590:18,31 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-grabber - int TestNamespace.InputTagHelper2.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (590:18,31 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 42 + DefaultTagHelperProperty - (611:18,52 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-salt - System.Collections.Generic.IDictionary TestNamespace.InputTagHelper1.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (611:18,52 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 37 + DefaultTagHelperProperty - (611:18,52 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-salt - int TestNamespace.InputTagHelper2.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (611:18,52 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 37 + DefaultTagHelperProperty - (634:18,75 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-pepper - System.Collections.Generic.IDictionary TestNamespace.InputTagHelper1.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (634:18,75 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 98 + DefaultTagHelperProperty - (634:18,75 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-pepper - int TestNamespace.InputTagHelper2.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (634:18,75 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 98 + DefaultTagHelperHtmlAttribute - - int-prefix-salt - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (655:18,96 [1] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (655:18,96 [1] PrefixedAttributeTagHelpers.cshtml) - Html - 8 + DefaultTagHelperProperty - (693:19,34 [6] PrefixedAttributeTagHelpers.cshtml) - string-prefix-grabber - string TestNamespace.InputTagHelper1.StringProperty - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (693:19,34 [6] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (693:19,34 [6] PrefixedAttributeTagHelpers.cshtml) - Html - string + DefaultTagHelperProperty - (693:19,34 [6] PrefixedAttributeTagHelpers.cshtml) - string-prefix-grabber - Namespace.DictionaryWithoutParameterlessConstructor TestNamespace.InputTagHelper2.StringDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (693:19,34 [6] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (693:19,34 [6] PrefixedAttributeTagHelpers.cshtml) - Html - string + DefaultTagHelperProperty - (724:19,65 [14] PrefixedAttributeTagHelpers.cshtml) - string-prefix-paprika - Namespace.DictionaryWithoutParameterlessConstructor TestNamespace.InputTagHelper1.StringDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (724:19,65 [14] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (724:19,65 [14] PrefixedAttributeTagHelpers.cshtml) - Html - another string + DefaultTagHelperProperty - (724:19,65 [14] PrefixedAttributeTagHelpers.cshtml) - string-prefix-paprika - Namespace.DictionaryWithoutParameterlessConstructor TestNamespace.InputTagHelper2.StringDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (724:19,65 [14] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (724:19,65 [14] PrefixedAttributeTagHelpers.cshtml) - Html - another string + DefaultTagHelperProperty - (773:20,32 [19] PrefixedAttributeTagHelpers.cshtml) - string-prefix-cumin - Namespace.DictionaryWithoutParameterlessConstructor TestNamespace.InputTagHelper1.StringDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (773:20,32 [9] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (773:20,32 [8] PrefixedAttributeTagHelpers.cshtml) - Html - literate + IntermediateToken - (781:20,40 [1] PrefixedAttributeTagHelpers.cshtml) - Html - + CSharpExpression - (783:20,42 [8] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (783:20,42 [8] PrefixedAttributeTagHelpers.cshtml) - CSharp - literate + HtmlContent - (791:20,50 [1] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (791:20,50 [1] PrefixedAttributeTagHelpers.cshtml) - Html - ? + DefaultTagHelperProperty - (773:20,32 [19] PrefixedAttributeTagHelpers.cshtml) - string-prefix-cumin - Namespace.DictionaryWithoutParameterlessConstructor TestNamespace.InputTagHelper2.StringDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (773:20,32 [9] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (773:20,32 [8] PrefixedAttributeTagHelpers.cshtml) - Html - literate + IntermediateToken - (781:20,40 [1] PrefixedAttributeTagHelpers.cshtml) - Html - + CSharpExpression - (783:20,42 [8] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (783:20,42 [8] PrefixedAttributeTagHelpers.cshtml) - CSharp - literate + HtmlContent - (791:20,50 [1] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (791:20,50 [1] PrefixedAttributeTagHelpers.cshtml) - Html - ? + DefaultTagHelperExecute - + HtmlContent - (795:20,54 [6] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (795:20,54 [6] PrefixedAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (801:21,4 [60] PrefixedAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper1 + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (826:21,29 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-value - System.Collections.Generic.IDictionary TestNamespace.InputTagHelper1.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (826:21,29 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 37 + DefaultTagHelperProperty - (826:21,29 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-value - int TestNamespace.InputTagHelper2.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (826:21,29 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 37 + DefaultTagHelperProperty - (851:21,54 [6] PrefixedAttributeTagHelpers.cshtml) - string-prefix-thyme - Namespace.DictionaryWithoutParameterlessConstructor TestNamespace.InputTagHelper1.StringDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (851:21,54 [6] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (851:21,54 [6] PrefixedAttributeTagHelpers.cshtml) - Html - string + DefaultTagHelperProperty - (851:21,54 [6] PrefixedAttributeTagHelpers.cshtml) - string-prefix-thyme - Namespace.DictionaryWithoutParameterlessConstructor TestNamespace.InputTagHelper2.StringDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (851:21,54 [6] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (851:21,54 [6] PrefixedAttributeTagHelpers.cshtml) - Html - string + DefaultTagHelperExecute - + HtmlContent - (861:21,64 [8] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (861:21,64 [2] PrefixedAttributeTagHelpers.cshtml) - Html - \n + IntermediateToken - (863:22,0 [6] PrefixedAttributeTagHelpers.cshtml) - Html -
        diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_DesignTime.mappings.txt new file mode 100644 index 0000000000..240afcc5df --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_DesignTime.mappings.txt @@ -0,0 +1,80 @@ +Source Location: (14:0,14 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml) +|"*, TestAssembly"| +Generated Location: (731:14,37 [17] ) +|"*, TestAssembly"| + +Source Location: (37:2,2 [242] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml) +| + var literate = "or illiterate"; + var intDictionary = new Dictionary + { + { "three", 3 }, + }; + var stringDictionary = new SortedDictionary + { + { "name", "value" }, + }; +| +Generated Location: (1239:31,2 [242] ) +| + var literate = "or illiterate"; + var intDictionary = new Dictionary + { + { "three", 3 }, + }; + var stringDictionary = new SortedDictionary + { + { "name", "value" }, + }; +| + +Source Location: (370:15,43 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml) +|intDictionary| +Generated Location: (1920:49,56 [13] ) +|intDictionary| + +Source Location: (404:15,77 [16] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml) +|stringDictionary| +Generated Location: (2310:57,77 [16] ) +|stringDictionary| + +Source Location: (468:16,43 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml) +|intDictionary| +Generated Location: (2898:67,56 [13] ) +|intDictionary| + +Source Location: (502:16,77 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml) +|37| +Generated Location: (3288:75,77 [2] ) +|37| + +Source Location: (526:16,101 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml) +|42| +Generated Location: (3711:83,101 [2] ) +|42| + +Source Location: (590:18,31 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml) +|42| +Generated Location: (4270:93,46 [2] ) +|42| + +Source Location: (611:18,52 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml) +|37| +Generated Location: (4637:101,64 [2] ) +|37| + +Source Location: (634:18,75 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml) +|98| +Generated Location: (5030:109,75 [2] ) +|98| + +Source Location: (783:20,42 [8] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml) +|literate| +Generated Location: (5850:121,42 [8] ) +|literate| + +Source Location: (826:21,29 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml) +|37| +Generated Location: (6552:132,65 [2] ) +|37| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_Runtime.codegen.cs new file mode 100644 index 0000000000..08a94f8f44 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_Runtime.codegen.cs @@ -0,0 +1,282 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "fc1a85ca24bc6ae7170b67e2d8371cede965879e" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_PrefixedAttributeTagHelpers_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"fc1a85ca24bc6ae7170b67e2d8371cede965879e", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_PrefixedAttributeTagHelpers_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("checkbox"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("password"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("radio"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("int-prefix-salt", new global::Microsoft.AspNetCore.Html.HtmlString("8"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("string-prefix-grabber", "string", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_5 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("string-prefix-paprika", "another string", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_6 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("string-prefix-thyme", "string", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.InputTagHelper1 __TestNamespace_InputTagHelper1; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" + + var literate = "or illiterate"; + var intDictionary = new Dictionary + { + { "three", 3 }, + }; + var stringDictionary = new SortedDictionary + { + { "name", "value" }, + }; + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n
        \r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper1 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper1); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper1.IntDictionaryProperty = intDictionary; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("int-dictionary", __TestNamespace_InputTagHelper1.IntDictionaryProperty, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __TestNamespace_InputTagHelper2.IntDictionaryProperty = __TestNamespace_InputTagHelper1.IntDictionaryProperty; +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper1.StringDictionaryProperty = stringDictionary; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("string-dictionary", __TestNamespace_InputTagHelper1.StringDictionaryProperty, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __TestNamespace_InputTagHelper2.StringDictionaryProperty = __TestNamespace_InputTagHelper1.StringDictionaryProperty; + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper1 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper1); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper1.IntDictionaryProperty = intDictionary; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("int-dictionary", __TestNamespace_InputTagHelper1.IntDictionaryProperty, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __TestNamespace_InputTagHelper2.IntDictionaryProperty = __TestNamespace_InputTagHelper1.IntDictionaryProperty; + if (__TestNamespace_InputTagHelper1.IntDictionaryProperty == null) + { + throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("int-prefix-garlic", "TestNamespace.InputTagHelper1", "IntDictionaryProperty")); + } +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper1.IntDictionaryProperty["garlic"] = 37; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-garlic", __TestNamespace_InputTagHelper1.IntDictionaryProperty["garlic"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + if (__TestNamespace_InputTagHelper2.IntDictionaryProperty == null) + { + throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("int-prefix-garlic", "TestNamespace.InputTagHelper2", "IntDictionaryProperty")); + } + __TestNamespace_InputTagHelper2.IntDictionaryProperty["garlic"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["garlic"]; +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper1.IntProperty = 42; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-grabber", __TestNamespace_InputTagHelper1.IntProperty, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"] = __TestNamespace_InputTagHelper1.IntProperty; + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper1 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper1); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper1.IntProperty = 42; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-grabber", __TestNamespace_InputTagHelper1.IntProperty, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + if (__TestNamespace_InputTagHelper2.IntDictionaryProperty == null) + { + throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("int-prefix-grabber", "TestNamespace.InputTagHelper2", "IntDictionaryProperty")); + } + __TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"] = __TestNamespace_InputTagHelper1.IntProperty; + if (__TestNamespace_InputTagHelper1.IntDictionaryProperty == null) + { + throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("int-prefix-salt", "TestNamespace.InputTagHelper1", "IntDictionaryProperty")); + } +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper1.IntDictionaryProperty["salt"] = 37; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-salt", __TestNamespace_InputTagHelper1.IntDictionaryProperty["salt"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __TestNamespace_InputTagHelper2.IntDictionaryProperty["salt"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["salt"]; +#nullable restore +#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"] = 98; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-pepper", __TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __TestNamespace_InputTagHelper2.IntDictionaryProperty["pepper"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"]; + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); + __TestNamespace_InputTagHelper1.StringProperty = (string)__tagHelperAttribute_4.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4); + if (__TestNamespace_InputTagHelper2.StringDictionaryProperty == null) + { + throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("string-prefix-grabber", "TestNamespace.InputTagHelper2", "StringDictionaryProperty")); + } + __TestNamespace_InputTagHelper2.StringDictionaryProperty["grabber"] = (string)__tagHelperAttribute_4.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4); + if (__TestNamespace_InputTagHelper1.StringDictionaryProperty == null) + { + throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("string-prefix-paprika", "TestNamespace.InputTagHelper1", "StringDictionaryProperty")); + } + __TestNamespace_InputTagHelper1.StringDictionaryProperty["paprika"] = (string)__tagHelperAttribute_5.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_5); + __TestNamespace_InputTagHelper2.StringDictionaryProperty["paprika"] = (string)__tagHelperAttribute_5.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_5); + if (__TestNamespace_InputTagHelper1.StringDictionaryProperty == null) + { + throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("string-prefix-cumin", "TestNamespace.InputTagHelper1", "StringDictionaryProperty")); + } + BeginWriteTagHelperAttribute(); + WriteLiteral("literate "); +#nullable restore +#line 21 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" + WriteLiteral(literate); + +#line default +#line hidden +#nullable disable + WriteLiteral("?"); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __TestNamespace_InputTagHelper1.StringDictionaryProperty["cumin"] = __tagHelperStringValueBuffer; + __tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-cumin", __TestNamespace_InputTagHelper1.StringDictionaryProperty["cumin"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + if (__TestNamespace_InputTagHelper2.StringDictionaryProperty == null) + { + throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("string-prefix-cumin", "TestNamespace.InputTagHelper2", "StringDictionaryProperty")); + } + __TestNamespace_InputTagHelper2.StringDictionaryProperty["cumin"] = __TestNamespace_InputTagHelper1.StringDictionaryProperty["cumin"]; + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper1 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper1); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + if (__TestNamespace_InputTagHelper1.IntDictionaryProperty == null) + { + throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("int-prefix-value", "TestNamespace.InputTagHelper1", "IntDictionaryProperty")); + } +#nullable restore +#line 22 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" +__TestNamespace_InputTagHelper1.IntDictionaryProperty["value"] = 37; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-value", __TestNamespace_InputTagHelper1.IntDictionaryProperty["value"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + if (__TestNamespace_InputTagHelper2.IntDictionaryProperty == null) + { + throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("int-prefix-value", "TestNamespace.InputTagHelper2", "IntDictionaryProperty")); + } + __TestNamespace_InputTagHelper2.IntDictionaryProperty["value"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["value"]; + if (__TestNamespace_InputTagHelper1.StringDictionaryProperty == null) + { + throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("string-prefix-thyme", "TestNamespace.InputTagHelper1", "StringDictionaryProperty")); + } + __TestNamespace_InputTagHelper1.StringDictionaryProperty["thyme"] = (string)__tagHelperAttribute_6.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_6); + if (__TestNamespace_InputTagHelper2.StringDictionaryProperty == null) + { + throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("string-prefix-thyme", "TestNamespace.InputTagHelper2", "StringDictionaryProperty")); + } + __TestNamespace_InputTagHelper2.StringDictionaryProperty["thyme"] = (string)__tagHelperAttribute_6.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_6); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n
        "); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_Runtime.ir.txt new file mode 100644 index 0000000000..892245a292 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers_Runtime.ir.txt @@ -0,0 +1,117 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_PrefixedAttributeTagHelpers_Runtime - - + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_0 - type - checkbox - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_1 - type - password - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_2 - type - radio - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_3 - int-prefix-salt - 8 - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_4 - string-prefix-grabber - string - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_5 - string-prefix-paprika - another string - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_6 - string-prefix-thyme - string - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.InputTagHelper1 - __TestNamespace_InputTagHelper1 + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (33:1,0 [2] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (33:1,0 [2] PrefixedAttributeTagHelpers.cshtml) - Html - \n + CSharpCode - (37:2,2 [242] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (37:2,2 [242] PrefixedAttributeTagHelpers.cshtml) - CSharp - \n var literate = "or illiterate";\n var intDictionary = new Dictionary\n {\n { "three", 3 },\n };\n var stringDictionary = new SortedDictionary\n {\n { "name", "value" },\n };\n + HtmlContent - (282:13,0 [49] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (282:13,0 [2] PrefixedAttributeTagHelpers.cshtml) - Html - \n + IntermediateToken - (284:14,0 [4] PrefixedAttributeTagHelpers.cshtml) - Html -
        + IntermediateToken - (325:14,41 [6] PrefixedAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (331:15,4 [92] PrefixedAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper1 + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 + DefaultTagHelperProperty - (370:15,43 [13] PrefixedAttributeTagHelpers.cshtml) - int-dictionary - System.Collections.Generic.IDictionary TestNamespace.InputTagHelper1.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (370:15,43 [13] PrefixedAttributeTagHelpers.cshtml) - CSharp - intDictionary + DefaultTagHelperProperty - (370:15,43 [13] PrefixedAttributeTagHelpers.cshtml) - int-dictionary - int TestNamespace.InputTagHelper2.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (370:15,43 [13] PrefixedAttributeTagHelpers.cshtml) - CSharp - intDictionary + DefaultTagHelperProperty - (404:15,77 [16] PrefixedAttributeTagHelpers.cshtml) - string-dictionary - Namespace.DictionaryWithoutParameterlessConstructor TestNamespace.InputTagHelper1.StringDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (404:15,77 [16] PrefixedAttributeTagHelpers.cshtml) - CSharp - stringDictionary + DefaultTagHelperProperty - (404:15,77 [16] PrefixedAttributeTagHelpers.cshtml) - string-dictionary - Namespace.DictionaryWithoutParameterlessConstructor TestNamespace.InputTagHelper2.StringDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (404:15,77 [16] PrefixedAttributeTagHelpers.cshtml) - CSharp - stringDictionary + DefaultTagHelperExecute - + HtmlContent - (423:15,96 [6] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (423:15,96 [6] PrefixedAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (429:16,4 [103] PrefixedAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper1 + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 + DefaultTagHelperProperty - (468:16,43 [13] PrefixedAttributeTagHelpers.cshtml) - int-dictionary - System.Collections.Generic.IDictionary TestNamespace.InputTagHelper1.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (468:16,43 [13] PrefixedAttributeTagHelpers.cshtml) - CSharp - intDictionary + DefaultTagHelperProperty - (468:16,43 [13] PrefixedAttributeTagHelpers.cshtml) - int-dictionary - int TestNamespace.InputTagHelper2.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (468:16,43 [13] PrefixedAttributeTagHelpers.cshtml) - CSharp - intDictionary + DefaultTagHelperProperty - (502:16,77 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-garlic - System.Collections.Generic.IDictionary TestNamespace.InputTagHelper1.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (502:16,77 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 37 + DefaultTagHelperProperty - (502:16,77 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-garlic - int TestNamespace.InputTagHelper2.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (502:16,77 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 37 + DefaultTagHelperProperty - (526:16,101 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-grabber - int TestNamespace.InputTagHelper1.IntProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (526:16,101 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 42 + DefaultTagHelperProperty - (526:16,101 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-grabber - int TestNamespace.InputTagHelper2.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (526:16,101 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 42 + DefaultTagHelperExecute - + HtmlContent - (532:16,107 [6] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (532:16,107 [6] PrefixedAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (538:17,4 [257] PrefixedAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper1 + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 + DefaultTagHelperProperty - (590:18,31 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-grabber - int TestNamespace.InputTagHelper1.IntProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (590:18,31 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 42 + DefaultTagHelperProperty - (590:18,31 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-grabber - int TestNamespace.InputTagHelper2.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (590:18,31 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 42 + DefaultTagHelperProperty - (611:18,52 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-salt - System.Collections.Generic.IDictionary TestNamespace.InputTagHelper1.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (611:18,52 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 37 + DefaultTagHelperProperty - (611:18,52 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-salt - int TestNamespace.InputTagHelper2.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (611:18,52 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 37 + DefaultTagHelperProperty - (634:18,75 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-pepper - System.Collections.Generic.IDictionary TestNamespace.InputTagHelper1.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (634:18,75 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 98 + DefaultTagHelperProperty - (634:18,75 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-pepper - int TestNamespace.InputTagHelper2.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (634:18,75 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 98 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_3 + PreallocatedTagHelperProperty - (693:19,34 [6] PrefixedAttributeTagHelpers.cshtml) - __tagHelperAttribute_4 - string-prefix-grabber - StringProperty + PreallocatedTagHelperProperty - (693:19,34 [6] PrefixedAttributeTagHelpers.cshtml) - __tagHelperAttribute_4 - string-prefix-grabber - StringDictionaryProperty + PreallocatedTagHelperProperty - (724:19,65 [14] PrefixedAttributeTagHelpers.cshtml) - __tagHelperAttribute_5 - string-prefix-paprika - StringDictionaryProperty + PreallocatedTagHelperProperty - (724:19,65 [14] PrefixedAttributeTagHelpers.cshtml) - __tagHelperAttribute_5 - string-prefix-paprika - StringDictionaryProperty + DefaultTagHelperProperty - (773:20,32 [19] PrefixedAttributeTagHelpers.cshtml) - string-prefix-cumin - Namespace.DictionaryWithoutParameterlessConstructor TestNamespace.InputTagHelper1.StringDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (773:20,32 [9] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (773:20,32 [8] PrefixedAttributeTagHelpers.cshtml) - Html - literate + IntermediateToken - (781:20,40 [1] PrefixedAttributeTagHelpers.cshtml) - Html - + CSharpExpression - (783:20,42 [8] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (783:20,42 [8] PrefixedAttributeTagHelpers.cshtml) - CSharp - literate + HtmlContent - (791:20,50 [1] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (791:20,50 [1] PrefixedAttributeTagHelpers.cshtml) - Html - ? + DefaultTagHelperProperty - (773:20,32 [19] PrefixedAttributeTagHelpers.cshtml) - string-prefix-cumin - Namespace.DictionaryWithoutParameterlessConstructor TestNamespace.InputTagHelper2.StringDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (773:20,32 [9] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (773:20,32 [8] PrefixedAttributeTagHelpers.cshtml) - Html - literate + IntermediateToken - (781:20,40 [1] PrefixedAttributeTagHelpers.cshtml) - Html - + CSharpExpression - (783:20,42 [8] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (783:20,42 [8] PrefixedAttributeTagHelpers.cshtml) - CSharp - literate + HtmlContent - (791:20,50 [1] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (791:20,50 [1] PrefixedAttributeTagHelpers.cshtml) - Html - ? + DefaultTagHelperExecute - + HtmlContent - (795:20,54 [6] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (795:20,54 [6] PrefixedAttributeTagHelpers.cshtml) - Html - \n + TagHelper - (801:21,4 [60] PrefixedAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper1 + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (826:21,29 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-value - System.Collections.Generic.IDictionary TestNamespace.InputTagHelper1.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (826:21,29 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 37 + DefaultTagHelperProperty - (826:21,29 [2] PrefixedAttributeTagHelpers.cshtml) - int-prefix-value - int TestNamespace.InputTagHelper2.IntDictionaryProperty - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (826:21,29 [2] PrefixedAttributeTagHelpers.cshtml) - CSharp - 37 + PreallocatedTagHelperProperty - (851:21,54 [6] PrefixedAttributeTagHelpers.cshtml) - __tagHelperAttribute_6 - string-prefix-thyme - StringDictionaryProperty + PreallocatedTagHelperProperty - (851:21,54 [6] PrefixedAttributeTagHelpers.cshtml) - __tagHelperAttribute_6 - string-prefix-thyme - StringDictionaryProperty + DefaultTagHelperExecute - + HtmlContent - (861:21,64 [8] PrefixedAttributeTagHelpers.cshtml) + IntermediateToken - (861:21,64 [2] PrefixedAttributeTagHelpers.cshtml) - Html - \n + IntermediateToken - (863:22,0 [6] PrefixedAttributeTagHelpers.cshtml) - Html -
        diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml new file mode 100644 index 0000000000..1edd2fcc49 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml @@ -0,0 +1,18 @@ +@*This is not going to be rendered*@ +

        This should @* not *@ be shown

        + +@{ + @* throw new Exception("Oh no!") *@ + Exception foo = @* new Exception("Oh no!") *@ null; + if(foo != null) { + throw foo; + } +} + +@{ var bar = "@* bar *@"; } +

        But this should show the comment syntax: @bar

        + +@(a@**@b) + + + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.codegen.cs new file mode 100644 index 0000000000..d4fb4049ab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.codegen.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorComments_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml" + + Exception foo = + +#line default +#line hidden +#nullable disable +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml" + null; + if(foo != null) { + throw foo; + } + +#line default +#line hidden +#nullable disable +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml" + var bar = "@* bar *@"; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml" + __o = bar; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 15 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml" +__o = ab; + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.ir.txt new file mode 100644 index 0000000000..20961d3dc2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.ir.txt @@ -0,0 +1,55 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorComments_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (38:1,0 [15] RazorComments.cshtml) + IntermediateToken - (38:1,0 [2] RazorComments.cshtml) - Html -

        + IntermediateToken - (41:1,3 [12] RazorComments.cshtml) - Html - This should + HtmlContent - (62:1,24 [17] RazorComments.cshtml) + IntermediateToken - (62:1,24 [9] RazorComments.cshtml) - Html - be shown + IntermediateToken - (71:1,33 [4] RazorComments.cshtml) - Html -

        + IntermediateToken - (75:1,37 [4] RazorComments.cshtml) - Html - \n\n + CSharpCode - (81:3,2 [6] RazorComments.cshtml) + IntermediateToken - (81:3,2 [6] RazorComments.cshtml) - CSharp - \n + CSharpCode - (122:4,39 [22] RazorComments.cshtml) + IntermediateToken - (122:4,39 [22] RazorComments.cshtml) - CSharp - \n Exception foo = + CSharpCode - (173:5,49 [58] RazorComments.cshtml) + IntermediateToken - (173:5,49 [58] RazorComments.cshtml) - CSharp - null;\n if(foo != null) {\n throw foo;\n }\n + HtmlContent - (234:10,0 [2] RazorComments.cshtml) + IntermediateToken - (234:10,0 [2] RazorComments.cshtml) - Html - \n + CSharpCode - (238:11,2 [24] RazorComments.cshtml) + IntermediateToken - (238:11,2 [24] RazorComments.cshtml) - CSharp - var bar = "@* bar *@"; + HtmlContent - (265:12,0 [44] RazorComments.cshtml) + IntermediateToken - (265:12,0 [2] RazorComments.cshtml) - Html -

        + IntermediateToken - (268:12,3 [41] RazorComments.cshtml) - Html - But this should show the comment syntax: + CSharpExpression - (310:12,45 [3] RazorComments.cshtml) + IntermediateToken - (310:12,45 [3] RazorComments.cshtml) - CSharp - bar + HtmlContent - (313:12,48 [8] RazorComments.cshtml) + IntermediateToken - (313:12,48 [4] RazorComments.cshtml) - Html -

        + IntermediateToken - (317:12,52 [4] RazorComments.cshtml) - Html - \n\n + CSharpExpression - (323:14,2 [2] RazorComments.cshtml) + IntermediateToken - (323:14,2 [1] RazorComments.cshtml) - CSharp - a + IntermediateToken - (328:14,7 [1] RazorComments.cshtml) - CSharp - b + HtmlContent - (330:14,9 [85] RazorComments.cshtml) + IntermediateToken - (330:14,9 [4] RazorComments.cshtml) - Html - \n\n + IntermediateToken - (334:16,0 [6] RazorComments.cshtml) - Html - + IntermediateToken - (406:16,72 [2] RazorComments.cshtml) - Html - \n + IntermediateToken - (408:17,0 [6] RazorComments.cshtml) - Html - + IntermediateToken - (473:17,65 [2] RazorComments.cshtml) - Html - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.mappings.txt new file mode 100644 index 0000000000..3ad7eb8bbd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.mappings.txt @@ -0,0 +1,47 @@ +Source Location: (81:3,2 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml) +| + | +Generated Location: (746:19,2 [6] ) +| + | + +Source Location: (122:4,39 [22] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml) +| + Exception foo = | +Generated Location: (951:27,39 [22] ) +| + Exception foo = | + +Source Location: (173:5,49 [58] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml) +| null; + if(foo != null) { + throw foo; + } +| +Generated Location: (1182:35,49 [58] ) +| null; + if(foo != null) { + throw foo; + } +| + +Source Location: (238:11,2 [24] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml) +| var bar = "@* bar *@"; | +Generated Location: (1401:45,2 [24] ) +| var bar = "@* bar *@"; | + +Source Location: (310:12,45 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml) +|bar| +Generated Location: (1631:52,45 [3] ) +|bar| + +Source Location: (323:14,2 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml) +|a| +Generated Location: (1802:59,6 [1] ) +|a| + +Source Location: (328:14,7 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml) +|b| +Generated Location: (1803:59,7 [1] ) +|b| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_Runtime.codegen.cs new file mode 100644 index 0000000000..b833277cf4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_Runtime.codegen.cs @@ -0,0 +1,64 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "4d553281e07fafc67ca0139b27ee95724a37f162" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorComments_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"4d553281e07fafc67ca0139b27ee95724a37f162", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorComments_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("

        This should "); + WriteLiteral(" be shown

        \r\n\r\n"); +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml" + + Exception foo = + +#line default +#line hidden +#nullable disable +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml" + null; + if(foo != null) { + throw foo; + } + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml" + var bar = "@* bar *@"; + +#line default +#line hidden +#nullable disable + WriteLiteral("

        But this should show the comment syntax: "); +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml" + Write(bar); + +#line default +#line hidden +#nullable disable + WriteLiteral("

        \r\n\r\n"); +#nullable restore +#line 15 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments.cshtml" +Write(ab); + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n\r\n\r\n\r\n"); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_Runtime.ir.txt new file mode 100644 index 0000000000..1229ef836f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_Runtime.ir.txt @@ -0,0 +1,50 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorComments_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (38:1,0 [15] RazorComments.cshtml) + IntermediateToken - (38:1,0 [2] RazorComments.cshtml) - Html -

        + IntermediateToken - (41:1,3 [12] RazorComments.cshtml) - Html - This should + HtmlContent - (62:1,24 [17] RazorComments.cshtml) + IntermediateToken - (62:1,24 [9] RazorComments.cshtml) - Html - be shown + IntermediateToken - (71:1,33 [4] RazorComments.cshtml) - Html -

        + IntermediateToken - (75:1,37 [4] RazorComments.cshtml) - Html - \n\n + CSharpCode - (81:3,2 [6] RazorComments.cshtml) + IntermediateToken - (81:3,2 [6] RazorComments.cshtml) - CSharp - \n + CSharpCode - (122:4,39 [22] RazorComments.cshtml) + IntermediateToken - (122:4,39 [22] RazorComments.cshtml) - CSharp - \n Exception foo = + CSharpCode - (173:5,49 [58] RazorComments.cshtml) + IntermediateToken - (173:5,49 [58] RazorComments.cshtml) - CSharp - null;\n if(foo != null) {\n throw foo;\n }\n + HtmlContent - (234:10,0 [2] RazorComments.cshtml) + IntermediateToken - (234:10,0 [2] RazorComments.cshtml) - Html - \n + CSharpCode - (238:11,2 [24] RazorComments.cshtml) + IntermediateToken - (238:11,2 [24] RazorComments.cshtml) - CSharp - var bar = "@* bar *@"; + HtmlContent - (265:12,0 [44] RazorComments.cshtml) + IntermediateToken - (265:12,0 [2] RazorComments.cshtml) - Html -

        + IntermediateToken - (268:12,3 [41] RazorComments.cshtml) - Html - But this should show the comment syntax: + CSharpExpression - (310:12,45 [3] RazorComments.cshtml) + IntermediateToken - (310:12,45 [3] RazorComments.cshtml) - CSharp - bar + HtmlContent - (313:12,48 [8] RazorComments.cshtml) + IntermediateToken - (313:12,48 [4] RazorComments.cshtml) - Html -

        + IntermediateToken - (317:12,52 [4] RazorComments.cshtml) - Html - \n\n + CSharpExpression - (323:14,2 [2] RazorComments.cshtml) + IntermediateToken - (323:14,2 [1] RazorComments.cshtml) - CSharp - a + IntermediateToken - (328:14,7 [1] RazorComments.cshtml) - CSharp - b + HtmlContent - (330:14,9 [85] RazorComments.cshtml) + IntermediateToken - (330:14,9 [4] RazorComments.cshtml) - Html - \n\n + IntermediateToken - (334:16,0 [6] RazorComments.cshtml) - Html - + IntermediateToken - (406:16,72 [2] RazorComments.cshtml) - Html - \n + IntermediateToken - (408:17,0 [6] RazorComments.cshtml) - Html - + IntermediateToken - (473:17,65 [2] RazorComments.cshtml) - Html - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective.cshtml new file mode 100644 index 0000000000..a8cd525a3d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective.cshtml @@ -0,0 +1 @@ +@removeTagHelper *, TestAssembly diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective_DesignTime.codegen.cs new file mode 100644 index 0000000000..8a96ffc840 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective_DesignTime.codegen.cs @@ -0,0 +1,32 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RemoveTagHelperDirective_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective_DesignTime.ir.txt new file mode 100644 index 0000000000..8a37436277 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective_DesignTime.ir.txt @@ -0,0 +1,14 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RemoveTagHelperDirective_DesignTime - - + DesignTimeDirective - + DirectiveToken - (17:0,17 [15] RemoveTagHelperDirective.cshtml) - *, TestAssembly + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (32:0,32 [2] RemoveTagHelperDirective.cshtml) + IntermediateToken - (32:0,32 [2] RemoveTagHelperDirective.cshtml) - Html - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective_DesignTime.mappings.txt new file mode 100644 index 0000000000..a607226eb2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective_DesignTime.mappings.txt @@ -0,0 +1,5 @@ +Source Location: (17:0,17 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective.cshtml) +|*, TestAssembly| +Generated Location: (550:12,38 [15] ) +|*, TestAssembly| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml new file mode 100644 index 0000000000..952461002f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml @@ -0,0 +1,17 @@ +@{ + Layout = "_SectionTestLayout.cshtml" +} + +
        This is in the Body> + +@section Section2 { +
        This is in Section 2
        +} + +@section Section1 { +
        This is in Section 1
        +} + +@section NestedDelegates { + @{ Func f = @@item; } +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_DesignTime.codegen.cs new file mode 100644 index 0000000000..4a9f436896 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_DesignTime.codegen.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Sections_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml" +global::System.Object Section2 = null; + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml" +global::System.Object Section1 = null; + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 15 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml" +global::System.Object NestedDelegates = null; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml" + + Layout = "_SectionTestLayout.cshtml" + +#line default +#line hidden +#nullable disable + DefineSection("Section2", async(__razor_section_writer) => { +#nullable restore +#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml" + __o = thing; + +#line default +#line hidden +#nullable disable + } + ); + DefineSection("Section1", async(__razor_section_writer) => { + } + ); + DefineSection("NestedDelegates", async(__razor_section_writer) => { +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml" + Func f = + +#line default +#line hidden +#nullable disable + item => new Template(async(__razor_template_writer) => { +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml" + __o = item; + +#line default +#line hidden +#nullable disable + } + ) +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml" + ; + +#line default +#line hidden +#nullable disable + } + ); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_DesignTime.ir.txt new file mode 100644 index 0000000000..13ef74e9ff --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_DesignTime.ir.txt @@ -0,0 +1,62 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Sections_DesignTime - - + DesignTimeDirective - + DirectiveToken - (89:6,9 [8] Sections.cshtml) - Section2 + DirectiveToken - (172:10,9 [8] Sections.cshtml) - Section1 + DirectiveToken - (235:14,9 [15] Sections.cshtml) - NestedDelegates + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [44] Sections.cshtml) + IntermediateToken - (2:0,2 [44] Sections.cshtml) - CSharp - \n Layout = "_SectionTestLayout.cshtml"\n + HtmlContent - (49:3,0 [31] Sections.cshtml) + IntermediateToken - (49:3,0 [2] Sections.cshtml) - Html - \n + IntermediateToken - (51:4,0 [4] Sections.cshtml) - Html -
        + IntermediateToken - (56:4,5 [24] Sections.cshtml) - Html - This is in the Body>\n\n + Section - - Section2 + HtmlContent - (99:6,19 [10] Sections.cshtml) + IntermediateToken - (99:6,19 [6] Sections.cshtml) - Html - \n + IntermediateToken - (105:7,4 [4] Sections.cshtml) - Html -
        + IntermediateToken - (130:7,29 [20] Sections.cshtml) - Html - This is in Section 2 + IntermediateToken - (150:7,49 [6] Sections.cshtml) - Html -
        + IntermediateToken - (156:7,55 [2] Sections.cshtml) - Html - \n + HtmlContent - (159:8,1 [4] Sections.cshtml) + IntermediateToken - (159:8,1 [4] Sections.cshtml) - Html - \n\n + Section - - Section1 + HtmlContent - (182:10,19 [39] Sections.cshtml) + IntermediateToken - (182:10,19 [6] Sections.cshtml) - Html - \n + IntermediateToken - (188:11,4 [4] Sections.cshtml) - Html -
        + IntermediateToken - (193:11,9 [20] Sections.cshtml) - Html - This is in Section 1 + IntermediateToken - (213:11,29 [6] Sections.cshtml) - Html -
        + IntermediateToken - (219:11,35 [2] Sections.cshtml) - Html - \n + HtmlContent - (222:12,1 [4] Sections.cshtml) + IntermediateToken - (222:12,1 [4] Sections.cshtml) - Html - \n\n + Section - - NestedDelegates + HtmlContent - (252:14,26 [6] Sections.cshtml) + IntermediateToken - (252:14,26 [6] Sections.cshtml) - Html - \n + CSharpCode - (260:15,6 [27] Sections.cshtml) + IntermediateToken - (260:15,6 [27] Sections.cshtml) - CSharp - Func f = + Template - (288:15,34 [17] Sections.cshtml) + HtmlContent - (288:15,34 [6] Sections.cshtml) + IntermediateToken - (288:15,34 [5] Sections.cshtml) - Html - + CSharpExpression - (295:15,41 [4] Sections.cshtml) + IntermediateToken - (295:15,41 [4] Sections.cshtml) - CSharp - item + HtmlContent - (299:15,45 [7] Sections.cshtml) + IntermediateToken - (299:15,45 [7] Sections.cshtml) - Html - + CSharpCode - (306:15,52 [2] Sections.cshtml) + IntermediateToken - (306:15,52 [2] Sections.cshtml) - CSharp - ; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_DesignTime.mappings.txt new file mode 100644 index 0000000000..fe0db2092f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_DesignTime.mappings.txt @@ -0,0 +1,44 @@ +Source Location: (89:6,9 [8] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml) +|Section2| +Generated Location: (502:12,22 [8] ) +|Section2| + +Source Location: (172:10,9 [8] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml) +|Section1| +Generated Location: (756:22,22 [8] ) +|Section1| + +Source Location: (235:14,9 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml) +|NestedDelegates| +Generated Location: (1010:32,22 [15] ) +|NestedDelegates| + +Source Location: (2:0,2 [44] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml) +| + Layout = "_SectionTestLayout.cshtml" +| +Generated Location: (1504:49,2 [44] ) +| + Layout = "_SectionTestLayout.cshtml" +| + +Source Location: (123:7,22 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml) +|thing| +Generated Location: (1797:58,22 [5] ) +|thing| + +Source Location: (260:15,6 [27] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml) +| Func f = | +Generated Location: (2182:71,6 [27] ) +| Func f = | + +Source Location: (295:15,41 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml) +|item| +Generated Location: (2480:79,41 [4] ) +|item| + +Source Location: (306:15,52 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml) +|; | +Generated Location: (2731:88,52 [2] ) +|; | + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_Runtime.codegen.cs new file mode 100644 index 0000000000..f73b2141c1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_Runtime.codegen.cs @@ -0,0 +1,80 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "2c1cd9bdf77c65fcccd7f5b86be5746c1381be0e" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Sections_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"2c1cd9bdf77c65fcccd7f5b86be5746c1381be0e", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Sections_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml" + + Layout = "_SectionTestLayout.cshtml" + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n
        This is in the Body>\r\n\r\n"); + DefineSection("Section2", async() => { + WriteLiteral("\r\n
        \r\n"); + } + ); + WriteLiteral("\r\n"); + DefineSection("Section1", async() => { + WriteLiteral("\r\n
        This is in Section 1
        \r\n"); + } + ); + WriteLiteral("\r\n"); + DefineSection("NestedDelegates", async() => { + WriteLiteral("\r\n"); +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml" + Func f = + +#line default +#line hidden +#nullable disable + item => new Template(async(__razor_template_writer) => { + PushWriter(__razor_template_writer); + WriteLiteral(""); +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml" + Write(item); + +#line default +#line hidden +#nullable disable + WriteLiteral(""); + PopWriter(); + } + ) +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml" + ; + +#line default +#line hidden +#nullable disable + } + ); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_Runtime.ir.txt new file mode 100644 index 0000000000..94f5bec0b3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_Runtime.ir.txt @@ -0,0 +1,56 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Sections_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [44] Sections.cshtml) + IntermediateToken - (2:0,2 [44] Sections.cshtml) - CSharp - \n Layout = "_SectionTestLayout.cshtml"\n + HtmlContent - (49:3,0 [31] Sections.cshtml) + IntermediateToken - (49:3,0 [2] Sections.cshtml) - Html - \n + IntermediateToken - (51:4,0 [4] Sections.cshtml) - Html -
        + IntermediateToken - (56:4,5 [24] Sections.cshtml) - Html - This is in the Body>\n\n + Section - - Section2 + HtmlContent - (99:6,19 [10] Sections.cshtml) + IntermediateToken - (99:6,19 [6] Sections.cshtml) - Html - \n + IntermediateToken - (105:7,4 [4] Sections.cshtml) - Html -
        + IntermediateToken - (130:7,29 [20] Sections.cshtml) - Html - This is in Section 2 + IntermediateToken - (150:7,49 [6] Sections.cshtml) - Html -
        + IntermediateToken - (156:7,55 [2] Sections.cshtml) - Html - \n + HtmlContent - (161:9,0 [2] Sections.cshtml) + IntermediateToken - (161:9,0 [2] Sections.cshtml) - Html - \n + Section - - Section1 + HtmlContent - (182:10,19 [39] Sections.cshtml) + IntermediateToken - (182:10,19 [6] Sections.cshtml) - Html - \n + IntermediateToken - (188:11,4 [4] Sections.cshtml) - Html -
        + IntermediateToken - (193:11,9 [20] Sections.cshtml) - Html - This is in Section 1 + IntermediateToken - (213:11,29 [6] Sections.cshtml) - Html -
        + IntermediateToken - (219:11,35 [2] Sections.cshtml) - Html - \n + HtmlContent - (224:13,0 [2] Sections.cshtml) + IntermediateToken - (224:13,0 [2] Sections.cshtml) - Html - \n + Section - - NestedDelegates + HtmlContent - (252:14,26 [2] Sections.cshtml) + IntermediateToken - (252:14,26 [2] Sections.cshtml) - Html - \n + CSharpCode - (254:15,0 [4] Sections.cshtml) + IntermediateToken - (254:15,0 [4] Sections.cshtml) - CSharp - + CSharpCode - (260:15,6 [27] Sections.cshtml) + IntermediateToken - (260:15,6 [27] Sections.cshtml) - CSharp - Func f = + Template - (288:15,34 [17] Sections.cshtml) + HtmlContent - (288:15,34 [6] Sections.cshtml) + IntermediateToken - (288:15,34 [5] Sections.cshtml) - Html - + CSharpExpression - (295:15,41 [4] Sections.cshtml) + IntermediateToken - (295:15,41 [4] Sections.cshtml) - CSharp - item + HtmlContent - (299:15,45 [7] Sections.cshtml) + IntermediateToken - (299:15,45 [7] Sections.cshtml) - Html - + CSharpCode - (306:15,52 [2] Sections.cshtml) + IntermediateToken - (306:15,52 [2] Sections.cshtml) - CSharp - ; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers.cshtml new file mode 100644 index 0000000000..bd4ce8107a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers.cshtml @@ -0,0 +1,5 @@ +@addTagHelper *, TestAssembly +

        Hola

        +
        + +
        \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_DesignTime.codegen.cs new file mode 100644 index 0000000000..1ad3a7830d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_DesignTime.codegen.cs @@ -0,0 +1,35 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SimpleTagHelpers_DesignTime + { + private global::InputTagHelper __InputTagHelper; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __InputTagHelper = CreateTagHelper(); + __InputTagHelper.FooProp = "Hello"; + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_DesignTime.ir.txt new file mode 100644 index 0000000000..061f7507f9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_DesignTime.ir.txt @@ -0,0 +1,37 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SimpleTagHelpers_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::InputTagHelper - __InputTagHelper + DesignTimeDirective - + DirectiveToken - (14:0,14 [15] SimpleTagHelpers.cshtml) - *, TestAssembly + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (29:0,29 [27] SimpleTagHelpers.cshtml) + IntermediateToken - (29:0,29 [2] SimpleTagHelpers.cshtml) - Html - \n + IntermediateToken - (31:1,0 [2] SimpleTagHelpers.cshtml) - Html -

        + IntermediateToken - (34:1,3 [4] SimpleTagHelpers.cshtml) - Html - Hola + IntermediateToken - (38:1,7 [4] SimpleTagHelpers.cshtml) - Html -

        + IntermediateToken - (42:1,11 [2] SimpleTagHelpers.cshtml) - Html - \n + IntermediateToken - (44:2,0 [5] SimpleTagHelpers.cshtml) - Html -
        + IntermediateToken - (50:2,6 [6] SimpleTagHelpers.cshtml) - Html - \n + TagHelper - (56:3,4 [35] SimpleTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - InputTagHelper + DefaultTagHelperProperty - (70:3,18 [5] SimpleTagHelpers.cshtml) - value - string InputTagHelper.FooProp - HtmlAttributeValueStyle.SingleQuotes + HtmlContent - (70:3,18 [5] SimpleTagHelpers.cshtml) + IntermediateToken - (70:3,18 [5] SimpleTagHelpers.cshtml) - Html - Hello + DefaultTagHelperHtmlAttribute - - type - HtmlAttributeValueStyle.SingleQuotes + HtmlContent - (83:3,31 [4] SimpleTagHelpers.cshtml) + IntermediateToken - (83:3,31 [4] SimpleTagHelpers.cshtml) - Html - text + DefaultTagHelperExecute - + HtmlContent - (91:3,39 [9] SimpleTagHelpers.cshtml) + IntermediateToken - (91:3,39 [2] SimpleTagHelpers.cshtml) - Html - \n + IntermediateToken - (93:4,0 [7] SimpleTagHelpers.cshtml) - Html -
        diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_DesignTime.mappings.txt new file mode 100644 index 0000000000..9593c67dea --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_DesignTime.mappings.txt @@ -0,0 +1,5 @@ +Source Location: (14:0,14 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers.cshtml) +|*, TestAssembly| +Generated Location: (592:13,38 [15] ) +|*, TestAssembly| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_Runtime.codegen.cs new file mode 100644 index 0000000000..4d5cd87159 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_Runtime.codegen.cs @@ -0,0 +1,56 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "e2cfd373c979f0844c2fd0ff78d289027202a932" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SimpleTagHelpers_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"e2cfd373c979f0844c2fd0ff78d289027202a932", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SimpleTagHelpers_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("value", "Hello", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("text"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::InputTagHelper __InputTagHelper; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("

        Hola

        \r\n
        \r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__InputTagHelper); + __InputTagHelper.FooProp = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_Runtime.ir.txt new file mode 100644 index 0000000000..ac2e930b2c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleTagHelpers_Runtime.ir.txt @@ -0,0 +1,28 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SimpleTagHelpers_Runtime - - + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_0 - value - Hello - HtmlAttributeValueStyle.SingleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_1 - type - text - HtmlAttributeValueStyle.SingleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::InputTagHelper - __InputTagHelper + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:1,0 [25] SimpleTagHelpers.cshtml) + IntermediateToken - (31:1,0 [2] SimpleTagHelpers.cshtml) - Html -

        + IntermediateToken - (34:1,3 [4] SimpleTagHelpers.cshtml) - Html - Hola + IntermediateToken - (38:1,7 [4] SimpleTagHelpers.cshtml) - Html -

        + IntermediateToken - (42:1,11 [2] SimpleTagHelpers.cshtml) - Html - \n + IntermediateToken - (44:2,0 [5] SimpleTagHelpers.cshtml) - Html -
        + IntermediateToken - (50:2,6 [6] SimpleTagHelpers.cshtml) - Html - \n + TagHelper - (56:3,4 [35] SimpleTagHelpers.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - InputTagHelper + PreallocatedTagHelperProperty - (70:3,18 [5] SimpleTagHelpers.cshtml) - __tagHelperAttribute_0 - value - FooProp + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 + DefaultTagHelperExecute - + HtmlContent - (91:3,39 [9] SimpleTagHelpers.cshtml) + IntermediateToken - (91:3,39 [2] SimpleTagHelpers.cshtml) - Html - \n + IntermediateToken - (93:4,0 [7] SimpleTagHelpers.cshtml) - Html -
        diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf.cshtml new file mode 100644 index 0000000000..27f2750eb2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf.cshtml @@ -0,0 +1,4 @@ +@if (true) +{ +
        +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_DesignTime.codegen.cs new file mode 100644 index 0000000000..6f0947cdd6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_DesignTime.codegen.cs @@ -0,0 +1,39 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SimpleUnspacedIf_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf.cshtml" + if (true) +{ + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf.cshtml" + +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_DesignTime.ir.txt new file mode 100644 index 0000000000..597e0809e0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_DesignTime.ir.txt @@ -0,0 +1,19 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SimpleUnspacedIf_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (1:0,1 [15] SimpleUnspacedIf.cshtml) + IntermediateToken - (1:0,1 [15] SimpleUnspacedIf.cshtml) - CSharp - if (true)\n{\n + HtmlContent - (16:2,1 [11] SimpleUnspacedIf.cshtml) + IntermediateToken - (16:2,1 [4] SimpleUnspacedIf.cshtml) - Html -
        + IntermediateToken - (21:2,6 [6] SimpleUnspacedIf.cshtml) - Html -
        + CSharpCode - (27:2,12 [3] SimpleUnspacedIf.cshtml) + IntermediateToken - (27:2,12 [3] SimpleUnspacedIf.cshtml) - CSharp - \n} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_DesignTime.mappings.txt new file mode 100644 index 0000000000..b49f243de1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_DesignTime.mappings.txt @@ -0,0 +1,16 @@ +Source Location: (1:0,1 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf.cshtml) +|if (true) +{ + | +Generated Location: (751:19,1 [15] ) +|if (true) +{ + | + +Source Location: (27:2,12 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf.cshtml) +| +}| +Generated Location: (944:28,15 [3] ) +| +}| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_Runtime.codegen.cs new file mode 100644 index 0000000000..d9a4109355 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_Runtime.codegen.cs @@ -0,0 +1,34 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "57877348e222dad68a66bed082fa64c96f925772" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SimpleUnspacedIf_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"57877348e222dad68a66bed082fa64c96f925772", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SimpleUnspacedIf_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf.cshtml" + if (true) +{ + +#line default +#line hidden +#nullable disable + WriteLiteral("\t
        \r\n"); +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf.cshtml" +} + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_Runtime.ir.txt new file mode 100644 index 0000000000..ad4a325577 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_Runtime.ir.txt @@ -0,0 +1,16 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SimpleUnspacedIf_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (1:0,1 [14] SimpleUnspacedIf.cshtml) + IntermediateToken - (1:0,1 [14] SimpleUnspacedIf.cshtml) - CSharp - if (true)\n{\n + HtmlContent - (15:2,0 [14] SimpleUnspacedIf.cshtml) + IntermediateToken - (15:2,0 [1] SimpleUnspacedIf.cshtml) - Html - + IntermediateToken - (16:2,1 [4] SimpleUnspacedIf.cshtml) - Html -
        + IntermediateToken - (21:2,6 [6] SimpleUnspacedIf.cshtml) - Html -
        + IntermediateToken - (27:2,12 [2] SimpleUnspacedIf.cshtml) - Html - \n + CSharpCode - (29:3,0 [1] SimpleUnspacedIf.cshtml) + IntermediateToken - (29:3,0 [1] SimpleUnspacedIf.cshtml) - CSharp - } diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml new file mode 100644 index 0000000000..6e12a5f3bf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml @@ -0,0 +1,3 @@ +@addTagHelper "*, TestAssembly" + +

        Body of Tag

        \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml new file mode 100644 index 0000000000..b5c2eddf1a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml @@ -0,0 +1,4 @@ +@addTagHelper "*, TestAssembly" + +

        Body of Tag

        \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_DesignTime.codegen.cs new file mode 100644 index 0000000000..0935d3a6e2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_DesignTime.codegen.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SingleTagHelperWithNewlineBeforeAttributes_DesignTime + { + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __TestNamespace_PTagHelper = CreateTagHelper(); +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml" +__TestNamespace_PTagHelper.Age = 1337; + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_DesignTime.ir.txt new file mode 100644 index 0000000000..caa51dd43d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_DesignTime.ir.txt @@ -0,0 +1,27 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SingleTagHelperWithNewlineBeforeAttributes_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + DesignTimeDirective - + DirectiveToken - (14:0,14 [17] SingleTagHelperWithNewlineBeforeAttributes.cshtml) - "*, TestAssembly" + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:0,31 [4] SingleTagHelperWithNewlineBeforeAttributes.cshtml) + IntermediateToken - (31:0,31 [4] SingleTagHelperWithNewlineBeforeAttributes.cshtml) - Html - \n\n + TagHelper - (35:2,0 [53] SingleTagHelperWithNewlineBeforeAttributes.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (73:3,34 [11] SingleTagHelperWithNewlineBeforeAttributes.cshtml) + IntermediateToken - (73:3,34 [11] SingleTagHelperWithNewlineBeforeAttributes.cshtml) - Html - Body of Tag + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (49:3,10 [11] SingleTagHelperWithNewlineBeforeAttributes.cshtml) + IntermediateToken - (49:3,10 [11] SingleTagHelperWithNewlineBeforeAttributes.cshtml) - Html - Hello World + DefaultTagHelperProperty - (67:3,28 [4] SingleTagHelperWithNewlineBeforeAttributes.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (67:3,28 [4] SingleTagHelperWithNewlineBeforeAttributes.cshtml) - CSharp - 1337 + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_DesignTime.mappings.txt new file mode 100644 index 0000000000..10a7afd1c9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_DesignTime.mappings.txt @@ -0,0 +1,10 @@ +Source Location: (14:0,14 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml) +|"*, TestAssembly"| +Generated Location: (663:13,37 [17] ) +|"*, TestAssembly"| + +Source Location: (67:3,28 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml) +|1337| +Generated Location: (1312:31,33 [4] ) +|1337| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_Runtime.codegen.cs new file mode 100644 index 0000000000..2a91ccf643 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_Runtime.codegen.cs @@ -0,0 +1,61 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "00f665efb7bd154c43f2bd30d287b9ed9fa2ffdd" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SingleTagHelperWithNewlineBeforeAttributes_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"00f665efb7bd154c43f2bd30d287b9ed9fa2ffdd", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SingleTagHelperWithNewlineBeforeAttributes_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("Body of Tag"); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml" +__TestNamespace_PTagHelper.Age = 1337; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_Runtime.ir.txt new file mode 100644 index 0000000000..fb67e469d9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes_Runtime.ir.txt @@ -0,0 +1,20 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SingleTagHelperWithNewlineBeforeAttributes_Runtime - - + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_0 - class - Hello World - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (33:1,0 [2] SingleTagHelperWithNewlineBeforeAttributes.cshtml) + IntermediateToken - (33:1,0 [2] SingleTagHelperWithNewlineBeforeAttributes.cshtml) - Html - \n + TagHelper - (35:2,0 [53] SingleTagHelperWithNewlineBeforeAttributes.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (73:3,34 [11] SingleTagHelperWithNewlineBeforeAttributes.cshtml) + IntermediateToken - (73:3,34 [11] SingleTagHelperWithNewlineBeforeAttributes.cshtml) - Html - Body of Tag + DefaultTagHelperCreate - - TestNamespace.PTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 + DefaultTagHelperProperty - (67:3,28 [4] SingleTagHelperWithNewlineBeforeAttributes.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (67:3,28 [4] SingleTagHelperWithNewlineBeforeAttributes.cshtml) - CSharp - 1337 + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_DesignTime.codegen.cs new file mode 100644 index 0000000000..2217a4f90f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_DesignTime.codegen.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SingleTagHelper_DesignTime + { + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __TestNamespace_PTagHelper = CreateTagHelper(); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml" +__TestNamespace_PTagHelper.Age = 1337; + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_DesignTime.ir.txt new file mode 100644 index 0000000000..4749a67bfd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_DesignTime.ir.txt @@ -0,0 +1,27 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SingleTagHelper_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + DesignTimeDirective - + DirectiveToken - (14:0,14 [17] SingleTagHelper.cshtml) - "*, TestAssembly" + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:0,31 [4] SingleTagHelper.cshtml) + IntermediateToken - (31:0,31 [4] SingleTagHelper.cshtml) - Html - \n\n + TagHelper - (35:2,0 [49] SingleTagHelper.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (69:2,34 [11] SingleTagHelper.cshtml) + IntermediateToken - (69:2,34 [11] SingleTagHelper.cshtml) - Html - Body of Tag + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (45:2,10 [11] SingleTagHelper.cshtml) + IntermediateToken - (45:2,10 [11] SingleTagHelper.cshtml) - Html - Hello World + DefaultTagHelperProperty - (63:2,28 [4] SingleTagHelper.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (63:2,28 [4] SingleTagHelper.cshtml) - CSharp - 1337 + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_DesignTime.mappings.txt new file mode 100644 index 0000000000..4fc0cd4c8e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_DesignTime.mappings.txt @@ -0,0 +1,10 @@ +Source Location: (14:0,14 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml) +|"*, TestAssembly"| +Generated Location: (609:13,37 [17] ) +|"*, TestAssembly"| + +Source Location: (63:2,28 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml) +|1337| +Generated Location: (1231:31,33 [4] ) +|1337| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_Runtime.codegen.cs new file mode 100644 index 0000000000..ac037abbb1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_Runtime.codegen.cs @@ -0,0 +1,61 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "8cdee08b4e2681f8524ae09a405f163fd96d1ed8" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SingleTagHelper_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"8cdee08b4e2681f8524ae09a405f163fd96d1ed8", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SingleTagHelper_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("Body of Tag"); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml" +__TestNamespace_PTagHelper.Age = 1337; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_Runtime.ir.txt new file mode 100644 index 0000000000..89ef050a2c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper_Runtime.ir.txt @@ -0,0 +1,20 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SingleTagHelper_Runtime - - + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_0 - class - Hello World - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (33:1,0 [2] SingleTagHelper.cshtml) + IntermediateToken - (33:1,0 [2] SingleTagHelper.cshtml) - Html - \n + TagHelper - (35:2,0 [49] SingleTagHelper.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (69:2,34 [11] SingleTagHelper.cshtml) + IntermediateToken - (69:2,34 [11] SingleTagHelper.cshtml) - Html - Body of Tag + DefaultTagHelperCreate - - TestNamespace.PTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 + DefaultTagHelperProperty - (63:2,28 [4] SingleTagHelper.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (63:2,28 [4] SingleTagHelper.cshtml) - CSharp - 1337 + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals.cshtml new file mode 100644 index 0000000000..19d498abfe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals.cshtml @@ -0,0 +1,237 @@ +

        This is line 1

        +

        This is line 2

        +

        This is line 3

        +

        This is line 4

        +

        This is line 5

        +

        This is line 6

        +

        This is line 7

        +

        This is line 8

        +

        This is line 9

        +

        This is line 10

        +

        This is line 11

        +

        This is line 12

        +

        This is line 13

        +

        This is line 14

        +

        This is line 15

        +

        This is line 16

        +

        This is line 17

        +

        This is line 18

        +

        This is line 19

        +

        This is line 20

        +

        This is line 21

        +

        This is line 22

        +

        This is line 23

        +

        This is line 24

        +

        This is line 25

        +

        This is line 26

        +

        This is line 27

        +

        This is line 28

        +

        This is line 29

        +

        This is line 30

        +

        This is line 31

        +

        This is line 32

        +

        This is line 33

        +

        This is line 34

        +

        This is line 35

        +

        This is line 36

        +

        This is line 37

        +

        This is line 38

        +

        This is line 39

        +

        This is line 40

        +

        This is line 41

        +

        This is line 42

        +

        This is line 43

        +

        This is line 44

        +

        This is line 45

        +

        This is line 46

        +

        This is line 47

        +

        This is line 48

        +

        This is line 49

        +

        This is line 50

        +

        This is line 51

        +

        This is line 52

        +

        This is line 53

        +

        This is line 54

        +

        This is line 55

        +

        This is line 56

        +

        This is line 57

        +

        This is line 58

        +

        This is line 59

        +

        This is line 60

        +

        This is line 61

        +

        This is line 62

        +

        This is line 63

        +

        This is line 64

        +

        This is line 65

        +

        This is line 66

        +

        This is line 67

        +

        This is line 68

        +

        This is line 69

        +

        This is line 70

        +

        This is line 71

        +

        This is line 72

        +

        This is line 73

        +

        This is line 74

        +

        This is line 75

        +

        This is line 76

        +

        This is line 77

        +

        This is line 78

        +

        This is line 79

        +

        This is line 80

        +

        This is line 81

        +

        This is line 82

        +

        This is line 83

        +

        This is line 84


        + +@section WriteLiteralsToInHere { +

        This is line 1 nested

        +

        This is line 2 nested

        +

        This is line 3 nested

        +

        This is line 4 nested

        +

        This is line 5 nested

        +

        This is line 6 nested

        +

        This is line 7 nested

        +

        This is line 8 nested

        +

        This is line 9 nested

        +

        This is line 10 nested

        +

        This is line 11 nested

        +

        This is line 12 nested

        +

        This is line 13 nested

        +

        This is line 14 nested

        +

        This is line 15 nested

        +

        This is line 16 nested

        +

        This is line 17 nested

        +

        This is line 18 nested

        +

        This is line 19 nested

        +

        This is line 20 nested

        +

        This is line 21 nested

        +

        This is line 22 nested

        +

        This is line 23 nested

        +

        This is line 24 nested

        +

        This is line 25 nested

        +

        This is line 26 nested

        +

        This is line 27 nested

        +

        This is line 28 nested

        +

        This is line 29 nested

        +

        This is line 30 nested

        +

        This is line 31 nested

        +

        This is line 32 nested

        +

        This is line 33 nested

        +

        This is line 34 nested

        +

        This is line 35 nested

        +

        This is line 36 nested

        +

        This is line 37 nested

        +

        This is line 38 nested

        +

        This is line 39 nested

        +

        This is line 40 nested

        +

        This is line 41 nested

        +

        This is line 42 nested

        +

        This is line 43 nested

        +

        This is line 44 nested

        +

        This is line 45 nested

        +

        This is line 46 nested

        +

        This is line 47 nested

        +

        This is line 48 nested

        +

        This is line 49 nested

        +

        This is line 50 nested

        +

        This is line 51 nested

        +

        This is line 52 nested

        +

        This is line 53 nested

        +

        This is line 54 nested

        +

        This is line 55 nested

        +

        This is line 56 nested

        +

        This is line 57 nested

        +

        This is line 58 nested

        +

        This is line 59 nested

        +

        This is line 60 nested

        +

        This is line 61 nested

        +

        This is line 62 nested

        +

        This is line 63 nested

        +

        This is line 64 nested

        +

        This is line 65 nested

        +

        This is line 66 nested

        +

        This is line 67 nested

        +

        This is line 68 nested

        +

        This is line 69 nested

        +

        This is line 70 nested

        +

        This is line 71 nested

        +

        This is line 72 nested

        +

        This is line 73 nested

        +

        This is line 74 nested

        +

        This is line 75 nested

        +} +

        This is line 1

        +

        This is line 2

        +

        This is line 3

        +

        This is line 4

        +

        This is line 5

        +

        This is line 6

        +

        This is line 7

        +

        This is line 8

        +

        This is line 9

        +

        This is line 10

        +

        This is line 11

        +

        This is line 12

        +

        This is line 13

        +

        This is line 14

        +

        This is line 15

        +

        This is line 16

        +

        This is line 17

        +

        This is line 18

        +

        This is line 19

        +

        This is line 20

        +

        This is line 21

        +

        This is line 22

        +

        This is line 23

        +

        This is line 24

        +

        This is line 25

        +

        This is line 26

        +

        This is line 27

        +

        This is line 28

        +

        This is line 29

        +

        This is line 30

        +

        This is line 31

        +

        This is line 32

        +

        This is line 33

        +

        This is line 34

        +

        This is line 35

        +

        This is line 36

        +

        This is line 37

        +

        This is line 38

        +

        This is line 39

        +

        This is line 40

        +

        This is line 41

        +

        This is line 42

        +

        This is line 43

        hi! +@section WriteLiteralsToInHereAlso { +

        This is line 1 nested

        +

        This is line 2 nested

        +

        This is line 3 nested

        +

        This is line 4 nested

        +

        This is line 5 nested

        +

        This is line 6 nested

        +

        This is line 7 nested

        +

        This is line 8 nested

        +

        This is line 9 nested

        +

        This is line 10 nested

        +

        This is line 11 nested

        +

        This is line 12 nested

        +

        This is line 13 nested

        +

        This is line 14 nested

        +

        This is line 15 nested

        +

        This is line 16 nested

        +

        This is line 17 nested

        +

        This is line 18 nested

        +

        This is line 19 nested

        +

        This is line 20 nested

        +

        This is line 21 nested

        +

        This is line 22 nested

        +

        This is line 23 nested

        +

        This is line 24 nested

        +

        This is line 25 nested

        +

        This is line 26 nested

        +

        This is line 27 nested

        +

        This is line 28 nested

        +

        This is line 29 nested

        +

        30

        +}! \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_DesignTime.codegen.cs new file mode 100644 index 0000000000..27ab1b0a1b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_DesignTime.codegen.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_StringLiterals_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 86 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals.cshtml" +global::System.Object WriteLiteralsToInHere = null; + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 206 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals.cshtml" +global::System.Object WriteLiteralsToInHereAlso = null; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + DefineSection("WriteLiteralsToInHere", async(__razor_section_writer) => { + } + ); + DefineSection("WriteLiteralsToInHereAlso", async(__razor_section_writer) => { + } + ); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_DesignTime.ir.txt new file mode 100644 index 0000000000..0c6dbeca8d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_DesignTime.ir.txt @@ -0,0 +1,1186 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_StringLiterals_DesignTime - - + DesignTimeDirective - + DirectiveToken - (2022:85,9 [21] StringLiterals.cshtml) - WriteLiteralsToInHere + DirectiveToken - (5701:205,9 [25] StringLiterals.cshtml) - WriteLiteralsToInHereAlso + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [2013] StringLiterals.cshtml) + IntermediateToken - (0:0,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3:0,3 [14] StringLiterals.cshtml) - Html - This is line 1 + IntermediateToken - (17:0,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (21:0,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (23:1,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (26:1,3 [14] StringLiterals.cshtml) - Html - This is line 2 + IntermediateToken - (40:1,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (44:1,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (46:2,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (49:2,3 [14] StringLiterals.cshtml) - Html - This is line 3 + IntermediateToken - (63:2,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (67:2,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (69:3,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (72:3,3 [14] StringLiterals.cshtml) - Html - This is line 4 + IntermediateToken - (86:3,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (90:3,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (92:4,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (95:4,3 [14] StringLiterals.cshtml) - Html - This is line 5 + IntermediateToken - (109:4,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (113:4,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (115:5,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (118:5,3 [14] StringLiterals.cshtml) - Html - This is line 6 + IntermediateToken - (132:5,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (136:5,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (138:6,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (141:6,3 [14] StringLiterals.cshtml) - Html - This is line 7 + IntermediateToken - (155:6,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (159:6,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (161:7,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (164:7,3 [14] StringLiterals.cshtml) - Html - This is line 8 + IntermediateToken - (178:7,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (182:7,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (184:8,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (187:8,3 [14] StringLiterals.cshtml) - Html - This is line 9 + IntermediateToken - (201:8,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (205:8,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (207:9,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (210:9,3 [15] StringLiterals.cshtml) - Html - This is line 10 + IntermediateToken - (225:9,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (229:9,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (231:10,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (234:10,3 [15] StringLiterals.cshtml) - Html - This is line 11 + IntermediateToken - (249:10,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (253:10,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (255:11,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (258:11,3 [15] StringLiterals.cshtml) - Html - This is line 12 + IntermediateToken - (273:11,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (277:11,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (279:12,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (282:12,3 [15] StringLiterals.cshtml) - Html - This is line 13 + IntermediateToken - (297:12,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (301:12,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (303:13,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (306:13,3 [15] StringLiterals.cshtml) - Html - This is line 14 + IntermediateToken - (321:13,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (325:13,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (327:14,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (330:14,3 [15] StringLiterals.cshtml) - Html - This is line 15 + IntermediateToken - (345:14,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (349:14,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (351:15,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (354:15,3 [15] StringLiterals.cshtml) - Html - This is line 16 + IntermediateToken - (369:15,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (373:15,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (375:16,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (378:16,3 [15] StringLiterals.cshtml) - Html - This is line 17 + IntermediateToken - (393:16,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (397:16,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (399:17,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (402:17,3 [15] StringLiterals.cshtml) - Html - This is line 18 + IntermediateToken - (417:17,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (421:17,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (423:18,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (426:18,3 [15] StringLiterals.cshtml) - Html - This is line 19 + IntermediateToken - (441:18,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (445:18,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (447:19,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (450:19,3 [15] StringLiterals.cshtml) - Html - This is line 20 + IntermediateToken - (465:19,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (469:19,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (471:20,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (474:20,3 [15] StringLiterals.cshtml) - Html - This is line 21 + IntermediateToken - (489:20,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (493:20,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (495:21,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (498:21,3 [15] StringLiterals.cshtml) - Html - This is line 22 + IntermediateToken - (513:21,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (517:21,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (519:22,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (522:22,3 [15] StringLiterals.cshtml) - Html - This is line 23 + IntermediateToken - (537:22,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (541:22,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (543:23,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (546:23,3 [15] StringLiterals.cshtml) - Html - This is line 24 + IntermediateToken - (561:23,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (565:23,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (567:24,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (570:24,3 [15] StringLiterals.cshtml) - Html - This is line 25 + IntermediateToken - (585:24,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (589:24,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (591:25,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (594:25,3 [15] StringLiterals.cshtml) - Html - This is line 26 + IntermediateToken - (609:25,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (613:25,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (615:26,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (618:26,3 [15] StringLiterals.cshtml) - Html - This is line 27 + IntermediateToken - (633:26,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (637:26,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (639:27,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (642:27,3 [15] StringLiterals.cshtml) - Html - This is line 28 + IntermediateToken - (657:27,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (661:27,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (663:28,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (666:28,3 [15] StringLiterals.cshtml) - Html - This is line 29 + IntermediateToken - (681:28,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (685:28,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (687:29,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (690:29,3 [15] StringLiterals.cshtml) - Html - This is line 30 + IntermediateToken - (705:29,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (709:29,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (711:30,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (714:30,3 [15] StringLiterals.cshtml) - Html - This is line 31 + IntermediateToken - (729:30,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (733:30,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (735:31,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (738:31,3 [15] StringLiterals.cshtml) - Html - This is line 32 + IntermediateToken - (753:31,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (757:31,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (759:32,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (762:32,3 [15] StringLiterals.cshtml) - Html - This is line 33 + IntermediateToken - (777:32,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (781:32,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (783:33,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (786:33,3 [15] StringLiterals.cshtml) - Html - This is line 34 + IntermediateToken - (801:33,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (805:33,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (807:34,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (810:34,3 [15] StringLiterals.cshtml) - Html - This is line 35 + IntermediateToken - (825:34,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (829:34,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (831:35,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (834:35,3 [15] StringLiterals.cshtml) - Html - This is line 36 + IntermediateToken - (849:35,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (853:35,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (855:36,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (858:36,3 [15] StringLiterals.cshtml) - Html - This is line 37 + IntermediateToken - (873:36,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (877:36,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (879:37,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (882:37,3 [15] StringLiterals.cshtml) - Html - This is line 38 + IntermediateToken - (897:37,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (901:37,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (903:38,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (906:38,3 [15] StringLiterals.cshtml) - Html - This is line 39 + IntermediateToken - (921:38,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (925:38,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (927:39,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (930:39,3 [15] StringLiterals.cshtml) - Html - This is line 40 + IntermediateToken - (945:39,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (949:39,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (951:40,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (954:40,3 [15] StringLiterals.cshtml) - Html - This is line 41 + IntermediateToken - (969:40,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (973:40,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (975:41,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (978:41,3 [15] StringLiterals.cshtml) - Html - This is line 42 + IntermediateToken - (993:41,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (997:41,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (999:42,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1002:42,3 [15] StringLiterals.cshtml) - Html - This is line 43 + IntermediateToken - (1017:42,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1021:42,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1023:43,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1026:43,3 [15] StringLiterals.cshtml) - Html - This is line 44 + IntermediateToken - (1041:43,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1045:43,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1047:44,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1050:44,3 [15] StringLiterals.cshtml) - Html - This is line 45 + IntermediateToken - (1065:44,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1069:44,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1071:45,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1074:45,3 [15] StringLiterals.cshtml) - Html - This is line 46 + IntermediateToken - (1089:45,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1093:45,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1095:46,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1098:46,3 [15] StringLiterals.cshtml) - Html - This is line 47 + IntermediateToken - (1113:46,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1117:46,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1119:47,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1122:47,3 [15] StringLiterals.cshtml) - Html - This is line 48 + IntermediateToken - (1137:47,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1141:47,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1143:48,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1146:48,3 [15] StringLiterals.cshtml) - Html - This is line 49 + IntermediateToken - (1161:48,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1165:48,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1167:49,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1170:49,3 [15] StringLiterals.cshtml) - Html - This is line 50 + IntermediateToken - (1185:49,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1189:49,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1191:50,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1194:50,3 [15] StringLiterals.cshtml) - Html - This is line 51 + IntermediateToken - (1209:50,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1213:50,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1215:51,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1218:51,3 [15] StringLiterals.cshtml) - Html - This is line 52 + IntermediateToken - (1233:51,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1237:51,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1239:52,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1242:52,3 [15] StringLiterals.cshtml) - Html - This is line 53 + IntermediateToken - (1257:52,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1261:52,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1263:53,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1266:53,3 [15] StringLiterals.cshtml) - Html - This is line 54 + IntermediateToken - (1281:53,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1285:53,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1287:54,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1290:54,3 [15] StringLiterals.cshtml) - Html - This is line 55 + IntermediateToken - (1305:54,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1309:54,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1311:55,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1314:55,3 [15] StringLiterals.cshtml) - Html - This is line 56 + IntermediateToken - (1329:55,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1333:55,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1335:56,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1338:56,3 [15] StringLiterals.cshtml) - Html - This is line 57 + IntermediateToken - (1353:56,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1357:56,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1359:57,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1362:57,3 [15] StringLiterals.cshtml) - Html - This is line 58 + IntermediateToken - (1377:57,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1381:57,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1383:58,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1386:58,3 [15] StringLiterals.cshtml) - Html - This is line 59 + IntermediateToken - (1401:58,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1405:58,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1407:59,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1410:59,3 [15] StringLiterals.cshtml) - Html - This is line 60 + IntermediateToken - (1425:59,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1429:59,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1431:60,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1434:60,3 [15] StringLiterals.cshtml) - Html - This is line 61 + IntermediateToken - (1449:60,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1453:60,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1455:61,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1458:61,3 [15] StringLiterals.cshtml) - Html - This is line 62 + IntermediateToken - (1473:61,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1477:61,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1479:62,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1482:62,3 [15] StringLiterals.cshtml) - Html - This is line 63 + IntermediateToken - (1497:62,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1501:62,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1503:63,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1506:63,3 [15] StringLiterals.cshtml) - Html - This is line 64 + IntermediateToken - (1521:63,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1525:63,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1527:64,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1530:64,3 [15] StringLiterals.cshtml) - Html - This is line 65 + IntermediateToken - (1545:64,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1549:64,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1551:65,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1554:65,3 [15] StringLiterals.cshtml) - Html - This is line 66 + IntermediateToken - (1569:65,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1573:65,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1575:66,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1578:66,3 [15] StringLiterals.cshtml) - Html - This is line 67 + IntermediateToken - (1593:66,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1597:66,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1599:67,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1602:67,3 [15] StringLiterals.cshtml) - Html - This is line 68 + IntermediateToken - (1617:67,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1621:67,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1623:68,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1626:68,3 [15] StringLiterals.cshtml) - Html - This is line 69 + IntermediateToken - (1641:68,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1645:68,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1647:69,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1650:69,3 [15] StringLiterals.cshtml) - Html - This is line 70 + IntermediateToken - (1665:69,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1669:69,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1671:70,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1674:70,3 [15] StringLiterals.cshtml) - Html - This is line 71 + IntermediateToken - (1689:70,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1693:70,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1695:71,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1698:71,3 [15] StringLiterals.cshtml) - Html - This is line 72 + IntermediateToken - (1713:71,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1717:71,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1719:72,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1722:72,3 [15] StringLiterals.cshtml) - Html - This is line 73 + IntermediateToken - (1737:72,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1741:72,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1743:73,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1746:73,3 [15] StringLiterals.cshtml) - Html - This is line 74 + IntermediateToken - (1761:73,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1765:73,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1767:74,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1770:74,3 [15] StringLiterals.cshtml) - Html - This is line 75 + IntermediateToken - (1785:74,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1789:74,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1791:75,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1794:75,3 [15] StringLiterals.cshtml) - Html - This is line 76 + IntermediateToken - (1809:75,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1813:75,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1815:76,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1818:76,3 [15] StringLiterals.cshtml) - Html - This is line 77 + IntermediateToken - (1833:76,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1837:76,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1839:77,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1842:77,3 [15] StringLiterals.cshtml) - Html - This is line 78 + IntermediateToken - (1857:77,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1861:77,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1863:78,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1866:78,3 [15] StringLiterals.cshtml) - Html - This is line 79 + IntermediateToken - (1881:78,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1885:78,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1887:79,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1890:79,3 [15] StringLiterals.cshtml) - Html - This is line 80 + IntermediateToken - (1905:79,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1909:79,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1911:80,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1914:80,3 [15] StringLiterals.cshtml) - Html - This is line 81 + IntermediateToken - (1929:80,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1933:80,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1935:81,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1938:81,3 [15] StringLiterals.cshtml) - Html - This is line 82 + IntermediateToken - (1953:81,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1957:81,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1959:82,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1962:82,3 [15] StringLiterals.cshtml) - Html - This is line 83 + IntermediateToken - (1977:82,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1981:82,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1983:83,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1986:83,3 [15] StringLiterals.cshtml) - Html - This is line 84 + IntermediateToken - (2001:83,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2005:83,22 [3] StringLiterals.cshtml) - Html -
        + IntermediateToken - (2009:83,26 [4] StringLiterals.cshtml) - Html - \n\n + Section - - WriteLiteralsToInHere + HtmlContent - (2045:85,32 [2618] StringLiterals.cshtml) + IntermediateToken - (2045:85,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2051:86,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2054:86,7 [21] StringLiterals.cshtml) - Html - This is line 1 nested + IntermediateToken - (2075:86,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2079:86,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2085:87,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2088:87,7 [21] StringLiterals.cshtml) - Html - This is line 2 nested + IntermediateToken - (2109:87,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2113:87,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2119:88,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2122:88,7 [21] StringLiterals.cshtml) - Html - This is line 3 nested + IntermediateToken - (2143:88,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2147:88,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2153:89,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2156:89,7 [21] StringLiterals.cshtml) - Html - This is line 4 nested + IntermediateToken - (2177:89,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2181:89,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2187:90,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2190:90,7 [21] StringLiterals.cshtml) - Html - This is line 5 nested + IntermediateToken - (2211:90,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2215:90,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2221:91,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2224:91,7 [21] StringLiterals.cshtml) - Html - This is line 6 nested + IntermediateToken - (2245:91,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2249:91,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2255:92,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2258:92,7 [21] StringLiterals.cshtml) - Html - This is line 7 nested + IntermediateToken - (2279:92,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2283:92,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2289:93,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2292:93,7 [21] StringLiterals.cshtml) - Html - This is line 8 nested + IntermediateToken - (2313:93,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2317:93,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2323:94,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2326:94,7 [21] StringLiterals.cshtml) - Html - This is line 9 nested + IntermediateToken - (2347:94,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2351:94,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2357:95,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2360:95,7 [22] StringLiterals.cshtml) - Html - This is line 10 nested + IntermediateToken - (2382:95,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2386:95,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2392:96,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2395:96,7 [22] StringLiterals.cshtml) - Html - This is line 11 nested + IntermediateToken - (2417:96,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2421:96,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2427:97,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2430:97,7 [22] StringLiterals.cshtml) - Html - This is line 12 nested + IntermediateToken - (2452:97,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2456:97,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2462:98,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2465:98,7 [22] StringLiterals.cshtml) - Html - This is line 13 nested + IntermediateToken - (2487:98,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2491:98,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2497:99,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2500:99,7 [22] StringLiterals.cshtml) - Html - This is line 14 nested + IntermediateToken - (2522:99,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2526:99,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2532:100,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2535:100,7 [22] StringLiterals.cshtml) - Html - This is line 15 nested + IntermediateToken - (2557:100,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2561:100,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2567:101,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2570:101,7 [22] StringLiterals.cshtml) - Html - This is line 16 nested + IntermediateToken - (2592:101,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2596:101,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2602:102,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2605:102,7 [22] StringLiterals.cshtml) - Html - This is line 17 nested + IntermediateToken - (2627:102,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2631:102,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2637:103,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2640:103,7 [22] StringLiterals.cshtml) - Html - This is line 18 nested + IntermediateToken - (2662:103,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2666:103,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2672:104,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2675:104,7 [22] StringLiterals.cshtml) - Html - This is line 19 nested + IntermediateToken - (2697:104,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2701:104,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2707:105,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2710:105,7 [22] StringLiterals.cshtml) - Html - This is line 20 nested + IntermediateToken - (2732:105,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2736:105,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2742:106,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2745:106,7 [22] StringLiterals.cshtml) - Html - This is line 21 nested + IntermediateToken - (2767:106,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2771:106,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2777:107,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2780:107,7 [22] StringLiterals.cshtml) - Html - This is line 22 nested + IntermediateToken - (2802:107,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2806:107,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2812:108,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2815:108,7 [22] StringLiterals.cshtml) - Html - This is line 23 nested + IntermediateToken - (2837:108,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2841:108,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2847:109,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2850:109,7 [22] StringLiterals.cshtml) - Html - This is line 24 nested + IntermediateToken - (2872:109,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2876:109,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2882:110,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2885:110,7 [22] StringLiterals.cshtml) - Html - This is line 25 nested + IntermediateToken - (2907:110,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2911:110,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2917:111,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2920:111,7 [22] StringLiterals.cshtml) - Html - This is line 26 nested + IntermediateToken - (2942:111,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2946:111,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2952:112,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2955:112,7 [22] StringLiterals.cshtml) - Html - This is line 27 nested + IntermediateToken - (2977:112,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2981:112,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2987:113,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2990:113,7 [22] StringLiterals.cshtml) - Html - This is line 28 nested + IntermediateToken - (3012:113,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3016:113,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3022:114,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3025:114,7 [22] StringLiterals.cshtml) - Html - This is line 29 nested + IntermediateToken - (3047:114,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3051:114,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3057:115,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3060:115,7 [22] StringLiterals.cshtml) - Html - This is line 30 nested + IntermediateToken - (3082:115,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3086:115,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3092:116,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3095:116,7 [22] StringLiterals.cshtml) - Html - This is line 31 nested + IntermediateToken - (3117:116,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3121:116,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3127:117,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3130:117,7 [22] StringLiterals.cshtml) - Html - This is line 32 nested + IntermediateToken - (3152:117,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3156:117,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3162:118,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3165:118,7 [22] StringLiterals.cshtml) - Html - This is line 33 nested + IntermediateToken - (3187:118,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3191:118,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3197:119,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3200:119,7 [22] StringLiterals.cshtml) - Html - This is line 34 nested + IntermediateToken - (3222:119,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3226:119,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3232:120,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3235:120,7 [22] StringLiterals.cshtml) - Html - This is line 35 nested + IntermediateToken - (3257:120,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3261:120,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3267:121,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3270:121,7 [22] StringLiterals.cshtml) - Html - This is line 36 nested + IntermediateToken - (3292:121,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3296:121,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3302:122,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3305:122,7 [22] StringLiterals.cshtml) - Html - This is line 37 nested + IntermediateToken - (3327:122,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3331:122,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3337:123,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3340:123,7 [22] StringLiterals.cshtml) - Html - This is line 38 nested + IntermediateToken - (3362:123,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3366:123,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3372:124,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3375:124,7 [22] StringLiterals.cshtml) - Html - This is line 39 nested + IntermediateToken - (3397:124,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3401:124,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3407:125,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3410:125,7 [22] StringLiterals.cshtml) - Html - This is line 40 nested + IntermediateToken - (3432:125,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3436:125,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3442:126,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3445:126,7 [22] StringLiterals.cshtml) - Html - This is line 41 nested + IntermediateToken - (3467:126,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3471:126,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3477:127,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3480:127,7 [22] StringLiterals.cshtml) - Html - This is line 42 nested + IntermediateToken - (3502:127,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3506:127,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3512:128,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3515:128,7 [22] StringLiterals.cshtml) - Html - This is line 43 nested + IntermediateToken - (3537:128,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3541:128,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3547:129,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3550:129,7 [22] StringLiterals.cshtml) - Html - This is line 44 nested + IntermediateToken - (3572:129,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3576:129,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3582:130,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3585:130,7 [22] StringLiterals.cshtml) - Html - This is line 45 nested + IntermediateToken - (3607:130,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3611:130,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3617:131,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3620:131,7 [22] StringLiterals.cshtml) - Html - This is line 46 nested + IntermediateToken - (3642:131,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3646:131,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3652:132,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3655:132,7 [22] StringLiterals.cshtml) - Html - This is line 47 nested + IntermediateToken - (3677:132,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3681:132,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3687:133,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3690:133,7 [22] StringLiterals.cshtml) - Html - This is line 48 nested + IntermediateToken - (3712:133,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3716:133,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3722:134,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3725:134,7 [22] StringLiterals.cshtml) - Html - This is line 49 nested + IntermediateToken - (3747:134,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3751:134,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3757:135,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3760:135,7 [22] StringLiterals.cshtml) - Html - This is line 50 nested + IntermediateToken - (3782:135,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3786:135,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3792:136,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3795:136,7 [22] StringLiterals.cshtml) - Html - This is line 51 nested + IntermediateToken - (3817:136,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3821:136,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3827:137,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3830:137,7 [22] StringLiterals.cshtml) - Html - This is line 52 nested + IntermediateToken - (3852:137,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3856:137,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3862:138,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3865:138,7 [22] StringLiterals.cshtml) - Html - This is line 53 nested + IntermediateToken - (3887:138,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3891:138,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3897:139,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3900:139,7 [22] StringLiterals.cshtml) - Html - This is line 54 nested + IntermediateToken - (3922:139,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3926:139,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3932:140,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3935:140,7 [22] StringLiterals.cshtml) - Html - This is line 55 nested + IntermediateToken - (3957:140,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3961:140,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3967:141,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3970:141,7 [22] StringLiterals.cshtml) - Html - This is line 56 nested + IntermediateToken - (3992:141,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3996:141,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4002:142,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4005:142,7 [22] StringLiterals.cshtml) - Html - This is line 57 nested + IntermediateToken - (4027:142,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4031:142,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4037:143,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4040:143,7 [22] StringLiterals.cshtml) - Html - This is line 58 nested + IntermediateToken - (4062:143,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4066:143,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4072:144,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4075:144,7 [22] StringLiterals.cshtml) - Html - This is line 59 nested + IntermediateToken - (4097:144,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4101:144,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4107:145,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4110:145,7 [22] StringLiterals.cshtml) - Html - This is line 60 nested + IntermediateToken - (4132:145,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4136:145,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4142:146,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4145:146,7 [22] StringLiterals.cshtml) - Html - This is line 61 nested + IntermediateToken - (4167:146,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4171:146,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4177:147,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4180:147,7 [22] StringLiterals.cshtml) - Html - This is line 62 nested + IntermediateToken - (4202:147,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4206:147,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4212:148,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4215:148,7 [22] StringLiterals.cshtml) - Html - This is line 63 nested + IntermediateToken - (4237:148,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4241:148,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4247:149,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4250:149,7 [22] StringLiterals.cshtml) - Html - This is line 64 nested + IntermediateToken - (4272:149,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4276:149,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4282:150,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4285:150,7 [22] StringLiterals.cshtml) - Html - This is line 65 nested + IntermediateToken - (4307:150,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4311:150,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4317:151,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4320:151,7 [22] StringLiterals.cshtml) - Html - This is line 66 nested + IntermediateToken - (4342:151,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4346:151,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4352:152,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4355:152,7 [22] StringLiterals.cshtml) - Html - This is line 67 nested + IntermediateToken - (4377:152,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4381:152,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4387:153,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4390:153,7 [22] StringLiterals.cshtml) - Html - This is line 68 nested + IntermediateToken - (4412:153,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4416:153,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4422:154,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4425:154,7 [22] StringLiterals.cshtml) - Html - This is line 69 nested + IntermediateToken - (4447:154,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4451:154,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4457:155,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4460:155,7 [22] StringLiterals.cshtml) - Html - This is line 70 nested + IntermediateToken - (4482:155,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4486:155,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4492:156,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4495:156,7 [22] StringLiterals.cshtml) - Html - This is line 71 nested + IntermediateToken - (4517:156,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4521:156,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4527:157,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4530:157,7 [22] StringLiterals.cshtml) - Html - This is line 72 nested + IntermediateToken - (4552:157,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4556:157,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4562:158,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4565:158,7 [22] StringLiterals.cshtml) - Html - This is line 73 nested + IntermediateToken - (4587:158,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4591:158,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4597:159,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4600:159,7 [22] StringLiterals.cshtml) - Html - This is line 74 nested + IntermediateToken - (4622:159,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4626:159,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4632:160,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4635:160,7 [22] StringLiterals.cshtml) - Html - This is line 75 nested + IntermediateToken - (4657:160,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4661:160,33 [2] StringLiterals.cshtml) - Html - \n + HtmlContent - (4664:161,1 [1028] StringLiterals.cshtml) + IntermediateToken - (4664:161,1 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4666:162,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4669:162,3 [14] StringLiterals.cshtml) - Html - This is line 1 + IntermediateToken - (4683:162,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4687:162,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4689:163,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4692:163,3 [14] StringLiterals.cshtml) - Html - This is line 2 + IntermediateToken - (4706:163,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4710:163,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4712:164,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4715:164,3 [14] StringLiterals.cshtml) - Html - This is line 3 + IntermediateToken - (4729:164,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4733:164,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4735:165,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4738:165,3 [14] StringLiterals.cshtml) - Html - This is line 4 + IntermediateToken - (4752:165,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4756:165,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4758:166,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4761:166,3 [14] StringLiterals.cshtml) - Html - This is line 5 + IntermediateToken - (4775:166,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4779:166,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4781:167,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4784:167,3 [14] StringLiterals.cshtml) - Html - This is line 6 + IntermediateToken - (4798:167,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4802:167,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4804:168,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4807:168,3 [14] StringLiterals.cshtml) - Html - This is line 7 + IntermediateToken - (4821:168,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4825:168,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4827:169,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4830:169,3 [14] StringLiterals.cshtml) - Html - This is line 8 + IntermediateToken - (4844:169,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4848:169,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4850:170,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4853:170,3 [14] StringLiterals.cshtml) - Html - This is line 9 + IntermediateToken - (4867:170,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4871:170,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4873:171,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4876:171,3 [15] StringLiterals.cshtml) - Html - This is line 10 + IntermediateToken - (4891:171,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4895:171,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4897:172,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4900:172,3 [15] StringLiterals.cshtml) - Html - This is line 11 + IntermediateToken - (4915:172,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4919:172,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4921:173,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4924:173,3 [15] StringLiterals.cshtml) - Html - This is line 12 + IntermediateToken - (4939:173,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4943:173,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4945:174,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4948:174,3 [15] StringLiterals.cshtml) - Html - This is line 13 + IntermediateToken - (4963:174,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4967:174,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4969:175,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4972:175,3 [15] StringLiterals.cshtml) - Html - This is line 14 + IntermediateToken - (4987:175,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4991:175,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4993:176,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4996:176,3 [15] StringLiterals.cshtml) - Html - This is line 15 + IntermediateToken - (5011:176,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5015:176,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5017:177,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5020:177,3 [15] StringLiterals.cshtml) - Html - This is line 16 + IntermediateToken - (5035:177,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5039:177,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5041:178,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5044:178,3 [15] StringLiterals.cshtml) - Html - This is line 17 + IntermediateToken - (5059:178,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5063:178,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5065:179,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5068:179,3 [15] StringLiterals.cshtml) - Html - This is line 18 + IntermediateToken - (5083:179,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5087:179,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5089:180,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5092:180,3 [15] StringLiterals.cshtml) - Html - This is line 19 + IntermediateToken - (5107:180,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5111:180,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5113:181,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5116:181,3 [15] StringLiterals.cshtml) - Html - This is line 20 + IntermediateToken - (5131:181,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5135:181,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5137:182,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5140:182,3 [15] StringLiterals.cshtml) - Html - This is line 21 + IntermediateToken - (5155:182,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5159:182,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5161:183,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5164:183,3 [15] StringLiterals.cshtml) - Html - This is line 22 + IntermediateToken - (5179:183,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5183:183,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5185:184,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5188:184,3 [15] StringLiterals.cshtml) - Html - This is line 23 + IntermediateToken - (5203:184,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5207:184,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5209:185,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5212:185,3 [15] StringLiterals.cshtml) - Html - This is line 24 + IntermediateToken - (5227:185,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5231:185,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5233:186,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5236:186,3 [15] StringLiterals.cshtml) - Html - This is line 25 + IntermediateToken - (5251:186,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5255:186,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5257:187,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5260:187,3 [15] StringLiterals.cshtml) - Html - This is line 26 + IntermediateToken - (5275:187,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5279:187,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5281:188,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5284:188,3 [15] StringLiterals.cshtml) - Html - This is line 27 + IntermediateToken - (5299:188,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5303:188,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5305:189,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5308:189,3 [15] StringLiterals.cshtml) - Html - This is line 28 + IntermediateToken - (5323:189,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5327:189,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5329:190,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5332:190,3 [15] StringLiterals.cshtml) - Html - This is line 29 + IntermediateToken - (5347:190,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5351:190,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5353:191,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5356:191,3 [15] StringLiterals.cshtml) - Html - This is line 30 + IntermediateToken - (5371:191,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5375:191,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5377:192,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5380:192,3 [15] StringLiterals.cshtml) - Html - This is line 31 + IntermediateToken - (5395:192,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5399:192,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5401:193,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5404:193,3 [15] StringLiterals.cshtml) - Html - This is line 32 + IntermediateToken - (5419:193,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5423:193,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5425:194,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5428:194,3 [15] StringLiterals.cshtml) - Html - This is line 33 + IntermediateToken - (5443:194,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5447:194,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5449:195,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5452:195,3 [15] StringLiterals.cshtml) - Html - This is line 34 + IntermediateToken - (5467:195,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5471:195,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5473:196,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5476:196,3 [15] StringLiterals.cshtml) - Html - This is line 35 + IntermediateToken - (5491:196,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5495:196,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5497:197,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5500:197,3 [15] StringLiterals.cshtml) - Html - This is line 36 + IntermediateToken - (5515:197,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5519:197,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5521:198,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5524:198,3 [15] StringLiterals.cshtml) - Html - This is line 37 + IntermediateToken - (5539:198,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5543:198,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5545:199,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5548:199,3 [15] StringLiterals.cshtml) - Html - This is line 38 + IntermediateToken - (5563:199,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5567:199,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5569:200,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5572:200,3 [15] StringLiterals.cshtml) - Html - This is line 39 + IntermediateToken - (5587:200,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5591:200,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5593:201,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5596:201,3 [15] StringLiterals.cshtml) - Html - This is line 40 + IntermediateToken - (5611:201,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5615:201,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5617:202,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5620:202,3 [15] StringLiterals.cshtml) - Html - This is line 41 + IntermediateToken - (5635:202,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5639:202,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5641:203,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5644:203,3 [15] StringLiterals.cshtml) - Html - This is line 42 + IntermediateToken - (5659:203,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5663:203,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5665:204,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5668:204,3 [15] StringLiterals.cshtml) - Html - This is line 43 + IntermediateToken - (5683:204,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5687:204,22 [5] StringLiterals.cshtml) - Html - hi!\n + Section - - WriteLiteralsToInHereAlso + HtmlContent - (5728:205,36 [1023] StringLiterals.cshtml) + IntermediateToken - (5728:205,36 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5734:206,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5737:206,7 [21] StringLiterals.cshtml) - Html - This is line 1 nested + IntermediateToken - (5758:206,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5762:206,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5768:207,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5771:207,7 [21] StringLiterals.cshtml) - Html - This is line 2 nested + IntermediateToken - (5792:207,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5796:207,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5802:208,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5805:208,7 [21] StringLiterals.cshtml) - Html - This is line 3 nested + IntermediateToken - (5826:208,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5830:208,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5836:209,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5839:209,7 [21] StringLiterals.cshtml) - Html - This is line 4 nested + IntermediateToken - (5860:209,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5864:209,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5870:210,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5873:210,7 [21] StringLiterals.cshtml) - Html - This is line 5 nested + IntermediateToken - (5894:210,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5898:210,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5904:211,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5907:211,7 [21] StringLiterals.cshtml) - Html - This is line 6 nested + IntermediateToken - (5928:211,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5932:211,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5938:212,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5941:212,7 [21] StringLiterals.cshtml) - Html - This is line 7 nested + IntermediateToken - (5962:212,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5966:212,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5972:213,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5975:213,7 [21] StringLiterals.cshtml) - Html - This is line 8 nested + IntermediateToken - (5996:213,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6000:213,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6006:214,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6009:214,7 [21] StringLiterals.cshtml) - Html - This is line 9 nested + IntermediateToken - (6030:214,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6034:214,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6040:215,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6043:215,7 [22] StringLiterals.cshtml) - Html - This is line 10 nested + IntermediateToken - (6065:215,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6069:215,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6075:216,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6078:216,7 [22] StringLiterals.cshtml) - Html - This is line 11 nested + IntermediateToken - (6100:216,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6104:216,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6110:217,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6113:217,7 [22] StringLiterals.cshtml) - Html - This is line 12 nested + IntermediateToken - (6135:217,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6139:217,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6145:218,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6148:218,7 [22] StringLiterals.cshtml) - Html - This is line 13 nested + IntermediateToken - (6170:218,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6174:218,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6180:219,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6183:219,7 [22] StringLiterals.cshtml) - Html - This is line 14 nested + IntermediateToken - (6205:219,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6209:219,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6215:220,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6218:220,7 [22] StringLiterals.cshtml) - Html - This is line 15 nested + IntermediateToken - (6240:220,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6244:220,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6250:221,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6253:221,7 [22] StringLiterals.cshtml) - Html - This is line 16 nested + IntermediateToken - (6275:221,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6279:221,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6285:222,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6288:222,7 [22] StringLiterals.cshtml) - Html - This is line 17 nested + IntermediateToken - (6310:222,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6314:222,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6320:223,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6323:223,7 [22] StringLiterals.cshtml) - Html - This is line 18 nested + IntermediateToken - (6345:223,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6349:223,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6355:224,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6358:224,7 [22] StringLiterals.cshtml) - Html - This is line 19 nested + IntermediateToken - (6380:224,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6384:224,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6390:225,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6393:225,7 [22] StringLiterals.cshtml) - Html - This is line 20 nested + IntermediateToken - (6415:225,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6419:225,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6425:226,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6428:226,7 [22] StringLiterals.cshtml) - Html - This is line 21 nested + IntermediateToken - (6450:226,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6454:226,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6460:227,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6463:227,7 [22] StringLiterals.cshtml) - Html - This is line 22 nested + IntermediateToken - (6485:227,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6489:227,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6495:228,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6498:228,7 [22] StringLiterals.cshtml) - Html - This is line 23 nested + IntermediateToken - (6520:228,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6524:228,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6530:229,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6533:229,7 [22] StringLiterals.cshtml) - Html - This is line 24 nested + IntermediateToken - (6555:229,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6559:229,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6565:230,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6568:230,7 [22] StringLiterals.cshtml) - Html - This is line 25 nested + IntermediateToken - (6590:230,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6594:230,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6600:231,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6603:231,7 [22] StringLiterals.cshtml) - Html - This is line 26 nested + IntermediateToken - (6625:231,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6629:231,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6635:232,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6638:232,7 [22] StringLiterals.cshtml) - Html - This is line 27 nested + IntermediateToken - (6660:232,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6664:232,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6670:233,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6673:233,7 [22] StringLiterals.cshtml) - Html - This is line 28 nested + IntermediateToken - (6695:233,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6699:233,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6705:234,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6708:234,7 [22] StringLiterals.cshtml) - Html - This is line 29 nested + IntermediateToken - (6730:234,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6734:234,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6740:235,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6743:235,7 [2] StringLiterals.cshtml) - Html - 30 + IntermediateToken - (6745:235,9 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6749:235,13 [2] StringLiterals.cshtml) - Html - \n + HtmlContent - (6752:236,1 [1] StringLiterals.cshtml) + IntermediateToken - (6752:236,1 [1] StringLiterals.cshtml) - Html - ! diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_DesignTime.mappings.txt new file mode 100644 index 0000000000..dd997dde62 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_DesignTime.mappings.txt @@ -0,0 +1,10 @@ +Source Location: (2022:85,9 [21] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals.cshtml) +|WriteLiteralsToInHere| +Generated Location: (515:12,22 [21] ) +|WriteLiteralsToInHere| + +Source Location: (5701:205,9 [25] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals.cshtml) +|WriteLiteralsToInHereAlso| +Generated Location: (789:22,22 [25] ) +|WriteLiteralsToInHereAlso| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_Runtime.codegen.cs new file mode 100644 index 0000000000..b2c587c14d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_Runtime.codegen.cs @@ -0,0 +1,267 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "711aea8060d90aea04acd3324afb4bb4a0caccde" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_StringLiterals_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"711aea8060d90aea04acd3324afb4bb4a0caccde", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_StringLiterals_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral(@"

        This is line 1

        +

        This is line 2

        +

        This is line 3

        +

        This is line 4

        +

        This is line 5

        +

        This is line 6

        +

        This is line 7

        +

        This is line 8

        +

        This is line 9

        +

        This is line 10

        +

        This is line 11

        +

        This is line 12

        +

        This is line 13

        +

        This is line 14

        +

        This is line 15

        +

        This is line 16

        +

        This is line 17

        +

        This is line 18

        +

        This is line 19

        +

        This is line 20

        +

        This is line 21

        +

        This is line 22

        +

        This is line 23

        +

        This is line 24

        +

        This is line 25

        +

        This is line 26

        +

        This is line 27

        +

        This is line 28

        +

        This is line 29

        +

        This is line 30

        +

        This is line 31

        +

        This is line 32

        +

        This is line 33

        +

        This is line 34

        +

        This is line 35

        +

        This is line 36

        +

        This is line 37

        +

        This is line 38

        +

        This is line 39

        +

        This is line 40

        +

        This is line 41

        +

        This is line 42

        +

        This is line 43

        +<"); + WriteLiteral(@"p>This is line 44

        +

        This is line 45

        +

        This is line 46

        +

        This is line 47

        +

        This is line 48

        +

        This is line 49

        +

        This is line 50

        +

        This is line 51

        +

        This is line 52

        +

        This is line 53

        +

        This is line 54

        +

        This is line 55

        +

        This is line 56

        +

        This is line 57

        +

        This is line 58

        +

        This is line 59

        +

        This is line 60

        +

        This is line 61

        +

        This is line 62

        +

        This is line 63

        +

        This is line 64

        +

        This is line 65

        +

        This is line 66

        +

        This is line 67

        +

        This is line 68

        +

        This is line 69

        +

        This is line 70

        +

        This is line 71

        +

        This is line 72

        +

        This is line 73

        +

        This is line 74

        +

        This is line 75

        +

        This is line 76

        +

        This is line 77

        +

        This is line 78

        +

        This is line 79

        +

        This is line 80

        +

        This is line 81

        +

        This is line 82

        +

        This is line 83

        +

        This is line 84


        + +"); + DefineSection("WriteLiteralsToInHere", async() => { + WriteLiteral(@" +

        This is line 1 nested

        +

        This is line 2 nested

        +

        This is line 3 nested

        +

        This is line 4 nested

        +

        This is line 5 nested

        +

        This is line 6 nested

        +

        This is line 7 nested

        +

        This is line 8 nested

        +

        This is line 9 nested

        +

        This is line 10 nested

        +

        This is line 11 nested

        +

        This is line 12 nested

        +

        This is line 13 nested

        +

        This is line 14 nested

        +

        This is line 15 nested

        +

        This is line 16 nested

        +

        This is line 17 nested

        +

        This is line 18 nested

        +

        This is line 19 nested

        +

        This is line 20 nested

        +

        This is line 21 nested

        +

        This is line 22 nested

        +

        This is line 23 nested

        +

        This is line 24 nested

        +

        This is line 25 nested

        +

        This is line 26 nested

        +

        This is line 27 nested

        +

        This is line 28 nested

        +

        This is line 29 nested

        +

        This is l"); + WriteLiteral(@"ine 30 nested

        +

        This is line 31 nested

        +

        This is line 32 nested

        +

        This is line 33 nested

        +

        This is line 34 nested

        +

        This is line 35 nested

        +

        This is line 36 nested

        +

        This is line 37 nested

        +

        This is line 38 nested

        +

        This is line 39 nested

        +

        This is line 40 nested

        +

        This is line 41 nested

        +

        This is line 42 nested

        +

        This is line 43 nested

        +

        This is line 44 nested

        +

        This is line 45 nested

        +

        This is line 46 nested

        +

        This is line 47 nested

        +

        This is line 48 nested

        +

        This is line 49 nested

        +

        This is line 50 nested

        +

        This is line 51 nested

        +

        This is line 52 nested

        +

        This is line 53 nested

        +

        This is line 54 nested

        +

        This is line 55 nested

        +

        This is line 56 nested

        +

        This is line 57 nested

        +

        This is line 58 nested

        +

        This is line 59 ne"); + WriteLiteral(@"sted

        +

        This is line 60 nested

        +

        This is line 61 nested

        +

        This is line 62 nested

        +

        This is line 63 nested

        +

        This is line 64 nested

        +

        This is line 65 nested

        +

        This is line 66 nested

        +

        This is line 67 nested

        +

        This is line 68 nested

        +

        This is line 69 nested

        +

        This is line 70 nested

        +

        This is line 71 nested

        +

        This is line 72 nested

        +

        This is line 73 nested

        +

        This is line 74 nested

        +

        This is line 75 nested

        +"); + } + ); + WriteLiteral(@"

        This is line 1

        +

        This is line 2

        +

        This is line 3

        +

        This is line 4

        +

        This is line 5

        +

        This is line 6

        +

        This is line 7

        +

        This is line 8

        +

        This is line 9

        +

        This is line 10

        +

        This is line 11

        +

        This is line 12

        +

        This is line 13

        +

        This is line 14

        +

        This is line 15

        +

        This is line 16

        +

        This is line 17

        +

        This is line 18

        +

        This is line 19

        +

        This is line 20

        +

        This is line 21

        +

        This is line 22

        +

        This is line 23

        +

        This is line 24

        +

        This is line 25

        +

        This is line 26

        +

        This is line 27

        +

        This is line 28

        +

        This is line 29

        +

        This is line 30

        +

        This is line 31

        +

        This is line 32

        +

        This is line 33

        +

        This is line 34

        +

        This is line 35

        +

        This is line 36

        +

        This is line 37

        +

        This is line 38

        +

        This is line 39

        +

        This is line 40

        +

        This is line 41

        +

        This is line 42

        +

        This is line 43

        hi!"); + WriteLiteral("\r\n"); + DefineSection("WriteLiteralsToInHereAlso", async() => { + WriteLiteral(@" +

        This is line 1 nested

        +

        This is line 2 nested

        +

        This is line 3 nested

        +

        This is line 4 nested

        +

        This is line 5 nested

        +

        This is line 6 nested

        +

        This is line 7 nested

        +

        This is line 8 nested

        +

        This is line 9 nested

        +

        This is line 10 nested

        +

        This is line 11 nested

        +

        This is line 12 nested

        +

        This is line 13 nested

        +

        This is line 14 nested

        +

        This is line 15 nested

        +

        This is line 16 nested

        +

        This is line 17 nested

        +

        This is line 18 nested

        +

        This is line 19 nested

        +

        This is line 20 nested

        +

        This is line 21 nested

        +

        This is line 22 nested

        +

        This is line 23 nested

        +

        This is line 24 nested

        +

        This is line 25 nested

        +

        This is line 26 nested

        +

        This is line 27 nested

        +

        This is line 28 nested

        +

        This is line 29 nested

        +

        30

        +"); + } + ); + WriteLiteral("!"); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_Runtime.ir.txt new file mode 100644 index 0000000000..0866f75837 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_Runtime.ir.txt @@ -0,0 +1,1178 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_StringLiterals_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [2013] StringLiterals.cshtml) + IntermediateToken - (0:0,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3:0,3 [14] StringLiterals.cshtml) - Html - This is line 1 + IntermediateToken - (17:0,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (21:0,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (23:1,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (26:1,3 [14] StringLiterals.cshtml) - Html - This is line 2 + IntermediateToken - (40:1,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (44:1,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (46:2,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (49:2,3 [14] StringLiterals.cshtml) - Html - This is line 3 + IntermediateToken - (63:2,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (67:2,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (69:3,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (72:3,3 [14] StringLiterals.cshtml) - Html - This is line 4 + IntermediateToken - (86:3,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (90:3,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (92:4,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (95:4,3 [14] StringLiterals.cshtml) - Html - This is line 5 + IntermediateToken - (109:4,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (113:4,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (115:5,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (118:5,3 [14] StringLiterals.cshtml) - Html - This is line 6 + IntermediateToken - (132:5,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (136:5,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (138:6,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (141:6,3 [14] StringLiterals.cshtml) - Html - This is line 7 + IntermediateToken - (155:6,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (159:6,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (161:7,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (164:7,3 [14] StringLiterals.cshtml) - Html - This is line 8 + IntermediateToken - (178:7,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (182:7,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (184:8,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (187:8,3 [14] StringLiterals.cshtml) - Html - This is line 9 + IntermediateToken - (201:8,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (205:8,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (207:9,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (210:9,3 [15] StringLiterals.cshtml) - Html - This is line 10 + IntermediateToken - (225:9,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (229:9,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (231:10,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (234:10,3 [15] StringLiterals.cshtml) - Html - This is line 11 + IntermediateToken - (249:10,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (253:10,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (255:11,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (258:11,3 [15] StringLiterals.cshtml) - Html - This is line 12 + IntermediateToken - (273:11,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (277:11,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (279:12,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (282:12,3 [15] StringLiterals.cshtml) - Html - This is line 13 + IntermediateToken - (297:12,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (301:12,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (303:13,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (306:13,3 [15] StringLiterals.cshtml) - Html - This is line 14 + IntermediateToken - (321:13,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (325:13,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (327:14,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (330:14,3 [15] StringLiterals.cshtml) - Html - This is line 15 + IntermediateToken - (345:14,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (349:14,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (351:15,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (354:15,3 [15] StringLiterals.cshtml) - Html - This is line 16 + IntermediateToken - (369:15,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (373:15,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (375:16,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (378:16,3 [15] StringLiterals.cshtml) - Html - This is line 17 + IntermediateToken - (393:16,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (397:16,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (399:17,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (402:17,3 [15] StringLiterals.cshtml) - Html - This is line 18 + IntermediateToken - (417:17,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (421:17,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (423:18,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (426:18,3 [15] StringLiterals.cshtml) - Html - This is line 19 + IntermediateToken - (441:18,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (445:18,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (447:19,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (450:19,3 [15] StringLiterals.cshtml) - Html - This is line 20 + IntermediateToken - (465:19,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (469:19,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (471:20,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (474:20,3 [15] StringLiterals.cshtml) - Html - This is line 21 + IntermediateToken - (489:20,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (493:20,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (495:21,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (498:21,3 [15] StringLiterals.cshtml) - Html - This is line 22 + IntermediateToken - (513:21,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (517:21,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (519:22,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (522:22,3 [15] StringLiterals.cshtml) - Html - This is line 23 + IntermediateToken - (537:22,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (541:22,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (543:23,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (546:23,3 [15] StringLiterals.cshtml) - Html - This is line 24 + IntermediateToken - (561:23,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (565:23,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (567:24,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (570:24,3 [15] StringLiterals.cshtml) - Html - This is line 25 + IntermediateToken - (585:24,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (589:24,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (591:25,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (594:25,3 [15] StringLiterals.cshtml) - Html - This is line 26 + IntermediateToken - (609:25,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (613:25,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (615:26,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (618:26,3 [15] StringLiterals.cshtml) - Html - This is line 27 + IntermediateToken - (633:26,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (637:26,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (639:27,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (642:27,3 [15] StringLiterals.cshtml) - Html - This is line 28 + IntermediateToken - (657:27,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (661:27,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (663:28,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (666:28,3 [15] StringLiterals.cshtml) - Html - This is line 29 + IntermediateToken - (681:28,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (685:28,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (687:29,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (690:29,3 [15] StringLiterals.cshtml) - Html - This is line 30 + IntermediateToken - (705:29,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (709:29,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (711:30,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (714:30,3 [15] StringLiterals.cshtml) - Html - This is line 31 + IntermediateToken - (729:30,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (733:30,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (735:31,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (738:31,3 [15] StringLiterals.cshtml) - Html - This is line 32 + IntermediateToken - (753:31,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (757:31,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (759:32,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (762:32,3 [15] StringLiterals.cshtml) - Html - This is line 33 + IntermediateToken - (777:32,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (781:32,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (783:33,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (786:33,3 [15] StringLiterals.cshtml) - Html - This is line 34 + IntermediateToken - (801:33,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (805:33,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (807:34,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (810:34,3 [15] StringLiterals.cshtml) - Html - This is line 35 + IntermediateToken - (825:34,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (829:34,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (831:35,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (834:35,3 [15] StringLiterals.cshtml) - Html - This is line 36 + IntermediateToken - (849:35,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (853:35,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (855:36,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (858:36,3 [15] StringLiterals.cshtml) - Html - This is line 37 + IntermediateToken - (873:36,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (877:36,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (879:37,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (882:37,3 [15] StringLiterals.cshtml) - Html - This is line 38 + IntermediateToken - (897:37,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (901:37,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (903:38,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (906:38,3 [15] StringLiterals.cshtml) - Html - This is line 39 + IntermediateToken - (921:38,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (925:38,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (927:39,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (930:39,3 [15] StringLiterals.cshtml) - Html - This is line 40 + IntermediateToken - (945:39,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (949:39,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (951:40,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (954:40,3 [15] StringLiterals.cshtml) - Html - This is line 41 + IntermediateToken - (969:40,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (973:40,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (975:41,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (978:41,3 [15] StringLiterals.cshtml) - Html - This is line 42 + IntermediateToken - (993:41,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (997:41,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (999:42,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1002:42,3 [15] StringLiterals.cshtml) - Html - This is line 43 + IntermediateToken - (1017:42,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1021:42,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1023:43,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1026:43,3 [15] StringLiterals.cshtml) - Html - This is line 44 + IntermediateToken - (1041:43,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1045:43,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1047:44,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1050:44,3 [15] StringLiterals.cshtml) - Html - This is line 45 + IntermediateToken - (1065:44,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1069:44,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1071:45,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1074:45,3 [15] StringLiterals.cshtml) - Html - This is line 46 + IntermediateToken - (1089:45,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1093:45,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1095:46,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1098:46,3 [15] StringLiterals.cshtml) - Html - This is line 47 + IntermediateToken - (1113:46,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1117:46,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1119:47,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1122:47,3 [15] StringLiterals.cshtml) - Html - This is line 48 + IntermediateToken - (1137:47,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1141:47,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1143:48,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1146:48,3 [15] StringLiterals.cshtml) - Html - This is line 49 + IntermediateToken - (1161:48,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1165:48,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1167:49,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1170:49,3 [15] StringLiterals.cshtml) - Html - This is line 50 + IntermediateToken - (1185:49,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1189:49,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1191:50,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1194:50,3 [15] StringLiterals.cshtml) - Html - This is line 51 + IntermediateToken - (1209:50,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1213:50,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1215:51,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1218:51,3 [15] StringLiterals.cshtml) - Html - This is line 52 + IntermediateToken - (1233:51,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1237:51,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1239:52,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1242:52,3 [15] StringLiterals.cshtml) - Html - This is line 53 + IntermediateToken - (1257:52,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1261:52,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1263:53,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1266:53,3 [15] StringLiterals.cshtml) - Html - This is line 54 + IntermediateToken - (1281:53,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1285:53,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1287:54,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1290:54,3 [15] StringLiterals.cshtml) - Html - This is line 55 + IntermediateToken - (1305:54,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1309:54,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1311:55,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1314:55,3 [15] StringLiterals.cshtml) - Html - This is line 56 + IntermediateToken - (1329:55,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1333:55,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1335:56,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1338:56,3 [15] StringLiterals.cshtml) - Html - This is line 57 + IntermediateToken - (1353:56,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1357:56,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1359:57,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1362:57,3 [15] StringLiterals.cshtml) - Html - This is line 58 + IntermediateToken - (1377:57,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1381:57,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1383:58,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1386:58,3 [15] StringLiterals.cshtml) - Html - This is line 59 + IntermediateToken - (1401:58,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1405:58,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1407:59,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1410:59,3 [15] StringLiterals.cshtml) - Html - This is line 60 + IntermediateToken - (1425:59,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1429:59,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1431:60,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1434:60,3 [15] StringLiterals.cshtml) - Html - This is line 61 + IntermediateToken - (1449:60,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1453:60,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1455:61,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1458:61,3 [15] StringLiterals.cshtml) - Html - This is line 62 + IntermediateToken - (1473:61,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1477:61,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1479:62,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1482:62,3 [15] StringLiterals.cshtml) - Html - This is line 63 + IntermediateToken - (1497:62,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1501:62,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1503:63,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1506:63,3 [15] StringLiterals.cshtml) - Html - This is line 64 + IntermediateToken - (1521:63,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1525:63,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1527:64,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1530:64,3 [15] StringLiterals.cshtml) - Html - This is line 65 + IntermediateToken - (1545:64,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1549:64,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1551:65,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1554:65,3 [15] StringLiterals.cshtml) - Html - This is line 66 + IntermediateToken - (1569:65,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1573:65,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1575:66,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1578:66,3 [15] StringLiterals.cshtml) - Html - This is line 67 + IntermediateToken - (1593:66,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1597:66,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1599:67,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1602:67,3 [15] StringLiterals.cshtml) - Html - This is line 68 + IntermediateToken - (1617:67,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1621:67,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1623:68,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1626:68,3 [15] StringLiterals.cshtml) - Html - This is line 69 + IntermediateToken - (1641:68,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1645:68,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1647:69,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1650:69,3 [15] StringLiterals.cshtml) - Html - This is line 70 + IntermediateToken - (1665:69,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1669:69,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1671:70,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1674:70,3 [15] StringLiterals.cshtml) - Html - This is line 71 + IntermediateToken - (1689:70,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1693:70,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1695:71,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1698:71,3 [15] StringLiterals.cshtml) - Html - This is line 72 + IntermediateToken - (1713:71,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1717:71,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1719:72,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1722:72,3 [15] StringLiterals.cshtml) - Html - This is line 73 + IntermediateToken - (1737:72,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1741:72,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1743:73,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1746:73,3 [15] StringLiterals.cshtml) - Html - This is line 74 + IntermediateToken - (1761:73,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1765:73,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1767:74,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1770:74,3 [15] StringLiterals.cshtml) - Html - This is line 75 + IntermediateToken - (1785:74,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1789:74,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1791:75,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1794:75,3 [15] StringLiterals.cshtml) - Html - This is line 76 + IntermediateToken - (1809:75,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1813:75,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1815:76,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1818:76,3 [15] StringLiterals.cshtml) - Html - This is line 77 + IntermediateToken - (1833:76,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1837:76,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1839:77,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1842:77,3 [15] StringLiterals.cshtml) - Html - This is line 78 + IntermediateToken - (1857:77,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1861:77,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1863:78,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1866:78,3 [15] StringLiterals.cshtml) - Html - This is line 79 + IntermediateToken - (1881:78,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1885:78,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1887:79,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1890:79,3 [15] StringLiterals.cshtml) - Html - This is line 80 + IntermediateToken - (1905:79,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1909:79,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1911:80,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1914:80,3 [15] StringLiterals.cshtml) - Html - This is line 81 + IntermediateToken - (1929:80,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1933:80,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1935:81,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1938:81,3 [15] StringLiterals.cshtml) - Html - This is line 82 + IntermediateToken - (1953:81,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1957:81,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1959:82,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1962:82,3 [15] StringLiterals.cshtml) - Html - This is line 83 + IntermediateToken - (1977:82,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1981:82,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (1983:83,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (1986:83,3 [15] StringLiterals.cshtml) - Html - This is line 84 + IntermediateToken - (2001:83,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2005:83,22 [3] StringLiterals.cshtml) - Html -
        + IntermediateToken - (2009:83,26 [4] StringLiterals.cshtml) - Html - \n\n + Section - - WriteLiteralsToInHere + HtmlContent - (2045:85,32 [2618] StringLiterals.cshtml) + IntermediateToken - (2045:85,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2051:86,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2054:86,7 [21] StringLiterals.cshtml) - Html - This is line 1 nested + IntermediateToken - (2075:86,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2079:86,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2085:87,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2088:87,7 [21] StringLiterals.cshtml) - Html - This is line 2 nested + IntermediateToken - (2109:87,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2113:87,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2119:88,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2122:88,7 [21] StringLiterals.cshtml) - Html - This is line 3 nested + IntermediateToken - (2143:88,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2147:88,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2153:89,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2156:89,7 [21] StringLiterals.cshtml) - Html - This is line 4 nested + IntermediateToken - (2177:89,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2181:89,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2187:90,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2190:90,7 [21] StringLiterals.cshtml) - Html - This is line 5 nested + IntermediateToken - (2211:90,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2215:90,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2221:91,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2224:91,7 [21] StringLiterals.cshtml) - Html - This is line 6 nested + IntermediateToken - (2245:91,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2249:91,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2255:92,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2258:92,7 [21] StringLiterals.cshtml) - Html - This is line 7 nested + IntermediateToken - (2279:92,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2283:92,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2289:93,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2292:93,7 [21] StringLiterals.cshtml) - Html - This is line 8 nested + IntermediateToken - (2313:93,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2317:93,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2323:94,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2326:94,7 [21] StringLiterals.cshtml) - Html - This is line 9 nested + IntermediateToken - (2347:94,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2351:94,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2357:95,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2360:95,7 [22] StringLiterals.cshtml) - Html - This is line 10 nested + IntermediateToken - (2382:95,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2386:95,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2392:96,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2395:96,7 [22] StringLiterals.cshtml) - Html - This is line 11 nested + IntermediateToken - (2417:96,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2421:96,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2427:97,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2430:97,7 [22] StringLiterals.cshtml) - Html - This is line 12 nested + IntermediateToken - (2452:97,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2456:97,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2462:98,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2465:98,7 [22] StringLiterals.cshtml) - Html - This is line 13 nested + IntermediateToken - (2487:98,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2491:98,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2497:99,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2500:99,7 [22] StringLiterals.cshtml) - Html - This is line 14 nested + IntermediateToken - (2522:99,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2526:99,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2532:100,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2535:100,7 [22] StringLiterals.cshtml) - Html - This is line 15 nested + IntermediateToken - (2557:100,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2561:100,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2567:101,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2570:101,7 [22] StringLiterals.cshtml) - Html - This is line 16 nested + IntermediateToken - (2592:101,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2596:101,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2602:102,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2605:102,7 [22] StringLiterals.cshtml) - Html - This is line 17 nested + IntermediateToken - (2627:102,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2631:102,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2637:103,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2640:103,7 [22] StringLiterals.cshtml) - Html - This is line 18 nested + IntermediateToken - (2662:103,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2666:103,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2672:104,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2675:104,7 [22] StringLiterals.cshtml) - Html - This is line 19 nested + IntermediateToken - (2697:104,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2701:104,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2707:105,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2710:105,7 [22] StringLiterals.cshtml) - Html - This is line 20 nested + IntermediateToken - (2732:105,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2736:105,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2742:106,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2745:106,7 [22] StringLiterals.cshtml) - Html - This is line 21 nested + IntermediateToken - (2767:106,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2771:106,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2777:107,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2780:107,7 [22] StringLiterals.cshtml) - Html - This is line 22 nested + IntermediateToken - (2802:107,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2806:107,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2812:108,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2815:108,7 [22] StringLiterals.cshtml) - Html - This is line 23 nested + IntermediateToken - (2837:108,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2841:108,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2847:109,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2850:109,7 [22] StringLiterals.cshtml) - Html - This is line 24 nested + IntermediateToken - (2872:109,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2876:109,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2882:110,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2885:110,7 [22] StringLiterals.cshtml) - Html - This is line 25 nested + IntermediateToken - (2907:110,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2911:110,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2917:111,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2920:111,7 [22] StringLiterals.cshtml) - Html - This is line 26 nested + IntermediateToken - (2942:111,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2946:111,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2952:112,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2955:112,7 [22] StringLiterals.cshtml) - Html - This is line 27 nested + IntermediateToken - (2977:112,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2981:112,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (2987:113,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (2990:113,7 [22] StringLiterals.cshtml) - Html - This is line 28 nested + IntermediateToken - (3012:113,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3016:113,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3022:114,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3025:114,7 [22] StringLiterals.cshtml) - Html - This is line 29 nested + IntermediateToken - (3047:114,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3051:114,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3057:115,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3060:115,7 [22] StringLiterals.cshtml) - Html - This is line 30 nested + IntermediateToken - (3082:115,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3086:115,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3092:116,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3095:116,7 [22] StringLiterals.cshtml) - Html - This is line 31 nested + IntermediateToken - (3117:116,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3121:116,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3127:117,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3130:117,7 [22] StringLiterals.cshtml) - Html - This is line 32 nested + IntermediateToken - (3152:117,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3156:117,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3162:118,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3165:118,7 [22] StringLiterals.cshtml) - Html - This is line 33 nested + IntermediateToken - (3187:118,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3191:118,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3197:119,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3200:119,7 [22] StringLiterals.cshtml) - Html - This is line 34 nested + IntermediateToken - (3222:119,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3226:119,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3232:120,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3235:120,7 [22] StringLiterals.cshtml) - Html - This is line 35 nested + IntermediateToken - (3257:120,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3261:120,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3267:121,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3270:121,7 [22] StringLiterals.cshtml) - Html - This is line 36 nested + IntermediateToken - (3292:121,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3296:121,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3302:122,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3305:122,7 [22] StringLiterals.cshtml) - Html - This is line 37 nested + IntermediateToken - (3327:122,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3331:122,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3337:123,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3340:123,7 [22] StringLiterals.cshtml) - Html - This is line 38 nested + IntermediateToken - (3362:123,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3366:123,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3372:124,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3375:124,7 [22] StringLiterals.cshtml) - Html - This is line 39 nested + IntermediateToken - (3397:124,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3401:124,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3407:125,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3410:125,7 [22] StringLiterals.cshtml) - Html - This is line 40 nested + IntermediateToken - (3432:125,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3436:125,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3442:126,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3445:126,7 [22] StringLiterals.cshtml) - Html - This is line 41 nested + IntermediateToken - (3467:126,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3471:126,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3477:127,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3480:127,7 [22] StringLiterals.cshtml) - Html - This is line 42 nested + IntermediateToken - (3502:127,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3506:127,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3512:128,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3515:128,7 [22] StringLiterals.cshtml) - Html - This is line 43 nested + IntermediateToken - (3537:128,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3541:128,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3547:129,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3550:129,7 [22] StringLiterals.cshtml) - Html - This is line 44 nested + IntermediateToken - (3572:129,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3576:129,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3582:130,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3585:130,7 [22] StringLiterals.cshtml) - Html - This is line 45 nested + IntermediateToken - (3607:130,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3611:130,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3617:131,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3620:131,7 [22] StringLiterals.cshtml) - Html - This is line 46 nested + IntermediateToken - (3642:131,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3646:131,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3652:132,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3655:132,7 [22] StringLiterals.cshtml) - Html - This is line 47 nested + IntermediateToken - (3677:132,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3681:132,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3687:133,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3690:133,7 [22] StringLiterals.cshtml) - Html - This is line 48 nested + IntermediateToken - (3712:133,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3716:133,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3722:134,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3725:134,7 [22] StringLiterals.cshtml) - Html - This is line 49 nested + IntermediateToken - (3747:134,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3751:134,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3757:135,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3760:135,7 [22] StringLiterals.cshtml) - Html - This is line 50 nested + IntermediateToken - (3782:135,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3786:135,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3792:136,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3795:136,7 [22] StringLiterals.cshtml) - Html - This is line 51 nested + IntermediateToken - (3817:136,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3821:136,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3827:137,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3830:137,7 [22] StringLiterals.cshtml) - Html - This is line 52 nested + IntermediateToken - (3852:137,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3856:137,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3862:138,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3865:138,7 [22] StringLiterals.cshtml) - Html - This is line 53 nested + IntermediateToken - (3887:138,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3891:138,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3897:139,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3900:139,7 [22] StringLiterals.cshtml) - Html - This is line 54 nested + IntermediateToken - (3922:139,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3926:139,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3932:140,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3935:140,7 [22] StringLiterals.cshtml) - Html - This is line 55 nested + IntermediateToken - (3957:140,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3961:140,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (3967:141,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3970:141,7 [22] StringLiterals.cshtml) - Html - This is line 56 nested + IntermediateToken - (3992:141,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (3996:141,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4002:142,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4005:142,7 [22] StringLiterals.cshtml) - Html - This is line 57 nested + IntermediateToken - (4027:142,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4031:142,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4037:143,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4040:143,7 [22] StringLiterals.cshtml) - Html - This is line 58 nested + IntermediateToken - (4062:143,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4066:143,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4072:144,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4075:144,7 [22] StringLiterals.cshtml) - Html - This is line 59 nested + IntermediateToken - (4097:144,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4101:144,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4107:145,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4110:145,7 [22] StringLiterals.cshtml) - Html - This is line 60 nested + IntermediateToken - (4132:145,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4136:145,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4142:146,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4145:146,7 [22] StringLiterals.cshtml) - Html - This is line 61 nested + IntermediateToken - (4167:146,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4171:146,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4177:147,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4180:147,7 [22] StringLiterals.cshtml) - Html - This is line 62 nested + IntermediateToken - (4202:147,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4206:147,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4212:148,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4215:148,7 [22] StringLiterals.cshtml) - Html - This is line 63 nested + IntermediateToken - (4237:148,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4241:148,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4247:149,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4250:149,7 [22] StringLiterals.cshtml) - Html - This is line 64 nested + IntermediateToken - (4272:149,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4276:149,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4282:150,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4285:150,7 [22] StringLiterals.cshtml) - Html - This is line 65 nested + IntermediateToken - (4307:150,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4311:150,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4317:151,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4320:151,7 [22] StringLiterals.cshtml) - Html - This is line 66 nested + IntermediateToken - (4342:151,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4346:151,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4352:152,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4355:152,7 [22] StringLiterals.cshtml) - Html - This is line 67 nested + IntermediateToken - (4377:152,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4381:152,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4387:153,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4390:153,7 [22] StringLiterals.cshtml) - Html - This is line 68 nested + IntermediateToken - (4412:153,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4416:153,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4422:154,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4425:154,7 [22] StringLiterals.cshtml) - Html - This is line 69 nested + IntermediateToken - (4447:154,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4451:154,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4457:155,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4460:155,7 [22] StringLiterals.cshtml) - Html - This is line 70 nested + IntermediateToken - (4482:155,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4486:155,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4492:156,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4495:156,7 [22] StringLiterals.cshtml) - Html - This is line 71 nested + IntermediateToken - (4517:156,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4521:156,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4527:157,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4530:157,7 [22] StringLiterals.cshtml) - Html - This is line 72 nested + IntermediateToken - (4552:157,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4556:157,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4562:158,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4565:158,7 [22] StringLiterals.cshtml) - Html - This is line 73 nested + IntermediateToken - (4587:158,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4591:158,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4597:159,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4600:159,7 [22] StringLiterals.cshtml) - Html - This is line 74 nested + IntermediateToken - (4622:159,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4626:159,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4632:160,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4635:160,7 [22] StringLiterals.cshtml) - Html - This is line 75 nested + IntermediateToken - (4657:160,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4661:160,33 [2] StringLiterals.cshtml) - Html - \n + HtmlContent - (4666:162,0 [1026] StringLiterals.cshtml) + IntermediateToken - (4666:162,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4669:162,3 [14] StringLiterals.cshtml) - Html - This is line 1 + IntermediateToken - (4683:162,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4687:162,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4689:163,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4692:163,3 [14] StringLiterals.cshtml) - Html - This is line 2 + IntermediateToken - (4706:163,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4710:163,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4712:164,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4715:164,3 [14] StringLiterals.cshtml) - Html - This is line 3 + IntermediateToken - (4729:164,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4733:164,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4735:165,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4738:165,3 [14] StringLiterals.cshtml) - Html - This is line 4 + IntermediateToken - (4752:165,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4756:165,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4758:166,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4761:166,3 [14] StringLiterals.cshtml) - Html - This is line 5 + IntermediateToken - (4775:166,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4779:166,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4781:167,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4784:167,3 [14] StringLiterals.cshtml) - Html - This is line 6 + IntermediateToken - (4798:167,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4802:167,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4804:168,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4807:168,3 [14] StringLiterals.cshtml) - Html - This is line 7 + IntermediateToken - (4821:168,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4825:168,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4827:169,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4830:169,3 [14] StringLiterals.cshtml) - Html - This is line 8 + IntermediateToken - (4844:169,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4848:169,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4850:170,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4853:170,3 [14] StringLiterals.cshtml) - Html - This is line 9 + IntermediateToken - (4867:170,17 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4871:170,21 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4873:171,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4876:171,3 [15] StringLiterals.cshtml) - Html - This is line 10 + IntermediateToken - (4891:171,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4895:171,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4897:172,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4900:172,3 [15] StringLiterals.cshtml) - Html - This is line 11 + IntermediateToken - (4915:172,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4919:172,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4921:173,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4924:173,3 [15] StringLiterals.cshtml) - Html - This is line 12 + IntermediateToken - (4939:173,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4943:173,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4945:174,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4948:174,3 [15] StringLiterals.cshtml) - Html - This is line 13 + IntermediateToken - (4963:174,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4967:174,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4969:175,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4972:175,3 [15] StringLiterals.cshtml) - Html - This is line 14 + IntermediateToken - (4987:175,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4991:175,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (4993:176,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (4996:176,3 [15] StringLiterals.cshtml) - Html - This is line 15 + IntermediateToken - (5011:176,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5015:176,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5017:177,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5020:177,3 [15] StringLiterals.cshtml) - Html - This is line 16 + IntermediateToken - (5035:177,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5039:177,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5041:178,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5044:178,3 [15] StringLiterals.cshtml) - Html - This is line 17 + IntermediateToken - (5059:178,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5063:178,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5065:179,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5068:179,3 [15] StringLiterals.cshtml) - Html - This is line 18 + IntermediateToken - (5083:179,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5087:179,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5089:180,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5092:180,3 [15] StringLiterals.cshtml) - Html - This is line 19 + IntermediateToken - (5107:180,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5111:180,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5113:181,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5116:181,3 [15] StringLiterals.cshtml) - Html - This is line 20 + IntermediateToken - (5131:181,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5135:181,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5137:182,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5140:182,3 [15] StringLiterals.cshtml) - Html - This is line 21 + IntermediateToken - (5155:182,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5159:182,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5161:183,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5164:183,3 [15] StringLiterals.cshtml) - Html - This is line 22 + IntermediateToken - (5179:183,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5183:183,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5185:184,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5188:184,3 [15] StringLiterals.cshtml) - Html - This is line 23 + IntermediateToken - (5203:184,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5207:184,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5209:185,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5212:185,3 [15] StringLiterals.cshtml) - Html - This is line 24 + IntermediateToken - (5227:185,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5231:185,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5233:186,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5236:186,3 [15] StringLiterals.cshtml) - Html - This is line 25 + IntermediateToken - (5251:186,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5255:186,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5257:187,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5260:187,3 [15] StringLiterals.cshtml) - Html - This is line 26 + IntermediateToken - (5275:187,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5279:187,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5281:188,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5284:188,3 [15] StringLiterals.cshtml) - Html - This is line 27 + IntermediateToken - (5299:188,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5303:188,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5305:189,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5308:189,3 [15] StringLiterals.cshtml) - Html - This is line 28 + IntermediateToken - (5323:189,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5327:189,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5329:190,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5332:190,3 [15] StringLiterals.cshtml) - Html - This is line 29 + IntermediateToken - (5347:190,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5351:190,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5353:191,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5356:191,3 [15] StringLiterals.cshtml) - Html - This is line 30 + IntermediateToken - (5371:191,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5375:191,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5377:192,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5380:192,3 [15] StringLiterals.cshtml) - Html - This is line 31 + IntermediateToken - (5395:192,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5399:192,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5401:193,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5404:193,3 [15] StringLiterals.cshtml) - Html - This is line 32 + IntermediateToken - (5419:193,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5423:193,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5425:194,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5428:194,3 [15] StringLiterals.cshtml) - Html - This is line 33 + IntermediateToken - (5443:194,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5447:194,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5449:195,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5452:195,3 [15] StringLiterals.cshtml) - Html - This is line 34 + IntermediateToken - (5467:195,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5471:195,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5473:196,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5476:196,3 [15] StringLiterals.cshtml) - Html - This is line 35 + IntermediateToken - (5491:196,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5495:196,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5497:197,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5500:197,3 [15] StringLiterals.cshtml) - Html - This is line 36 + IntermediateToken - (5515:197,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5519:197,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5521:198,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5524:198,3 [15] StringLiterals.cshtml) - Html - This is line 37 + IntermediateToken - (5539:198,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5543:198,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5545:199,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5548:199,3 [15] StringLiterals.cshtml) - Html - This is line 38 + IntermediateToken - (5563:199,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5567:199,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5569:200,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5572:200,3 [15] StringLiterals.cshtml) - Html - This is line 39 + IntermediateToken - (5587:200,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5591:200,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5593:201,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5596:201,3 [15] StringLiterals.cshtml) - Html - This is line 40 + IntermediateToken - (5611:201,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5615:201,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5617:202,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5620:202,3 [15] StringLiterals.cshtml) - Html - This is line 41 + IntermediateToken - (5635:202,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5639:202,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5641:203,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5644:203,3 [15] StringLiterals.cshtml) - Html - This is line 42 + IntermediateToken - (5659:203,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5663:203,22 [2] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5665:204,0 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5668:204,3 [15] StringLiterals.cshtml) - Html - This is line 43 + IntermediateToken - (5683:204,18 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5687:204,22 [5] StringLiterals.cshtml) - Html - hi!\n + Section - - WriteLiteralsToInHereAlso + HtmlContent - (5728:205,36 [1023] StringLiterals.cshtml) + IntermediateToken - (5728:205,36 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5734:206,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5737:206,7 [21] StringLiterals.cshtml) - Html - This is line 1 nested + IntermediateToken - (5758:206,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5762:206,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5768:207,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5771:207,7 [21] StringLiterals.cshtml) - Html - This is line 2 nested + IntermediateToken - (5792:207,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5796:207,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5802:208,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5805:208,7 [21] StringLiterals.cshtml) - Html - This is line 3 nested + IntermediateToken - (5826:208,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5830:208,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5836:209,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5839:209,7 [21] StringLiterals.cshtml) - Html - This is line 4 nested + IntermediateToken - (5860:209,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5864:209,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5870:210,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5873:210,7 [21] StringLiterals.cshtml) - Html - This is line 5 nested + IntermediateToken - (5894:210,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5898:210,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5904:211,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5907:211,7 [21] StringLiterals.cshtml) - Html - This is line 6 nested + IntermediateToken - (5928:211,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5932:211,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5938:212,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5941:212,7 [21] StringLiterals.cshtml) - Html - This is line 7 nested + IntermediateToken - (5962:212,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5966:212,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (5972:213,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (5975:213,7 [21] StringLiterals.cshtml) - Html - This is line 8 nested + IntermediateToken - (5996:213,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6000:213,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6006:214,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6009:214,7 [21] StringLiterals.cshtml) - Html - This is line 9 nested + IntermediateToken - (6030:214,28 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6034:214,32 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6040:215,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6043:215,7 [22] StringLiterals.cshtml) - Html - This is line 10 nested + IntermediateToken - (6065:215,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6069:215,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6075:216,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6078:216,7 [22] StringLiterals.cshtml) - Html - This is line 11 nested + IntermediateToken - (6100:216,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6104:216,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6110:217,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6113:217,7 [22] StringLiterals.cshtml) - Html - This is line 12 nested + IntermediateToken - (6135:217,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6139:217,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6145:218,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6148:218,7 [22] StringLiterals.cshtml) - Html - This is line 13 nested + IntermediateToken - (6170:218,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6174:218,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6180:219,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6183:219,7 [22] StringLiterals.cshtml) - Html - This is line 14 nested + IntermediateToken - (6205:219,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6209:219,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6215:220,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6218:220,7 [22] StringLiterals.cshtml) - Html - This is line 15 nested + IntermediateToken - (6240:220,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6244:220,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6250:221,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6253:221,7 [22] StringLiterals.cshtml) - Html - This is line 16 nested + IntermediateToken - (6275:221,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6279:221,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6285:222,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6288:222,7 [22] StringLiterals.cshtml) - Html - This is line 17 nested + IntermediateToken - (6310:222,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6314:222,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6320:223,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6323:223,7 [22] StringLiterals.cshtml) - Html - This is line 18 nested + IntermediateToken - (6345:223,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6349:223,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6355:224,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6358:224,7 [22] StringLiterals.cshtml) - Html - This is line 19 nested + IntermediateToken - (6380:224,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6384:224,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6390:225,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6393:225,7 [22] StringLiterals.cshtml) - Html - This is line 20 nested + IntermediateToken - (6415:225,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6419:225,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6425:226,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6428:226,7 [22] StringLiterals.cshtml) - Html - This is line 21 nested + IntermediateToken - (6450:226,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6454:226,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6460:227,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6463:227,7 [22] StringLiterals.cshtml) - Html - This is line 22 nested + IntermediateToken - (6485:227,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6489:227,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6495:228,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6498:228,7 [22] StringLiterals.cshtml) - Html - This is line 23 nested + IntermediateToken - (6520:228,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6524:228,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6530:229,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6533:229,7 [22] StringLiterals.cshtml) - Html - This is line 24 nested + IntermediateToken - (6555:229,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6559:229,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6565:230,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6568:230,7 [22] StringLiterals.cshtml) - Html - This is line 25 nested + IntermediateToken - (6590:230,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6594:230,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6600:231,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6603:231,7 [22] StringLiterals.cshtml) - Html - This is line 26 nested + IntermediateToken - (6625:231,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6629:231,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6635:232,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6638:232,7 [22] StringLiterals.cshtml) - Html - This is line 27 nested + IntermediateToken - (6660:232,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6664:232,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6670:233,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6673:233,7 [22] StringLiterals.cshtml) - Html - This is line 28 nested + IntermediateToken - (6695:233,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6699:233,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6705:234,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6708:234,7 [22] StringLiterals.cshtml) - Html - This is line 29 nested + IntermediateToken - (6730:234,29 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6734:234,33 [6] StringLiterals.cshtml) - Html - \n + IntermediateToken - (6740:235,4 [2] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6743:235,7 [2] StringLiterals.cshtml) - Html - 30 + IntermediateToken - (6745:235,9 [4] StringLiterals.cshtml) - Html -

        + IntermediateToken - (6749:235,13 [2] StringLiterals.cshtml) - Html - \n + HtmlContent - (6752:236,1 [1] StringLiterals.cshtml) + IntermediateToken - (6752:236,1 [1] StringLiterals.cshtml) - Html - ! diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml new file mode 100644 index 0000000000..c653cff1b3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml @@ -0,0 +1,19 @@ +@addTagHelper *, TestAssembly + +
          +
            + + + +
            +
            + +
              +
                + + + +
                +
                \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_DesignTime.codegen.cs new file mode 100644 index 0000000000..2175a523ab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_DesignTime.codegen.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SymbolBoundAttributes_DesignTime + { + private global::TestNamespace.CatchAllTagHelper __TestNamespace_CatchAllTagHelper; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml" +__TestNamespace_CatchAllTagHelper.ListItems = items; + +#line default +#line hidden +#nullable disable + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml" +__TestNamespace_CatchAllTagHelper.ArrayItems = items; + +#line default +#line hidden +#nullable disable + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml" +__TestNamespace_CatchAllTagHelper.Event1 = doSomething(); + +#line default +#line hidden +#nullable disable + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); +#nullable restore +#line 15 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml" +__TestNamespace_CatchAllTagHelper.Event2 = doSomething(); + +#line default +#line hidden +#nullable disable + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __TestNamespace_CatchAllTagHelper.StringProperty1 = "value"; + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __TestNamespace_CatchAllTagHelper.StringProperty2 = "value"; + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_DesignTime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_DesignTime.diagnostics.txt new file mode 100644 index 0000000000..1ee160ff70 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_DesignTime.diagnostics.txt @@ -0,0 +1,5 @@ +(0,0): Error RZ3003: Invalid tag helper bound property 'System.Collections.Generic.List TestNamespace.CatchAllTagHelper.ListItems' on tag helper 'TestNamespace.CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property 'System.Collections.Generic.List TestNamespace.CatchAllTagHelper.ListItems' on tag helper 'TestNamespace.CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property 'System.String[] TestNamespace.CatchAllTagHelper.ArrayItems' on tag helper 'TestNamespace.CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property 'System.String[] TestNamespace.CatchAllTagHelper.ArrayItems' on tag helper 'TestNamespace.CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property 'string TestNamespace.CatchAllTagHelper.StringProperty1' on tag helper 'TestNamespace.CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '*something' because the name contains a '*' character. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_DesignTime.ir.txt new file mode 100644 index 0000000000..5315700a1a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_DesignTime.ir.txt @@ -0,0 +1,140 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SymbolBoundAttributes_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.CatchAllTagHelper - __TestNamespace_CatchAllTagHelper + DesignTimeDirective - + DirectiveToken - (14:0,14 [15] SymbolBoundAttributes.cshtml) - *, TestAssembly + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (29:0,29 [255] SymbolBoundAttributes.cshtml) + IntermediateToken - (29:0,29 [4] SymbolBoundAttributes.cshtml) - Html - \n\n + IntermediateToken - (33:2,0 [3] SymbolBoundAttributes.cshtml) - Html -
                  + IntermediateToken - (52:2,19 [5] SymbolBoundAttributes.cshtml) - Html -
                + IntermediateToken - (57:2,24 [2] SymbolBoundAttributes.cshtml) - Html - \n + IntermediateToken - (59:3,0 [3] SymbolBoundAttributes.cshtml) - Html -
                  + IntermediateToken - (80:3,21 [5] SymbolBoundAttributes.cshtml) - Html -
                + IntermediateToken - (85:3,26 [2] SymbolBoundAttributes.cshtml) - Html - \n + IntermediateToken - (87:4,0 [7] SymbolBoundAttributes.cshtml) - Html - + IntermediateToken - (136:4,49 [2] SymbolBoundAttributes.cshtml) - Html - \n + IntermediateToken - (138:5,0 [7] SymbolBoundAttributes.cshtml) - Html - + IntermediateToken - (188:5,50 [2] SymbolBoundAttributes.cshtml) - Html - \n + IntermediateToken - (190:6,0 [9] SymbolBoundAttributes.cshtml) - Html - + IntermediateToken - (232:7,11 [2] SymbolBoundAttributes.cshtml) - Html - \n + IntermediateToken - (234:8,0 [4] SymbolBoundAttributes.cshtml) - Html -
                + IntermediateToken - (246:8,12 [6] SymbolBoundAttributes.cshtml) - Html -
                + IntermediateToken - (252:8,18 [2] SymbolBoundAttributes.cshtml) - Html - \n + IntermediateToken - (254:9,0 [4] SymbolBoundAttributes.cshtml) - Html -
                + IntermediateToken - (274:9,20 [6] SymbolBoundAttributes.cshtml) - Html -
                + IntermediateToken - (280:9,26 [4] SymbolBoundAttributes.cshtml) - Html - \n\n + TagHelper - (284:11,0 [45] SymbolBoundAttributes.cshtml) - ul - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - bound - HtmlAttributeValueStyle.Minimized + DefaultTagHelperProperty - (302:11,18 [5] SymbolBoundAttributes.cshtml) - [item] - System.Collections.Generic.List TestNamespace.CatchAllTagHelper.ListItems - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (302:11,18 [5] SymbolBoundAttributes.cshtml) - CSharp - items + DefaultTagHelperHtmlAttribute - - [item] - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (317:11,33 [5] SymbolBoundAttributes.cshtml) + IntermediateToken - (317:11,33 [5] SymbolBoundAttributes.cshtml) - Html - items + DefaultTagHelperExecute - + HtmlContent - (329:11,45 [2] SymbolBoundAttributes.cshtml) + IntermediateToken - (329:11,45 [2] SymbolBoundAttributes.cshtml) - Html - \n + TagHelper - (331:12,0 [49] SymbolBoundAttributes.cshtml) - ul - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - bound - HtmlAttributeValueStyle.Minimized + DefaultTagHelperProperty - (351:12,20 [5] SymbolBoundAttributes.cshtml) - [(item)] - System.String[] TestNamespace.CatchAllTagHelper.ArrayItems - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (351:12,20 [5] SymbolBoundAttributes.cshtml) - CSharp - items + DefaultTagHelperHtmlAttribute - - [(item)] - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (368:12,37 [5] SymbolBoundAttributes.cshtml) + IntermediateToken - (368:12,37 [5] SymbolBoundAttributes.cshtml) - Html - items + DefaultTagHelperExecute - + HtmlContent - (380:12,49 [2] SymbolBoundAttributes.cshtml) + IntermediateToken - (380:12,49 [2] SymbolBoundAttributes.cshtml) - Html - \n + TagHelper - (382:13,0 [79] SymbolBoundAttributes.cshtml) - button - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (444:13,62 [8] SymbolBoundAttributes.cshtml) + IntermediateToken - (444:13,62 [8] SymbolBoundAttributes.cshtml) - Html - Click Me + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - bound - HtmlAttributeValueStyle.Minimized + DefaultTagHelperProperty - (405:13,23 [13] SymbolBoundAttributes.cshtml) - (click) - System.Action TestNamespace.CatchAllTagHelper.Event1 - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (405:13,23 [13] SymbolBoundAttributes.cshtml) - CSharp - doSomething() + DefaultTagHelperHtmlAttribute - - (click) - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (429:13,47 [13] SymbolBoundAttributes.cshtml) + IntermediateToken - (429:13,47 [13] SymbolBoundAttributes.cshtml) - Html - doSomething() + DefaultTagHelperExecute - + HtmlContent - (461:13,79 [2] SymbolBoundAttributes.cshtml) + IntermediateToken - (461:13,79 [2] SymbolBoundAttributes.cshtml) - Html - \n + TagHelper - (463:14,0 [81] SymbolBoundAttributes.cshtml) - button - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (527:14,64 [8] SymbolBoundAttributes.cshtml) + IntermediateToken - (527:14,64 [8] SymbolBoundAttributes.cshtml) - Html - Click Me + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - bound - HtmlAttributeValueStyle.Minimized + DefaultTagHelperProperty - (487:14,24 [13] SymbolBoundAttributes.cshtml) - (^click) - System.Action TestNamespace.CatchAllTagHelper.Event2 - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (487:14,24 [13] SymbolBoundAttributes.cshtml) - CSharp - doSomething() + DefaultTagHelperHtmlAttribute - - (^click) - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (512:14,49 [13] SymbolBoundAttributes.cshtml) + IntermediateToken - (512:14,49 [13] SymbolBoundAttributes.cshtml) - Html - doSomething() + DefaultTagHelperExecute - + HtmlContent - (544:14,81 [2] SymbolBoundAttributes.cshtml) + IntermediateToken - (544:14,81 [2] SymbolBoundAttributes.cshtml) - Html - \n + TagHelper - (546:15,0 [67] SymbolBoundAttributes.cshtml) - template - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (600:15,54 [2] SymbolBoundAttributes.cshtml) + IntermediateToken - (600:15,54 [2] SymbolBoundAttributes.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - bound - HtmlAttributeValueStyle.Minimized + DefaultTagHelperProperty - (574:15,28 [5] SymbolBoundAttributes.cshtml) - *something - string TestNamespace.CatchAllTagHelper.StringProperty1 - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (574:15,28 [5] SymbolBoundAttributes.cshtml) + IntermediateToken - (574:15,28 [5] SymbolBoundAttributes.cshtml) - Html - value + DefaultTagHelperHtmlAttribute - - *something - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (593:15,47 [5] SymbolBoundAttributes.cshtml) + IntermediateToken - (593:15,47 [5] SymbolBoundAttributes.cshtml) - Html - value + DefaultTagHelperExecute - + HtmlContent - (613:16,11 [2] SymbolBoundAttributes.cshtml) + IntermediateToken - (613:16,11 [2] SymbolBoundAttributes.cshtml) - Html - \n + TagHelper - (615:17,0 [33] SymbolBoundAttributes.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - bound - HtmlAttributeValueStyle.Minimized + DefaultTagHelperHtmlAttribute - - #localminimized - HtmlAttributeValueStyle.Minimized + DefaultTagHelperExecute - + HtmlContent - (648:17,33 [2] SymbolBoundAttributes.cshtml) + IntermediateToken - (648:17,33 [2] SymbolBoundAttributes.cshtml) - Html - \n + TagHelper - (650:18,0 [47] SymbolBoundAttributes.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - bound - HtmlAttributeValueStyle.Minimized + DefaultTagHelperProperty - (669:18,19 [5] SymbolBoundAttributes.cshtml) - #local - string TestNamespace.CatchAllTagHelper.StringProperty2 - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (669:18,19 [5] SymbolBoundAttributes.cshtml) + IntermediateToken - (669:18,19 [5] SymbolBoundAttributes.cshtml) - Html - value + DefaultTagHelperHtmlAttribute - - #local - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (684:18,34 [5] SymbolBoundAttributes.cshtml) + IntermediateToken - (684:18,34 [5] SymbolBoundAttributes.cshtml) - Html - value + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_DesignTime.mappings.txt new file mode 100644 index 0000000000..37301c4302 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_DesignTime.mappings.txt @@ -0,0 +1,25 @@ +Source Location: (14:0,14 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml) +|*, TestAssembly| +Generated Location: (636:13,38 [15] ) +|*, TestAssembly| + +Source Location: (302:11,18 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml) +|items| +Generated Location: (1291:31,46 [5] ) +|items| + +Source Location: (351:12,20 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml) +|items| +Generated Location: (1622:39,47 [5] ) +|items| + +Source Location: (405:13,23 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml) +|doSomething()| +Generated Location: (1949:47,43 [13] ) +|doSomething()| + +Source Location: (487:14,24 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml) +|doSomething()| +Generated Location: (2284:55,43 [13] ) +|doSomething()| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_Runtime.codegen.cs new file mode 100644 index 0000000000..187ebaa6a6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_Runtime.codegen.cs @@ -0,0 +1,205 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "911fabc92d64c2732fa0cff025d454076241edb8" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SymbolBoundAttributes_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"911fabc92d64c2732fa0cff025d454076241edb8", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SymbolBoundAttributes_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("[item]", new global::Microsoft.AspNetCore.Html.HtmlString("items"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("[(item)]", new global::Microsoft.AspNetCore.Html.HtmlString("items"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("(click)", new global::Microsoft.AspNetCore.Html.HtmlString("doSomething()"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("(^click)", new global::Microsoft.AspNetCore.Html.HtmlString("doSomething()"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("*something", "value", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_5 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("*something", new global::Microsoft.AspNetCore.Html.HtmlString("value"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_6 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("#local", "value", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_7 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("#local", new global::Microsoft.AspNetCore.Html.HtmlString("value"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.CatchAllTagHelper __TestNamespace_CatchAllTagHelper; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n
                  \r\n
                    \r\n\r\n\r\n\r\n
                    \r\n
                    \r\n\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("ul", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + } + ); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + BeginWriteTagHelperAttribute(); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("bound", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml" +__TestNamespace_CatchAllTagHelper.ListItems = items; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("[item]", __TestNamespace_CatchAllTagHelper.ListItems, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("ul", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + } + ); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + BeginWriteTagHelperAttribute(); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("bound", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml" +__TestNamespace_CatchAllTagHelper.ArrayItems = items; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("[(item)]", __TestNamespace_CatchAllTagHelper.ArrayItems, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("button", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("Click Me"); + } + ); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + BeginWriteTagHelperAttribute(); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("bound", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); +#nullable restore +#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml" +__TestNamespace_CatchAllTagHelper.Event1 = doSomething(); + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("(click)", __TestNamespace_CatchAllTagHelper.Event1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("button", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("Click Me"); + } + ); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + BeginWriteTagHelperAttribute(); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("bound", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); +#nullable restore +#line 15 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml" +__TestNamespace_CatchAllTagHelper.Event2 = doSomething(); + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("(^click)", __TestNamespace_CatchAllTagHelper.Event2, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("template", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("\r\n"); + } + ); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + BeginWriteTagHelperAttribute(); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("bound", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); + __TestNamespace_CatchAllTagHelper.StringProperty1 = (string)__tagHelperAttribute_4.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + } + ); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + BeginWriteTagHelperAttribute(); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("bound", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); + BeginWriteTagHelperAttribute(); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("#localminimized", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + } + ); + __TestNamespace_CatchAllTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); + BeginWriteTagHelperAttribute(); + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("bound", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.Minimized); + __TestNamespace_CatchAllTagHelper.StringProperty2 = (string)__tagHelperAttribute_6.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_6); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_7); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_Runtime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_Runtime.diagnostics.txt new file mode 100644 index 0000000000..1ee160ff70 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_Runtime.diagnostics.txt @@ -0,0 +1,5 @@ +(0,0): Error RZ3003: Invalid tag helper bound property 'System.Collections.Generic.List TestNamespace.CatchAllTagHelper.ListItems' on tag helper 'TestNamespace.CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property 'System.Collections.Generic.List TestNamespace.CatchAllTagHelper.ListItems' on tag helper 'TestNamespace.CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property 'System.String[] TestNamespace.CatchAllTagHelper.ArrayItems' on tag helper 'TestNamespace.CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property 'System.String[] TestNamespace.CatchAllTagHelper.ArrayItems' on tag helper 'TestNamespace.CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property 'string TestNamespace.CatchAllTagHelper.StringProperty1' on tag helper 'TestNamespace.CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '*something' because the name contains a '*' character. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_Runtime.ir.txt new file mode 100644 index 0000000000..ee4dc7af83 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes_Runtime.ir.txt @@ -0,0 +1,126 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SymbolBoundAttributes_Runtime - - + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_0 - [item] - items - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_1 - [(item)] - items - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_2 - (click) - doSomething() - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_3 - (^click) - doSomething() - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_4 - *something - value - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_5 - *something - value - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_6 - #local - value - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_7 - #local - value - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.CatchAllTagHelper - __TestNamespace_CatchAllTagHelper + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:1,0 [253] SymbolBoundAttributes.cshtml) + IntermediateToken - (31:1,0 [2] SymbolBoundAttributes.cshtml) - Html - \n + IntermediateToken - (33:2,0 [3] SymbolBoundAttributes.cshtml) - Html -
                      + IntermediateToken - (52:2,19 [5] SymbolBoundAttributes.cshtml) - Html -
                    + IntermediateToken - (57:2,24 [2] SymbolBoundAttributes.cshtml) - Html - \n + IntermediateToken - (59:3,0 [3] SymbolBoundAttributes.cshtml) - Html -
                      + IntermediateToken - (80:3,21 [5] SymbolBoundAttributes.cshtml) - Html -
                    + IntermediateToken - (85:3,26 [2] SymbolBoundAttributes.cshtml) - Html - \n + IntermediateToken - (87:4,0 [7] SymbolBoundAttributes.cshtml) - Html - + IntermediateToken - (136:4,49 [2] SymbolBoundAttributes.cshtml) - Html - \n + IntermediateToken - (138:5,0 [7] SymbolBoundAttributes.cshtml) - Html - + IntermediateToken - (188:5,50 [2] SymbolBoundAttributes.cshtml) - Html - \n + IntermediateToken - (190:6,0 [9] SymbolBoundAttributes.cshtml) - Html - + IntermediateToken - (232:7,11 [2] SymbolBoundAttributes.cshtml) - Html - \n + IntermediateToken - (234:8,0 [4] SymbolBoundAttributes.cshtml) - Html -
                    + IntermediateToken - (246:8,12 [6] SymbolBoundAttributes.cshtml) - Html -
                    + IntermediateToken - (252:8,18 [2] SymbolBoundAttributes.cshtml) - Html - \n + IntermediateToken - (254:9,0 [4] SymbolBoundAttributes.cshtml) - Html -
                    + IntermediateToken - (274:9,20 [6] SymbolBoundAttributes.cshtml) - Html -
                    + IntermediateToken - (280:9,26 [4] SymbolBoundAttributes.cshtml) - Html - \n\n + TagHelper - (284:11,0 [45] SymbolBoundAttributes.cshtml) - ul - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - bound - HtmlAttributeValueStyle.Minimized + DefaultTagHelperProperty - (302:11,18 [5] SymbolBoundAttributes.cshtml) - [item] - System.Collections.Generic.List TestNamespace.CatchAllTagHelper.ListItems - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (302:11,18 [5] SymbolBoundAttributes.cshtml) - CSharp - items + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 + DefaultTagHelperExecute - + HtmlContent - (329:11,45 [2] SymbolBoundAttributes.cshtml) + IntermediateToken - (329:11,45 [2] SymbolBoundAttributes.cshtml) - Html - \n + TagHelper - (331:12,0 [49] SymbolBoundAttributes.cshtml) - ul - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - bound - HtmlAttributeValueStyle.Minimized + DefaultTagHelperProperty - (351:12,20 [5] SymbolBoundAttributes.cshtml) - [(item)] - System.String[] TestNamespace.CatchAllTagHelper.ArrayItems - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (351:12,20 [5] SymbolBoundAttributes.cshtml) - CSharp - items + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 + DefaultTagHelperExecute - + HtmlContent - (380:12,49 [2] SymbolBoundAttributes.cshtml) + IntermediateToken - (380:12,49 [2] SymbolBoundAttributes.cshtml) - Html - \n + TagHelper - (382:13,0 [79] SymbolBoundAttributes.cshtml) - button - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (444:13,62 [8] SymbolBoundAttributes.cshtml) + IntermediateToken - (444:13,62 [8] SymbolBoundAttributes.cshtml) - Html - Click Me + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - bound - HtmlAttributeValueStyle.Minimized + DefaultTagHelperProperty - (405:13,23 [13] SymbolBoundAttributes.cshtml) - (click) - System.Action TestNamespace.CatchAllTagHelper.Event1 - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (405:13,23 [13] SymbolBoundAttributes.cshtml) - CSharp - doSomething() + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 + DefaultTagHelperExecute - + HtmlContent - (461:13,79 [2] SymbolBoundAttributes.cshtml) + IntermediateToken - (461:13,79 [2] SymbolBoundAttributes.cshtml) - Html - \n + TagHelper - (463:14,0 [81] SymbolBoundAttributes.cshtml) - button - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (527:14,64 [8] SymbolBoundAttributes.cshtml) + IntermediateToken - (527:14,64 [8] SymbolBoundAttributes.cshtml) - Html - Click Me + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - bound - HtmlAttributeValueStyle.Minimized + DefaultTagHelperProperty - (487:14,24 [13] SymbolBoundAttributes.cshtml) - (^click) - System.Action TestNamespace.CatchAllTagHelper.Event2 - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (487:14,24 [13] SymbolBoundAttributes.cshtml) - CSharp - doSomething() + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_3 + DefaultTagHelperExecute - + HtmlContent - (544:14,81 [2] SymbolBoundAttributes.cshtml) + IntermediateToken - (544:14,81 [2] SymbolBoundAttributes.cshtml) - Html - \n + TagHelper - (546:15,0 [67] SymbolBoundAttributes.cshtml) - template - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (600:15,54 [2] SymbolBoundAttributes.cshtml) + IntermediateToken - (600:15,54 [2] SymbolBoundAttributes.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - bound - HtmlAttributeValueStyle.Minimized + PreallocatedTagHelperProperty - (574:15,28 [5] SymbolBoundAttributes.cshtml) - __tagHelperAttribute_4 - *something - StringProperty1 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_5 + DefaultTagHelperExecute - + HtmlContent - (613:16,11 [2] SymbolBoundAttributes.cshtml) + IntermediateToken - (613:16,11 [2] SymbolBoundAttributes.cshtml) - Html - \n + TagHelper - (615:17,0 [33] SymbolBoundAttributes.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - bound - HtmlAttributeValueStyle.Minimized + DefaultTagHelperHtmlAttribute - - #localminimized - HtmlAttributeValueStyle.Minimized + DefaultTagHelperExecute - + HtmlContent - (648:17,33 [2] SymbolBoundAttributes.cshtml) + IntermediateToken - (648:17,33 [2] SymbolBoundAttributes.cshtml) - Html - \n + TagHelper - (650:18,0 [47] SymbolBoundAttributes.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.CatchAllTagHelper + DefaultTagHelperHtmlAttribute - - bound - HtmlAttributeValueStyle.Minimized + PreallocatedTagHelperProperty - (669:18,19 [5] SymbolBoundAttributes.cshtml) - __tagHelperAttribute_6 - #local - StringProperty2 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_7 + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml new file mode 100644 index 0000000000..12d0afd197 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml @@ -0,0 +1,20 @@ +@addTagHelper "*, TestAssembly" + +@{ + var code = "some code"; +} + +@section MySection { +
                    + + In None ContentBehavior. + Some buffered values with @code + +
                    + + @section nestedsection { +
                    + +
                    + } +} \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_DesignTime.codegen.cs new file mode 100644 index 0000000000..7c12b772e5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_DesignTime.codegen.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersInSection_DesignTime + { + private global::TestNamespace.MyTagHelper __TestNamespace_MyTagHelper; + private global::TestNamespace.NestedTagHelper __TestNamespace_NestedTagHelper; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml" +global::System.Object MySection = null; + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 15 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml" +global::System.Object nestedsection = null; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml" + + var code = "some code"; + +#line default +#line hidden +#nullable disable + DefineSection("MySection", async(__razor_section_writer) => { +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml" + __o = code; + +#line default +#line hidden +#nullable disable + __TestNamespace_NestedTagHelper = CreateTagHelper(); + __TestNamespace_MyTagHelper = CreateTagHelper(); +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml" + __o = DateTime.Now; + +#line default +#line hidden +#nullable disable + __TestNamespace_MyTagHelper.BoundProperty = string.Empty; +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml" + __o = DateTime.Now; + +#line default +#line hidden +#nullable disable + __TestNamespace_NestedTagHelper = CreateTagHelper(); + } + ); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_DesignTime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_DesignTime.diagnostics.txt new file mode 100644 index 0000000000..0efe33796f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_DesignTime.diagnostics.txt @@ -0,0 +1 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml(15,5): Error RZ2002: Section blocks ("@section Header { ... }") cannot be nested. Only one level of section blocks are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_DesignTime.ir.txt new file mode 100644 index 0000000000..1f073cdb22 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_DesignTime.ir.txt @@ -0,0 +1,80 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersInSection_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.MyTagHelper - __TestNamespace_MyTagHelper + FieldDeclaration - - private - global::TestNamespace.NestedTagHelper - __TestNamespace_NestedTagHelper + DesignTimeDirective - + DirectiveToken - (14:0,14 [17] TagHelpersInSection.cshtml) - "*, TestAssembly" + DirectiveToken - (82:6,9 [9] TagHelpersInSection.cshtml) - MySection + DirectiveToken - (388:14,13 [13] TagHelpersInSection.cshtml) - nestedsection + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:0,31 [4] TagHelpersInSection.cshtml) + IntermediateToken - (31:0,31 [4] TagHelpersInSection.cshtml) - Html - \n\n + CSharpCode - (37:2,2 [31] TagHelpersInSection.cshtml) + IntermediateToken - (37:2,2 [31] TagHelpersInSection.cshtml) - CSharp - \n var code = "some code";\n + HtmlContent - (71:5,0 [2] TagHelpersInSection.cshtml) + IntermediateToken - (71:5,0 [2] TagHelpersInSection.cshtml) - Html - \n + Section - - MySection + HtmlContent - (93:6,20 [21] TagHelpersInSection.cshtml) + IntermediateToken - (93:6,20 [6] TagHelpersInSection.cshtml) - Html - \n + IntermediateToken - (99:7,4 [4] TagHelpersInSection.cshtml) - Html -
                    + IntermediateToken - (104:7,9 [10] TagHelpersInSection.cshtml) - Html - \n + TagHelper - (114:8,8 [245] TagHelpersInSection.cshtml) - mytaghelper - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (217:8,111 [52] TagHelpersInSection.cshtml) + IntermediateToken - (217:8,111 [52] TagHelpersInSection.cshtml) - Html - \n In None ContentBehavior.\n + TagHelper - (269:10,12 [66] TagHelpersInSection.cshtml) - nestedtaghelper - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (286:10,29 [26] TagHelpersInSection.cshtml) + IntermediateToken - (286:10,29 [26] TagHelpersInSection.cshtml) - Html - Some buffered values with + CSharpExpression - (313:10,56 [4] TagHelpersInSection.cshtml) + IntermediateToken - (313:10,56 [4] TagHelpersInSection.cshtml) - CSharp - code + DefaultTagHelperCreate - - TestNamespace.NestedTagHelper + DefaultTagHelperExecute - + HtmlContent - (335:10,78 [10] TagHelpersInSection.cshtml) + IntermediateToken - (335:10,78 [10] TagHelpersInSection.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.MyTagHelper + DefaultTagHelperProperty - (142:8,36 [27] TagHelpersInSection.cshtml) - boundproperty - string TestNamespace.MyTagHelper.BoundProperty - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (142:8,36 [14] TagHelpersInSection.cshtml) + IntermediateToken - (142:8,36 [7] TagHelpersInSection.cshtml) - Html - Current + IntermediateToken - (149:8,43 [6] TagHelpersInSection.cshtml) - Html - Time: + IntermediateToken - (155:8,49 [1] TagHelpersInSection.cshtml) - Html - + CSharpExpression - (157:8,51 [12] TagHelpersInSection.cshtml) + IntermediateToken - (157:8,51 [12] TagHelpersInSection.cshtml) - CSharp - DateTime.Now + DefaultTagHelperHtmlAttribute - - unboundproperty - HtmlAttributeValueStyle.DoubleQuotes + HtmlAttributeValue - (188:8,82 [7] TagHelpersInSection.cshtml) - + IntermediateToken - (188:8,82 [7] TagHelpersInSection.cshtml) - Html - Current + HtmlAttributeValue - (195:8,89 [6] TagHelpersInSection.cshtml) - + IntermediateToken - (196:8,90 [5] TagHelpersInSection.cshtml) - Html - Time: + CSharpExpressionAttributeValue - (201:8,95 [14] TagHelpersInSection.cshtml) - + IntermediateToken - (203:8,97 [12] TagHelpersInSection.cshtml) - CSharp - DateTime.Now + DefaultTagHelperExecute - + HtmlContent - (359:11,22 [20] TagHelpersInSection.cshtml) + IntermediateToken - (359:11,22 [6] TagHelpersInSection.cshtml) - Html - \n + IntermediateToken - (365:12,4 [6] TagHelpersInSection.cshtml) - Html -
                    + IntermediateToken - (371:12,10 [8] TagHelpersInSection.cshtml) - Html - \n\n + MalformedDirective - (379:14,4 [112] TagHelpersInSection.cshtml) - section + DirectiveToken - (388:14,13 [13] TagHelpersInSection.cshtml) - nestedsection + HtmlContent - (404:14,29 [29] TagHelpersInSection.cshtml) + IntermediateToken - (404:14,29 [10] TagHelpersInSection.cshtml) - Html - \n + IntermediateToken - (414:15,8 [4] TagHelpersInSection.cshtml) - Html -
                    + IntermediateToken - (419:15,13 [14] TagHelpersInSection.cshtml) - Html - \n + TagHelper - (433:16,12 [35] TagHelpersInSection.cshtml) - nestedtaghelper - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.NestedTagHelper + DefaultTagHelperExecute - + HtmlContent - (468:16,47 [22] TagHelpersInSection.cshtml) + IntermediateToken - (468:16,47 [10] TagHelpersInSection.cshtml) - Html - \n + IntermediateToken - (478:17,8 [6] TagHelpersInSection.cshtml) - Html -
                    + IntermediateToken - (484:17,14 [6] TagHelpersInSection.cshtml) - Html - \n + HtmlContent - (491:18,5 [2] TagHelpersInSection.cshtml) + IntermediateToken - (491:18,5 [2] TagHelpersInSection.cshtml) - Html - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_DesignTime.mappings.txt new file mode 100644 index 0000000000..c22fb1f9dd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_DesignTime.mappings.txt @@ -0,0 +1,39 @@ +Source Location: (14:0,14 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml) +|"*, TestAssembly"| +Generated Location: (707:14,37 [17] ) +|"*, TestAssembly"| + +Source Location: (82:6,9 [9] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml) +|MySection| +Generated Location: (973:24,22 [9] ) +|MySection| + +Source Location: (388:14,13 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml) +|nestedsection| +Generated Location: (1239:34,22 [13] ) +|nestedsection| + +Source Location: (37:2,2 [31] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml) +| + var code = "some code"; +| +Generated Location: (1742:51,2 [31] ) +| + var code = "some code"; +| + +Source Location: (313:10,56 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml) +|code| +Generated Location: (2069:60,56 [4] ) +|code| + +Source Location: (157:8,51 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml) +|DateTime.Now| +Generated Location: (2501:69,51 [12] ) +|DateTime.Now| + +Source Location: (203:8,97 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml) +|DateTime.Now| +Generated Location: (2852:77,97 [12] ) +|DateTime.Now| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_Runtime.codegen.cs new file mode 100644 index 0000000000..4ec7e5dd25 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_Runtime.codegen.cs @@ -0,0 +1,124 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "7d1f5fcf069d8b265b8300a5070e14e2312ef599" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersInSection_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"7d1f5fcf069d8b265b8300a5070e14e2312ef599", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersInSection_Runtime + { + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.MyTagHelper __TestNamespace_MyTagHelper; + private global::TestNamespace.NestedTagHelper __TestNamespace_NestedTagHelper; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml" + + var code = "some code"; + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); + DefineSection("MySection", async() => { + WriteLiteral("\r\n
                    \r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("mytaghelper", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("\r\n In None ContentBehavior.\r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("nestedtaghelper", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("Some buffered values with "); +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml" + Write(code); + +#line default +#line hidden +#nullable disable + } + ); + __TestNamespace_NestedTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_NestedTagHelper); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n "); + } + ); + __TestNamespace_MyTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_MyTagHelper); + BeginWriteTagHelperAttribute(); + WriteLiteral("Current Time: "); +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml" + WriteLiteral(DateTime.Now); + +#line default +#line hidden +#nullable disable + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __TestNamespace_MyTagHelper.BoundProperty = __tagHelperStringValueBuffer; + __tagHelperExecutionContext.AddTagHelperAttribute("boundproperty", __TestNamespace_MyTagHelper.BoundProperty, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unboundproperty", 3, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + AddHtmlAttributeValue("", 188, "Current", 188, 7, true); + AddHtmlAttributeValue(" ", 195, "Time:", 196, 6, true); +#nullable restore +#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml" +AddHtmlAttributeValue(" ", 201, DateTime.Now, 202, 13, false); + +#line default +#line hidden +#nullable disable + EndAddHtmlAttributeValues(__tagHelperExecutionContext); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n
                    \r\n\r\n"); + WriteLiteral("\r\n
                    \r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("nestedtaghelper", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + } + ); + __TestNamespace_NestedTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_NestedTagHelper); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n
                    \r\n "); + } + ); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_Runtime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_Runtime.diagnostics.txt new file mode 100644 index 0000000000..0efe33796f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_Runtime.diagnostics.txt @@ -0,0 +1 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection.cshtml(15,5): Error RZ2002: Section blocks ("@section Header { ... }") cannot be nested. Only one level of section blocks are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_Runtime.ir.txt new file mode 100644 index 0000000000..f59eaa42bb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersInSection_Runtime.ir.txt @@ -0,0 +1,70 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersInSection_Runtime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.MyTagHelper - __TestNamespace_MyTagHelper + FieldDeclaration - - private - global::TestNamespace.NestedTagHelper - __TestNamespace_NestedTagHelper + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (33:1,0 [2] TagHelpersInSection.cshtml) + IntermediateToken - (33:1,0 [2] TagHelpersInSection.cshtml) - Html - \n + CSharpCode - (37:2,2 [31] TagHelpersInSection.cshtml) + IntermediateToken - (37:2,2 [31] TagHelpersInSection.cshtml) - CSharp - \n var code = "some code";\n + HtmlContent - (71:5,0 [2] TagHelpersInSection.cshtml) + IntermediateToken - (71:5,0 [2] TagHelpersInSection.cshtml) - Html - \n + Section - - MySection + HtmlContent - (93:6,20 [21] TagHelpersInSection.cshtml) + IntermediateToken - (93:6,20 [6] TagHelpersInSection.cshtml) - Html - \n + IntermediateToken - (99:7,4 [4] TagHelpersInSection.cshtml) - Html -
                    + IntermediateToken - (104:7,9 [10] TagHelpersInSection.cshtml) - Html - \n + TagHelper - (114:8,8 [245] TagHelpersInSection.cshtml) - mytaghelper - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (217:8,111 [52] TagHelpersInSection.cshtml) + IntermediateToken - (217:8,111 [52] TagHelpersInSection.cshtml) - Html - \n In None ContentBehavior.\n + TagHelper - (269:10,12 [66] TagHelpersInSection.cshtml) - nestedtaghelper - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (286:10,29 [26] TagHelpersInSection.cshtml) + IntermediateToken - (286:10,29 [26] TagHelpersInSection.cshtml) - Html - Some buffered values with + CSharpExpression - (313:10,56 [4] TagHelpersInSection.cshtml) + IntermediateToken - (313:10,56 [4] TagHelpersInSection.cshtml) - CSharp - code + DefaultTagHelperCreate - - TestNamespace.NestedTagHelper + DefaultTagHelperExecute - + HtmlContent - (335:10,78 [10] TagHelpersInSection.cshtml) + IntermediateToken - (335:10,78 [10] TagHelpersInSection.cshtml) - Html - \n + DefaultTagHelperCreate - - TestNamespace.MyTagHelper + DefaultTagHelperProperty - (142:8,36 [27] TagHelpersInSection.cshtml) - boundproperty - string TestNamespace.MyTagHelper.BoundProperty - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (142:8,36 [14] TagHelpersInSection.cshtml) + IntermediateToken - (142:8,36 [7] TagHelpersInSection.cshtml) - Html - Current + IntermediateToken - (149:8,43 [6] TagHelpersInSection.cshtml) - Html - Time: + IntermediateToken - (155:8,49 [1] TagHelpersInSection.cshtml) - Html - + CSharpExpression - (157:8,51 [12] TagHelpersInSection.cshtml) + IntermediateToken - (157:8,51 [12] TagHelpersInSection.cshtml) - CSharp - DateTime.Now + DefaultTagHelperHtmlAttribute - - unboundproperty - HtmlAttributeValueStyle.DoubleQuotes + HtmlAttributeValue - (188:8,82 [7] TagHelpersInSection.cshtml) - + IntermediateToken - (188:8,82 [7] TagHelpersInSection.cshtml) - Html - Current + HtmlAttributeValue - (195:8,89 [6] TagHelpersInSection.cshtml) - + IntermediateToken - (196:8,90 [5] TagHelpersInSection.cshtml) - Html - Time: + CSharpExpressionAttributeValue - (201:8,95 [14] TagHelpersInSection.cshtml) - + IntermediateToken - (203:8,97 [12] TagHelpersInSection.cshtml) - CSharp - DateTime.Now + DefaultTagHelperExecute - + HtmlContent - (359:11,22 [16] TagHelpersInSection.cshtml) + IntermediateToken - (359:11,22 [6] TagHelpersInSection.cshtml) - Html - \n + IntermediateToken - (365:12,4 [6] TagHelpersInSection.cshtml) - Html -
                    + IntermediateToken - (371:12,10 [4] TagHelpersInSection.cshtml) - Html - \n\n + MalformedDirective - (379:14,4 [114] TagHelpersInSection.cshtml) - section + DirectiveToken - (388:14,13 [13] TagHelpersInSection.cshtml) - nestedsection + HtmlContent - (404:14,29 [29] TagHelpersInSection.cshtml) + IntermediateToken - (404:14,29 [10] TagHelpersInSection.cshtml) - Html - \n + IntermediateToken - (414:15,8 [4] TagHelpersInSection.cshtml) - Html -
                    + IntermediateToken - (419:15,13 [14] TagHelpersInSection.cshtml) - Html - \n + TagHelper - (433:16,12 [35] TagHelpersInSection.cshtml) - nestedtaghelper - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.NestedTagHelper + DefaultTagHelperExecute - + HtmlContent - (468:16,47 [22] TagHelpersInSection.cshtml) + IntermediateToken - (468:16,47 [10] TagHelpersInSection.cshtml) - Html - \n + IntermediateToken - (478:17,8 [6] TagHelpersInSection.cshtml) - Html -
                    + IntermediateToken - (484:17,14 [6] TagHelpersInSection.cshtml) - Html - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes.cshtml new file mode 100644 index 0000000000..83023559d3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes.cshtml @@ -0,0 +1,4 @@ +@addTagHelper *, TestAssembly +
                    + +
                    \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_DesignTime.codegen.cs new file mode 100644 index 0000000000..346627dfdf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_DesignTime.codegen.cs @@ -0,0 +1,42 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithBoundAttributes_DesignTime + { + private global::InputTagHelper __InputTagHelper; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __InputTagHelper = CreateTagHelper(); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes.cshtml" + __o = Hello; + +#line default +#line hidden +#nullable disable + __InputTagHelper.BoundProp = string.Empty; + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_DesignTime.ir.txt new file mode 100644 index 0000000000..1b4902d35d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_DesignTime.ir.txt @@ -0,0 +1,32 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithBoundAttributes_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::InputTagHelper - __InputTagHelper + DesignTimeDirective - + DirectiveToken - (14:0,14 [15] TagHelpersWithBoundAttributes.cshtml) - *, TestAssembly + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (29:0,29 [14] TagHelpersWithBoundAttributes.cshtml) + IntermediateToken - (29:0,29 [2] TagHelpersWithBoundAttributes.cshtml) - Html - \n + IntermediateToken - (31:1,0 [5] TagHelpersWithBoundAttributes.cshtml) - Html -
                    + IntermediateToken - (37:1,6 [6] TagHelpersWithBoundAttributes.cshtml) - Html - \n + TagHelper - (43:2,4 [34] TagHelpersWithBoundAttributes.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - InputTagHelper + DefaultTagHelperProperty - (56:2,17 [6] TagHelpersWithBoundAttributes.cshtml) - bound - string InputTagHelper.BoundProp - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (57:2,18 [5] TagHelpersWithBoundAttributes.cshtml) + IntermediateToken - (57:2,18 [5] TagHelpersWithBoundAttributes.cshtml) - CSharp - Hello + DefaultTagHelperHtmlAttribute - - type - HtmlAttributeValueStyle.SingleQuotes + HtmlContent - (69:2,30 [4] TagHelpersWithBoundAttributes.cshtml) + IntermediateToken - (69:2,30 [4] TagHelpersWithBoundAttributes.cshtml) - Html - text + DefaultTagHelperExecute - + HtmlContent - (77:2,38 [9] TagHelpersWithBoundAttributes.cshtml) + IntermediateToken - (77:2,38 [2] TagHelpersWithBoundAttributes.cshtml) - Html - \n + IntermediateToken - (79:3,0 [7] TagHelpersWithBoundAttributes.cshtml) - Html -
                    diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_DesignTime.mappings.txt new file mode 100644 index 0000000000..d9fa738e43 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_DesignTime.mappings.txt @@ -0,0 +1,10 @@ +Source Location: (14:0,14 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes.cshtml) +|*, TestAssembly| +Generated Location: (618:13,38 [15] ) +|*, TestAssembly| + +Source Location: (57:2,18 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes.cshtml) +|Hello| +Generated Location: (1218:31,18 [5] ) +|Hello| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_Runtime.codegen.cs new file mode 100644 index 0000000000..20611de088 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_Runtime.codegen.cs @@ -0,0 +1,64 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "111aa585040c2e45a0dac3f5bdb65ee0252748d2" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithBoundAttributes_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"111aa585040c2e45a0dac3f5bdb65ee0252748d2", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithBoundAttributes_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("text"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::InputTagHelper __InputTagHelper; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("
                    \r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__InputTagHelper); + BeginWriteTagHelperAttribute(); +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes.cshtml" + WriteLiteral(Hello); + +#line default +#line hidden +#nullable disable + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __InputTagHelper.BoundProp = __tagHelperStringValueBuffer; + __tagHelperExecutionContext.AddTagHelperAttribute("bound", __InputTagHelper.BoundProp, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_Runtime.ir.txt new file mode 100644 index 0000000000..cc8c24201a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithBoundAttributes_Runtime.ir.txt @@ -0,0 +1,24 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithBoundAttributes_Runtime - - + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_0 - type - text - HtmlAttributeValueStyle.SingleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::InputTagHelper - __InputTagHelper + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:1,0 [12] TagHelpersWithBoundAttributes.cshtml) + IntermediateToken - (31:1,0 [5] TagHelpersWithBoundAttributes.cshtml) - Html -
                    + IntermediateToken - (37:1,6 [6] TagHelpersWithBoundAttributes.cshtml) - Html - \n + TagHelper - (43:2,4 [34] TagHelpersWithBoundAttributes.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - InputTagHelper + DefaultTagHelperProperty - (56:2,17 [6] TagHelpersWithBoundAttributes.cshtml) - bound - string InputTagHelper.BoundProp - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (57:2,18 [5] TagHelpersWithBoundAttributes.cshtml) + IntermediateToken - (57:2,18 [5] TagHelpersWithBoundAttributes.cshtml) - CSharp - Hello + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 + DefaultTagHelperExecute - + HtmlContent - (77:2,38 [9] TagHelpersWithBoundAttributes.cshtml) + IntermediateToken - (77:2,38 [2] TagHelpersWithBoundAttributes.cshtml) - Html - \n + IntermediateToken - (79:3,0 [7] TagHelpersWithBoundAttributes.cshtml) - Html -
                    diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes.cshtml new file mode 100644 index 0000000000..2a341893ee --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes.cshtml @@ -0,0 +1,5 @@ +@addTagHelper *, TestAssembly + + +
                    +

                    diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes_DesignTime.codegen.cs new file mode 100644 index 0000000000..2c6b661cbb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes_DesignTime.codegen.cs @@ -0,0 +1,58 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithDataDashAttributes_DesignTime + { + private global::InputTagHelper __InputTagHelper; + private global::DivTagHelper __DivTagHelper; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __InputTagHelper = CreateTagHelper(); + __InputTagHelper.BoundProp = "hello"; + __DivTagHelper = CreateTagHelper(); +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes.cshtml" + __o = foo; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes.cshtml" + __o = bar; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes.cshtml" + __o = foo; + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes_DesignTime.ir.txt new file mode 100644 index 0000000000..2fadae0eec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes_DesignTime.ir.txt @@ -0,0 +1,67 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithDataDashAttributes_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::InputTagHelper - __InputTagHelper + FieldDeclaration - - private - global::DivTagHelper - __DivTagHelper + DesignTimeDirective - + DirectiveToken - (14:0,14 [15] TagHelpersWithDataDashAttributes.cshtml) - *, TestAssembly + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (29:0,29 [4] TagHelpersWithDataDashAttributes.cshtml) + IntermediateToken - (29:0,29 [4] TagHelpersWithDataDashAttributes.cshtml) - Html - \n\n + TagHelper - (33:2,0 [61] TagHelpersWithDataDashAttributes.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - InputTagHelper + DefaultTagHelperProperty - (47:2,14 [5] TagHelpersWithDataDashAttributes.cshtml) - bound - string InputTagHelper.BoundProp - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (47:2,14 [5] TagHelpersWithDataDashAttributes.cshtml) + IntermediateToken - (47:2,14 [5] TagHelpersWithDataDashAttributes.cshtml) - Html - hello + DefaultTagHelperHtmlAttribute - - data-one - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (64:2,31 [1] TagHelpersWithDataDashAttributes.cshtml) + IntermediateToken - (64:2,31 [1] TagHelpersWithDataDashAttributes.cshtml) - Html - 1 + DefaultTagHelperHtmlAttribute - - data-two - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (76:2,43 [1] TagHelpersWithDataDashAttributes.cshtml) + IntermediateToken - (76:2,43 [1] TagHelpersWithDataDashAttributes.cshtml) - Html - 2 + DefaultTagHelperHtmlAttribute - - data-three - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (90:2,57 [0] TagHelpersWithDataDashAttributes.cshtml) + IntermediateToken - (90:2,57 [0] TagHelpersWithDataDashAttributes.cshtml) - Html - + DefaultTagHelperExecute - + HtmlContent - (94:2,61 [2] TagHelpersWithDataDashAttributes.cshtml) + IntermediateToken - (94:2,61 [2] TagHelpersWithDataDashAttributes.cshtml) - Html - \n + TagHelper - (96:3,0 [66] TagHelpersWithDataDashAttributes.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - DivTagHelper + DefaultTagHelperHtmlAttribute - - data-one - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (111:3,15 [3] TagHelpersWithDataDashAttributes.cshtml) + IntermediateToken - (111:3,15 [3] TagHelpersWithDataDashAttributes.cshtml) - CSharp - foo + DefaultTagHelperHtmlAttribute - - data-two - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (126:3,30 [3] TagHelpersWithDataDashAttributes.cshtml) + IntermediateToken - (126:3,30 [3] TagHelpersWithDataDashAttributes.cshtml) - CSharp - bar + DefaultTagHelperHtmlAttribute - - data-three - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (142:3,46 [0] TagHelpersWithDataDashAttributes.cshtml) + IntermediateToken - (142:3,46 [0] TagHelpersWithDataDashAttributes.cshtml) - Html - + DefaultTagHelperHtmlAttribute - - data-four - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (154:3,58 [0] TagHelpersWithDataDashAttributes.cshtml) + IntermediateToken - (154:3,58 [0] TagHelpersWithDataDashAttributes.cshtml) - Html - + DefaultTagHelperExecute - + HtmlContent - (162:3,66 [4] TagHelpersWithDataDashAttributes.cshtml) + IntermediateToken - (162:3,66 [2] TagHelpersWithDataDashAttributes.cshtml) - Html - \n + IntermediateToken - (164:4,0 [2] TagHelpersWithDataDashAttributes.cshtml) - Html -

                    + IntermediateToken - (229:4,65 [2] TagHelpersWithDataDashAttributes.cshtml) - Html - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes_DesignTime.mappings.txt new file mode 100644 index 0000000000..bfce560156 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes_DesignTime.mappings.txt @@ -0,0 +1,20 @@ +Source Location: (14:0,14 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes.cshtml) +|*, TestAssembly| +Generated Location: (678:14,38 [15] ) +|*, TestAssembly| + +Source Location: (111:3,15 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes.cshtml) +|foo| +Generated Location: (1400:34,15 [3] ) +|foo| + +Source Location: (126:3,30 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes.cshtml) +|bar| +Generated Location: (1613:41,30 [3] ) +|bar| + +Source Location: (225:4,61 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes.cshtml) +|foo| +Generated Location: (1857:48,61 [3] ) +|foo| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes_Runtime.codegen.cs new file mode 100644 index 0000000000..4de77bd981 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes_Runtime.codegen.cs @@ -0,0 +1,108 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "cf45e3f3bb37acbe0abf214d8091170eaa98ce5f" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithDataDashAttributes_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"cf45e3f3bb37acbe0abf214d8091170eaa98ce5f", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithDataDashAttributes_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("bound", "hello", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-one", new global::Microsoft.AspNetCore.Html.HtmlString("1"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-two", new global::Microsoft.AspNetCore.Html.HtmlString("2"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-three", new global::Microsoft.AspNetCore.Html.HtmlString(""), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-four", new global::Microsoft.AspNetCore.Html.HtmlString(""), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::InputTagHelper __InputTagHelper; + private global::DivTagHelper __DivTagHelper; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__InputTagHelper); + __InputTagHelper.BoundProp = (string)__tagHelperAttribute_0.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + } + ); + __DivTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__DivTagHelper); + BeginWriteTagHelperAttribute(); +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes.cshtml" + Write(foo); + +#line default +#line hidden +#nullable disable + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("data-one", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + BeginWriteTagHelperAttribute(); +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithDataDashAttributes.cshtml" + Write(bar); + +#line default +#line hidden +#nullable disable + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("data-two", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n

                    + IntermediateToken - (229:4,65 [2] TagHelpersWithDataDashAttributes.cshtml) - Html - \n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix.cshtml new file mode 100644 index 0000000000..e365dd4d60 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix.cshtml @@ -0,0 +1,5 @@ +@addTagHelper *, TestAssembly +@tagHelperPrefix cool: +

                    + + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_DesignTime.codegen.cs new file mode 100644 index 0000000000..67b895feb8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_DesignTime.codegen.cs @@ -0,0 +1,52 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithPrefix_DesignTime + { + private global::InputTagHelper __InputTagHelper; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + ((System.Action)(() => { +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix.cshtml" +global::System.Object __typeHelper = "cool:"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __InputTagHelper = CreateTagHelper(); +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix.cshtml" + __o = Hello; + +#line default +#line hidden +#nullable disable + __InputTagHelper.BoundProp = string.Empty; + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_DesignTime.ir.txt new file mode 100644 index 0000000000..52f53933c0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_DesignTime.ir.txt @@ -0,0 +1,35 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithPrefix_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::InputTagHelper - __InputTagHelper + DesignTimeDirective - + DirectiveToken - (14:0,14 [15] TagHelpersWithPrefix.cshtml) - *, TestAssembly + DirectiveToken - (48:1,17 [5] TagHelpersWithPrefix.cshtml) - cool: + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (29:0,29 [2] TagHelpersWithPrefix.cshtml) + IntermediateToken - (29:0,29 [2] TagHelpersWithPrefix.cshtml) - Html - \n + HtmlContent - (53:1,22 [14] TagHelpersWithPrefix.cshtml) + IntermediateToken - (53:1,22 [2] TagHelpersWithPrefix.cshtml) - Html - \n + IntermediateToken - (55:2,0 [5] TagHelpersWithPrefix.cshtml) - Html -
                    + IntermediateToken - (61:2,6 [6] TagHelpersWithPrefix.cshtml) - Html - \n + TagHelper - (67:3,4 [39] TagHelpersWithPrefix.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - InputTagHelper + DefaultTagHelperProperty - (85:3,22 [6] TagHelpersWithPrefix.cshtml) - bound - string InputTagHelper.BoundProp - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (86:3,23 [5] TagHelpersWithPrefix.cshtml) + IntermediateToken - (86:3,23 [5] TagHelpersWithPrefix.cshtml) - CSharp - Hello + DefaultTagHelperHtmlAttribute - - type - HtmlAttributeValueStyle.SingleQuotes + HtmlContent - (98:3,35 [4] TagHelpersWithPrefix.cshtml) + IntermediateToken - (98:3,35 [4] TagHelpersWithPrefix.cshtml) - Html - text + DefaultTagHelperExecute - + HtmlContent - (106:3,43 [9] TagHelpersWithPrefix.cshtml) + IntermediateToken - (106:3,43 [2] TagHelpersWithPrefix.cshtml) - Html - \n + IntermediateToken - (108:4,0 [7] TagHelpersWithPrefix.cshtml) - Html -
                    diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_DesignTime.mappings.txt new file mode 100644 index 0000000000..e8d9aa5ec4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_DesignTime.mappings.txt @@ -0,0 +1,15 @@ +Source Location: (14:0,14 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix.cshtml) +|*, TestAssembly| +Generated Location: (600:13,38 [15] ) +|*, TestAssembly| + +Source Location: (48:1,17 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix.cshtml) +|cool:| +Generated Location: (882:23,38 [5] ) +|cool:| + +Source Location: (86:3,23 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix.cshtml) +|Hello| +Generated Location: (1468:41,23 [5] ) +|Hello| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_Runtime.codegen.cs new file mode 100644 index 0000000000..433ab5477b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_Runtime.codegen.cs @@ -0,0 +1,64 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "5c97c003c8158f389b506a6dbc47e468892ec57d" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithPrefix_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"5c97c003c8158f389b506a6dbc47e468892ec57d", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithPrefix_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("text"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::InputTagHelper __InputTagHelper; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("
                    \r\n "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__InputTagHelper); + BeginWriteTagHelperAttribute(); +#nullable restore +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix.cshtml" + WriteLiteral(Hello); + +#line default +#line hidden +#nullable disable + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __InputTagHelper.BoundProp = __tagHelperStringValueBuffer; + __tagHelperExecutionContext.AddTagHelperAttribute("bound", __InputTagHelper.BoundProp, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n"); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_Runtime.ir.txt new file mode 100644 index 0000000000..3a88f319f4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithPrefix_Runtime.ir.txt @@ -0,0 +1,24 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithPrefix_Runtime - - + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_0 - type - text - HtmlAttributeValueStyle.SingleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::InputTagHelper - __InputTagHelper + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (55:2,0 [12] TagHelpersWithPrefix.cshtml) + IntermediateToken - (55:2,0 [5] TagHelpersWithPrefix.cshtml) - Html -
                    + IntermediateToken - (61:2,6 [6] TagHelpersWithPrefix.cshtml) - Html - \n + TagHelper - (67:3,4 [39] TagHelpersWithPrefix.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - InputTagHelper + DefaultTagHelperProperty - (85:3,22 [6] TagHelpersWithPrefix.cshtml) - bound - string InputTagHelper.BoundProp - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (86:3,23 [5] TagHelpersWithPrefix.cshtml) + IntermediateToken - (86:3,23 [5] TagHelpersWithPrefix.cshtml) - CSharp - Hello + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 + DefaultTagHelperExecute - + HtmlContent - (106:3,43 [9] TagHelpersWithPrefix.cshtml) + IntermediateToken - (106:3,43 [2] TagHelpersWithPrefix.cshtml) - Html - \n + IntermediateToken - (108:4,0 [7] TagHelpersWithPrefix.cshtml) - Html -
                    diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml new file mode 100644 index 0000000000..071122c261 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml @@ -0,0 +1,19 @@ +@addTagHelper "*, TestAssembly" + +@functions { + public void RenderTemplate(string title, Func template) + { + Output.WriteLine("

                    Rendering Template:

                    "); + var helperResult = template(title); + helperResult.WriteTo(Output, HtmlEncoder); + } +} + +
                    + @{ + RenderTemplate( + "Template: ", + @

                    @item

                    ); + } +
                    + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_DesignTime.codegen.cs new file mode 100644 index 0000000000..c92d670f37 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_DesignTime.codegen.cs @@ -0,0 +1,78 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithTemplate_DesignTime + { + private global::DivTagHelper __DivTagHelper; + private global::InputTagHelper __InputTagHelper; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml" + + RenderTemplate( + "Template: ", + + +#line default +#line hidden +#nullable disable + item => new Template(async(__razor_template_writer) => { +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml" + __o = item; + +#line default +#line hidden +#nullable disable + __InputTagHelper = CreateTagHelper(); + __DivTagHelper = CreateTagHelper(); + } + ) +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml" + ); + + +#line default +#line hidden +#nullable disable + __DivTagHelper = CreateTagHelper(); + } + #pragma warning restore 1998 +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml" + + public void RenderTemplate(string title, Func template) + { + Output.WriteLine("

                    Rendering Template:

                    "); + var helperResult = template(title); + helperResult.WriteTo(Output, HtmlEncoder); + } + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_DesignTime.ir.txt new file mode 100644 index 0000000000..229134183a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_DesignTime.ir.txt @@ -0,0 +1,58 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithTemplate_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::DivTagHelper - __DivTagHelper + FieldDeclaration - - private - global::InputTagHelper - __InputTagHelper + DesignTimeDirective - + DirectiveToken - (14:0,14 [17] TagHelpersWithTemplate.cshtml) - "*, TestAssembly" + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:0,31 [4] TagHelpersWithTemplate.cshtml) + IntermediateToken - (31:0,31 [4] TagHelpersWithTemplate.cshtml) - Html - \n\n + HtmlContent - (316:9,1 [4] TagHelpersWithTemplate.cshtml) + IntermediateToken - (316:9,1 [4] TagHelpersWithTemplate.cshtml) - Html - \n\n + TagHelper - (320:11,0 [179] TagHelpersWithTemplate.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (325:11,5 [6] TagHelpersWithTemplate.cshtml) + IntermediateToken - (325:11,5 [6] TagHelpersWithTemplate.cshtml) - Html - \n + CSharpCode - (333:12,6 [66] TagHelpersWithTemplate.cshtml) + IntermediateToken - (333:12,6 [66] TagHelpersWithTemplate.cshtml) - CSharp - \n RenderTemplate(\n "Template: ",\n + Template - (400:15,13 [82] TagHelpersWithTemplate.cshtml) + TagHelper - (400:15,13 [82] TagHelpersWithTemplate.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (422:15,35 [4] TagHelpersWithTemplate.cshtml) + IntermediateToken - (422:15,35 [3] TagHelpersWithTemplate.cshtml) - Html -

                    + CSharpExpression - (427:15,40 [4] TagHelpersWithTemplate.cshtml) + IntermediateToken - (427:15,40 [4] TagHelpersWithTemplate.cshtml) - CSharp - item + HtmlContent - (431:15,44 [5] TagHelpersWithTemplate.cshtml) + IntermediateToken - (431:15,44 [5] TagHelpersWithTemplate.cshtml) - Html -

                    + TagHelper - (436:15,49 [40] TagHelpersWithTemplate.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - InputTagHelper + DefaultTagHelperHtmlAttribute - - type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (449:15,62 [8] TagHelpersWithTemplate.cshtml) + IntermediateToken - (449:15,62 [8] TagHelpersWithTemplate.cshtml) - Html - checkbox + DefaultTagHelperHtmlAttribute - - checked - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (468:15,81 [4] TagHelpersWithTemplate.cshtml) + IntermediateToken - (468:15,81 [4] TagHelpersWithTemplate.cshtml) - Html - true + DefaultTagHelperExecute - + DefaultTagHelperCreate - - DivTagHelper + DefaultTagHelperHtmlAttribute - - condition - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (416:15,29 [4] TagHelpersWithTemplate.cshtml) + IntermediateToken - (416:15,29 [4] TagHelpersWithTemplate.cshtml) - Html - true + DefaultTagHelperExecute - + CSharpCode - (482:15,95 [8] TagHelpersWithTemplate.cshtml) + IntermediateToken - (482:15,95 [8] TagHelpersWithTemplate.cshtml) - CSharp - );\n + DefaultTagHelperCreate - - DivTagHelper + DefaultTagHelperExecute - + HtmlContent - (499:17,6 [4] TagHelpersWithTemplate.cshtml) + IntermediateToken - (499:17,6 [4] TagHelpersWithTemplate.cshtml) - Html - \n\n + CSharpCode - (47:2,12 [268] TagHelpersWithTemplate.cshtml) + IntermediateToken - (47:2,12 [268] TagHelpersWithTemplate.cshtml) - CSharp - \n public void RenderTemplate(string title, Func template)\n {\n Output.WriteLine("

                    Rendering Template:

                    ");\n var helperResult = template(title);\n helperResult.WriteTo(Output, HtmlEncoder);\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_DesignTime.mappings.txt new file mode 100644 index 0000000000..bb29992ce2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_DesignTime.mappings.txt @@ -0,0 +1,47 @@ +Source Location: (14:0,14 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml) +|"*, TestAssembly"| +Generated Location: (657:14,37 [17] ) +|"*, TestAssembly"| + +Source Location: (333:12,6 [66] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml) +| + RenderTemplate( + "Template: ", + | +Generated Location: (1165:31,6 [66] ) +| + RenderTemplate( + "Template: ", + | + +Source Location: (427:15,40 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml) +|item| +Generated Location: (1511:42,40 [4] ) +|item| + +Source Location: (482:15,95 [8] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml) +|); + | +Generated Location: (1965:53,95 [8] ) +|); + | + +Source Location: (47:2,12 [268] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml) +| + public void RenderTemplate(string title, Func template) + { + Output.WriteLine("

                    Rendering Template:

                    "); + var helperResult = template(title); + helperResult.WriteTo(Output, HtmlEncoder); + } +| +Generated Location: (2274:64,12 [268] ) +| + public void RenderTemplate(string title, Func template) + { + Output.WriteLine("

                    Rendering Template:

                    "); + var helperResult = template(title); + helperResult.WriteTo(Output, HtmlEncoder); + } +| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_Runtime.codegen.cs new file mode 100644 index 0000000000..e27d68d83b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_Runtime.codegen.cs @@ -0,0 +1,129 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "d02421b6972074e82cabcfd56c7ab2739d5f3d49" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithTemplate_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"d02421b6972074e82cabcfd56c7ab2739d5f3d49", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithTemplate_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("checkbox"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("checked", new global::Microsoft.AspNetCore.Html.HtmlString("true"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("condition", new global::Microsoft.AspNetCore.Html.HtmlString("true"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::DivTagHelper __DivTagHelper; + private global::InputTagHelper __InputTagHelper; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("\r\n"); +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml" + + RenderTemplate( + "Template: ", + + +#line default +#line hidden +#nullable disable + item => new Template(async(__razor_template_writer) => { + PushWriter(__razor_template_writer); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("

                    "); +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml" + Write(item); + +#line default +#line hidden +#nullable disable + WriteLiteral("

                    "); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__InputTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + } + ); + __DivTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__DivTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + PopWriter(); + } + ) +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml" + ); + + +#line default +#line hidden +#nullable disable + } + ); + __DivTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__DivTagHelper); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n\r\n"); + } + #pragma warning restore 1998 +#nullable restore +#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate.cshtml" + + public void RenderTemplate(string title, Func template) + { + Output.WriteLine("

                    Rendering Template:

                    "); + var helperResult = template(title); + helperResult.WriteTo(Output, HtmlEncoder); + } + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_Runtime.ir.txt new file mode 100644 index 0000000000..2c551023fe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithTemplate_Runtime.ir.txt @@ -0,0 +1,51 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithTemplate_Runtime - - + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_0 - type - checkbox - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_1 - checked - true - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_2 - condition - true - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::DivTagHelper - __DivTagHelper + FieldDeclaration - - private - global::InputTagHelper - __InputTagHelper + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (33:1,0 [2] TagHelpersWithTemplate.cshtml) + IntermediateToken - (33:1,0 [2] TagHelpersWithTemplate.cshtml) - Html - \n + HtmlContent - (318:10,0 [2] TagHelpersWithTemplate.cshtml) + IntermediateToken - (318:10,0 [2] TagHelpersWithTemplate.cshtml) - Html - \n + TagHelper - (320:11,0 [179] TagHelpersWithTemplate.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (325:11,5 [2] TagHelpersWithTemplate.cshtml) + IntermediateToken - (325:11,5 [2] TagHelpersWithTemplate.cshtml) - Html - \n + CSharpCode - (327:12,0 [4] TagHelpersWithTemplate.cshtml) + IntermediateToken - (327:12,0 [4] TagHelpersWithTemplate.cshtml) - CSharp - + CSharpCode - (333:12,6 [66] TagHelpersWithTemplate.cshtml) + IntermediateToken - (333:12,6 [66] TagHelpersWithTemplate.cshtml) - CSharp - \n RenderTemplate(\n "Template: ",\n + Template - (400:15,13 [82] TagHelpersWithTemplate.cshtml) + TagHelper - (400:15,13 [82] TagHelpersWithTemplate.cshtml) - div - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (422:15,35 [4] TagHelpersWithTemplate.cshtml) + IntermediateToken - (422:15,35 [3] TagHelpersWithTemplate.cshtml) - Html -

                    + CSharpExpression - (427:15,40 [4] TagHelpersWithTemplate.cshtml) + IntermediateToken - (427:15,40 [4] TagHelpersWithTemplate.cshtml) - CSharp - item + HtmlContent - (431:15,44 [5] TagHelpersWithTemplate.cshtml) + IntermediateToken - (431:15,44 [5] TagHelpersWithTemplate.cshtml) - Html -

                    + TagHelper - (436:15,49 [40] TagHelpersWithTemplate.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - InputTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 + DefaultTagHelperExecute - + DefaultTagHelperCreate - - DivTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 + DefaultTagHelperExecute - + CSharpCode - (482:15,95 [8] TagHelpersWithTemplate.cshtml) + IntermediateToken - (482:15,95 [8] TagHelpersWithTemplate.cshtml) - CSharp - );\n + DefaultTagHelperCreate - - DivTagHelper + DefaultTagHelperExecute - + HtmlContent - (499:17,6 [4] TagHelpersWithTemplate.cshtml) + IntermediateToken - (499:17,6 [4] TagHelpersWithTemplate.cshtml) - Html - \n\n + CSharpCode - (47:2,12 [268] TagHelpersWithTemplate.cshtml) + IntermediateToken - (47:2,12 [268] TagHelpersWithTemplate.cshtml) - CSharp - \n public void RenderTemplate(string title, Func template)\n {\n Output.WriteLine("

                    Rendering Template:

                    ");\n var helperResult = template(title);\n helperResult.WriteTo(Output, HtmlEncoder);\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml new file mode 100644 index 0000000000..1796ed5c04 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml @@ -0,0 +1,15 @@ +@addTagHelper "*, TestAssembly" + +

                    Body of Tag

                    + + + +

                    + + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_DesignTime.codegen.cs new file mode 100644 index 0000000000..5c20aac0f0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_DesignTime.codegen.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithWeirdlySpacedAttributes_DesignTime + { + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + ((System.Action)(() => { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml" +global::System.Object __typeHelper = "*, TestAssembly"; + +#line default +#line hidden +#nullable disable + } + ))(); + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + __TestNamespace_PTagHelper = CreateTagHelper(); +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml" +__TestNamespace_PTagHelper.Age = 1337; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml" + __o = true; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __TestNamespace_InputTagHelper.Type = "text"; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; + __TestNamespace_PTagHelper = CreateTagHelper(); +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml" +__TestNamespace_PTagHelper.Age = 1234; + +#line default +#line hidden +#nullable disable + __TestNamespace_InputTagHelper = CreateTagHelper(); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __TestNamespace_InputTagHelper.Type = "password"; + __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_DesignTime.ir.txt new file mode 100644 index 0000000000..8f89ff3a4f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_DesignTime.ir.txt @@ -0,0 +1,75 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithWeirdlySpacedAttributes_DesignTime - - + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + DesignTimeDirective - + DirectiveToken - (14:0,14 [17] TagHelpersWithWeirdlySpacedAttributes.cshtml) - "*, TestAssembly" + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:0,31 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (31:0,31 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - \n\n + TagHelper - (35:2,0 [85] TagHelpersWithWeirdlySpacedAttributes.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (105:6,25 [11] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (105:6,25 [11] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - Body of Tag + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (54:5,1 [11] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (54:5,1 [11] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - Hello World + DefaultTagHelperProperty - (74:5,21 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (74:5,21 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - CSharp - 1337 + DefaultTagHelperHtmlAttribute - - data-content - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (99:6,19 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (99:6,19 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - CSharp - true + DefaultTagHelperExecute - + HtmlContent - (120:6,40 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (120:6,40 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - \n\n + TagHelper - (124:8,0 [47] TagHelpersWithWeirdlySpacedAttributes.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (140:8,16 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.SingleQuotes + HtmlContent - (140:8,16 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (140:8,16 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - text + DefaultTagHelperProperty - (140:8,16 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.SingleQuotes + HtmlContent - (140:8,16 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (140:8,16 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - text + DefaultTagHelperHtmlAttribute - - data-content - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (162:8,38 [5] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (162:8,38 [5] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - hello + DefaultTagHelperExecute - + HtmlContent - (171:8,47 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (171:8,47 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - \n\n + TagHelper - (175:10,0 [46] TagHelpersWithWeirdlySpacedAttributes.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (186:10,11 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (186:10,11 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - CSharp - 1234 + DefaultTagHelperHtmlAttribute - - data-content - HtmlAttributeValueStyle.SingleQuotes + HtmlContent - (209:11,3 [6] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (209:11,3 [6] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - hello2 + DefaultTagHelperExecute - + HtmlContent - (221:11,15 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (221:11,15 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - \n\n + TagHelper - (225:13,0 [51] TagHelpersWithWeirdlySpacedAttributes.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + DefaultTagHelperProperty - (247:14,8 [8] TagHelpersWithWeirdlySpacedAttributes.cshtml) - type - string TestNamespace.InputTagHelper.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (247:14,8 [8] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (247:14,8 [8] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - password + DefaultTagHelperProperty - (247:14,8 [8] TagHelpersWithWeirdlySpacedAttributes.cshtml) - type - string TestNamespace.InputTagHelper2.Type - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (247:14,8 [8] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (247:14,8 [8] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - password + DefaultTagHelperHtmlAttribute - - data-content - HtmlAttributeValueStyle.DoubleQuotes + HtmlContent - (270:14,31 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (270:14,31 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - blah + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_DesignTime.mappings.txt new file mode 100644 index 0000000000..ecd160b96c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_DesignTime.mappings.txt @@ -0,0 +1,20 @@ +Source Location: (14:0,14 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml) +|"*, TestAssembly"| +Generated Location: (827:15,37 [17] ) +|"*, TestAssembly"| + +Source Location: (74:5,21 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml) +|1337| +Generated Location: (1471:33,33 [4] ) +|1337| + +Source Location: (99:6,19 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml) +|true| +Generated Location: (1679:40,19 [4] ) +|true| + +Source Location: (186:10,11 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml) +|1234| +Generated Location: (2353:52,33 [4] ) +|1234| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_Runtime.codegen.cs new file mode 100644 index 0000000000..f0d4d3d1ac --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_Runtime.codegen.cs @@ -0,0 +1,140 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "a58200cdb2a70e95e4cebb5c830216be0ae4b62c" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithWeirdlySpacedAttributes_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"a58200cdb2a70e95e4cebb5c830216be0ae4b62c", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithWeirdlySpacedAttributes_Runtime + { + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "text", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-content", new global::Microsoft.AspNetCore.Html.HtmlString("hello"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-content", new global::Microsoft.AspNetCore.Html.HtmlString("hello2"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "password", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_5 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-content", new global::Microsoft.AspNetCore.Html.HtmlString("blah"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + #line hidden + #pragma warning disable 0169 + private string __tagHelperStringValueBuffer; + #pragma warning restore 0169 + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null; + private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager + { + get + { + if (__backed__tagHelperScopeManager == null) + { + __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope); + } + return __backed__tagHelperScopeManager; + } + } + private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper; + private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper; + private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + WriteLiteral("Body of Tag"); + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); +#nullable restore +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml" +__TestNamespace_PTagHelper.Age = 1337; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + BeginWriteTagHelperAttribute(); +#nullable restore +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml" + Write(true); + +#line default +#line hidden +#nullable disable + __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); + __tagHelperExecutionContext.AddHtmlAttribute("data-content", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_1.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_1.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { + } + ); + __TestNamespace_PTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml" +__TestNamespace_PTagHelper.Age = 1234; + +#line default +#line hidden +#nullable disable + __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + WriteLiteral("\r\n\r\n"); + __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { + } + ); + __TestNamespace_InputTagHelper = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); + __TestNamespace_InputTagHelper2 = CreateTagHelper(); + __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); + __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_4.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4); + __TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_4.Value; + __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4); + __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5); + await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); + if (!__tagHelperExecutionContext.Output.IsContentModified) + { + await __tagHelperExecutionContext.SetOutputContentAsync(); + } + Write(__tagHelperExecutionContext.Output); + __tagHelperExecutionContext = __tagHelperScopeManager.End(); + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_Runtime.ir.txt new file mode 100644 index 0000000000..b89b1ddb27 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes_Runtime.ir.txt @@ -0,0 +1,59 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithWeirdlySpacedAttributes_Runtime - - + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_0 - class - Hello World - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_1 - type - text - HtmlAttributeValueStyle.SingleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_2 - data-content - hello - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_3 - data-content - hello2 - HtmlAttributeValueStyle.SingleQuotes + PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_4 - type - password - HtmlAttributeValueStyle.DoubleQuotes + PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_5 - data-content - blah - HtmlAttributeValueStyle.DoubleQuotes + DefaultTagHelperRuntime - + FieldDeclaration - - private - global::TestNamespace.PTagHelper - __TestNamespace_PTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper - __TestNamespace_InputTagHelper + FieldDeclaration - - private - global::TestNamespace.InputTagHelper2 - __TestNamespace_InputTagHelper2 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (33:1,0 [2] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (33:1,0 [2] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - \n + TagHelper - (35:2,0 [85] TagHelpersWithWeirdlySpacedAttributes.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + HtmlContent - (105:6,25 [11] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (105:6,25 [11] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - Body of Tag + DefaultTagHelperCreate - - TestNamespace.PTagHelper + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 + DefaultTagHelperProperty - (74:5,21 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (74:5,21 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - CSharp - 1337 + DefaultTagHelperHtmlAttribute - - data-content - HtmlAttributeValueStyle.DoubleQuotes + CSharpExpression - (99:6,19 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (99:6,19 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - CSharp - true + DefaultTagHelperExecute - + HtmlContent - (120:6,40 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (120:6,40 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - \n\n + TagHelper - (124:8,0 [47] TagHelpersWithWeirdlySpacedAttributes.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + PreallocatedTagHelperProperty - (140:8,16 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - __tagHelperAttribute_1 - type - Type + PreallocatedTagHelperProperty - (140:8,16 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - __tagHelperAttribute_1 - type - Type + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 + DefaultTagHelperExecute - + HtmlContent - (171:8,47 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (171:8,47 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - \n\n + TagHelper - (175:10,0 [46] TagHelpersWithWeirdlySpacedAttributes.cshtml) - p - TagMode.StartTagAndEndTag + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.PTagHelper + DefaultTagHelperProperty - (186:10,11 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - age - int TestNamespace.PTagHelper.Age - HtmlAttributeValueStyle.DoubleQuotes + IntermediateToken - (186:10,11 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - CSharp - 1234 + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_3 + DefaultTagHelperExecute - + HtmlContent - (221:11,15 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) + IntermediateToken - (221:11,15 [4] TagHelpersWithWeirdlySpacedAttributes.cshtml) - Html - \n\n + TagHelper - (225:13,0 [51] TagHelpersWithWeirdlySpacedAttributes.cshtml) - input - TagMode.SelfClosing + DefaultTagHelperBody - + DefaultTagHelperCreate - - TestNamespace.InputTagHelper + DefaultTagHelperCreate - - TestNamespace.InputTagHelper2 + PreallocatedTagHelperProperty - (247:14,8 [8] TagHelpersWithWeirdlySpacedAttributes.cshtml) - __tagHelperAttribute_4 - type - Type + PreallocatedTagHelperProperty - (247:14,8 [8] TagHelpersWithWeirdlySpacedAttributes.cshtml) - __tagHelperAttribute_4 - type - Type + PreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_5 + DefaultTagHelperExecute - diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml new file mode 100644 index 0000000000..f32934b44a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml @@ -0,0 +1,5 @@ +@{ + +} + + +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Tags_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml" + + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml" + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml" + + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags_DesignTime.diagnostics.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags_DesignTime.diagnostics.txt new file mode 100644 index 0000000000..b67fb8bdc0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags_DesignTime.diagnostics.txt @@ -0,0 +1 @@ +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml(5,11): Error RZ1024: End of file or an unexpected character was reached before the "script" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                    ") or have matching end tags ("

                    Hello

                    "). If you intended to display a "<" character, use the "<" HTML entity. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags_DesignTime.ir.txt new file mode 100644 index 0000000000..c06477366a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags_DesignTime.ir.txt @@ -0,0 +1,30 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Tags_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [6] Tags.cshtml) + IntermediateToken - (2:0,2 [6] Tags.cshtml) - CSharp - \n + HtmlContent - (8:1,4 [31] Tags.cshtml) + IntermediateToken - (8:1,4 [7] Tags.cshtml) - Html - + CSharpCode - (59:1,55 [2] Tags.cshtml) + IntermediateToken - (59:1,55 [2] Tags.cshtml) - CSharp - \n + HtmlContent - (64:3,0 [20] Tags.cshtml) + IntermediateToken - (64:3,0 [2] Tags.cshtml) - Html - \n + IntermediateToken - (66:4,0 [7] Tags.cshtml) - Html - +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Tags_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"42fb758ed87c3709cfb3f3aeff7a9cf8d242b74c", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Tags_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral(" \r\n"); + WriteLiteral("\r\n") or have matching end tags ("

                    Hello

                    "). If you intended to display a "<" character, use the "<" HTML entity. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags_Runtime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags_Runtime.ir.txt new file mode 100644 index 0000000000..38757651f0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags_Runtime.ir.txt @@ -0,0 +1,27 @@ +Document - + RazorCompiledItemAttribute - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + RazorSourceChecksumAttribute - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Tags_Runtime - - + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + CSharpCode - (2:0,2 [2] Tags.cshtml) + IntermediateToken - (2:0,2 [2] Tags.cshtml) - CSharp - \n + HtmlContent - (4:1,0 [35] Tags.cshtml) + IntermediateToken - (4:1,0 [4] Tags.cshtml) - Html - + IntermediateToken - (8:1,4 [7] Tags.cshtml) - Html - + IntermediateToken - (59:1,55 [2] Tags.cshtml) - Html - \n + CSharpCode - (61:2,0 [0] Tags.cshtml) + IntermediateToken - (61:2,0 [0] Tags.cshtml) - CSharp - + HtmlContent - (64:3,0 [20] Tags.cshtml) + IntermediateToken - (64:3,0 [2] Tags.cshtml) - Html - \n + IntermediateToken - (66:4,0 [7] Tags.cshtml) - Html - template) { + return new HelperResult((writer) => { + for(int i = 0; i < times; i++) { + ((HelperResult)template(i)).WriteTo(writer); + } + }); + } +} + +@{ + Func foo = @This works @item!; + @foo("") +} + +@{ + Func bar = @

                    Hello

                    ; + @bar("myclass") +} + +
                      +@(Repeat(10, @
                    • Item #@item
                    • )) +
                    + +

                    +@Repeat(10, + @: This is line#@item of markup
                    +) +

                    + +

                    +@Repeat(10, + @:: This is line#@item of markup
                    +) +

                    + +

                    +@Repeat(10, + @::: This is line#@item of markup
                    +) +

                    + + +
                      + @Repeat(10, @
                    • + Item #@item + @{var parent = item;} +
                        +
                      • Child Items... ?
                      • + @*Repeat(10, @
                      • Item #@(parent).@item
                      • )*@ +
                      +
                    • ) +
                    \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.codegen.cs new file mode 100644 index 0000000000..e9338fa173 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.codegen.cs @@ -0,0 +1,206 @@ +// +#pragma warning disable 1591 +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Templates_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + #pragma warning disable 0414 + private static System.Object __o = null; + #pragma warning restore 0414 + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + + Func foo = + +#line default +#line hidden +#nullable disable + item => new Template(async(__razor_template_writer) => { +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + __o = item; + +#line default +#line hidden +#nullable disable + } + ) +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + ; + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" +__o = foo(""); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + + Func bar = + +#line default +#line hidden +#nullable disable + item => new Template(async(__razor_template_writer) => { +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + __o = item; + +#line default +#line hidden +#nullable disable + } + ) +#nullable restore +#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + ; + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 18 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" +__o = bar("myclass"); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 18 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 22 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" +__o = Repeat(10, item => new Template(async(__razor_template_writer) => { +#nullable restore +#line 22 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + __o = item; + +#line default +#line hidden +#nullable disable +} +)); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 26 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" +__o = Repeat(10, + item => new Template(async(__razor_template_writer) => { +#nullable restore +#line 27 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + __o = item; + +#line default +#line hidden +#nullable disable +} +)); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 32 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" +__o = Repeat(10, + item => new Template(async(__razor_template_writer) => { +#nullable restore +#line 33 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + __o = item; + +#line default +#line hidden +#nullable disable +} +)); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 38 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" +__o = Repeat(10, + item => new Template(async(__razor_template_writer) => { +#nullable restore +#line 39 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + __o = item; + +#line default +#line hidden +#nullable disable +} +)); + +#line default +#line hidden +#nullable disable +#nullable restore +#line 45 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" +__o = Repeat(10, item => new Template(async(__razor_template_writer) => { +#nullable restore +#line 46 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + __o = item; + +#line default +#line hidden +#nullable disable +#nullable restore +#line 47 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + var parent = item; + +#line default +#line hidden +#nullable disable +} +)); + +#line default +#line hidden +#nullable disable + } + #pragma warning restore 1998 +#nullable restore +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + + public HelperResult Repeat(int times, Func template) { + return new HelperResult((writer) => { + for(int i = 0; i < times; i++) { + ((HelperResult)template(i)).WriteTo(writer); + } + }); + } + +#line default +#line hidden +#nullable disable + } +} +#pragma warning restore 1591 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.ir.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.ir.txt new file mode 100644 index 0000000000..f43be6acf7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.ir.txt @@ -0,0 +1,158 @@ +Document - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Templates_DesignTime - - + DesignTimeDirective - + CSharpCode - + IntermediateToken - - CSharp - #pragma warning disable 0414 + CSharpCode - + IntermediateToken - - CSharp - private static System.Object __o = null; + CSharpCode - + IntermediateToken - - CSharp - #pragma warning restore 0414 + MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (278:8,1 [4] Templates.cshtml) + IntermediateToken - (278:8,1 [4] Templates.cshtml) - Html - \n\n + CSharpCode - (284:10,2 [34] Templates.cshtml) + IntermediateToken - (284:10,2 [34] Templates.cshtml) - CSharp - \n Func foo = + Template - (325:11,39 [16] Templates.cshtml) + HtmlContent - (325:11,39 [11] Templates.cshtml) + IntermediateToken - (325:11,39 [11] Templates.cshtml) - Html - This works + CSharpExpression - (337:11,51 [4] Templates.cshtml) + IntermediateToken - (337:11,51 [4] Templates.cshtml) - CSharp - item + HtmlContent - (341:11,55 [1] Templates.cshtml) + IntermediateToken - (341:11,55 [1] Templates.cshtml) - Html - ! + CSharpCode - (349:11,63 [7] Templates.cshtml) + IntermediateToken - (349:11,63 [7] Templates.cshtml) - CSharp - ;\n + CSharpExpression - (357:12,5 [7] Templates.cshtml) + IntermediateToken - (357:12,5 [7] Templates.cshtml) - CSharp - foo("") + CSharpCode - (364:12,12 [2] Templates.cshtml) + IntermediateToken - (364:12,12 [2] Templates.cshtml) - CSharp - \n + HtmlContent - (369:14,0 [2] Templates.cshtml) + IntermediateToken - (369:14,0 [2] Templates.cshtml) - Html - \n + CSharpCode - (373:15,2 [35] Templates.cshtml) + IntermediateToken - (373:15,2 [35] Templates.cshtml) - CSharp - \n Func bar = + Template - (409:16,33 [26] Templates.cshtml) + HtmlContent - (409:16,33 [2] Templates.cshtml) + IntermediateToken - (409:16,33 [2] Templates.cshtml) - Html -

                    + IntermediateToken - (426:16,50 [5] Templates.cshtml) - Html - Hello + IntermediateToken - (431:16,55 [4] Templates.cshtml) - Html -

                    + CSharpCode - (435:16,59 [7] Templates.cshtml) + IntermediateToken - (435:16,59 [7] Templates.cshtml) - CSharp - ;\n + CSharpExpression - (443:17,5 [14] Templates.cshtml) + IntermediateToken - (443:17,5 [14] Templates.cshtml) - CSharp - bar("myclass") + CSharpCode - (457:17,19 [2] Templates.cshtml) + IntermediateToken - (457:17,19 [2] Templates.cshtml) - CSharp - \n + HtmlContent - (462:19,0 [8] Templates.cshtml) + IntermediateToken - (462:19,0 [2] Templates.cshtml) - Html - \n + IntermediateToken - (464:20,0 [3] Templates.cshtml) - Html -
                      + IntermediateToken - (468:20,4 [2] Templates.cshtml) - Html - \n + CSharpExpression - (472:21,2 [31] Templates.cshtml) + IntermediateToken - (472:21,2 [11] Templates.cshtml) - CSharp - Repeat(10, + Template - (484:21,14 [19] Templates.cshtml) + HtmlContent - (484:21,14 [10] Templates.cshtml) + IntermediateToken - (484:21,14 [3] Templates.cshtml) - Html -
                    • + IntermediateToken - (488:21,18 [6] Templates.cshtml) - Html - Item # + CSharpExpression - (495:21,25 [4] Templates.cshtml) + IntermediateToken - (495:21,25 [4] Templates.cshtml) - CSharp - item + HtmlContent - (499:21,29 [5] Templates.cshtml) + IntermediateToken - (499:21,29 [5] Templates.cshtml) - Html -
                    • + IntermediateToken - (504:21,34 [1] Templates.cshtml) - CSharp - ) + HtmlContent - (506:21,36 [16] Templates.cshtml) + IntermediateToken - (506:21,36 [2] Templates.cshtml) - Html - \n + IntermediateToken - (508:22,0 [5] Templates.cshtml) - Html -
                    + IntermediateToken - (513:22,5 [4] Templates.cshtml) - Html - \n\n + IntermediateToken - (517:24,0 [2] Templates.cshtml) - Html -

                    + IntermediateToken - (520:24,3 [2] Templates.cshtml) - Html - \n + CSharpExpression - (523:25,1 [52] Templates.cshtml) + IntermediateToken - (523:25,1 [16] Templates.cshtml) - CSharp - Repeat(10,\n + Template - (541:26,6 [35] Templates.cshtml) + HtmlContent - (541:26,6 [14] Templates.cshtml) + IntermediateToken - (541:26,6 [14] Templates.cshtml) - Html - This is line# + CSharpExpression - (556:26,21 [4] Templates.cshtml) + IntermediateToken - (556:26,21 [4] Templates.cshtml) - CSharp - item + HtmlContent - (560:26,25 [17] Templates.cshtml) + IntermediateToken - (560:26,25 [17] Templates.cshtml) - Html - of markup
                    \n + IntermediateToken - (577:27,0 [1] Templates.cshtml) - CSharp - ) + HtmlContent - (578:27,1 [15] Templates.cshtml) + IntermediateToken - (578:27,1 [2] Templates.cshtml) - Html - \n + IntermediateToken - (580:28,0 [4] Templates.cshtml) - Html -

                    + IntermediateToken - (584:28,4 [4] Templates.cshtml) - Html - \n\n + IntermediateToken - (588:30,0 [2] Templates.cshtml) - Html -

                    + IntermediateToken - (591:30,3 [2] Templates.cshtml) - Html - \n + CSharpExpression - (594:31,1 [54] Templates.cshtml) + IntermediateToken - (594:31,1 [16] Templates.cshtml) - CSharp - Repeat(10,\n + Template - (612:32,6 [37] Templates.cshtml) + HtmlContent - (612:32,6 [15] Templates.cshtml) + IntermediateToken - (612:32,6 [15] Templates.cshtml) - Html - : This is line# + CSharpExpression - (628:32,22 [4] Templates.cshtml) + IntermediateToken - (628:32,22 [4] Templates.cshtml) - CSharp - item + HtmlContent - (632:32,26 [18] Templates.cshtml) + IntermediateToken - (632:32,26 [18] Templates.cshtml) - Html - of markup
                    \n + IntermediateToken - (650:33,0 [1] Templates.cshtml) - CSharp - ) + HtmlContent - (651:33,1 [15] Templates.cshtml) + IntermediateToken - (651:33,1 [2] Templates.cshtml) - Html - \n + IntermediateToken - (653:34,0 [4] Templates.cshtml) - Html -

                    + IntermediateToken - (657:34,4 [4] Templates.cshtml) - Html - \n\n + IntermediateToken - (661:36,0 [2] Templates.cshtml) - Html -

                    + IntermediateToken - (664:36,3 [2] Templates.cshtml) - Html - \n + CSharpExpression - (667:37,1 [55] Templates.cshtml) + IntermediateToken - (667:37,1 [16] Templates.cshtml) - CSharp - Repeat(10,\n + Template - (685:38,6 [38] Templates.cshtml) + HtmlContent - (685:38,6 [16] Templates.cshtml) + IntermediateToken - (685:38,6 [16] Templates.cshtml) - Html - :: This is line# + CSharpExpression - (702:38,23 [4] Templates.cshtml) + IntermediateToken - (702:38,23 [4] Templates.cshtml) - CSharp - item + HtmlContent - (706:38,27 [18] Templates.cshtml) + IntermediateToken - (706:38,27 [18] Templates.cshtml) - Html - of markup
                    \n + IntermediateToken - (724:39,0 [1] Templates.cshtml) - CSharp - ) + HtmlContent - (725:39,1 [22] Templates.cshtml) + IntermediateToken - (725:39,1 [2] Templates.cshtml) - Html - \n + IntermediateToken - (727:40,0 [4] Templates.cshtml) - Html -

                    + IntermediateToken - (731:40,4 [6] Templates.cshtml) - Html - \n\n\n + IntermediateToken - (737:43,0 [3] Templates.cshtml) - Html -
                      + IntermediateToken - (741:43,4 [6] Templates.cshtml) - Html - \n + CSharpExpression - (748:44,5 [141] Templates.cshtml) + IntermediateToken - (748:44,5 [11] Templates.cshtml) - CSharp - Repeat(10, + Template - (760:44,17 [129] Templates.cshtml) + HtmlContent - (760:44,17 [20] Templates.cshtml) + IntermediateToken - (760:44,17 [3] Templates.cshtml) - Html -
                    • + IntermediateToken - (764:44,21 [16] Templates.cshtml) - Html - \n Item # + CSharpExpression - (781:45,15 [4] Templates.cshtml) + IntermediateToken - (781:45,15 [4] Templates.cshtml) - CSharp - item + HtmlContent - (785:45,19 [10] Templates.cshtml) + IntermediateToken - (785:45,19 [10] Templates.cshtml) - Html - \n + CSharpCode - (797:46,10 [18] Templates.cshtml) + IntermediateToken - (797:46,10 [18] Templates.cshtml) - CSharp - var parent = item; + HtmlContent - (818:47,0 [53] Templates.cshtml) + IntermediateToken - (818:47,0 [8] Templates.cshtml) - Html - + IntermediateToken - (826:47,8 [3] Templates.cshtml) - Html -
                        + IntermediateToken - (830:47,12 [14] Templates.cshtml) - Html - \n + IntermediateToken - (844:48,12 [3] Templates.cshtml) - Html -
                      • + IntermediateToken - (848:48,16 [16] Templates.cshtml) - Html - Child Items... ? + IntermediateToken - (864:48,32 [5] Templates.cshtml) - Html -
                      • + IntermediateToken - (869:48,37 [2] Templates.cshtml) - Html - \n + HtmlContent - (932:50,0 [24] Templates.cshtml) + IntermediateToken - (932:50,0 [8] Templates.cshtml) - Html - + IntermediateToken - (940:50,8 [5] Templates.cshtml) - Html -
                      + IntermediateToken - (945:50,13 [6] Templates.cshtml) - Html - \n + IntermediateToken - (951:51,4 [5] Templates.cshtml) - Html -
                    • + IntermediateToken - (956:51,9 [1] Templates.cshtml) - CSharp - ) + HtmlContent - (957:51,10 [8] Templates.cshtml) + IntermediateToken - (957:51,10 [2] Templates.cshtml) - Html - \n + IntermediateToken - (959:52,0 [5] Templates.cshtml) - Html -
                    + IntermediateToken - (964:52,5 [1] Templates.cshtml) - Html - + CSharpCode - (12:0,12 [265] Templates.cshtml) + IntermediateToken - (12:0,12 [265] Templates.cshtml) - CSharp - \n public HelperResult Repeat(int times, Func template) {\n return new HelperResult((writer) => {\n for(int i = 0; i < times; i++) {\n ((HelperResult)template(i)).WriteTo(writer);\n }\n });\n }\n diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.mappings.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.mappings.txt new file mode 100644 index 0000000000..4c67be5de0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.mappings.txt @@ -0,0 +1,169 @@ +Source Location: (284:10,2 [34] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +| + Func foo = | +Generated Location: (739:19,2 [34] ) +| + Func foo = | + +Source Location: (337:11,51 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|item| +Generated Location: (1051:28,51 [4] ) +|item| + +Source Location: (349:11,63 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|; + | +Generated Location: (1306:37,63 [7] ) +|; + | + +Source Location: (357:12,5 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|foo("")| +Generated Location: (1476:45,6 [7] ) +|foo("")| + +Source Location: (364:12,12 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +| +| +Generated Location: (1653:52,12 [2] ) +| +| + +Source Location: (373:15,2 [35] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +| + Func bar = | +Generated Location: (1812:59,2 [35] ) +| + Func bar = | + +Source Location: (420:16,44 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|item| +Generated Location: (2118:68,44 [4] ) +|item| + +Source Location: (435:16,59 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|; + | +Generated Location: (2369:77,59 [7] ) +|; + | + +Source Location: (443:17,5 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|bar("myclass")| +Generated Location: (2539:85,6 [14] ) +|bar("myclass")| + +Source Location: (457:17,19 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +| +| +Generated Location: (2730:92,19 [2] ) +| +| + +Source Location: (472:21,2 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|Repeat(10, | +Generated Location: (2893:99,6 [11] ) +|Repeat(10, | + +Source Location: (495:21,25 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|item| +Generated Location: (3092:102,25 [4] ) +|item| + +Source Location: (504:21,34 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|)| +Generated Location: (3153:108,1 [1] ) +|)| + +Source Location: (523:25,1 [16] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|Repeat(10, + | +Generated Location: (3318:115,6 [16] ) +|Repeat(10, + | + +Source Location: (556:26,21 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|item| +Generated Location: (3518:119,21 [4] ) +|item| + +Source Location: (577:27,0 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|)| +Generated Location: (3579:125,1 [1] ) +|)| + +Source Location: (594:31,1 [16] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|Repeat(10, + | +Generated Location: (3744:132,6 [16] ) +|Repeat(10, + | + +Source Location: (628:32,22 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|item| +Generated Location: (3945:136,22 [4] ) +|item| + +Source Location: (650:33,0 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|)| +Generated Location: (4006:142,1 [1] ) +|)| + +Source Location: (667:37,1 [16] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|Repeat(10, + | +Generated Location: (4171:149,6 [16] ) +|Repeat(10, + | + +Source Location: (702:38,23 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|item| +Generated Location: (4373:153,23 [4] ) +|item| + +Source Location: (724:39,0 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|)| +Generated Location: (4434:159,1 [1] ) +|)| + +Source Location: (748:44,5 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|Repeat(10, | +Generated Location: (4599:166,6 [11] ) +|Repeat(10, | + +Source Location: (781:45,15 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|item| +Generated Location: (4788:169,15 [4] ) +|item| + +Source Location: (797:46,10 [18] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|var parent = item;| +Generated Location: (4960:176,10 [18] ) +|var parent = item;| + +Source Location: (956:51,9 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +|)| +Generated Location: (5034:182,1 [1] ) +|)| + +Source Location: (12:0,12 [265] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml) +| + public HelperResult Repeat(int times, Func template) { + return new HelperResult((writer) => { + for(int i = 0; i < times; i++) { + ((HelperResult)template(i)).WriteTo(writer); + } + }); + } +| +Generated Location: (5253:191,12 [265] ) +| + public HelperResult Repeat(int times, Func template) { + return new HelperResult((writer) => { + for(int i = 0; i < times; i++) { + ((HelperResult)template(i)).WriteTo(writer); + } + }); + } +| + diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_Runtime.codegen.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_Runtime.codegen.cs new file mode 100644 index 0000000000..8dccc5c266 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_Runtime.codegen.cs @@ -0,0 +1,228 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "488aa2f21a6d3e3c761871ec0bf2f295695db71a" +// +#pragma warning disable 1591 +[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Templates_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml")] +namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles +{ + #line hidden + [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"488aa2f21a6d3e3c761871ec0bf2f295695db71a", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml")] + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Templates_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("\r\n"); +#nullable restore +#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + + Func foo = + +#line default +#line hidden +#nullable disable + item => new Template(async(__razor_template_writer) => { + PushWriter(__razor_template_writer); + WriteLiteral("This works "); +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + Write(item); + +#line default +#line hidden +#nullable disable + WriteLiteral("!"); + PopWriter(); + } + ) +#nullable restore +#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + ; + + +#line default +#line hidden +#nullable disable +#nullable restore +#line 13 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" +Write(foo("")); + +#line default +#line hidden +#nullable disable + WriteLiteral("\r\n"); +#nullable restore +#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates.cshtml" + + Func bar = + +#line default +#line hidden +#nullable disable + item => new Template(async(__razor_template_writer) => { + PushWriter(__razor_template_writer); + WriteLiteral("
                    LF }] + MarkupBlock - [0..352)::352 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..352)::352 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..36)::35 - [foreach(var c in db.Categories) {LF] - Gen - SpanEditHandler;Accepts:Any + Keyword;[foreach]; + LeftParenthesis;[(]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[c]; + Whitespace;[ ]; + Keyword;[in]; + Whitespace;[ ]; + Identifier;[db]; + Dot;[.]; + Identifier;[Categories]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + MarkupBlock - [36..343)::307 + MarkupTextLiteral - [36..48)::12 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [48..341)::293 + MarkupStartTag - [48..53)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [53..71)::18 - [LF ] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + MarkupElement - [71..87)::16 + MarkupStartTag - [71..75)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[h1]; + CloseAngle;[>]; + MarkupTextLiteral - [75..75)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [75..82)::7 + CSharpImplicitExpression - [75..82)::7 + CSharpTransition - [75..76)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [76..82)::6 + CSharpCodeBlock - [76..82)::6 + CSharpExpressionLiteral - [76..82)::6 - [c.Name] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[c]; + Dot;[.]; + Identifier;[Name]; + MarkupEndTag - [82..87)::5 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[h1]; + CloseAngle;[>]; + MarkupTextLiteral - [87..105)::18 - [LF ] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + MarkupElement - [105..321)::216 + MarkupStartTag - [105..109)::4 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[ul]; + CloseAngle;[>]; + MarkupTextLiteral - [321..335)::14 - [LF ] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + MarkupEndTag - [335..341)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [341..343)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [343..352)::9 - [ }] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [352..352)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesElseIfBranchesOfIfStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesElseIfBranchesOfIfStatement.cspans.txt new file mode 100644 index 0000000000..789aee764e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesElseIfBranchesOfIfStatement.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [181] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [181] ) +Code span at (1:0,1 [180] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [181] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesElseIfBranchesOfIfStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesElseIfBranchesOfIfStatement.stree.txt new file mode 100644 index 0000000000..bef141e83a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesElseIfBranchesOfIfStatement.stree.txt @@ -0,0 +1,101 @@ +RazorDocument - [0..181)::181 - [@if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"foo } bar");LF} else if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF}] + MarkupBlock - [0..181)::181 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..181)::181 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..181)::180 - [if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"foo } bar");LF} else if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF}] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"foo } bar"]; + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"bar } baz"]; + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesExpressionOnSwitchCharacterFollowedByIdentifierStart.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesExpressionOnSwitchCharacterFollowedByIdentifierStart.cspans.txt new file mode 100644 index 0000000000..e9b4132796 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesExpressionOnSwitchCharacterFollowedByIdentifierStart.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Code span at (1:0,1 [10] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) +Transition span at (11:0,11 [1] ) (Accepts:None) - Parent: Expression block at (11:0,11 [13] ) +Code span at (12:0,12 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (11:0,11 [13] ) +Code span at (24:0,24 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesExpressionOnSwitchCharacterFollowedByIdentifierStart.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesExpressionOnSwitchCharacterFollowedByIdentifierStart.stree.txt new file mode 100644 index 0000000000..4d0d95b0bd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesExpressionOnSwitchCharacterFollowedByIdentifierStart.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..26)::26 - [@if(foo) { @foo[4].bar() }] + MarkupBlock - [0..26)::26 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..26)::26 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..11)::10 - [if(foo) { ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + CSharpCodeBlock - [11..24)::13 + CSharpImplicitExpression - [11..24)::13 + CSharpTransition - [11..12)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [12..24)::12 + CSharpCodeBlock - [12..24)::12 + CSharpExpressionLiteral - [12..24)::12 - [foo[4].bar()] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[ATD];K14 + Identifier;[foo]; + LeftBracket;[[]; + IntegerLiteral;[4]; + RightBracket;[]]; + Dot;[.]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + CSharpStatementLiteral - [24..26)::2 - [ }] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesExpressionOnSwitchCharacterFollowedByOpenParen.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesExpressionOnSwitchCharacterFollowedByOpenParen.cspans.txt new file mode 100644 index 0000000000..fa6fe6f284 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesExpressionOnSwitchCharacterFollowedByOpenParen.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +Code span at (1:0,1 [10] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [25] ) +Transition span at (11:0,11 [1] ) (Accepts:None) - Parent: Expression block at (11:0,11 [12] ) +MetaCode span at (12:0,12 [1] ) (Accepts:None) - Parent: Expression block at (11:0,11 [12] ) +Code span at (13:0,13 [9] ) (Accepts:Any) - Parent: Expression block at (11:0,11 [12] ) +MetaCode span at (22:0,22 [1] ) (Accepts:None) - Parent: Expression block at (11:0,11 [12] ) +Code span at (23:0,23 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [25] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesExpressionOnSwitchCharacterFollowedByOpenParen.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesExpressionOnSwitchCharacterFollowedByOpenParen.stree.txt new file mode 100644 index 0000000000..13b1192f70 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesExpressionOnSwitchCharacterFollowedByOpenParen.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..25)::25 - [@if(foo) { @(foo + bar) }] + MarkupBlock - [0..25)::25 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..25)::25 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..11)::10 - [if(foo) { ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + CSharpCodeBlock - [11..23)::12 + CSharpExplicitExpression - [11..23)::12 + CSharpTransition - [11..12)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [12..23)::11 + RazorMetaCode - [12..13)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [13..22)::9 + CSharpExpressionLiteral - [13..22)::9 - [foo + bar] - Gen - SpanEditHandler;Accepts:Any + Identifier;[foo]; + Whitespace;[ ]; + Plus;[+]; + Whitespace;[ ]; + Identifier;[bar]; + RazorMetaCode - [22..23)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + CSharpStatementLiteral - [23..25)::2 - [ }] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesMultipleElseIfBranchesOfIfStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesMultipleElseIfBranchesOfIfStatement.cspans.txt new file mode 100644 index 0000000000..2fe075b558 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesMultipleElseIfBranchesOfIfStatement.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [460] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [460] ) +Code span at (1:0,1 [459] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [460] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesMultipleElseIfBranchesOfIfStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesMultipleElseIfBranchesOfIfStatement.stree.txt new file mode 100644 index 0000000000..c7b7c42a7e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesMultipleElseIfBranchesOfIfStatement.stree.txt @@ -0,0 +1,245 @@ +RazorDocument - [0..460)::460 - [@if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"foo } bar");LF} else if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF} else if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF} else if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF} else if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF}] + MarkupBlock - [0..460)::460 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..460)::460 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..460)::459 - [if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"foo } bar");LF} else if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF} else if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF} else if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF} else if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF}] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"foo } bar"]; + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"bar } baz"]; + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"bar } baz"]; + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"bar } baz"]; + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"bar } baz"]; + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesMultipleElseIfBranchesOfIfStatementFollowedByOneElseBranch.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesMultipleElseIfBranchesOfIfStatementFollowedByOneElseBranch.cspans.txt new file mode 100644 index 0000000000..605d3b6d2b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesMultipleElseIfBranchesOfIfStatementFollowedByOneElseBranch.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [314] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [314] ) +Code span at (1:0,1 [313] ) (Accepts:None) - Parent: Statement block at (0:0,0 [314] ) +Markup span at (314:6,41 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [314] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesMultipleElseIfBranchesOfIfStatementFollowedByOneElseBranch.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesMultipleElseIfBranchesOfIfStatementFollowedByOneElseBranch.stree.txt new file mode 100644 index 0000000000..aa1209b97a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesMultipleElseIfBranchesOfIfStatementFollowedByOneElseBranch.stree.txt @@ -0,0 +1,165 @@ +RazorDocument - [0..314)::314 - [@if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"foo } bar");LF} else if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF} else if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF} else { Debug.WriteLine(@"bar } baz"); }] + MarkupBlock - [0..314)::314 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..314)::314 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..314)::313 - [if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"foo } bar");LF} else if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF} else if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF} else { Debug.WriteLine(@"bar } baz"); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"foo } bar"]; + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"bar } baz"]; + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"bar } baz"]; + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"bar } baz"]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [314..314)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesNamespaceAliasWithSemicolonForUsingKeywordIfIsInValidFormat.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesNamespaceAliasWithSemicolonForUsingKeywordIfIsInValidFormat.cspans.txt new file mode 100644 index 0000000000..38e57fe477 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesNamespaceAliasWithSemicolonForUsingKeywordIfIsInValidFormat.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [29] ) +Code span at (1:0,1 [28] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [29] ) +Markup span at (29:0,29 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesNamespaceAliasWithSemicolonForUsingKeywordIfIsInValidFormat.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesNamespaceAliasWithSemicolonForUsingKeywordIfIsInValidFormat.stree.txt new file mode 100644 index 0000000000..824fdc01ed --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesNamespaceAliasWithSemicolonForUsingKeywordIfIsInValidFormat.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..29)::29 - [@using FooBarBaz = FooBarBaz;] + MarkupBlock - [0..29)::29 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..29)::29 + RazorDirective - [0..29)::29 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..29)::28 + CSharpStatementLiteral - [1..29)::28 - [using FooBarBaz = FooBarBaz;] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Keyword;[using]; + Whitespace;[ ]; + Identifier;[FooBarBaz]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[FooBarBaz]; + Semicolon;[;]; + MarkupTextLiteral - [29..29)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesNamespaceImportWithSemicolonForUsingKeywordIfIsInValidFormat.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesNamespaceImportWithSemicolonForUsingKeywordIfIsInValidFormat.cspans.txt new file mode 100644 index 0000000000..0fa4fa9054 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesNamespaceImportWithSemicolonForUsingKeywordIfIsInValidFormat.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [19] ) +Code span at (1:0,1 [18] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [19] ) +Markup span at (19:0,19 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesNamespaceImportWithSemicolonForUsingKeywordIfIsInValidFormat.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesNamespaceImportWithSemicolonForUsingKeywordIfIsInValidFormat.stree.txt new file mode 100644 index 0000000000..e80602c1cc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ParsesNamespaceImportWithSemicolonForUsingKeywordIfIsInValidFormat.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..19)::19 - [@using Foo.Bar.Baz;] + MarkupBlock - [0..19)::19 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..19)::19 + RazorDirective - [0..19)::19 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..19)::18 + CSharpStatementLiteral - [1..19)::18 - [using Foo.Bar.Baz;] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Keyword;[using]; + Whitespace;[ ]; + Identifier;[Foo]; + Dot;[.]; + Identifier;[Bar]; + Dot;[.]; + Identifier;[Baz]; + Semicolon;[;]; + MarkupTextLiteral - [19..19)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsForKeyword.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsForKeyword.cspans.txt new file mode 100644 index 0000000000..3331924bfe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsForKeyword.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [83] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [83] ) +Code span at (1:0,1 [82] ) (Accepts:None) - Parent: Statement block at (0:0,0 [83] ) +Markup span at (83:0,83 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [83] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsForKeyword.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsForKeyword.stree.txt new file mode 100644 index 0000000000..9b56c74626 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsForKeyword.stree.txt @@ -0,0 +1,54 @@ +RazorDocument - [0..83)::83 - [@for(int i = 0; i < 10; new Foo { Bar = "baz" }) { Debug.WriteLine(@"foo } bar"); }] + MarkupBlock - [0..83)::83 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..83)::83 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..83)::82 - [for(int i = 0; i < 10; new Foo { Bar = "baz" }) { Debug.WriteLine(@"foo } bar"); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[for]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"foo } bar"]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [83..83)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsForeachKeyword.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsForeachKeyword.cspans.txt new file mode 100644 index 0000000000..3dcf5604d4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsForeachKeyword.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [87] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [87] ) +Code span at (1:0,1 [86] ) (Accepts:None) - Parent: Statement block at (0:0,0 [87] ) +Markup span at (87:0,87 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [87] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsForeachKeyword.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsForeachKeyword.stree.txt new file mode 100644 index 0000000000..57c9e1ffbc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsForeachKeyword.stree.txt @@ -0,0 +1,54 @@ +RazorDocument - [0..87)::87 - [@foreach(int i = 0; i < 10; new Foo { Bar = "baz" }) { Debug.WriteLine(@"foo } bar"); }] + MarkupBlock - [0..87)::87 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..87)::87 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..87)::86 - [foreach(int i = 0; i < 10; new Foo { Bar = "baz" }) { Debug.WriteLine(@"foo } bar"); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[foreach]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"foo } bar"]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [87..87)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsIfKeywordWithNoElseBranches.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsIfKeywordWithNoElseBranches.cspans.txt new file mode 100644 index 0000000000..8cb778eea3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsIfKeywordWithNoElseBranches.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [82] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [82] ) +Code span at (1:0,1 [81] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [82] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsIfKeywordWithNoElseBranches.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsIfKeywordWithNoElseBranches.stree.txt new file mode 100644 index 0000000000..416c7e02e3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsIfKeywordWithNoElseBranches.stree.txt @@ -0,0 +1,52 @@ +RazorDocument - [0..82)::82 - [@if(int i = 0; i < 10; new Foo { Bar = "baz" }) { Debug.WriteLine(@"foo } bar"); }] + MarkupBlock - [0..82)::82 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..82)::82 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..82)::81 - [if(int i = 0; i < 10; new Foo { Bar = "baz" }) { Debug.WriteLine(@"foo } bar"); }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"foo } bar"]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsSwitchKeyword.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsSwitchKeyword.cspans.txt new file mode 100644 index 0000000000..1db0bcc1b4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsSwitchKeyword.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [162] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [162] ) +Code span at (1:0,1 [161] ) (Accepts:None) - Parent: Statement block at (0:0,0 [162] ) +Markup span at (162:11,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [162] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsSwitchKeyword.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsSwitchKeyword.stree.txt new file mode 100644 index 0000000000..29ee2fa878 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsSwitchKeyword.stree.txt @@ -0,0 +1,62 @@ +RazorDocument - [0..162)::162 - [@switch(foo) {LF case 0:LF break;LF case 1:LF {LF break;LF }LF case 2:LF return;LF default:LF return;LF}] + MarkupBlock - [0..162)::162 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..162)::162 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..162)::161 - [switch(foo) {LF case 0:LF break;LF case 1:LF {LF break;LF }LF case 2:LF return;LF default:LF return;LF}] - Gen - SpanEditHandler;Accepts:None + Keyword;[switch]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[case]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Colon;[:]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[break]; + Semicolon;[;]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[case]; + Whitespace;[ ]; + IntegerLiteral;[1]; + Colon;[:]; + NewLine;[LF]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[break]; + Semicolon;[;]; + NewLine;[LF]; + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[case]; + Whitespace;[ ]; + IntegerLiteral;[2]; + Colon;[:]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[return]; + Semicolon;[;]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[default]; + Colon;[:]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[return]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; + MarkupTextLiteral - [162..162)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsWhileKeyword.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsWhileKeyword.cspans.txt new file mode 100644 index 0000000000..ca0b546f9e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsWhileKeyword.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [85] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [85] ) +Code span at (1:0,1 [84] ) (Accepts:None) - Parent: Statement block at (0:0,0 [85] ) +Markup span at (85:0,85 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [85] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsWhileKeyword.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsWhileKeyword.stree.txt new file mode 100644 index 0000000000..7c1f988f74 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesBracesIfFirstIdentifierIsWhileKeyword.stree.txt @@ -0,0 +1,54 @@ +RazorDocument - [0..85)::85 - [@while(int i = 0; i < 10; new Foo { Bar = "baz" }) { Debug.WriteLine(@"foo } bar"); }] + MarkupBlock - [0..85)::85 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..85)::85 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..85)::84 - [while(int i = 0; i < 10; new Foo { Bar = "baz" }) { Debug.WriteLine(@"foo } bar"); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[while]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"foo } bar"]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [85..85)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesIfFirstIdentifierIsUsingFollowedByParen.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesIfFirstIdentifierIsUsingFollowedByParen.cspans.txt new file mode 100644 index 0000000000..ca0b546f9e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesIfFirstIdentifierIsUsingFollowedByParen.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [85] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [85] ) +Code span at (1:0,1 [84] ) (Accepts:None) - Parent: Statement block at (0:0,0 [85] ) +Markup span at (85:0,85 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [85] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesIfFirstIdentifierIsUsingFollowedByParen.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesIfFirstIdentifierIsUsingFollowedByParen.stree.txt new file mode 100644 index 0000000000..348596ed7b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SkipsExprThenBalancesIfFirstIdentifierIsUsingFollowedByParen.stree.txt @@ -0,0 +1,54 @@ +RazorDocument - [0..85)::85 - [@using(int i = 0; i < 10; new Foo { Bar = "baz" }) { Debug.WriteLine(@"foo } bar"); }] + MarkupBlock - [0..85)::85 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..85)::85 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..85)::84 - [using(int i = 0; i < 10; new Foo { Bar = "baz" }) { Debug.WriteLine(@"foo } bar"); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[using]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"foo } bar"]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [85..85)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingCatchClausesAfterFinallyBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingCatchClausesAfterFinallyBlock.cspans.txt new file mode 100644 index 0000000000..aa0c099c06 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingCatchClausesAfterFinallyBlock.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [79] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [56] ) +Code span at (1:0,1 [55] ) (Accepts:None) - Parent: Statement block at (0:0,0 [56] ) +Markup span at (56:0,56 [23] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [79] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingCatchClausesAfterFinallyBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingCatchClausesAfterFinallyBlock.stree.txt new file mode 100644 index 0000000000..591939c74e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingCatchClausesAfterFinallyBlock.stree.txt @@ -0,0 +1,54 @@ +RazorDocument - [0..79)::79 - [@try { var foo = new { } } finally { var foo = new { } } catch(Foo Bar Baz) { }] + MarkupBlock - [0..79)::79 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..56)::56 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..56)::55 - [try { var foo = new { } } finally { var foo = new { } }] - Gen - SpanEditHandler;Accepts:None + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[finally]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [56..79)::23 - [ catch(Foo Bar Baz) { }] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[catch(Foo]; + Whitespace;[ ]; + Text;[Bar]; + Whitespace;[ ]; + Text;[Baz)]; + Whitespace;[ ]; + Text;[{]; + Whitespace;[ ]; + Text;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingCodeAfterElseBranch.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingCodeAfterElseBranch.cspans.txt new file mode 100644 index 0000000000..be831c60b4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingCodeAfterElseBranch.cspans.txt @@ -0,0 +1,18 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [314] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [221] ) +Code span at (1:0,1 [220] ) (Accepts:None) - Parent: Statement block at (0:0,0 [221] ) +Markup span at (221:4,41 [22] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [314] ) +Markup span at (243:4,63 [1] ) (Accepts:Any) - Parent: Tag block at (243:4,63 [71] ) +Markup span at (244:4,64 [4] ) (Accepts:Any) - Parent: Markup block at (244:4,64 [4] ) +Markup span at (248:4,68 [4] ) (Accepts:Any) - Parent: Markup block at (248:4,68 [4] ) +Markup span at (252:4,72 [4] ) (Accepts:Any) - Parent: Markup block at (252:4,72 [4] ) +Markup span at (256:4,76 [2] ) (Accepts:Any) - Parent: Markup block at (256:4,76 [2] ) +Markup span at (258:4,78 [8] ) (Accepts:Any) - Parent: Markup block at (258:4,78 [12] ) +Markup span at (266:4,86 [3] ) (Accepts:Any) - Parent: Markup block at (258:4,78 [12] ) +Markup span at (269:4,89 [1] ) (Accepts:Any) - Parent: Markup block at (258:4,78 [12] ) +Markup span at (270:4,90 [3] ) (Accepts:Any) - Parent: Markup block at (270:4,90 [3] ) +Markup span at (273:4,93 [2] ) (Accepts:Any) - Parent: Markup block at (273:4,93 [2] ) +Markup span at (275:4,95 [27] ) (Accepts:Any) - Parent: Markup block at (275:4,95 [27] ) +Markup span at (302:5,25 [2] ) (Accepts:Any) - Parent: Markup block at (302:5,25 [2] ) +Markup span at (304:5,27 [7] ) (Accepts:Any) - Parent: Markup block at (304:5,27 [7] ) +Markup span at (311:5,34 [3] ) (Accepts:Any) - Parent: Markup block at (311:5,34 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingCodeAfterElseBranch.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingCodeAfterElseBranch.stree.txt new file mode 100644 index 0000000000..6ea3f05e53 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingCodeAfterElseBranch.stree.txt @@ -0,0 +1,207 @@ +RazorDocument - [0..314)::314 - [@if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"foo } bar");LF} else if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF} else { Debug.WriteLine(@"bar } baz"); } else if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF}] + MarkupBlock - [0..314)::314 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..221)::221 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..221)::220 - [if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"foo } bar");LF} else if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF} else { Debug.WriteLine(@"bar } baz"); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"foo } bar"]; + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"bar } baz"]; + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"bar } baz"]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [221..243)::22 - [ else if(int i = 0; i ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[else]; + Whitespace;[ ]; + Text;[if(int]; + Whitespace;[ ]; + Text;[i]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[0;]; + Whitespace;[ ]; + Text;[i]; + Whitespace;[ ]; + MarkupElement - [243..314)::71 + MarkupStartTag - [243..314)::71 - [< 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"bar } baz");LF}] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + MarkupMinimizedAttributeBlock - [244..248)::4 - [ 10;] + MarkupTextLiteral - [244..245)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [245..248)::3 - [10;] - Gen - SpanEditHandler;Accepts:Any + Text;[10;]; + MarkupMinimizedAttributeBlock - [248..252)::4 - [ new] + MarkupTextLiteral - [248..249)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [249..252)::3 - [new] - Gen - SpanEditHandler;Accepts:Any + Text;[new]; + MarkupMinimizedAttributeBlock - [252..256)::4 - [ Foo] + MarkupTextLiteral - [252..253)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [253..256)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupMinimizedAttributeBlock - [256..258)::2 - [ {] + MarkupTextLiteral - [256..257)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [257..258)::1 - [{] - Gen - SpanEditHandler;Accepts:Any + Text;[{]; + MarkupAttributeBlock - [258..270)::12 - [ Bar = "baz"] + MarkupTextLiteral - [258..259)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [259..262)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupTextLiteral - [262..263)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Equals;[=]; + MarkupTextLiteral - [264..266)::2 - [ "] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + DoubleQuote;["]; + GenericBlock - [266..269)::3 + MarkupLiteralAttributeValue - [266..269)::3 - [baz] + MarkupTextLiteral - [266..269)::3 - [baz] - Gen - SpanEditHandler;Accepts:Any + Text;[baz]; + MarkupTextLiteral - [269..270)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMinimizedAttributeBlock - [270..273)::3 - [ })] + MarkupTextLiteral - [270..271)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [271..273)::2 - [})] - Gen - SpanEditHandler;Accepts:Any + Text;[})]; + MarkupMinimizedAttributeBlock - [273..275)::2 - [ {] + MarkupTextLiteral - [273..274)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [274..275)::1 - [{] - Gen - SpanEditHandler;Accepts:Any + Text;[{]; + MarkupMinimizedAttributeBlock - [275..302)::27 - [LF Debug.WriteLine(@"bar] + MarkupTextLiteral - [275..281)::6 - [LF ] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + MarkupTextLiteral - [281..302)::21 - [Debug.WriteLine(@"bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Debug.WriteLine(]; + Transition;[@]; + DoubleQuote;["]; + Text;[bar]; + MarkupMinimizedAttributeBlock - [302..304)::2 - [ }] + MarkupTextLiteral - [302..303)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [303..304)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + MarkupMinimizedAttributeBlock - [304..311)::7 - [ baz");] + MarkupTextLiteral - [304..305)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [305..311)::6 - [baz");] - Gen - SpanEditHandler;Accepts:Any + Text;[baz]; + DoubleQuote;["]; + Text;[);]; + MarkupMinimizedAttributeBlock - [311..314)::3 - [LF}] + MarkupTextLiteral - [311..313)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupTextLiteral - [313..314)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingIfIfStatementNotFollowedByElse.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingIfIfStatementNotFollowedByElse.cspans.txt new file mode 100644 index 0000000000..fe1c982289 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingIfIfStatementNotFollowedByElse.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [88] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [88] ) +Code span at (1:0,1 [87] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [88] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingIfIfStatementNotFollowedByElse.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingIfIfStatementNotFollowedByElse.stree.txt new file mode 100644 index 0000000000..bc5f1923c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/StopsParsingIfIfStatementNotFollowedByElse.stree.txt @@ -0,0 +1,53 @@ +RazorDocument - [0..88)::88 - [@if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"foo } bar");LF}] + MarkupBlock - [0..88)::88 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..88)::88 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..88)::87 - [if(int i = 0; i < 10; new Foo { Bar = "baz" }) {LF Debug.WriteLine(@"foo } bar");LF}] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"foo } bar"]; + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenCatchAndFinallyClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenCatchAndFinallyClause.cspans.txt new file mode 100644 index 0000000000..6e4685336b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenCatchAndFinallyClause.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [76] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [76] ) +Code span at (1:0,1 [75] ) (Accepts:None) - Parent: Statement block at (0:0,0 [76] ) +Markup span at (76:0,76 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [76] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenCatchAndFinallyClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenCatchAndFinallyClause.stree.txt new file mode 100644 index 0000000000..96e3f6e83c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenCatchAndFinallyClause.stree.txt @@ -0,0 +1,49 @@ +RazorDocument - [0..76)::76 - [@try { bar(); } catch(bar) { baz(); } /* Foo */ /* Bar */ finally { biz(); }] + MarkupBlock - [0..76)::76 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..76)::76 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..76)::75 - [try { bar(); } catch(bar) { baz(); } /* Foo */ /* Bar */ finally { biz(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + CSharpComment;[/* Foo */]; + Whitespace;[ ]; + CSharpComment;[/* Bar */]; + Whitespace;[ ]; + Keyword;[finally]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[biz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [76..76)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenDoAndWhileClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenDoAndWhileClause.cspans.txt new file mode 100644 index 0000000000..ad7d618e3f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenDoAndWhileClause.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [55] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [55] ) +Code span at (1:0,1 [54] ) (Accepts:None) - Parent: Statement block at (0:0,0 [55] ) +Markup span at (55:0,55 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [55] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenDoAndWhileClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenDoAndWhileClause.stree.txt new file mode 100644 index 0000000000..fce6e868c6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenDoAndWhileClause.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..55)::55 - [@do { var foo = bar; } /* Foo */ /* Bar */ while(true);] + MarkupBlock - [0..55)::55 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..55)::55 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..55)::54 - [do { var foo = bar; } /* Foo */ /* Bar */ while(true);] - Gen - SpanEditHandler;Accepts:None + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + CSharpComment;[/* Foo */]; + Whitespace;[ ]; + CSharpComment;[/* Bar */]; + Whitespace;[ ]; + Keyword;[while]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Semicolon;[;]; + MarkupTextLiteral - [55..55)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenElseIfAndElseClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenElseIfAndElseClause.cspans.txt new file mode 100644 index 0000000000..ab49157b04 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenElseIfAndElseClause.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [79] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [79] ) +Code span at (1:0,1 [78] ) (Accepts:None) - Parent: Statement block at (0:0,0 [79] ) +Markup span at (79:0,79 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [79] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenElseIfAndElseClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenElseIfAndElseClause.stree.txt new file mode 100644 index 0000000000..a3ef08830e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenElseIfAndElseClause.stree.txt @@ -0,0 +1,54 @@ +RazorDocument - [0..79)::79 - [@if(foo) { bar(); } else if(bar) { baz(); } /* Foo */ /* Bar */ else { biz(); }] + MarkupBlock - [0..79)::79 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..79)::79 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..79)::78 - [if(foo) { bar(); } else if(bar) { baz(); } /* Foo */ /* Bar */ else { biz(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + CSharpComment;[/* Foo */]; + Whitespace;[ ]; + CSharpComment;[/* Bar */]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[biz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [79..79)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenIfAndElseClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenIfAndElseClause.cspans.txt new file mode 100644 index 0000000000..ad7d618e3f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenIfAndElseClause.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [55] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [55] ) +Code span at (1:0,1 [54] ) (Accepts:None) - Parent: Statement block at (0:0,0 [55] ) +Markup span at (55:0,55 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [55] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenIfAndElseClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenIfAndElseClause.stree.txt new file mode 100644 index 0000000000..caa9d72231 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenIfAndElseClause.stree.txt @@ -0,0 +1,38 @@ +RazorDocument - [0..55)::55 - [@if(foo) { bar(); } /* Foo */ /* Bar */ else { baz(); }] + MarkupBlock - [0..55)::55 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..55)::55 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..55)::54 - [if(foo) { bar(); } /* Foo */ /* Bar */ else { baz(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + CSharpComment;[/* Foo */]; + Whitespace;[ ]; + CSharpComment;[/* Bar */]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [55..55)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenIfAndElseIfClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenIfAndElseIfClause.cspans.txt new file mode 100644 index 0000000000..9308e1a86a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenIfAndElseIfClause.cspans.txt @@ -0,0 +1 @@ +Markup span at (0:0,0 [62] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [62] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenIfAndElseIfClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenIfAndElseIfClause.stree.txt new file mode 100644 index 0000000000..4d4572d8e2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenIfAndElseIfClause.stree.txt @@ -0,0 +1,36 @@ +RazorDocument - [0..62)::62 - [if(foo) { bar(); } /* Foo */ /* Bar */ else if(bar) { baz(); }] + MarkupBlock - [0..62)::62 + MarkupTextLiteral - [0..62)::62 - [if(foo) { bar(); } /* Foo */ /* Bar */ else if(bar) { baz(); }] - Gen - SpanEditHandler;Accepts:Any + Text;[if(foo)]; + Whitespace;[ ]; + Text;[{]; + Whitespace;[ ]; + Text;[bar();]; + Whitespace;[ ]; + Text;[}]; + Whitespace;[ ]; + ForwardSlash;[/]; + Text;[*]; + Whitespace;[ ]; + Text;[Foo]; + Whitespace;[ ]; + Text;[*]; + ForwardSlash;[/]; + Whitespace;[ ]; + ForwardSlash;[/]; + Text;[*]; + Whitespace;[ ]; + Text;[Bar]; + Whitespace;[ ]; + Text;[*]; + ForwardSlash;[/]; + Whitespace;[ ]; + Text;[else]; + Whitespace;[ ]; + Text;[if(bar)]; + Whitespace;[ ]; + Text;[{]; + Whitespace;[ ]; + Text;[baz();]; + Whitespace;[ ]; + Text;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenTryAndCatchClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenTryAndCatchClause.cspans.txt new file mode 100644 index 0000000000..160fbdc681 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenTryAndCatchClause.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [57] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [57] ) +Code span at (1:0,1 [56] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [57] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenTryAndCatchClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenTryAndCatchClause.stree.txt new file mode 100644 index 0000000000..2385e04a83 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenTryAndCatchClause.stree.txt @@ -0,0 +1,36 @@ +RazorDocument - [0..57)::57 - [@try { bar(); } /* Foo */ /* Bar */ catch(bar) { baz(); }] + MarkupBlock - [0..57)::57 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..57)::57 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..57)::56 - [try { bar(); } /* Foo */ /* Bar */ catch(bar) { baz(); }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + CSharpComment;[/* Foo */]; + Whitespace;[ ]; + CSharpComment;[/* Bar */]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenTryAndFinallyClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenTryAndFinallyClause.cspans.txt new file mode 100644 index 0000000000..d203f657ee --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenTryAndFinallyClause.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [54] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [54] ) +Code span at (1:0,1 [53] ) (Accepts:None) - Parent: Statement block at (0:0,0 [54] ) +Markup span at (54:0,54 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [54] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenTryAndFinallyClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenTryAndFinallyClause.stree.txt new file mode 100644 index 0000000000..b260d25664 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsBlockCommentBetweenTryAndFinallyClause.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..54)::54 - [@try { bar(); } /* Foo */ /* Bar */ finally { baz(); }] + MarkupBlock - [0..54)::54 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..54)::54 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..54)::53 - [try { bar(); } /* Foo */ /* Bar */ finally { baz(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + CSharpComment;[/* Foo */]; + Whitespace;[ ]; + CSharpComment;[/* Bar */]; + Whitespace;[ ]; + Keyword;[finally]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [54..54)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsExceptionLessCatchClauses.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsExceptionLessCatchClauses.cspans.txt new file mode 100644 index 0000000000..c6237e0e8a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsExceptionLessCatchClauses.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [54] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [54] ) +Code span at (1:0,1 [53] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [54] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsExceptionLessCatchClauses.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsExceptionLessCatchClauses.stree.txt new file mode 100644 index 0000000000..32c77551fa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsExceptionLessCatchClauses.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..54)::54 - [@try { var foo = new { } } catch { var foo = new { } }] + MarkupBlock - [0..54)::54 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..54)::54 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..54)::53 - [try { var foo = new { } } catch { var foo = new { } }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenCatchAndFinallyClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenCatchAndFinallyClause.cspans.txt new file mode 100644 index 0000000000..62b7ff3aa5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenCatchAndFinallyClause.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [73] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [73] ) +Code span at (1:0,1 [72] ) (Accepts:None) - Parent: Statement block at (0:0,0 [73] ) +Markup span at (73:3,18 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [73] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenCatchAndFinallyClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenCatchAndFinallyClause.stree.txt new file mode 100644 index 0000000000..2171dd644d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenCatchAndFinallyClause.stree.txt @@ -0,0 +1,49 @@ +RazorDocument - [0..73)::73 - [@try { bar(); } catch(bar) { baz(); }LF// FooLF// BarLFfinally { biz(); }] + MarkupBlock - [0..73)::73 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..73)::73 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..73)::72 - [try { bar(); } catch(bar) { baz(); }LF// FooLF// BarLFfinally { biz(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + CSharpComment;[// Foo]; + NewLine;[LF]; + CSharpComment;[// Bar]; + NewLine;[LF]; + Keyword;[finally]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[biz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [73..73)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenDoAndWhileClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenDoAndWhileClause.cspans.txt new file mode 100644 index 0000000000..9cf3e2b219 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenDoAndWhileClause.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [52] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [52] ) +Code span at (1:0,1 [51] ) (Accepts:None) - Parent: Statement block at (0:0,0 [52] ) +Markup span at (52:3,12 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [52] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenDoAndWhileClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenDoAndWhileClause.stree.txt new file mode 100644 index 0000000000..6e8cbb886a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenDoAndWhileClause.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..52)::52 - [@do { var foo = bar; }LF// FooLF// BarLFwhile(true);] + MarkupBlock - [0..52)::52 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..52)::52 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..52)::51 - [do { var foo = bar; }LF// FooLF// BarLFwhile(true);] - Gen - SpanEditHandler;Accepts:None + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + CSharpComment;[// Foo]; + NewLine;[LF]; + CSharpComment;[// Bar]; + NewLine;[LF]; + Keyword;[while]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Semicolon;[;]; + MarkupTextLiteral - [52..52)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenElseIfAndElseClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenElseIfAndElseClause.cspans.txt new file mode 100644 index 0000000000..e5f45fe9ff --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenElseIfAndElseClause.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [76] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [76] ) +Code span at (1:0,1 [75] ) (Accepts:None) - Parent: Statement block at (0:0,0 [76] ) +Markup span at (76:3,15 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [76] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenElseIfAndElseClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenElseIfAndElseClause.stree.txt new file mode 100644 index 0000000000..e7bad5b4ff --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenElseIfAndElseClause.stree.txt @@ -0,0 +1,54 @@ +RazorDocument - [0..76)::76 - [@if(foo) { bar(); } else if(bar) { baz(); }LF// FooLF// BarLFelse { biz(); }] + MarkupBlock - [0..76)::76 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..76)::76 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..76)::75 - [if(foo) { bar(); } else if(bar) { baz(); }LF// FooLF// BarLFelse { biz(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + CSharpComment;[// Foo]; + NewLine;[LF]; + CSharpComment;[// Bar]; + NewLine;[LF]; + Keyword;[else]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[biz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [76..76)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenIfAndElseClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenIfAndElseClause.cspans.txt new file mode 100644 index 0000000000..566e454573 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenIfAndElseClause.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [52] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [52] ) +Code span at (1:0,1 [51] ) (Accepts:None) - Parent: Statement block at (0:0,0 [52] ) +Markup span at (52:3,15 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [52] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenIfAndElseClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenIfAndElseClause.stree.txt new file mode 100644 index 0000000000..d167b6dbe2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenIfAndElseClause.stree.txt @@ -0,0 +1,38 @@ +RazorDocument - [0..52)::52 - [@if(foo) { bar(); }LF// FooLF// BarLFelse { baz(); }] + MarkupBlock - [0..52)::52 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..52)::52 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..52)::51 - [if(foo) { bar(); }LF// FooLF// BarLFelse { baz(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + CSharpComment;[// Foo]; + NewLine;[LF]; + CSharpComment;[// Bar]; + NewLine;[LF]; + Keyword;[else]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [52..52)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenIfAndElseIfClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenIfAndElseIfClause.cspans.txt new file mode 100644 index 0000000000..8985fc4d32 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenIfAndElseIfClause.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [60] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [60] ) +Code span at (1:0,1 [59] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [60] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenIfAndElseIfClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenIfAndElseIfClause.stree.txt new file mode 100644 index 0000000000..a0ca426d84 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenIfAndElseIfClause.stree.txt @@ -0,0 +1,41 @@ +RazorDocument - [0..60)::60 - [@if(foo) { bar(); }LF// FooLF// BarLFelse if(bar) { baz(); }] + MarkupBlock - [0..60)::60 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..60)::60 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..60)::59 - [if(foo) { bar(); }LF// FooLF// BarLFelse if(bar) { baz(); }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + CSharpComment;[// Foo]; + NewLine;[LF]; + CSharpComment;[// Bar]; + NewLine;[LF]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenTryAndCatchClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenTryAndCatchClause.cspans.txt new file mode 100644 index 0000000000..c6237e0e8a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenTryAndCatchClause.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [54] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [54] ) +Code span at (1:0,1 [53] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [54] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenTryAndCatchClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenTryAndCatchClause.stree.txt new file mode 100644 index 0000000000..62b181f49f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenTryAndCatchClause.stree.txt @@ -0,0 +1,36 @@ +RazorDocument - [0..54)::54 - [@try { bar(); }LF// FooLF// BarLFcatch(bar) { baz(); }] + MarkupBlock - [0..54)::54 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..54)::54 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..54)::53 - [try { bar(); }LF// FooLF// BarLFcatch(bar) { baz(); }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + CSharpComment;[// Foo]; + NewLine;[LF]; + CSharpComment;[// Bar]; + NewLine;[LF]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenTryAndFinallyClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenTryAndFinallyClause.cspans.txt new file mode 100644 index 0000000000..4ea9b5e4ac --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenTryAndFinallyClause.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [51] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [51] ) +Code span at (1:0,1 [50] ) (Accepts:None) - Parent: Statement block at (0:0,0 [51] ) +Markup span at (51:3,18 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [51] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenTryAndFinallyClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenTryAndFinallyClause.stree.txt new file mode 100644 index 0000000000..ed023e9a58 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsLineCommentBetweenTryAndFinallyClause.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..51)::51 - [@try { bar(); }LF// FooLF// BarLFfinally { baz(); }] + MarkupBlock - [0..51)::51 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..51)::51 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..51)::50 - [try { bar(); }LF// FooLF// BarLFfinally { baz(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + CSharpComment;[// Foo]; + NewLine;[LF]; + CSharpComment;[// Bar]; + NewLine;[LF]; + Keyword;[finally]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [51..51)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinAdditionalCatchClauses.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinAdditionalCatchClauses.cspans.txt new file mode 100644 index 0000000000..c85c3644c5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinAdditionalCatchClauses.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [142] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [142] ) +Code span at (1:0,1 [128] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [142] ) +Markup span at (129:0,129 [1] ) (Accepts:Any) - Parent: Markup block at (129:0,129 [12] ) +Markup span at (130:0,130 [3] ) (Accepts:None) - Parent: Tag block at (130:0,130 [3] ) +Markup span at (133:0,133 [3] ) (Accepts:Any) - Parent: Markup block at (129:0,129 [12] ) +Markup span at (136:0,136 [4] ) (Accepts:None) - Parent: Tag block at (136:0,136 [4] ) +Markup span at (140:0,140 [1] ) (Accepts:None) - Parent: Markup block at (129:0,129 [12] ) +Code span at (141:0,141 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [142] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinAdditionalCatchClauses.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinAdditionalCatchClauses.stree.txt new file mode 100644 index 0000000000..8c4bba87e9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinAdditionalCatchClauses.stree.txt @@ -0,0 +1,105 @@ +RazorDocument - [0..142)::142 - [@try { var foo = new { } } catch(Foo Bar Baz) { var foo = new { } } catch(Foo Bar Baz) { var foo = new { } } catch(Foo Bar Baz) {

                    Foo

                    }] + MarkupBlock - [0..142)::142 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..142)::142 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..129)::128 - [try { var foo = new { } } catch(Foo Bar Baz) { var foo = new { } } catch(Foo Bar Baz) { var foo = new { } } catch(Foo Bar Baz) {] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Foo]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Identifier;[Baz]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Foo]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Identifier;[Baz]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Foo]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Identifier;[Baz]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [129..141)::12 + MarkupTextLiteral - [129..130)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [130..140)::10 + MarkupStartTag - [130..133)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [133..136)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [136..140)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [140..141)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [141..142)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinCatchClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinCatchClause.cspans.txt new file mode 100644 index 0000000000..f5eacad8c8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinCatchClause.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [60] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [60] ) +Code span at (1:0,1 [46] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [60] ) +Markup span at (47:0,47 [1] ) (Accepts:Any) - Parent: Markup block at (47:0,47 [12] ) +Markup span at (48:0,48 [3] ) (Accepts:None) - Parent: Tag block at (48:0,48 [3] ) +Markup span at (51:0,51 [3] ) (Accepts:Any) - Parent: Markup block at (47:0,47 [12] ) +Markup span at (54:0,54 [4] ) (Accepts:None) - Parent: Tag block at (54:0,54 [4] ) +Markup span at (58:0,58 [1] ) (Accepts:None) - Parent: Markup block at (47:0,47 [12] ) +Code span at (59:0,59 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [60] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinCatchClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinCatchClause.stree.txt new file mode 100644 index 0000000000..c3f718b548 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinCatchClause.stree.txt @@ -0,0 +1,55 @@ +RazorDocument - [0..60)::60 - [@try { var foo = new { } } catch(Foo Bar Baz) {

                    Foo

                    }] + MarkupBlock - [0..60)::60 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..60)::60 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..47)::46 - [try { var foo = new { } } catch(Foo Bar Baz) {] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Foo]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Identifier;[Baz]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [47..59)::12 + MarkupTextLiteral - [47..48)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [48..58)::10 + MarkupStartTag - [48..51)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [51..54)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [54..58)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [58..59)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [59..60)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinFinallyClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinFinallyClause.cspans.txt new file mode 100644 index 0000000000..4fd893b6ab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinFinallyClause.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [49] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [49] ) +Code span at (1:0,1 [35] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [49] ) +Markup span at (36:0,36 [1] ) (Accepts:Any) - Parent: Markup block at (36:0,36 [12] ) +Markup span at (37:0,37 [3] ) (Accepts:None) - Parent: Tag block at (37:0,37 [3] ) +Markup span at (40:0,40 [3] ) (Accepts:Any) - Parent: Markup block at (36:0,36 [12] ) +Markup span at (43:0,43 [4] ) (Accepts:None) - Parent: Tag block at (43:0,43 [4] ) +Markup span at (47:0,47 [1] ) (Accepts:None) - Parent: Markup block at (36:0,36 [12] ) +Code span at (48:0,48 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [49] ) +Markup span at (49:0,49 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [49] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinFinallyClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinFinallyClause.stree.txt new file mode 100644 index 0000000000..41cfa89c2c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinFinallyClause.stree.txt @@ -0,0 +1,50 @@ +RazorDocument - [0..49)::49 - [@try { var foo = new { } } finally {

                    Foo

                    }] + MarkupBlock - [0..49)::49 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..49)::49 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..36)::35 - [try { var foo = new { } } finally {] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[finally]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [36..48)::12 + MarkupTextLiteral - [36..37)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [37..47)::10 + MarkupStartTag - [37..40)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [40..43)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [43..47)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [47..48)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [48..49)::1 - [}] - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [49..49)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinTryClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinTryClause.cspans.txt new file mode 100644 index 0000000000..93ffe7cfe8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinTryClause.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +Code span at (1:0,1 [5] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [19] ) +Markup span at (6:0,6 [1] ) (Accepts:Any) - Parent: Markup block at (6:0,6 [12] ) +Markup span at (7:0,7 [3] ) (Accepts:None) - Parent: Tag block at (7:0,7 [3] ) +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Markup block at (6:0,6 [12] ) +Markup span at (13:0,13 [4] ) (Accepts:None) - Parent: Tag block at (13:0,13 [4] ) +Markup span at (17:0,17 [1] ) (Accepts:None) - Parent: Markup block at (6:0,6 [12] ) +Code span at (18:0,18 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinTryClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinTryClause.stree.txt new file mode 100644 index 0000000000..996f278e09 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsMarkupWithinTryClause.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..19)::19 - [@try {

                    Foo

                    }] + MarkupBlock - [0..19)::19 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..19)::19 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..6)::5 - [try {] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [6..18)::12 + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [7..17)::10 + MarkupStartTag - [7..10)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [10..13)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [13..17)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [18..19)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenCatchAndFinallyClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenCatchAndFinallyClause.cspans.txt new file mode 100644 index 0000000000..93426c20ee --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenCatchAndFinallyClause.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [76] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [76] ) +Code span at (1:0,1 [37] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [76] ) +Transition span at (38:0,38 [1] ) (Accepts:None) - Parent: Comment block at (38:0,38 [9] ) +MetaCode span at (39:0,39 [1] ) (Accepts:None) - Parent: Comment block at (38:0,38 [9] ) +Comment span at (40:0,40 [5] ) (Accepts:Any) - Parent: Comment block at (38:0,38 [9] ) +MetaCode span at (45:0,45 [1] ) (Accepts:None) - Parent: Comment block at (38:0,38 [9] ) +Transition span at (46:0,46 [1] ) (Accepts:None) - Parent: Comment block at (38:0,38 [9] ) +Code span at (47:0,47 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [76] ) +Transition span at (48:0,48 [1] ) (Accepts:None) - Parent: Comment block at (48:0,48 [9] ) +MetaCode span at (49:0,49 [1] ) (Accepts:None) - Parent: Comment block at (48:0,48 [9] ) +Comment span at (50:0,50 [5] ) (Accepts:Any) - Parent: Comment block at (48:0,48 [9] ) +MetaCode span at (55:0,55 [1] ) (Accepts:None) - Parent: Comment block at (48:0,48 [9] ) +Transition span at (56:0,56 [1] ) (Accepts:None) - Parent: Comment block at (48:0,48 [9] ) +Code span at (57:0,57 [19] ) (Accepts:None) - Parent: Statement block at (0:0,0 [76] ) +Markup span at (76:0,76 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [76] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenCatchAndFinallyClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenCatchAndFinallyClause.stree.txt new file mode 100644 index 0000000000..2637f539e7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenCatchAndFinallyClause.stree.txt @@ -0,0 +1,61 @@ +RazorDocument - [0..76)::76 - [@try { bar(); } catch(bar) { baz(); } @* Foo *@ @* Bar *@ finally { biz(); }] + MarkupBlock - [0..76)::76 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..76)::76 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..38)::37 - [try { bar(); } catch(bar) { baz(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RazorComment - [38..47)::9 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ Foo ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + CSharpStatementLiteral - [47..48)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorComment - [48..57)::9 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ Bar ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + CSharpStatementLiteral - [57..76)::19 - [ finally { biz(); }] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Keyword;[finally]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[biz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [76..76)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenDoAndWhileClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenDoAndWhileClause.cspans.txt new file mode 100644 index 0000000000..bc25d70006 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenDoAndWhileClause.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [55] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [55] ) +Code span at (1:0,1 [22] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [55] ) +Transition span at (23:0,23 [1] ) (Accepts:None) - Parent: Comment block at (23:0,23 [9] ) +MetaCode span at (24:0,24 [1] ) (Accepts:None) - Parent: Comment block at (23:0,23 [9] ) +Comment span at (25:0,25 [5] ) (Accepts:Any) - Parent: Comment block at (23:0,23 [9] ) +MetaCode span at (30:0,30 [1] ) (Accepts:None) - Parent: Comment block at (23:0,23 [9] ) +Transition span at (31:0,31 [1] ) (Accepts:None) - Parent: Comment block at (23:0,23 [9] ) +Code span at (32:0,32 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [55] ) +Transition span at (33:0,33 [1] ) (Accepts:None) - Parent: Comment block at (33:0,33 [9] ) +MetaCode span at (34:0,34 [1] ) (Accepts:None) - Parent: Comment block at (33:0,33 [9] ) +Comment span at (35:0,35 [5] ) (Accepts:Any) - Parent: Comment block at (33:0,33 [9] ) +MetaCode span at (40:0,40 [1] ) (Accepts:None) - Parent: Comment block at (33:0,33 [9] ) +Transition span at (41:0,41 [1] ) (Accepts:None) - Parent: Comment block at (33:0,33 [9] ) +Code span at (42:0,42 [13] ) (Accepts:None) - Parent: Statement block at (0:0,0 [55] ) +Markup span at (55:0,55 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [55] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenDoAndWhileClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenDoAndWhileClause.stree.txt new file mode 100644 index 0000000000..381862b355 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenDoAndWhileClause.stree.txt @@ -0,0 +1,46 @@ +RazorDocument - [0..55)::55 - [@do { var foo = bar; } @* Foo *@ @* Bar *@ while(true);] + MarkupBlock - [0..55)::55 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..55)::55 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..23)::22 - [do { var foo = bar; } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RazorComment - [23..32)::9 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ Foo ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + CSharpStatementLiteral - [32..33)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorComment - [33..42)::9 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ Bar ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + CSharpStatementLiteral - [42..55)::13 - [ while(true);] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Keyword;[while]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Semicolon;[;]; + MarkupTextLiteral - [55..55)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenElseIfAndElseClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenElseIfAndElseClause.cspans.txt new file mode 100644 index 0000000000..18ad30afaa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenElseIfAndElseClause.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [79] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [79] ) +Code span at (1:0,1 [43] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [79] ) +Transition span at (44:0,44 [1] ) (Accepts:None) - Parent: Comment block at (44:0,44 [9] ) +MetaCode span at (45:0,45 [1] ) (Accepts:None) - Parent: Comment block at (44:0,44 [9] ) +Comment span at (46:0,46 [5] ) (Accepts:Any) - Parent: Comment block at (44:0,44 [9] ) +MetaCode span at (51:0,51 [1] ) (Accepts:None) - Parent: Comment block at (44:0,44 [9] ) +Transition span at (52:0,52 [1] ) (Accepts:None) - Parent: Comment block at (44:0,44 [9] ) +Code span at (53:0,53 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [79] ) +Transition span at (54:0,54 [1] ) (Accepts:None) - Parent: Comment block at (54:0,54 [9] ) +MetaCode span at (55:0,55 [1] ) (Accepts:None) - Parent: Comment block at (54:0,54 [9] ) +Comment span at (56:0,56 [5] ) (Accepts:Any) - Parent: Comment block at (54:0,54 [9] ) +MetaCode span at (61:0,61 [1] ) (Accepts:None) - Parent: Comment block at (54:0,54 [9] ) +Transition span at (62:0,62 [1] ) (Accepts:None) - Parent: Comment block at (54:0,54 [9] ) +Code span at (63:0,63 [16] ) (Accepts:None) - Parent: Statement block at (0:0,0 [79] ) +Markup span at (79:0,79 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [79] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenElseIfAndElseClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenElseIfAndElseClause.stree.txt new file mode 100644 index 0000000000..dcf81bd443 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenElseIfAndElseClause.stree.txt @@ -0,0 +1,66 @@ +RazorDocument - [0..79)::79 - [@if(foo) { bar(); } else if(bar) { baz(); } @* Foo *@ @* Bar *@ else { baz(); }] + MarkupBlock - [0..79)::79 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..79)::79 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..44)::43 - [if(foo) { bar(); } else if(bar) { baz(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RazorComment - [44..53)::9 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ Foo ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + CSharpStatementLiteral - [53..54)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorComment - [54..63)::9 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ Bar ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + CSharpStatementLiteral - [63..79)::16 - [ else { baz(); }] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [79..79)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenIfAndElseClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenIfAndElseClause.cspans.txt new file mode 100644 index 0000000000..988b9312cc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenIfAndElseClause.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [55] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [55] ) +Code span at (1:0,1 [19] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [55] ) +Transition span at (20:0,20 [1] ) (Accepts:None) - Parent: Comment block at (20:0,20 [9] ) +MetaCode span at (21:0,21 [1] ) (Accepts:None) - Parent: Comment block at (20:0,20 [9] ) +Comment span at (22:0,22 [5] ) (Accepts:Any) - Parent: Comment block at (20:0,20 [9] ) +MetaCode span at (27:0,27 [1] ) (Accepts:None) - Parent: Comment block at (20:0,20 [9] ) +Transition span at (28:0,28 [1] ) (Accepts:None) - Parent: Comment block at (20:0,20 [9] ) +Code span at (29:0,29 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [55] ) +Transition span at (30:0,30 [1] ) (Accepts:None) - Parent: Comment block at (30:0,30 [9] ) +MetaCode span at (31:0,31 [1] ) (Accepts:None) - Parent: Comment block at (30:0,30 [9] ) +Comment span at (32:0,32 [5] ) (Accepts:Any) - Parent: Comment block at (30:0,30 [9] ) +MetaCode span at (37:0,37 [1] ) (Accepts:None) - Parent: Comment block at (30:0,30 [9] ) +Transition span at (38:0,38 [1] ) (Accepts:None) - Parent: Comment block at (30:0,30 [9] ) +Code span at (39:0,39 [16] ) (Accepts:None) - Parent: Statement block at (0:0,0 [55] ) +Markup span at (55:0,55 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [55] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenIfAndElseClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenIfAndElseClause.stree.txt new file mode 100644 index 0000000000..4d0ae9df0d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenIfAndElseClause.stree.txt @@ -0,0 +1,50 @@ +RazorDocument - [0..55)::55 - [@if(foo) { bar(); } @* Foo *@ @* Bar *@ else { baz(); }] + MarkupBlock - [0..55)::55 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..55)::55 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..20)::19 - [if(foo) { bar(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RazorComment - [20..29)::9 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ Foo ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + CSharpStatementLiteral - [29..30)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorComment - [30..39)::9 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ Bar ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + CSharpStatementLiteral - [39..55)::16 - [ else { baz(); }] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [55..55)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenIfAndElseIfClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenIfAndElseIfClause.cspans.txt new file mode 100644 index 0000000000..7884e3972d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenIfAndElseIfClause.cspans.txt @@ -0,0 +1,15 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [63] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [63] ) +Code span at (1:0,1 [19] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [63] ) +Transition span at (20:0,20 [1] ) (Accepts:None) - Parent: Comment block at (20:0,20 [9] ) +MetaCode span at (21:0,21 [1] ) (Accepts:None) - Parent: Comment block at (20:0,20 [9] ) +Comment span at (22:0,22 [5] ) (Accepts:Any) - Parent: Comment block at (20:0,20 [9] ) +MetaCode span at (27:0,27 [1] ) (Accepts:None) - Parent: Comment block at (20:0,20 [9] ) +Transition span at (28:0,28 [1] ) (Accepts:None) - Parent: Comment block at (20:0,20 [9] ) +Code span at (29:0,29 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [63] ) +Transition span at (30:0,30 [1] ) (Accepts:None) - Parent: Comment block at (30:0,30 [9] ) +MetaCode span at (31:0,31 [1] ) (Accepts:None) - Parent: Comment block at (30:0,30 [9] ) +Comment span at (32:0,32 [5] ) (Accepts:Any) - Parent: Comment block at (30:0,30 [9] ) +MetaCode span at (37:0,37 [1] ) (Accepts:None) - Parent: Comment block at (30:0,30 [9] ) +Transition span at (38:0,38 [1] ) (Accepts:None) - Parent: Comment block at (30:0,30 [9] ) +Code span at (39:0,39 [24] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [63] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenIfAndElseIfClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenIfAndElseIfClause.stree.txt new file mode 100644 index 0000000000..9e6d75fb2e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenIfAndElseIfClause.stree.txt @@ -0,0 +1,53 @@ +RazorDocument - [0..63)::63 - [@if(foo) { bar(); } @* Foo *@ @* Bar *@ else if(bar) { baz(); }] + MarkupBlock - [0..63)::63 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..63)::63 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..20)::19 - [if(foo) { bar(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RazorComment - [20..29)::9 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ Foo ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + CSharpStatementLiteral - [29..30)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorComment - [30..39)::9 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ Bar ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + CSharpStatementLiteral - [39..63)::24 - [ else if(bar) { baz(); }] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenTryAndCatchClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenTryAndCatchClause.cspans.txt new file mode 100644 index 0000000000..4c91176796 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenTryAndCatchClause.cspans.txt @@ -0,0 +1,15 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [56] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [56] ) +Code span at (1:0,1 [14] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [56] ) +Transition span at (15:0,15 [1] ) (Accepts:None) - Parent: Comment block at (15:0,15 [9] ) +MetaCode span at (16:0,16 [1] ) (Accepts:None) - Parent: Comment block at (15:0,15 [9] ) +Comment span at (17:0,17 [5] ) (Accepts:Any) - Parent: Comment block at (15:0,15 [9] ) +MetaCode span at (22:0,22 [1] ) (Accepts:None) - Parent: Comment block at (15:0,15 [9] ) +Transition span at (23:0,23 [1] ) (Accepts:None) - Parent: Comment block at (15:0,15 [9] ) +Code span at (24:0,24 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [56] ) +Transition span at (25:0,25 [1] ) (Accepts:None) - Parent: Comment block at (25:0,25 [9] ) +MetaCode span at (26:0,26 [1] ) (Accepts:None) - Parent: Comment block at (25:0,25 [9] ) +Comment span at (27:0,27 [5] ) (Accepts:Any) - Parent: Comment block at (25:0,25 [9] ) +MetaCode span at (32:0,32 [1] ) (Accepts:None) - Parent: Comment block at (25:0,25 [9] ) +Transition span at (33:0,33 [1] ) (Accepts:None) - Parent: Comment block at (25:0,25 [9] ) +Code span at (34:0,34 [22] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [56] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenTryAndCatchClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenTryAndCatchClause.stree.txt new file mode 100644 index 0000000000..16457cd82d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenTryAndCatchClause.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..56)::56 - [@try { bar(); }@* Foo *@ @* Bar *@ catch(bar) { baz(); }] + MarkupBlock - [0..56)::56 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..56)::56 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..15)::14 - [try { bar(); }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + RazorComment - [15..24)::9 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ Foo ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + CSharpStatementLiteral - [24..25)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorComment - [25..34)::9 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ Bar ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + CSharpStatementLiteral - [34..56)::22 - [ catch(bar) { baz(); }] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenTryAndFinallyClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenTryAndFinallyClause.cspans.txt new file mode 100644 index 0000000000..404343ecca --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenTryAndFinallyClause.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [54] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [54] ) +Code span at (1:0,1 [15] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [54] ) +Transition span at (16:0,16 [1] ) (Accepts:None) - Parent: Comment block at (16:0,16 [9] ) +MetaCode span at (17:0,17 [1] ) (Accepts:None) - Parent: Comment block at (16:0,16 [9] ) +Comment span at (18:0,18 [5] ) (Accepts:Any) - Parent: Comment block at (16:0,16 [9] ) +MetaCode span at (23:0,23 [1] ) (Accepts:None) - Parent: Comment block at (16:0,16 [9] ) +Transition span at (24:0,24 [1] ) (Accepts:None) - Parent: Comment block at (16:0,16 [9] ) +Code span at (25:0,25 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [54] ) +Transition span at (26:0,26 [1] ) (Accepts:None) - Parent: Comment block at (26:0,26 [9] ) +MetaCode span at (27:0,27 [1] ) (Accepts:None) - Parent: Comment block at (26:0,26 [9] ) +Comment span at (28:0,28 [5] ) (Accepts:Any) - Parent: Comment block at (26:0,26 [9] ) +MetaCode span at (33:0,33 [1] ) (Accepts:None) - Parent: Comment block at (26:0,26 [9] ) +Transition span at (34:0,34 [1] ) (Accepts:None) - Parent: Comment block at (26:0,26 [9] ) +Code span at (35:0,35 [19] ) (Accepts:None) - Parent: Statement block at (0:0,0 [54] ) +Markup span at (54:0,54 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [54] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenTryAndFinallyClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenTryAndFinallyClause.stree.txt new file mode 100644 index 0000000000..0cc98a8834 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsRazorCommentBetweenTryAndFinallyClause.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..54)::54 - [@try { bar(); } @* Foo *@ @* Bar *@ finally { biz(); }] + MarkupBlock - [0..54)::54 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..54)::54 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..16)::15 - [try { bar(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RazorComment - [16..25)::9 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ Foo ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + CSharpStatementLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorComment - [26..35)::9 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ Bar ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + CSharpStatementLiteral - [35..54)::19 - [ finally { biz(); }] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Keyword;[finally]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[biz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [54..54)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithFinallyClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithFinallyClause.cspans.txt new file mode 100644 index 0000000000..eef6075fd7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithFinallyClause.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [56] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [56] ) +Code span at (1:0,1 [55] ) (Accepts:None) - Parent: Statement block at (0:0,0 [56] ) +Markup span at (56:0,56 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [56] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithFinallyClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithFinallyClause.stree.txt new file mode 100644 index 0000000000..0ce89b760f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithFinallyClause.stree.txt @@ -0,0 +1,45 @@ +RazorDocument - [0..56)::56 - [@try { var foo = new { } } finally { var foo = new { } }] + MarkupBlock - [0..56)::56 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..56)::56 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..56)::55 - [try { var foo = new { } } finally { var foo = new { } }] - Gen - SpanEditHandler;Accepts:None + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[finally]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [56..56)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithMultipleCatchClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithMultipleCatchClause.cspans.txt new file mode 100644 index 0000000000..3c1c9fd7ca --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithMultipleCatchClause.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [149] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [149] ) +Code span at (1:0,1 [148] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [149] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithMultipleCatchClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithMultipleCatchClause.stree.txt new file mode 100644 index 0000000000..54504a9e05 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithMultipleCatchClause.stree.txt @@ -0,0 +1,100 @@ +RazorDocument - [0..149)::149 - [@try { var foo = new { } } catch(Foo Bar Baz) { var foo = new { } } catch(Foo Bar Baz) { var foo = new { } } catch(Foo Bar Baz) { var foo = new { } }] + MarkupBlock - [0..149)::149 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..149)::149 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..149)::148 - [try { var foo = new { } } catch(Foo Bar Baz) { var foo = new { } } catch(Foo Bar Baz) { var foo = new { } } catch(Foo Bar Baz) { var foo = new { } }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Foo]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Identifier;[Baz]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Foo]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Identifier;[Baz]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Foo]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Identifier;[Baz]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithNoAdditionalClauses.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithNoAdditionalClauses.cspans.txt new file mode 100644 index 0000000000..6f701b216f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithNoAdditionalClauses.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Code span at (1:0,1 [25] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithNoAdditionalClauses.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithNoAdditionalClauses.stree.txt new file mode 100644 index 0000000000..944a321a80 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithNoAdditionalClauses.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..26)::26 - [@try { var foo = new { } }] + MarkupBlock - [0..26)::26 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..26)::26 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..26)::25 - [try { var foo = new { } }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithOneCatchClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithOneCatchClause.cspans.txt new file mode 100644 index 0000000000..2d883a5590 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithOneCatchClause.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [67] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [67] ) +Code span at (1:0,1 [66] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [67] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithOneCatchClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithOneCatchClause.stree.txt new file mode 100644 index 0000000000..976171e701 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsTryStatementWithOneCatchClause.stree.txt @@ -0,0 +1,50 @@ +RazorDocument - [0..67)::67 - [@try { var foo = new { } } catch(Foo Bar Baz) { var foo = new { } }] + MarkupBlock - [0..67)::67 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..67)::67 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..67)::66 - [try { var foo = new { } } catch(Foo Bar Baz) { var foo = new { } }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Foo]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Identifier;[Baz]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsUsingsNestedWithinOtherBlocks.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsUsingsNestedWithinOtherBlocks.cspans.txt new file mode 100644 index 0000000000..40ccbbdea5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsUsingsNestedWithinOtherBlocks.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [97] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [97] ) +Code span at (1:0,1 [96] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [97] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsUsingsNestedWithinOtherBlocks.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsUsingsNestedWithinOtherBlocks.stree.txt new file mode 100644 index 0000000000..5632b74d2f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/SupportsUsingsNestedWithinOtherBlocks.stree.txt @@ -0,0 +1,61 @@ +RazorDocument - [0..97)::97 - [@if(foo) { using(int i = 0; i < 10; new Foo { Bar = "baz" }) { Debug.WriteLine(@"foo } bar"); } }] + MarkupBlock - [0..97)::97 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..97)::97 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..97)::96 - [if(foo) { using(int i = 0; i < 10; new Foo { Bar = "baz" }) { Debug.WriteLine(@"foo } bar"); } }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Keyword;[using]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["baz"]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"foo } bar"]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesBlockCommentAtEndOfFile.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesBlockCommentAtEndOfFile.cspans.txt new file mode 100644 index 0000000000..2ed26af598 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesBlockCommentAtEndOfFile.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [39] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [39] ) +Code span at (1:0,1 [38] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [39] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesBlockCommentAtEndOfFile.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesBlockCommentAtEndOfFile.diag.txt new file mode 100644 index 0000000000..2612cdd013 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesBlockCommentAtEndOfFile.diag.txt @@ -0,0 +1,2 @@ +(1,26): Error RZ1001: End of file was reached before the end of the block comment. All comments started with "/*" sequence must be terminated with a matching "*/" sequence. +(1,2): Error RZ1006: The foreach block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesBlockCommentAtEndOfFile.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesBlockCommentAtEndOfFile.stree.txt new file mode 100644 index 0000000000..6a21bad8d3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesBlockCommentAtEndOfFile.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..39)::39 - [@foreach(var f in Foo) { /* foo bar baz] + MarkupBlock - [0..39)::39 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..39)::39 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..39)::38 - [foreach(var f in Foo) { /* foo bar baz] - Gen - SpanEditHandler;Accepts:Any + Keyword;[foreach]; + LeftParenthesis;[(]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[f]; + Whitespace;[ ]; + Keyword;[in]; + Whitespace;[ ]; + Identifier;[Foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + CSharpComment;[/* foo bar baz];RZ1001(25:0,25 [1] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesParenBalancingAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesParenBalancingAtEOF.cspans.txt new file mode 100644 index 0000000000..3f873f6ea4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesParenBalancingAtEOF.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [15] ) +Code span at (1:0,1 [14] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [15] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesParenBalancingAtEOF.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesParenBalancingAtEOF.diag.txt new file mode 100644 index 0000000000..a40df1a410 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesParenBalancingAtEOF.diag.txt @@ -0,0 +1 @@ +(1,9): Error RZ1027: An opening "(" is missing the corresponding closing ")". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesParenBalancingAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesParenBalancingAtEOF.stree.txt new file mode 100644 index 0000000000..c52a1189f0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesParenBalancingAtEOF.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..15)::15 - [@Html.En(code()] + MarkupBlock - [0..15)::15 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..15)::15 + CSharpImplicitExpression - [0..15)::15 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..15)::14 + CSharpCodeBlock - [1..15)::14 + CSharpExpressionLiteral - [1..15)::14 - [Html.En(code()] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[Html]; + Dot;[.]; + Identifier;[En]; + LeftParenthesis;[(]; + Identifier;[code]; + LeftParenthesis;[(]; + RightParenthesis;[)]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleLineCommentAtEndOfFile.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleLineCommentAtEndOfFile.cspans.txt new file mode 100644 index 0000000000..2ed26af598 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleLineCommentAtEndOfFile.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [39] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [39] ) +Code span at (1:0,1 [38] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [39] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleLineCommentAtEndOfFile.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleLineCommentAtEndOfFile.diag.txt new file mode 100644 index 0000000000..06bf6f2dca --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleLineCommentAtEndOfFile.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The foreach block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleLineCommentAtEndOfFile.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleLineCommentAtEndOfFile.stree.txt new file mode 100644 index 0000000000..256845d49c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleLineCommentAtEndOfFile.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..39)::39 - [@foreach(var f in Foo) { // foo bar baz] + MarkupBlock - [0..39)::39 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..39)::39 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..39)::38 - [foreach(var f in Foo) { // foo bar baz] - Gen - SpanEditHandler;Accepts:Any + Keyword;[foreach]; + LeftParenthesis;[(]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[f]; + Whitespace;[ ]; + Keyword;[in]; + Whitespace;[ ]; + Identifier;[Foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + CSharpComment;[// foo bar baz]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleSlashAtEndOfFile.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleSlashAtEndOfFile.cspans.txt new file mode 100644 index 0000000000..7326485a95 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleSlashAtEndOfFile.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [38] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [38] ) +Code span at (1:0,1 [37] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [38] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleSlashAtEndOfFile.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleSlashAtEndOfFile.diag.txt new file mode 100644 index 0000000000..06bf6f2dca --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleSlashAtEndOfFile.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The foreach block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleSlashAtEndOfFile.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleSlashAtEndOfFile.stree.txt new file mode 100644 index 0000000000..106b2c81a1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesSingleSlashAtEndOfFile.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..38)::38 - [@foreach(var f in Foo) { / foo bar baz] + MarkupBlock - [0..38)::38 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..38)::38 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..38)::37 - [foreach(var f in Foo) { / foo bar baz] - Gen - SpanEditHandler;Accepts:Any + Keyword;[foreach]; + LeftParenthesis;[(]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[f]; + Whitespace;[ ]; + Keyword;[in]; + Whitespace;[ ]; + Identifier;[Foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Slash;[/]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Identifier;[bar]; + Whitespace;[ ]; + Identifier;[baz]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesUsingKeywordAtEOFAndOutputsFileCodeBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesUsingKeywordAtEOFAndOutputsFileCodeBlock.cspans.txt new file mode 100644 index 0000000000..6f701b216f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesUsingKeywordAtEOFAndOutputsFileCodeBlock.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Code span at (1:0,1 [25] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesUsingKeywordAtEOFAndOutputsFileCodeBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesUsingKeywordAtEOFAndOutputsFileCodeBlock.stree.txt new file mode 100644 index 0000000000..7d0351183f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TerminatesUsingKeywordAtEOFAndOutputsFileCodeBlock.stree.txt @@ -0,0 +1,10 @@ +RazorDocument - [0..26)::26 - [@using ] + MarkupBlock - [0..26)::26 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..26)::26 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..26)::25 - [using ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[using]; + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ThenBalancesBracesIfFirstIdentifierIsLockKeyword.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ThenBalancesBracesIfFirstIdentifierIsLockKeyword.cspans.txt new file mode 100644 index 0000000000..3b430f9f07 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ThenBalancesBracesIfFirstIdentifierIsLockKeyword.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [45] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [45] ) +Code span at (1:0,1 [44] ) (Accepts:None) - Parent: Statement block at (0:0,0 [45] ) +Markup span at (45:0,45 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [45] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ThenBalancesBracesIfFirstIdentifierIsLockKeyword.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ThenBalancesBracesIfFirstIdentifierIsLockKeyword.stree.txt new file mode 100644 index 0000000000..0f6a422fa2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/ThenBalancesBracesIfFirstIdentifierIsLockKeyword.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..45)::45 - [@lock(foo) { Debug.WriteLine(@"foo } bar"); }] + MarkupBlock - [0..45)::45 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..45)::45 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..45)::44 - [lock(foo) { Debug.WriteLine(@"foo } bar"); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[lock]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Debug]; + Dot;[.]; + Identifier;[WriteLine]; + LeftParenthesis;[(]; + StringLiteral;[@"foo } bar"]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [45..45)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TreatsAtSignsAfterFirstPairAsPartOfCSharpStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TreatsAtSignsAfterFirstPairAsPartOfCSharpStatement.cspans.txt new file mode 100644 index 0000000000..bb6bc45bc9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TreatsAtSignsAfterFirstPairAsPartOfCSharpStatement.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [28] ) +Code span at (1:0,1 [10] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [28] ) +Code span at (11:0,11 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [28] ) +Code span at (12:0,12 [16] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [28] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TreatsAtSignsAfterFirstPairAsPartOfCSharpStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TreatsAtSignsAfterFirstPairAsPartOfCSharpStatement.stree.txt new file mode 100644 index 0000000000..a47868ef01 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TreatsAtSignsAfterFirstPairAsPartOfCSharpStatement.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..28)::28 - [@if(foo) { @@@@class.Foo() }] + MarkupBlock - [0..28)::28 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..28)::28 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..11)::10 - [if(foo) { ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + CSharpEphemeralTextLiteral - [11..12)::1 - [@] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + CSharpStatementLiteral - [12..28)::16 - [@@@class.Foo() }] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + Transition;[@]; + Transition;[@]; + Keyword;[class]; + Dot;[.]; + Identifier;[Foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TreatsDoubleAtSignAsEscapeSequenceIfAtStatementStart.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TreatsDoubleAtSignAsEscapeSequenceIfAtStatementStart.cspans.txt new file mode 100644 index 0000000000..74119a5b92 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TreatsDoubleAtSignAsEscapeSequenceIfAtStatementStart.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Code span at (1:0,1 [10] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) +Code span at (11:0,11 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) +Code span at (12:0,12 [14] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TreatsDoubleAtSignAsEscapeSequenceIfAtStatementStart.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TreatsDoubleAtSignAsEscapeSequenceIfAtStatementStart.stree.txt new file mode 100644 index 0000000000..3996000291 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/TreatsDoubleAtSignAsEscapeSequenceIfAtStatementStart.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..26)::26 - [@if(foo) { @@class.Foo() }] + MarkupBlock - [0..26)::26 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..26)::26 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..11)::10 - [if(foo) { ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + CSharpEphemeralTextLiteral - [11..12)::1 - [@] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + CSharpStatementLiteral - [12..26)::14 - [@class.Foo() }] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + Keyword;[class]; + Dot;[.]; + Identifier;[Foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionAtBeginningOfAttributeValue_DoesNotThrow.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionAtBeginningOfAttributeValue_DoesNotThrow.cspans.txt new file mode 100644 index 0000000000..867c9d5eae --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionAtBeginningOfAttributeValue_DoesNotThrow.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (2:0,2 [5] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [20] ) +Markup span at (7:0,7 [6] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [12] ) +Markup span at (13:0,13 [1] ) (Accepts:None) - Parent: Markup block at (13:0,13 [2] ) +Markup span at (14:0,14 [1] ) (Accepts:None) - Parent: Markup block at (13:0,13 [2] ) +Markup span at (15:0,15 [3] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [12] ) +Markup span at (18:0,18 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [12] ) +Markup span at (19:0,19 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [20] ) +Code span at (22:0,22 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [23] ) +MetaCode span at (22:0,22 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (23:0,23 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionAtBeginningOfAttributeValue_DoesNotThrow.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionAtBeginningOfAttributeValue_DoesNotThrow.stree.txt new file mode 100644 index 0000000000..7f968fcc3f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionAtBeginningOfAttributeValue_DoesNotThrow.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..23)::23 - [@{}] + MarkupBlock - [0..23)::23 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..23)::23 + CSharpStatement - [0..23)::23 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..23)::22 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..22)::20 + MarkupBlock - [2..22)::20 + MarkupElement - [2..22)::20 + MarkupStartTag - [2..22)::20 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [7..19)::12 - [ foo='@@def'] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [13..18)::5 + MarkupBlock - [13..15)::2 + MarkupTextLiteral - [13..14)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupEphemeralTextLiteral - [14..15)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupLiteralAttributeValue - [15..18)::3 - [def] + MarkupTextLiteral - [15..18)::3 - [def] - Gen - SpanEditHandler;Accepts:Any + Text;[def]; + MarkupTextLiteral - [18..19)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [19..20)::1 + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [22..23)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [23..23)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionAtEndOfAttributeValue_DoesNotThrow.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionAtEndOfAttributeValue_DoesNotThrow.cspans.txt new file mode 100644 index 0000000000..2af0b84813 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionAtEndOfAttributeValue_DoesNotThrow.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (2:0,2 [5] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [20] ) +Markup span at (7:0,7 [6] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [12] ) +Markup span at (13:0,13 [3] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [12] ) +Markup span at (16:0,16 [1] ) (Accepts:None) - Parent: Markup block at (16:0,16 [2] ) +Markup span at (17:0,17 [1] ) (Accepts:None) - Parent: Markup block at (16:0,16 [2] ) +Markup span at (18:0,18 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [12] ) +Markup span at (19:0,19 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [20] ) +Code span at (22:0,22 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [23] ) +MetaCode span at (22:0,22 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (23:0,23 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionAtEndOfAttributeValue_DoesNotThrow.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionAtEndOfAttributeValue_DoesNotThrow.stree.txt new file mode 100644 index 0000000000..931cd0b1e2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionAtEndOfAttributeValue_DoesNotThrow.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..23)::23 - [@{}] + MarkupBlock - [0..23)::23 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..23)::23 + CSharpStatement - [0..23)::23 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..23)::22 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..22)::20 + MarkupBlock - [2..22)::20 + MarkupElement - [2..22)::20 + MarkupStartTag - [2..22)::20 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [7..19)::12 - [ foo='abc@@'] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [13..18)::5 + MarkupLiteralAttributeValue - [13..16)::3 - [abc] + MarkupTextLiteral - [13..16)::3 - [abc] - Gen - SpanEditHandler;Accepts:Any + Text;[abc]; + MarkupBlock - [16..18)::2 + MarkupTextLiteral - [16..17)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupEphemeralTextLiteral - [17..18)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupTextLiteral - [18..19)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [19..20)::1 + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [22..23)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [23..23)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionBetweenAttributeValue_DoesNotThrow.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionBetweenAttributeValue_DoesNotThrow.cspans.txt new file mode 100644 index 0000000000..7af2be2c26 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionBetweenAttributeValue_DoesNotThrow.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [28] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [28] ) +Markup span at (2:0,2 [5] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [25] ) +Markup span at (7:0,7 [6] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [17] ) +Markup span at (13:0,13 [3] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [17] ) +Markup span at (16:0,16 [2] ) (Accepts:None) - Parent: Markup block at (16:0,16 [3] ) +Markup span at (18:0,18 [1] ) (Accepts:None) - Parent: Markup block at (16:0,16 [3] ) +Markup span at (19:0,19 [4] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [17] ) +Markup span at (23:0,23 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [17] ) +Markup span at (24:0,24 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [25] ) +Code span at (27:0,27 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [28] ) +MetaCode span at (27:0,27 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [28] ) +Markup span at (28:0,28 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionBetweenAttributeValue_DoesNotThrow.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionBetweenAttributeValue_DoesNotThrow.stree.txt new file mode 100644 index 0000000000..0e56c91bea --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionBetweenAttributeValue_DoesNotThrow.stree.txt @@ -0,0 +1,53 @@ +RazorDocument - [0..28)::28 - [@{}] + MarkupBlock - [0..28)::28 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..28)::28 + CSharpStatement - [0..28)::28 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..28)::27 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..27)::25 + MarkupBlock - [2..27)::25 + MarkupElement - [2..27)::25 + MarkupStartTag - [2..27)::25 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [7..24)::17 - [ foo='abc @@ def'] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [13..23)::10 + MarkupLiteralAttributeValue - [13..16)::3 - [abc] + MarkupTextLiteral - [13..16)::3 - [abc] - Gen - SpanEditHandler;Accepts:Any + Text;[abc]; + MarkupBlock - [16..19)::3 + MarkupTextLiteral - [16..18)::2 - [ @] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Transition;[@]; + MarkupEphemeralTextLiteral - [18..19)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupLiteralAttributeValue - [19..23)::4 - [ def] + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [20..23)::3 - [def] - Gen - SpanEditHandler;Accepts:Any + Text;[def]; + MarkupTextLiteral - [23..24)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [24..25)::1 + MarkupTextLiteral - [24..25)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [27..27)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [27..28)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [28..28)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInAttributeValue_DoesNotThrow.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInAttributeValue_DoesNotThrow.cspans.txt new file mode 100644 index 0000000000..391706d146 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInAttributeValue_DoesNotThrow.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +Markup span at (2:0,2 [5] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [17] ) +Markup span at (7:0,7 [6] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [9] ) +Markup span at (13:0,13 [1] ) (Accepts:None) - Parent: Markup block at (13:0,13 [2] ) +Markup span at (14:0,14 [1] ) (Accepts:None) - Parent: Markup block at (13:0,13 [2] ) +Markup span at (15:0,15 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [9] ) +Markup span at (16:0,16 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [17] ) +Code span at (19:0,19 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [20] ) +MetaCode span at (19:0,19 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +Markup span at (20:0,20 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInAttributeValue_DoesNotThrow.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInAttributeValue_DoesNotThrow.stree.txt new file mode 100644 index 0000000000..aea355dd25 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInAttributeValue_DoesNotThrow.stree.txt @@ -0,0 +1,44 @@ +RazorDocument - [0..20)::20 - [@{}] + MarkupBlock - [0..20)::20 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..20)::20 + CSharpStatement - [0..20)::20 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..20)::19 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..19)::17 + MarkupBlock - [2..19)::17 + MarkupElement - [2..19)::17 + MarkupStartTag - [2..19)::17 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [7..16)::9 - [ foo='@@'] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [13..15)::2 + MarkupBlock - [13..15)::2 + MarkupTextLiteral - [13..14)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupEphemeralTextLiteral - [14..15)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupTextLiteral - [15..16)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [16..17)::1 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [19..19)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [19..20)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [20..20)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInEmail_DoesNotThrow.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInEmail_DoesNotThrow.cspans.txt new file mode 100644 index 0000000000..26e0bdca06 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInEmail_DoesNotThrow.cspans.txt @@ -0,0 +1,17 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [45] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [45] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [45] ) +Markup span at (2:0,2 [5] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [42] ) +Markup span at (7:0,7 [6] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [34] ) +Markup span at (13:0,13 [11] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [34] ) +Markup span at (24:0,24 [4] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [34] ) +Markup span at (28:0,28 [1] ) (Accepts:None) - Parent: Markup block at (28:0,28 [2] ) +Markup span at (29:0,29 [1] ) (Accepts:None) - Parent: Markup block at (28:0,28 [2] ) +Markup span at (30:0,30 [7] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [34] ) +Markup span at (37:0,37 [2] ) (Accepts:None) - Parent: Markup block at (37:0,37 [3] ) +Markup span at (39:0,39 [1] ) (Accepts:None) - Parent: Markup block at (37:0,37 [3] ) +Markup span at (40:0,40 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [34] ) +Markup span at (41:0,41 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [42] ) +Code span at (44:0,44 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [45] ) +MetaCode span at (44:0,44 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [45] ) +Markup span at (45:0,45 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [45] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInEmail_DoesNotThrow.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInEmail_DoesNotThrow.stree.txt new file mode 100644 index 0000000000..440b6e0f7b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInEmail_DoesNotThrow.stree.txt @@ -0,0 +1,61 @@ +RazorDocument - [0..45)::45 - [@{}] + MarkupBlock - [0..45)::45 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..45)::45 + CSharpStatement - [0..45)::45 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..45)::44 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..44)::42 + MarkupBlock - [2..44)::42 + MarkupElement - [2..44)::42 + MarkupStartTag - [2..44)::42 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [7..41)::34 - [ foo='abc@def.com abc@@def.com @@'] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [13..40)::27 + MarkupLiteralAttributeValue - [13..24)::11 - [abc@def.com] + MarkupTextLiteral - [13..24)::11 - [abc@def.com] - Gen - SpanEditHandler;Accepts:Any + Text;[abc@def.com]; + MarkupLiteralAttributeValue - [24..28)::4 - [ abc] + MarkupTextLiteral - [24..25)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [25..28)::3 - [abc] - Gen - SpanEditHandler;Accepts:Any + Text;[abc]; + MarkupBlock - [28..30)::2 + MarkupTextLiteral - [28..29)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupEphemeralTextLiteral - [29..30)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupLiteralAttributeValue - [30..37)::7 - [def.com] + MarkupTextLiteral - [30..37)::7 - [def.com] - Gen - SpanEditHandler;Accepts:Any + Text;[def.com]; + MarkupBlock - [37..40)::3 + MarkupTextLiteral - [37..39)::2 - [ @] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Transition;[@]; + MarkupEphemeralTextLiteral - [39..40)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupTextLiteral - [40..41)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [41..42)::1 + MarkupTextLiteral - [41..42)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [44..44)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [44..45)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [45..45)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInRegex_DoesNotThrow.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInRegex_DoesNotThrow.cspans.txt new file mode 100644 index 0000000000..bc10454e41 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInRegex_DoesNotThrow.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [118] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [118] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [118] ) +Markup span at (2:0,2 [5] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [115] ) +Markup span at (7:0,7 [6] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [107] ) +Markup span at (13:0,13 [32] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [107] ) +Markup span at (45:0,45 [1] ) (Accepts:None) - Parent: Markup block at (45:0,45 [2] ) +Markup span at (46:0,46 [1] ) (Accepts:None) - Parent: Markup block at (45:0,45 [2] ) +Markup span at (47:0,47 [66] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [107] ) +Markup span at (113:0,113 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [107] ) +Markup span at (114:0,114 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [115] ) +Code span at (117:0,117 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [118] ) +MetaCode span at (117:0,117 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [118] ) +Markup span at (118:0,118 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [118] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInRegex_DoesNotThrow.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInRegex_DoesNotThrow.stree.txt new file mode 100644 index 0000000000..071e88d493 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionInRegex_DoesNotThrow.stree.txt @@ -0,0 +1,92 @@ +RazorDocument - [0..118)::118 - [@{}] + MarkupBlock - [0..118)::118 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..118)::118 + CSharpStatement - [0..118)::118 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..118)::117 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..117)::115 + MarkupBlock - [2..117)::115 + MarkupElement - [2..117)::115 + MarkupStartTag - [2..117)::115 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [7..114)::107 - [ foo="/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@@[a-z0-9]([a-z0-9-]*[a-z0-9])?\.([a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [13..113)::100 + MarkupLiteralAttributeValue - [13..45)::32 - [/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+] + MarkupTextLiteral - [13..45)::32 - [/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+] - Gen - SpanEditHandler;Accepts:Any + ForwardSlash;[/]; + Text;[^]; + LeftBracket;[[]; + Text;[a-z0-9]; + Bang;[!]; + Text;[#$%&]; + SingleQuote;[']; + Text;[*+\]; + ForwardSlash;[/]; + Equals;[=]; + QuestionMark;[?]; + Text;[^_`{|}~.-]; + RightBracket;[]]; + Text;[+]; + MarkupBlock - [45..47)::2 + MarkupTextLiteral - [45..46)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupEphemeralTextLiteral - [46..47)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupLiteralAttributeValue - [47..113)::66 - [[a-z0-9]([a-z0-9-]*[a-z0-9])?\.([a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i] + MarkupTextLiteral - [47..113)::66 - [[a-z0-9]([a-z0-9-]*[a-z0-9])?\.([a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i] - Gen - SpanEditHandler;Accepts:Any + LeftBracket;[[]; + Text;[a-z0-9]; + RightBracket;[]]; + Text;[(]; + LeftBracket;[[]; + Text;[a-z0-9-]; + RightBracket;[]]; + Text;[*]; + LeftBracket;[[]; + Text;[a-z0-9]; + RightBracket;[]]; + Text;[)]; + QuestionMark;[?]; + Text;[\.(]; + LeftBracket;[[]; + Text;[a-z0-9]; + RightBracket;[]]; + Text;[(]; + LeftBracket;[[]; + Text;[a-z0-9-]; + RightBracket;[]]; + Text;[*]; + LeftBracket;[[]; + Text;[a-z0-9]; + RightBracket;[]]; + Text;[)]; + QuestionMark;[?]; + Text;[)*$]; + ForwardSlash;[/]; + Text;[i]; + MarkupTextLiteral - [113..114)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [114..115)::1 + MarkupTextLiteral - [114..115)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [117..117)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [117..118)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [118..118)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionWithExpressionBlock_DoesNotThrow.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionWithExpressionBlock_DoesNotThrow.cspans.txt new file mode 100644 index 0000000000..cac77c7065 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionWithExpressionBlock_DoesNotThrow.cspans.txt @@ -0,0 +1,47 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [121] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [121] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [121] ) +Markup span at (2:0,2 [5] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [118] ) +Markup span at (7:0,7 [6] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [15] ) +Markup span at (13:0,13 [1] ) (Accepts:None) - Parent: Markup block at (13:0,13 [2] ) +Markup span at (14:0,14 [1] ) (Accepts:None) - Parent: Markup block at (13:0,13 [2] ) +Markup span at (15:0,15 [0] ) (Accepts:Any) - Parent: Markup block at (15:0,15 [6] ) +Transition span at (15:0,15 [1] ) (Accepts:None) - Parent: Expression block at (15:0,15 [6] ) +MetaCode span at (16:0,16 [1] ) (Accepts:None) - Parent: Expression block at (15:0,15 [6] ) +Code span at (17:0,17 [3] ) (Accepts:Any) - Parent: Expression block at (15:0,15 [6] ) +MetaCode span at (20:0,20 [1] ) (Accepts:None) - Parent: Expression block at (15:0,15 [6] ) +Markup span at (21:0,21 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [15] ) +Markup span at (22:0,22 [6] ) (Accepts:Any) - Parent: Markup block at (22:0,22 [28] ) +Transition span at (28:0,28 [1] ) (Accepts:None) - Parent: Expression block at (28:0,28 [6] ) +MetaCode span at (29:0,29 [1] ) (Accepts:None) - Parent: Expression block at (28:0,28 [6] ) +Code span at (30:0,30 [3] ) (Accepts:Any) - Parent: Expression block at (28:0,28 [6] ) +MetaCode span at (33:0,33 [1] ) (Accepts:None) - Parent: Expression block at (28:0,28 [6] ) +Markup span at (34:0,34 [1] ) (Accepts:None) - Parent: Markup block at (34:0,34 [2] ) +Markup span at (35:0,35 [1] ) (Accepts:None) - Parent: Markup block at (34:0,34 [2] ) +Markup span at (36:0,36 [0] ) (Accepts:Any) - Parent: Markup block at (36:0,36 [13] ) +Transition span at (36:0,36 [1] ) (Accepts:None) - Parent: Expression block at (36:0,36 [13] ) +Code span at (37:0,37 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (36:0,36 [13] ) +Markup span at (49:0,49 [1] ) (Accepts:Any) - Parent: Markup block at (22:0,22 [28] ) +Markup span at (50:0,50 [6] ) (Accepts:Any) - Parent: Markup block at (50:0,50 [22] ) +Transition span at (56:0,56 [1] ) (Accepts:None) - Parent: Expression block at (56:0,56 [13] ) +Code span at (57:0,57 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (56:0,56 [13] ) +Markup span at (69:0,69 [1] ) (Accepts:None) - Parent: Markup block at (69:0,69 [2] ) +Markup span at (70:0,70 [1] ) (Accepts:None) - Parent: Markup block at (69:0,69 [2] ) +Markup span at (71:0,71 [1] ) (Accepts:Any) - Parent: Markup block at (50:0,50 [22] ) +Markup span at (72:0,72 [6] ) (Accepts:Any) - Parent: Markup block at (72:0,72 [23] ) +Transition span at (78:0,78 [1] ) (Accepts:None) - Parent: Expression block at (78:0,78 [13] ) +Code span at (79:0,79 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (78:0,78 [13] ) +Markup span at (91:0,91 [2] ) (Accepts:None) - Parent: Markup block at (91:0,91 [3] ) +Markup span at (93:0,93 [1] ) (Accepts:None) - Parent: Markup block at (91:0,91 [3] ) +Markup span at (94:0,94 [1] ) (Accepts:Any) - Parent: Markup block at (72:0,72 [23] ) +Markup span at (95:0,95 [6] ) (Accepts:Any) - Parent: Markup block at (95:0,95 [22] ) +Markup span at (101:0,101 [1] ) (Accepts:None) - Parent: Markup block at (101:0,101 [2] ) +Markup span at (102:0,102 [1] ) (Accepts:None) - Parent: Markup block at (101:0,101 [2] ) +Markup span at (103:0,103 [0] ) (Accepts:Any) - Parent: Markup block at (103:0,103 [13] ) +Transition span at (103:0,103 [1] ) (Accepts:None) - Parent: Expression block at (103:0,103 [13] ) +Code span at (104:0,104 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (103:0,103 [13] ) +Markup span at (116:0,116 [1] ) (Accepts:Any) - Parent: Markup block at (95:0,95 [22] ) +Markup span at (117:0,117 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [118] ) +Code span at (120:0,120 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [121] ) +MetaCode span at (120:0,120 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [121] ) +Markup span at (121:0,121 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [121] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionWithExpressionBlock_DoesNotThrow.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionWithExpressionBlock_DoesNotThrow.stree.txt new file mode 100644 index 0000000000..06b8e19b9b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransitionWithExpressionBlock_DoesNotThrow.stree.txt @@ -0,0 +1,195 @@ +RazorDocument - [0..121)::121 - [@{}] + MarkupBlock - [0..121)::121 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..121)::121 + CSharpStatement - [0..121)::121 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..121)::120 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..120)::118 + MarkupBlock - [2..120)::118 + MarkupElement - [2..120)::118 + MarkupStartTag - [2..120)::118 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [7..22)::15 - [ foo='@@@(2+3)'] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [13..21)::8 + MarkupBlock - [13..15)::2 + MarkupTextLiteral - [13..14)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupEphemeralTextLiteral - [14..15)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupDynamicAttributeValue - [15..21)::6 - [@(2+3)] + GenericBlock - [15..21)::6 + MarkupTextLiteral - [15..15)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [15..21)::6 + CSharpExplicitExpression - [15..21)::6 + CSharpTransition - [15..16)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [16..21)::5 + RazorMetaCode - [16..17)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [17..20)::3 + CSharpExpressionLiteral - [17..20)::3 - [2+3] - Gen - SpanEditHandler;Accepts:Any + IntegerLiteral;[2]; + Plus;[+]; + IntegerLiteral;[3]; + RazorMetaCode - [20..21)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + MarkupTextLiteral - [21..22)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [22..50)::28 - [ bar='@(2+3)@@@DateTime.Now'] + MarkupTextLiteral - [22..23)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [23..26)::3 - [bar] - Gen - SpanEditHandler;Accepts:Any + Text;[bar]; + Equals;[=]; + MarkupTextLiteral - [27..28)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [28..49)::21 + MarkupDynamicAttributeValue - [28..34)::6 - [@(2+3)] + GenericBlock - [28..34)::6 + CSharpCodeBlock - [28..34)::6 + CSharpExplicitExpression - [28..34)::6 + CSharpTransition - [28..29)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [29..34)::5 + RazorMetaCode - [29..30)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [30..33)::3 + CSharpExpressionLiteral - [30..33)::3 - [2+3] - Gen - SpanEditHandler;Accepts:Any + IntegerLiteral;[2]; + Plus;[+]; + IntegerLiteral;[3]; + RazorMetaCode - [33..34)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + MarkupBlock - [34..36)::2 + MarkupTextLiteral - [34..35)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupEphemeralTextLiteral - [35..36)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupDynamicAttributeValue - [36..49)::13 - [@DateTime.Now] + GenericBlock - [36..49)::13 + MarkupTextLiteral - [36..36)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [36..49)::13 + CSharpImplicitExpression - [36..49)::13 + CSharpTransition - [36..37)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [37..49)::12 + CSharpCodeBlock - [37..49)::12 + CSharpExpressionLiteral - [37..49)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [49..50)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [50..72)::22 - [ baz='@DateTime.Now@@'] + MarkupTextLiteral - [50..51)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [51..54)::3 - [baz] - Gen - SpanEditHandler;Accepts:Any + Text;[baz]; + Equals;[=]; + MarkupTextLiteral - [55..56)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [56..71)::15 + MarkupDynamicAttributeValue - [56..69)::13 - [@DateTime.Now] + GenericBlock - [56..69)::13 + CSharpCodeBlock - [56..69)::13 + CSharpImplicitExpression - [56..69)::13 + CSharpTransition - [56..57)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [57..69)::12 + CSharpCodeBlock - [57..69)::12 + CSharpExpressionLiteral - [57..69)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupBlock - [69..71)::2 + MarkupTextLiteral - [69..70)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupEphemeralTextLiteral - [70..71)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupTextLiteral - [71..72)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [72..95)::23 - [ bat='@DateTime.Now @@'] + MarkupTextLiteral - [72..73)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [73..76)::3 - [bat] - Gen - SpanEditHandler;Accepts:Any + Text;[bat]; + Equals;[=]; + MarkupTextLiteral - [77..78)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [78..94)::16 + MarkupDynamicAttributeValue - [78..91)::13 - [@DateTime.Now] + GenericBlock - [78..91)::13 + CSharpCodeBlock - [78..91)::13 + CSharpImplicitExpression - [78..91)::13 + CSharpTransition - [78..79)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [79..91)::12 + CSharpCodeBlock - [79..91)::12 + CSharpExpressionLiteral - [79..91)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupBlock - [91..94)::3 + MarkupTextLiteral - [91..93)::2 - [ @] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Transition;[@]; + MarkupEphemeralTextLiteral - [93..94)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupTextLiteral - [94..95)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [95..117)::22 - [ zoo='@@@DateTime.Now'] + MarkupTextLiteral - [95..96)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [96..99)::3 - [zoo] - Gen - SpanEditHandler;Accepts:Any + Text;[zoo]; + Equals;[=]; + MarkupTextLiteral - [100..101)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [101..116)::15 + MarkupBlock - [101..103)::2 + MarkupTextLiteral - [101..102)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupEphemeralTextLiteral - [102..103)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupDynamicAttributeValue - [103..116)::13 - [@DateTime.Now] + GenericBlock - [103..116)::13 + MarkupTextLiteral - [103..103)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [103..116)::13 + CSharpImplicitExpression - [103..116)::13 + CSharpTransition - [103..104)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [104..116)::12 + CSharpCodeBlock - [104..116)::12 + CSharpExpressionLiteral - [104..116)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [116..117)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [117..118)::1 + MarkupTextLiteral - [117..118)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [120..120)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [120..121)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [121..121)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransition_EndOfFile_Throws.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransition_EndOfFile_Throws.cspans.txt new file mode 100644 index 0000000000..833ee8ad8a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransition_EndOfFile_Throws.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [15] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [15] ) +Markup span at (2:0,2 [5] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [13] ) +Markup span at (7:0,7 [6] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [8] ) +Markup span at (13:0,13 [1] ) (Accepts:None) - Parent: Markup block at (13:0,13 [2] ) +Markup span at (14:0,14 [1] ) (Accepts:None) - Parent: Markup block at (13:0,13 [2] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransition_EndOfFile_Throws.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransition_EndOfFile_Throws.diag.txt new file mode 100644 index 0000000000..69a6b33a62 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransition_EndOfFile_Throws.diag.txt @@ -0,0 +1,2 @@ +(1,4): Error RZ1024: End of file or an unexpected character was reached before the "span" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                    ") or have matching end tags ("

                    Hello

                    "). If you intended to display a "<" character, use the "<" HTML entity. +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransition_EndOfFile_Throws.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransition_EndOfFile_Throws.stree.txt new file mode 100644 index 0000000000..56adc1414b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithDoubleTransition_EndOfFile_Throws.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..15)::15 - [@{ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [7..15)::8 - [ foo='@@] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [13..15)::2 + MarkupBlock - [13..15)::2 + MarkupTextLiteral - [13..14)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupEphemeralTextLiteral - [14..15)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CloseAngle;[]; + RazorMetaCode - [15..15)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithUnexpectedTransitionsInAttributeValue_Throws.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithUnexpectedTransitionsInAttributeValue_Throws.cspans.txt new file mode 100644 index 0000000000..00335db4a8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithUnexpectedTransitionsInAttributeValue_Throws.cspans.txt @@ -0,0 +1,15 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Markup span at (2:0,2 [5] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [18] ) +Markup span at (7:0,7 [6] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [10] ) +Transition span at (13:0,13 [1] ) (Accepts:None) - Parent: Expression block at (13:0,13 [1] ) +Code span at (14:0,14 [0] ) (Accepts:NonWhitespace) - Parent: Expression block at (13:0,13 [1] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [2] ) +Transition span at (15:0,15 [1] ) (Accepts:None) - Parent: Expression block at (15:0,15 [1] ) +Code span at (16:0,16 [0] ) (Accepts:NonWhitespace) - Parent: Expression block at (15:0,15 [1] ) +Markup span at (16:0,16 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [10] ) +Markup span at (17:0,17 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [18] ) +Code span at (20:0,20 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [21] ) +MetaCode span at (20:0,20 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Markup span at (21:0,21 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithUnexpectedTransitionsInAttributeValue_Throws.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithUnexpectedTransitionsInAttributeValue_Throws.diag.txt new file mode 100644 index 0000000000..4f60a724cf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithUnexpectedTransitionsInAttributeValue_Throws.diag.txt @@ -0,0 +1,2 @@ +(1,15): Error RZ1003: A space or line break was encountered after the "@" character. Only valid identifiers, keywords, comments, "(" and "{" are valid at the start of a code block and they must occur immediately following "@" with no space in between. +(1,17): Error RZ1005: "' />}" is not valid at the start of a code block. Only identifiers, keywords, comments, "(" and "{" are valid. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithUnexpectedTransitionsInAttributeValue_Throws.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithUnexpectedTransitionsInAttributeValue_Throws.stree.txt new file mode 100644 index 0000000000..c724b78d64 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpBlockTest/WithUnexpectedTransitionsInAttributeValue_Throws.stree.txt @@ -0,0 +1,61 @@ +RazorDocument - [0..21)::21 - [@{}] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..21)::21 + CSharpStatement - [0..21)::21 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..21)::20 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..20)::18 + MarkupBlock - [2..20)::18 + MarkupElement - [2..20)::18 + MarkupStartTag - [2..20)::18 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [7..17)::10 - [ foo='@ @'] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [13..16)::3 + MarkupDynamicAttributeValue - [13..14)::1 - [@] + GenericBlock - [13..14)::1 + CSharpCodeBlock - [13..14)::1 + CSharpImplicitExpression - [13..14)::1 + CSharpTransition - [13..14)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [14..14)::0 + CSharpCodeBlock - [14..14)::0 + CSharpExpressionLiteral - [14..14)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Marker;[]; + MarkupDynamicAttributeValue - [14..16)::2 - [ @] + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + GenericBlock - [15..16)::1 + CSharpCodeBlock - [15..16)::1 + CSharpImplicitExpression - [15..16)::1 + CSharpTransition - [15..16)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [16..16)::0 + CSharpCodeBlock - [16..16)::0 + CSharpExpressionLiteral - [16..16)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Marker;[]; + MarkupTextLiteral - [16..17)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [17..18)::1 + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [20..20)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [20..21)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CapturesWhitespaceToEOLInInvalidUsingStmtAndTreatsAsFileCode.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CapturesWhitespaceToEOLInInvalidUsingStmtAndTreatsAsFileCode.cspans.txt new file mode 100644 index 0000000000..e0217056a7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CapturesWhitespaceToEOLInInvalidUsingStmtAndTreatsAsFileCode.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [18] ) +Code span at (1:0,1 [17] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [18] ) +Markup span at (18:1,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CapturesWhitespaceToEOLInInvalidUsingStmtAndTreatsAsFileCode.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CapturesWhitespaceToEOLInInvalidUsingStmtAndTreatsAsFileCode.stree.txt new file mode 100644 index 0000000000..813ee4da1e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CapturesWhitespaceToEOLInInvalidUsingStmtAndTreatsAsFileCode.stree.txt @@ -0,0 +1,13 @@ +RazorDocument - [0..20)::20 - [@using LFLF] + MarkupBlock - [0..20)::20 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..18)::18 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..18)::17 - [using LF] - Gen - SpanEditHandler;Accepts:Any + Keyword;[using]; + Whitespace;[ ]; + NewLine;[LF]; + MarkupTextLiteral - [18..20)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyHandlesInCorrectTransitionsIfImplicitExpressionParensUnclosed.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyHandlesInCorrectTransitionsIfImplicitExpressionParensUnclosed.cspans.txt new file mode 100644 index 0000000000..d1b305fbf1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyHandlesInCorrectTransitionsIfImplicitExpressionParensUnclosed.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [8] ) +Code span at (1:0,1 [7] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [8] ) +Markup span at (8:1,0 [4] ) (Accepts:Any) - Parent: Tag block at (8:1,0 [4] ) +Transition span at (12:1,4 [1] ) (Accepts:None) - Parent: Expression block at (12:1,4 [14] ) +Code span at (13:1,5 [13] ) (Accepts:NonWhitespace) - Parent: Expression block at (12:1,4 [14] ) +Markup span at (26:1,18 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) +Markup span at (27:1,19 [5] ) (Accepts:Any) - Parent: Tag block at (27:1,19 [5] ) +Markup span at (32:1,24 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyHandlesInCorrectTransitionsIfImplicitExpressionParensUnclosed.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyHandlesInCorrectTransitionsIfImplicitExpressionParensUnclosed.diag.txt new file mode 100644 index 0000000000..6cb7c82385 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyHandlesInCorrectTransitionsIfImplicitExpressionParensUnclosed.diag.txt @@ -0,0 +1 @@ +(1,6): Error RZ1027: An opening "(" is missing the corresponding closing ")". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyHandlesInCorrectTransitionsIfImplicitExpressionParensUnclosed.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyHandlesInCorrectTransitionsIfImplicitExpressionParensUnclosed.stree.txt new file mode 100644 index 0000000000..e576a17c44 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyHandlesInCorrectTransitionsIfImplicitExpressionParensUnclosed.stree.txt @@ -0,0 +1,41 @@ +RazorDocument - [0..34)::34 - [@Href(LF

                    @Html.Foo(Bar);

                    LF] + MarkupBlock - [0..34)::34 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + CSharpImplicitExpression - [0..8)::8 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..8)::7 + CSharpCodeBlock - [1..8)::7 + CSharpExpressionLiteral - [1..8)::7 - [Href(LF] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[Href]; + LeftParenthesis;[(]; + NewLine;[LF]; + MarkupElement - [8..32)::24 + MarkupStartTag - [8..12)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[h1]; + CloseAngle;[>]; + CSharpCodeBlock - [12..26)::14 + CSharpImplicitExpression - [12..26)::14 + CSharpTransition - [12..13)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [13..26)::13 + CSharpCodeBlock - [13..26)::13 + CSharpExpressionLiteral - [13..26)::13 - [Html.Foo(Bar)] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[Html]; + Dot;[.]; + Identifier;[Foo]; + LeftParenthesis;[(]; + Identifier;[Bar]; + RightParenthesis;[)]; + MarkupTextLiteral - [26..27)::1 - [;] - Gen - SpanEditHandler;Accepts:Any + Text;[;]; + MarkupEndTag - [27..32)::5 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[h1]; + CloseAngle;[>]; + MarkupTextLiteral - [32..34)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesAtSignInDelimitedBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesAtSignInDelimitedBlock.cspans.txt new file mode 100644 index 0000000000..1ee270f4e4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesAtSignInDelimitedBlock.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [47] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [47] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [47] ) +Code span at (2:0,2 [44] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [47] ) +MetaCode span at (46:0,46 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [47] ) +Markup span at (47:0,47 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [47] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesAtSignInDelimitedBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesAtSignInDelimitedBlock.stree.txt new file mode 100644 index 0000000000..5825be2c7b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesAtSignInDelimitedBlock.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..47)::47 - [@(Request["description"] ?? @photo.Description)] + MarkupBlock - [0..47)::47 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..47)::47 + CSharpExplicitExpression - [0..47)::47 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [1..47)::46 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [2..46)::44 + CSharpExpressionLiteral - [2..46)::44 - [Request["description"] ?? @photo.Description] - Gen - SpanEditHandler;Accepts:Any + Identifier;[Request]; + LeftBracket;[[]; + StringLiteral;["description"]; + RightBracket;[]]; + Whitespace;[ ]; + NullCoalesce;[??]; + Whitespace;[ ]; + Transition;[@]; + Identifier;[photo]; + Dot;[.]; + Identifier;[Description]; + RazorMetaCode - [46..47)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + MarkupTextLiteral - [47..47)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesMarkupIncorrectyAssumedToBeWithinAStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesMarkupIncorrectyAssumedToBeWithinAStatement.cspans.txt new file mode 100644 index 0000000000..c8c6ac23dc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesMarkupIncorrectyAssumedToBeWithinAStatement.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [65] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [65] ) +Code span at (1:0,1 [43] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [65] ) +Markup span at (44:2,4 [3] ) (Accepts:None) - Parent: Tag block at (44:2,4 [3] ) +Markup span at (47:2,7 [7] ) (Accepts:Any) - Parent: Markup block at (44:2,4 [20] ) +Transition span at (54:2,14 [1] ) (Accepts:None) - Parent: Expression block at (54:2,14 [4] ) +Code span at (55:2,15 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (54:2,14 [4] ) +Markup span at (58:2,18 [4] ) (Accepts:None) - Parent: Tag block at (58:2,18 [4] ) +Markup span at (62:2,22 [2] ) (Accepts:None) - Parent: Markup block at (44:2,4 [20] ) +Code span at (64:3,0 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [65] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesMarkupIncorrectyAssumedToBeWithinAStatement.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesMarkupIncorrectyAssumedToBeWithinAStatement.diag.txt new file mode 100644 index 0000000000..749c29cf56 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesMarkupIncorrectyAssumedToBeWithinAStatement.diag.txt @@ -0,0 +1 @@ +(2,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. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesMarkupIncorrectyAssumedToBeWithinAStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesMarkupIncorrectyAssumedToBeWithinAStatement.stree.txt new file mode 100644 index 0000000000..57d38b45fc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyParsesMarkupIncorrectyAssumedToBeWithinAStatement.stree.txt @@ -0,0 +1,53 @@ +RazorDocument - [0..65)::65 - [@if(foo) {LF var foo = "foo bar bazLF

                    Foo is @foo

                    LF}] + MarkupBlock - [0..65)::65 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..65)::65 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..44)::43 - [if(foo) {LF var foo = "foo bar bazLF ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["foo bar baz];RZ1000(26:1,14 [1] ) + NewLine;[LF]; + Whitespace;[ ]; + MarkupBlock - [44..64)::20 + MarkupElement - [44..62)::18 + MarkupStartTag - [44..47)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [47..54)::7 - [Foo is ] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + Text;[is]; + Whitespace;[ ]; + CSharpCodeBlock - [54..58)::4 + CSharpImplicitExpression - [54..58)::4 + CSharpTransition - [54..55)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [55..58)::3 + CSharpCodeBlock - [55..58)::3 + CSharpExpressionLiteral - [55..58)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupEndTag - [58..62)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [62..64)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [64..65)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyRecoversFromMissingCloseParenInExpressionWithinCode.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyRecoversFromMissingCloseParenInExpressionWithinCode.cspans.txt new file mode 100644 index 0000000000..7faf3199b1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyRecoversFromMissingCloseParenInExpressionWithinCode.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [30] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [30] ) +Code span at (2:0,2 [14] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [30] ) +Markup span at (16:0,16 [6] ) (Accepts:None) - Parent: Tag block at (16:0,16 [6] ) +Markup span at (22:0,22 [7] ) (Accepts:None) - Parent: Tag block at (22:0,22 [7] ) +Code span at (29:0,29 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [30] ) +MetaCode span at (29:0,29 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [30] ) +Markup span at (30:0,30 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyRecoversFromMissingCloseParenInExpressionWithinCode.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyRecoversFromMissingCloseParenInExpressionWithinCode.diag.txt new file mode 100644 index 0000000000..b356fede3b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyRecoversFromMissingCloseParenInExpressionWithinCode.diag.txt @@ -0,0 +1 @@ +(1,16): Error RZ1027: An opening "(" is missing the corresponding closing ")". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyRecoversFromMissingCloseParenInExpressionWithinCode.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyRecoversFromMissingCloseParenInExpressionWithinCode.stree.txt new file mode 100644 index 0000000000..96792af995 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/CorrectlyRecoversFromMissingCloseParenInExpressionWithinCode.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..30)::30 - [@{string.Format(}] + MarkupBlock - [0..30)::30 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..30)::30 + CSharpStatement - [0..30)::30 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..30)::29 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..29)::27 + CSharpStatementLiteral - [2..16)::14 - [string.Format(] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Keyword;[string]; + Dot;[.]; + Identifier;[Format]; + LeftParenthesis;[(]; + MarkupBlock - [16..29)::13 + MarkupElement - [16..29)::13 + MarkupStartTag - [16..22)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[html]; + CloseAngle;[>]; + MarkupEndTag - [22..29)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[html]; + CloseAngle;[>]; + CSharpStatementLiteral - [29..29)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [29..30)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [30..30)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/HandlesQuotesAfterTransition.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/HandlesQuotesAfterTransition.cspans.txt new file mode 100644 index 0000000000..d06a3a71b6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/HandlesQuotesAfterTransition.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [2] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [1] ) +Code span at (1:0,1 [0] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [1] ) +Markup span at (1:0,1 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [2] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/HandlesQuotesAfterTransition.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/HandlesQuotesAfterTransition.diag.txt new file mode 100644 index 0000000000..0179da5b14 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/HandlesQuotesAfterTransition.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1005: """ is not valid at the start of a code block. Only identifiers, keywords, comments, "(" and "{" are valid. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/HandlesQuotesAfterTransition.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/HandlesQuotesAfterTransition.stree.txt new file mode 100644 index 0000000000..585e50aec9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/HandlesQuotesAfterTransition.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..2)::2 - [@"] + MarkupBlock - [0..2)::2 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..1)::1 + CSharpImplicitExpression - [0..1)::1 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..1)::0 + CSharpCodeBlock - [1..1)::0 + CSharpExpressionLiteral - [1..1)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Marker;[]; + MarkupTextLiteral - [1..2)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/IncludesUnexpectedCharacterInSingleStatementControlFlowStatementError.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/IncludesUnexpectedCharacterInSingleStatementControlFlowStatementError.cspans.txt new file mode 100644 index 0000000000..4607de5bf4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/IncludesUnexpectedCharacterInSingleStatementControlFlowStatementError.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +Code span at (1:0,1 [9] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [10] ) +Markup span at (10:0,10 [18] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/IncludesUnexpectedCharacterInSingleStatementControlFlowStatementError.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/IncludesUnexpectedCharacterInSingleStatementControlFlowStatementError.diag.txt new file mode 100644 index 0000000000..37ec018710 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/IncludesUnexpectedCharacterInSingleStatementControlFlowStatementError.diag.txt @@ -0,0 +1,10 @@ +(1,9): Error RZ1008: Expected a "{" but found a ")". Block statements must be enclosed in "{" and "}". You cannot use single-statement control-flow statements in CSHTML pages. For example, the following is not allowed: + +@if(isLoggedIn) +

                    Hello, @user

                    + +Instead, wrap the contents of the block in "{}": + +@if(isLoggedIn) { +

                    Hello, @user

                    +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/IncludesUnexpectedCharacterInSingleStatementControlFlowStatementError.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/IncludesUnexpectedCharacterInSingleStatementControlFlowStatementError.stree.txt new file mode 100644 index 0000000000..ee3891e335 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/IncludesUnexpectedCharacterInSingleStatementControlFlowStatementError.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..28)::28 - [@if(foo)) { var bar = foo; }] + MarkupBlock - [0..28)::28 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..10)::10 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..10)::9 - [if(foo)) ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + RightParenthesis;[)]; + Whitespace;[ ]; + MarkupTextLiteral - [10..28)::18 - [{ var bar = foo; }] - Gen - SpanEditHandler;Accepts:Any + Text;[{]; + Whitespace;[ ]; + Text;[var]; + Whitespace;[ ]; + Text;[bar]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[foo;]; + Whitespace;[ ]; + Text;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsOpenCurlyAsCodeSpanIfEofFoundAfterOpenCurlyBrace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsOpenCurlyAsCodeSpanIfEofFoundAfterOpenCurlyBrace.cspans.txt new file mode 100644 index 0000000000..5f99762a70 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsOpenCurlyAsCodeSpanIfEofFoundAfterOpenCurlyBrace.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [2] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [2] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [2] ) +Code span at (2:0,2 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [2] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsOpenCurlyAsCodeSpanIfEofFoundAfterOpenCurlyBrace.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsOpenCurlyAsCodeSpanIfEofFoundAfterOpenCurlyBrace.diag.txt new file mode 100644 index 0000000000..1ced8c1b88 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsOpenCurlyAsCodeSpanIfEofFoundAfterOpenCurlyBrace.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsOpenCurlyAsCodeSpanIfEofFoundAfterOpenCurlyBrace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsOpenCurlyAsCodeSpanIfEofFoundAfterOpenCurlyBrace.stree.txt new file mode 100644 index 0000000000..4a57c97b59 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsOpenCurlyAsCodeSpanIfEofFoundAfterOpenCurlyBrace.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..2)::2 - [@{] + MarkupBlock - [0..2)::2 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..2)::2 + CSharpStatement - [0..2)::2 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..2)::1 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..2)::0 + CSharpStatementLiteral - [2..2)::0 - [] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[}];AtEOL + Marker;[]; + RazorMetaCode - [2..2)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsZeroLengthCodeSpanIfStatementBlockEmpty.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsZeroLengthCodeSpanIfStatementBlockEmpty.cspans.txt new file mode 100644 index 0000000000..48059498d2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsZeroLengthCodeSpanIfStatementBlockEmpty.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [3] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [3] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [3] ) +Code span at (2:0,2 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [3] ) +MetaCode span at (2:0,2 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [3] ) +Markup span at (3:0,3 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsZeroLengthCodeSpanIfStatementBlockEmpty.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsZeroLengthCodeSpanIfStatementBlockEmpty.stree.txt new file mode 100644 index 0000000000..0c76b47c33 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodOutputsZeroLengthCodeSpanIfStatementBlockEmpty.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..3)::3 - [@{}] + MarkupBlock - [0..3)::3 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..3)::3 + CSharpStatement - [0..3)::3 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..3)::2 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..2)::0 + CSharpStatementLiteral - [2..2)::0 - [] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Marker;[]; + RazorMetaCode - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [3..3)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodParsesNothingIfFirstCharacterIsNotIdentifierStartOrParenOrBrace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodParsesNothingIfFirstCharacterIsNotIdentifierStartOrParenOrBrace.cspans.txt new file mode 100644 index 0000000000..31bcda0391 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodParsesNothingIfFirstCharacterIsNotIdentifierStartOrParenOrBrace.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [4] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [1] ) +Code span at (1:0,1 [0] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [1] ) +Markup span at (1:0,1 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodParsesNothingIfFirstCharacterIsNotIdentifierStartOrParenOrBrace.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodParsesNothingIfFirstCharacterIsNotIdentifierStartOrParenOrBrace.diag.txt new file mode 100644 index 0000000000..84fe5838bb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodParsesNothingIfFirstCharacterIsNotIdentifierStartOrParenOrBrace.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1005: "!" is not valid at the start of a code block. Only identifiers, keywords, comments, "(" and "{" are valid. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodParsesNothingIfFirstCharacterIsNotIdentifierStartOrParenOrBrace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodParsesNothingIfFirstCharacterIsNotIdentifierStartOrParenOrBrace.stree.txt new file mode 100644 index 0000000000..80bf05811c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodParsesNothingIfFirstCharacterIsNotIdentifierStartOrParenOrBrace.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..4)::4 - [@!!!] + MarkupBlock - [0..4)::4 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..1)::1 + CSharpImplicitExpression - [0..1)::1 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..1)::0 + CSharpCodeBlock - [1..1)::0 + CSharpExpressionLiteral - [1..1)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Marker;[]; + MarkupTextLiteral - [1..4)::3 - [!!!] - Gen - SpanEditHandler;Accepts:Any + Bang;[!]; + Bang;[!]; + Bang;[!]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfEOFAfterTransitionInEmbeddedExpression.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfEOFAfterTransitionInEmbeddedExpression.cspans.txt new file mode 100644 index 0000000000..609209cd3d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfEOFAfterTransitionInEmbeddedExpression.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [9] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [9] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [9] ) +Code span at (2:0,2 [6] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [9] ) +Transition span at (8:1,4 [1] ) (Accepts:None) - Parent: Expression block at (8:1,4 [1] ) +Code span at (9:1,5 [0] ) (Accepts:NonWhitespace) - Parent: Expression block at (8:1,4 [1] ) +Code span at (9:1,5 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfEOFAfterTransitionInEmbeddedExpression.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfEOFAfterTransitionInEmbeddedExpression.diag.txt new file mode 100644 index 0000000000..5611de1939 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfEOFAfterTransitionInEmbeddedExpression.diag.txt @@ -0,0 +1,2 @@ +(2,6): Error RZ1004: End-of-file was found after the "@" character. "@" must be followed by a valid code block. If you want to output an "@", escape it using the sequence: "@@" +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfEOFAfterTransitionInEmbeddedExpression.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfEOFAfterTransitionInEmbeddedExpression.stree.txt new file mode 100644 index 0000000000..7d98cc9690 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfEOFAfterTransitionInEmbeddedExpression.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..9)::9 - [@{LF @] + MarkupBlock - [0..9)::9 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..9)::9 + CSharpStatement - [0..9)::9 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..9)::8 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..9)::7 + CSharpStatementLiteral - [2..8)::6 - [LF ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[}];AtEOL + NewLine;[LF]; + Whitespace;[ ]; + CSharpCodeBlock - [8..9)::1 + CSharpImplicitExpression - [8..9)::1 + CSharpTransition - [8..9)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [9..9)::0 + CSharpCodeBlock - [9..9)::0 + CSharpExpressionLiteral - [9..9)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[ATD];K14 + Marker;[]; + CSharpStatementLiteral - [9..9)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [9..9)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfNewlineFollowsTransition.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfNewlineFollowsTransition.cspans.txt new file mode 100644 index 0000000000..ab0be729ee --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfNewlineFollowsTransition.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [3] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [1] ) +Code span at (1:0,1 [0] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [1] ) +Markup span at (1:0,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfNewlineFollowsTransition.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfNewlineFollowsTransition.diag.txt new file mode 100644 index 0000000000..1a4e7725a4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfNewlineFollowsTransition.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1003: A space or line break was encountered after the "@" character. Only valid identifiers, keywords, comments, "(" and "{" are valid at the start of a code block and they must occur immediately following "@" with no space in between. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfNewlineFollowsTransition.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfNewlineFollowsTransition.stree.txt new file mode 100644 index 0000000000..178b2eab31 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfNewlineFollowsTransition.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..3)::3 - [@LF] + MarkupBlock - [0..3)::3 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..1)::1 + CSharpImplicitExpression - [0..1)::1 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..1)::0 + CSharpCodeBlock - [1..1)::0 + CSharpExpressionLiteral - [1..1)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Marker;[]; + MarkupTextLiteral - [1..3)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfWhitespaceBetweenTransitionAndBlockStartInEmbeddedExpr.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfWhitespaceBetweenTransitionAndBlockStartInEmbeddedExpr.cspans.txt new file mode 100644 index 0000000000..4b4aec9b7b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfWhitespaceBetweenTransitionAndBlockStartInEmbeddedExpr.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [17] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [17] ) +Code span at (2:0,2 [6] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [17] ) +Transition span at (8:1,4 [1] ) (Accepts:None) - Parent: Expression block at (8:1,4 [1] ) +Code span at (9:1,5 [0] ) (Accepts:NonWhitespace) - Parent: Expression block at (8:1,4 [1] ) +Code span at (9:1,5 [7] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [17] ) +MetaCode span at (16:2,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [17] ) +Markup span at (17:2,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfWhitespaceBetweenTransitionAndBlockStartInEmbeddedExpr.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfWhitespaceBetweenTransitionAndBlockStartInEmbeddedExpr.diag.txt new file mode 100644 index 0000000000..a8f6dc0930 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfWhitespaceBetweenTransitionAndBlockStartInEmbeddedExpr.diag.txt @@ -0,0 +1 @@ +(2,6): Error RZ1003: A space or line break was encountered after the "@" character. Only valid identifiers, keywords, comments, "(" and "{" are valid at the start of a code block and they must occur immediately following "@" with no space in between. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfWhitespaceBetweenTransitionAndBlockStartInEmbeddedExpr.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfWhitespaceBetweenTransitionAndBlockStartInEmbeddedExpr.stree.txt new file mode 100644 index 0000000000..5dbe63612f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/MethodProducesErrorIfWhitespaceBetweenTransitionAndBlockStartInEmbeddedExpr.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..17)::17 - [@{LF @ {}LF}] + MarkupBlock - [0..17)::17 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..17)::17 + CSharpStatement - [0..17)::17 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..17)::16 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..16)::14 + CSharpStatementLiteral - [2..8)::6 - [LF ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + Whitespace;[ ]; + CSharpCodeBlock - [8..9)::1 + CSharpImplicitExpression - [8..9)::1 + CSharpTransition - [8..9)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [9..9)::0 + CSharpCodeBlock - [9..9)::0 + CSharpExpressionLiteral - [9..9)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[ATD];K14 + Marker;[]; + CSharpStatementLiteral - [9..16)::7 - [ {}LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + LeftBrace;[{]; + RightBrace;[}]; + NewLine;[LF]; + RazorMetaCode - [16..17)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [17..17)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/OutputsErrorIfAtSignFollowedByLessThanSignAtStatementStart.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/OutputsErrorIfAtSignFollowedByLessThanSignAtStatementStart.cspans.txt new file mode 100644 index 0000000000..448f2a72aa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/OutputsErrorIfAtSignFollowedByLessThanSignAtStatementStart.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +Code span at (1:0,1 [9] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [24] ) +Markup span at (10:0,10 [1] ) (Accepts:Any) - Parent: Markup block at (10:0,10 [13] ) +Transition span at (11:0,11 [1] ) (Accepts:None) - Parent: Markup block at (10:0,10 [13] ) +Markup span at (12:0,12 [3] ) (Accepts:None) - Parent: Tag block at (12:0,12 [3] ) +Markup span at (15:0,15 [3] ) (Accepts:Any) - Parent: Markup block at (10:0,10 [13] ) +Markup span at (18:0,18 [4] ) (Accepts:None) - Parent: Tag block at (18:0,18 [4] ) +Markup span at (22:0,22 [1] ) (Accepts:None) - Parent: Markup block at (10:0,10 [13] ) +Code span at (23:0,23 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [24] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/OutputsErrorIfAtSignFollowedByLessThanSignAtStatementStart.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/OutputsErrorIfAtSignFollowedByLessThanSignAtStatementStart.diag.txt new file mode 100644 index 0000000000..ef1b3502c5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/OutputsErrorIfAtSignFollowedByLessThanSignAtStatementStart.diag.txt @@ -0,0 +1,5 @@ +(1,12): Error RZ1009: The "@" character must be followed by a ":", "(", or a C# identifier. If you intended to switch to markup, use an HTML start tag, for example: + +@if(isLoggedIn) { +

                    Hello, @user!

                    +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/OutputsErrorIfAtSignFollowedByLessThanSignAtStatementStart.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/OutputsErrorIfAtSignFollowedByLessThanSignAtStatementStart.stree.txt new file mode 100644 index 0000000000..a60288cf5a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/OutputsErrorIfAtSignFollowedByLessThanSignAtStatementStart.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..24)::24 - [@if(foo) { @

                    Bar

                    }] + MarkupBlock - [0..24)::24 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..24)::24 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..10)::9 - [if(foo) {] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [10..23)::13 + MarkupTextLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTransition - [11..12)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [12..22)::10 + MarkupStartTag - [12..15)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [15..18)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupEndTag - [18..22)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [22..23)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [23..24)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfCatchBlockUnterminatedAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfCatchBlockUnterminatedAtEOF.cspans.txt new file mode 100644 index 0000000000..c989a85034 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfCatchBlockUnterminatedAtEOF.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [71] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [71] ) +Code span at (1:0,1 [70] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [71] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfCatchBlockUnterminatedAtEOF.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfCatchBlockUnterminatedAtEOF.diag.txt new file mode 100644 index 0000000000..f6ab309156 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfCatchBlockUnterminatedAtEOF.diag.txt @@ -0,0 +1 @@ +(1,17): Error RZ1006: The catch block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfCatchBlockUnterminatedAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfCatchBlockUnterminatedAtEOF.stree.txt new file mode 100644 index 0000000000..50d37af8cc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfCatchBlockUnterminatedAtEOF.stree.txt @@ -0,0 +1,53 @@ +RazorDocument - [0..71)::71 - [@try { baz(); } catch(Foo) { var foo = bar; if(foo != null) { bar(); } ] + MarkupBlock - [0..71)::71 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..71)::71 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..71)::70 - [try { baz(); } catch(Foo) { var foo = bar; if(foo != null) { bar(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + NotEqual;[!=]; + Whitespace;[ ]; + Keyword;[null]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfClassBlockUnterminatedAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfClassBlockUnterminatedAtEOF.cspans.txt new file mode 100644 index 0000000000..229a40e9e5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfClassBlockUnterminatedAtEOF.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [55] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [55] ) +MetaCode span at (1:0,1 [9] ) (Accepts:None) - Parent: Directive block at (0:0,0 [55] ) +None span at (10:0,10 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [55] ) +MetaCode span at (11:0,11 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [55] ) +Code span at (12:0,12 [43] ) (Accepts:Any) - Parent: Directive block at (0:0,0 [55] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfClassBlockUnterminatedAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfClassBlockUnterminatedAtEOF.stree.txt new file mode 100644 index 0000000000..5cadb1566b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfClassBlockUnterminatedAtEOF.stree.txt @@ -0,0 +1,48 @@ +RazorDocument - [0..55)::55 - [@functions { var foo = bar; if(foo != null) { bar(); } ] + MarkupBlock - [0..55)::55 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..55)::55 + RazorDirective - [0..55)::55 - Directive:{functions;CodeBlock;Unrestricted} [RZ1006(11:0,11 [1] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..55)::54 + RazorMetaCode - [1..10)::9 - Gen - SpanEditHandler;Accepts:None + Identifier;[functions]; + CSharpCodeBlock - [10..55)::45 + UnclassifiedTextLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [11..12)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[}];AtEnd + LeftBrace;[{]; + CSharpCodeBlock - [12..55)::43 + CSharpStatementLiteral - [12..55)::43 - [ var foo = bar; if(foo != null) { bar(); } ] - Gen - CodeBlockEditHandler;Accepts:Any;CodeBlock + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + NotEqual;[!=]; + Whitespace;[ ]; + Keyword;[null]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RazorMetaCode - [55..55)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfDoBlockUnterminatedAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfDoBlockUnterminatedAtEOF.cspans.txt new file mode 100644 index 0000000000..0e6427508a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfDoBlockUnterminatedAtEOF.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [48] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [48] ) +Code span at (1:0,1 [47] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [48] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfDoBlockUnterminatedAtEOF.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfDoBlockUnterminatedAtEOF.diag.txt new file mode 100644 index 0000000000..3edd08db12 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfDoBlockUnterminatedAtEOF.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The do block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfDoBlockUnterminatedAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfDoBlockUnterminatedAtEOF.stree.txt new file mode 100644 index 0000000000..f7c8702df0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfDoBlockUnterminatedAtEOF.stree.txt @@ -0,0 +1,39 @@ +RazorDocument - [0..48)::48 - [@do { var foo = bar; if(foo != null) { bar(); } ] + MarkupBlock - [0..48)::48 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..48)::48 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..48)::47 - [do { var foo = bar; if(foo != null) { bar(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + NotEqual;[!=]; + Whitespace;[ ]; + Keyword;[null]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseBlockUnterminatedAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseBlockUnterminatedAtEOF.cspans.txt new file mode 100644 index 0000000000..2812db06fe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseBlockUnterminatedAtEOF.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [69] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [69] ) +Code span at (1:0,1 [68] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [69] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseBlockUnterminatedAtEOF.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseBlockUnterminatedAtEOF.diag.txt new file mode 100644 index 0000000000..1304e018e3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseBlockUnterminatedAtEOF.diag.txt @@ -0,0 +1 @@ +(1,21): Error RZ1006: The else block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseBlockUnterminatedAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseBlockUnterminatedAtEOF.stree.txt new file mode 100644 index 0000000000..4d6a99b223 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseBlockUnterminatedAtEOF.stree.txt @@ -0,0 +1,53 @@ +RazorDocument - [0..69)::69 - [@if(foo) { baz(); } else { var foo = bar; if(foo != null) { bar(); } ] + MarkupBlock - [0..69)::69 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..69)::69 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..69)::68 - [if(foo) { baz(); } else { var foo = bar; if(foo != null) { bar(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + NotEqual;[!=]; + Whitespace;[ ]; + Keyword;[null]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseIfBlockUnterminatedAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseIfBlockUnterminatedAtEOF.cspans.txt new file mode 100644 index 0000000000..a0e62028ce --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseIfBlockUnterminatedAtEOF.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [72] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [72] ) +Code span at (1:0,1 [71] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [72] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseIfBlockUnterminatedAtEOF.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseIfBlockUnterminatedAtEOF.diag.txt new file mode 100644 index 0000000000..d936a1e08f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseIfBlockUnterminatedAtEOF.diag.txt @@ -0,0 +1 @@ +(1,21): Error RZ1006: The else if block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseIfBlockUnterminatedAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseIfBlockUnterminatedAtEOF.stree.txt new file mode 100644 index 0000000000..bea3035aeb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfElseIfBlockUnterminatedAtEOF.stree.txt @@ -0,0 +1,55 @@ +RazorDocument - [0..72)::72 - [@if(foo) { baz(); } else if { var foo = bar; if(foo != null) { bar(); } ] + MarkupBlock - [0..72)::72 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..72)::72 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..72)::71 - [if(foo) { baz(); } else if { var foo = bar; if(foo != null) { bar(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + NotEqual;[!=]; + Whitespace;[ ]; + Keyword;[null]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfExplicitCodeBlockUnterminatedAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfExplicitCodeBlockUnterminatedAtEOF.cspans.txt new file mode 100644 index 0000000000..7ce34a75dc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfExplicitCodeBlockUnterminatedAtEOF.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [45] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [45] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [45] ) +Code span at (2:0,2 [43] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [45] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfExplicitCodeBlockUnterminatedAtEOF.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfExplicitCodeBlockUnterminatedAtEOF.diag.txt new file mode 100644 index 0000000000..1ced8c1b88 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfExplicitCodeBlockUnterminatedAtEOF.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfExplicitCodeBlockUnterminatedAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfExplicitCodeBlockUnterminatedAtEOF.stree.txt new file mode 100644 index 0000000000..9f3ebb874b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfExplicitCodeBlockUnterminatedAtEOF.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..45)::45 - [@{ var foo = bar; if(foo != null) { bar(); } ] + MarkupBlock - [0..45)::45 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..45)::45 + CSharpStatement - [0..45)::45 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..45)::44 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..45)::43 + CSharpStatementLiteral - [2..45)::43 - [ var foo = bar; if(foo != null) { bar(); } ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[}];AtEOL + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + NotEqual;[!=]; + Whitespace;[ ]; + Keyword;[null]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RazorMetaCode - [45..45)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfFinallyBlockUnterminatedAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfFinallyBlockUnterminatedAtEOF.cspans.txt new file mode 100644 index 0000000000..efb98ce332 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfFinallyBlockUnterminatedAtEOF.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [68] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [68] ) +Code span at (1:0,1 [67] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [68] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfFinallyBlockUnterminatedAtEOF.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfFinallyBlockUnterminatedAtEOF.diag.txt new file mode 100644 index 0000000000..c4ee5afb66 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfFinallyBlockUnterminatedAtEOF.diag.txt @@ -0,0 +1 @@ +(1,17): Error RZ1006: The finally block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfFinallyBlockUnterminatedAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfFinallyBlockUnterminatedAtEOF.stree.txt new file mode 100644 index 0000000000..7ce1b48905 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfFinallyBlockUnterminatedAtEOF.stree.txt @@ -0,0 +1,50 @@ +RazorDocument - [0..68)::68 - [@try { baz(); } finally { var foo = bar; if(foo != null) { bar(); } ] + MarkupBlock - [0..68)::68 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..68)::68 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..68)::67 - [try { baz(); } finally { var foo = bar; if(foo != null) { bar(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[baz]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[finally]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + NotEqual;[!=]; + Whitespace;[ ]; + Keyword;[null]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForBlockUnterminatedAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForBlockUnterminatedAtEOF.cspans.txt new file mode 100644 index 0000000000..5c2cb28925 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForBlockUnterminatedAtEOF.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [55] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [55] ) +Code span at (1:0,1 [54] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [55] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForBlockUnterminatedAtEOF.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForBlockUnterminatedAtEOF.diag.txt new file mode 100644 index 0000000000..2b762aec63 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForBlockUnterminatedAtEOF.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The for block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForBlockUnterminatedAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForBlockUnterminatedAtEOF.stree.txt new file mode 100644 index 0000000000..205adf9089 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForBlockUnterminatedAtEOF.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..55)::55 - [@for (foo) { var foo = bar; if(foo != null) { bar(); } ] + MarkupBlock - [0..55)::55 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..55)::55 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..55)::54 - [for (foo) { var foo = bar; if(foo != null) { bar(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[for]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + NotEqual;[!=]; + Whitespace;[ ]; + Keyword;[null]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForeachBlockUnterminatedAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForeachBlockUnterminatedAtEOF.cspans.txt new file mode 100644 index 0000000000..1c6ed575ff --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForeachBlockUnterminatedAtEOF.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [59] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [59] ) +Code span at (1:0,1 [58] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [59] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForeachBlockUnterminatedAtEOF.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForeachBlockUnterminatedAtEOF.diag.txt new file mode 100644 index 0000000000..06bf6f2dca --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForeachBlockUnterminatedAtEOF.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The foreach block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForeachBlockUnterminatedAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForeachBlockUnterminatedAtEOF.stree.txt new file mode 100644 index 0000000000..0572c5b99d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfForeachBlockUnterminatedAtEOF.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..59)::59 - [@foreach (foo) { var foo = bar; if(foo != null) { bar(); } ] + MarkupBlock - [0..59)::59 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..59)::59 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..59)::58 - [foreach (foo) { var foo = bar; if(foo != null) { bar(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[foreach]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + NotEqual;[!=]; + Whitespace;[ ]; + Keyword;[null]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfIfBlockUnterminatedAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfIfBlockUnterminatedAtEOF.cspans.txt new file mode 100644 index 0000000000..c6237e0e8a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfIfBlockUnterminatedAtEOF.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [54] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [54] ) +Code span at (1:0,1 [53] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [54] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfIfBlockUnterminatedAtEOF.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfIfBlockUnterminatedAtEOF.diag.txt new file mode 100644 index 0000000000..2742101ffc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfIfBlockUnterminatedAtEOF.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The if block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfIfBlockUnterminatedAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfIfBlockUnterminatedAtEOF.stree.txt new file mode 100644 index 0000000000..aa89143967 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfIfBlockUnterminatedAtEOF.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..54)::54 - [@if (foo) { var foo = bar; if(foo != null) { bar(); } ] + MarkupBlock - [0..54)::54 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..54)::54 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..54)::53 - [if (foo) { var foo = bar; if(foo != null) { bar(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + NotEqual;[!=]; + Whitespace;[ ]; + Keyword;[null]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfLockBlockUnterminatedAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfLockBlockUnterminatedAtEOF.cspans.txt new file mode 100644 index 0000000000..3ac1ad9b09 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfLockBlockUnterminatedAtEOF.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [56] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [56] ) +Code span at (1:0,1 [55] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [56] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfLockBlockUnterminatedAtEOF.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfLockBlockUnterminatedAtEOF.diag.txt new file mode 100644 index 0000000000..08db663674 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfLockBlockUnterminatedAtEOF.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The lock block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfLockBlockUnterminatedAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfLockBlockUnterminatedAtEOF.stree.txt new file mode 100644 index 0000000000..759e96286c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfLockBlockUnterminatedAtEOF.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..56)::56 - [@lock (foo) { var foo = bar; if(foo != null) { bar(); } ] + MarkupBlock - [0..56)::56 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..56)::56 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..56)::55 - [lock (foo) { var foo = bar; if(foo != null) { bar(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[lock]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + NotEqual;[!=]; + Whitespace;[ ]; + Keyword;[null]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfSwitchBlockUnterminatedAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfSwitchBlockUnterminatedAtEOF.cspans.txt new file mode 100644 index 0000000000..e601a12186 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfSwitchBlockUnterminatedAtEOF.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [58] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [58] ) +Code span at (1:0,1 [57] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [58] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfSwitchBlockUnterminatedAtEOF.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfSwitchBlockUnterminatedAtEOF.diag.txt new file mode 100644 index 0000000000..65ca04a2b2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfSwitchBlockUnterminatedAtEOF.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The switch block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfSwitchBlockUnterminatedAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfSwitchBlockUnterminatedAtEOF.stree.txt new file mode 100644 index 0000000000..a54583efbf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfSwitchBlockUnterminatedAtEOF.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..58)::58 - [@switch (foo) { var foo = bar; if(foo != null) { bar(); } ] + MarkupBlock - [0..58)::58 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..58)::58 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..58)::57 - [switch (foo) { var foo = bar; if(foo != null) { bar(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[switch]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + NotEqual;[!=]; + Whitespace;[ ]; + Keyword;[null]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfTryBlockUnterminatedAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfTryBlockUnterminatedAtEOF.cspans.txt new file mode 100644 index 0000000000..ee11c5c511 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfTryBlockUnterminatedAtEOF.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [49] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [49] ) +Code span at (1:0,1 [48] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [49] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfTryBlockUnterminatedAtEOF.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfTryBlockUnterminatedAtEOF.diag.txt new file mode 100644 index 0000000000..1b9bc8df7f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfTryBlockUnterminatedAtEOF.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The try block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfTryBlockUnterminatedAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfTryBlockUnterminatedAtEOF.stree.txt new file mode 100644 index 0000000000..7c5b8b4d7d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfTryBlockUnterminatedAtEOF.stree.txt @@ -0,0 +1,39 @@ +RazorDocument - [0..49)::49 - [@try { var foo = bar; if(foo != null) { bar(); } ] + MarkupBlock - [0..49)::49 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..49)::49 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..49)::48 - [try { var foo = bar; if(foo != null) { bar(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + NotEqual;[!=]; + Whitespace;[ ]; + Keyword;[null]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfUsingBlockUnterminatedAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfUsingBlockUnterminatedAtEOF.cspans.txt new file mode 100644 index 0000000000..160fbdc681 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfUsingBlockUnterminatedAtEOF.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [57] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [57] ) +Code span at (1:0,1 [56] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [57] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfUsingBlockUnterminatedAtEOF.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfUsingBlockUnterminatedAtEOF.diag.txt new file mode 100644 index 0000000000..1a15e5d491 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfUsingBlockUnterminatedAtEOF.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The using block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfUsingBlockUnterminatedAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfUsingBlockUnterminatedAtEOF.stree.txt new file mode 100644 index 0000000000..82d612293e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfUsingBlockUnterminatedAtEOF.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..57)::57 - [@using (foo) { var foo = bar; if(foo != null) { bar(); } ] + MarkupBlock - [0..57)::57 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..57)::57 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..57)::56 - [using (foo) { var foo = bar; if(foo != null) { bar(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[using]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + NotEqual;[!=]; + Whitespace;[ ]; + Keyword;[null]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfWhileBlockUnterminatedAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfWhileBlockUnterminatedAtEOF.cspans.txt new file mode 100644 index 0000000000..160fbdc681 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfWhileBlockUnterminatedAtEOF.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [57] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [57] ) +Code span at (1:0,1 [56] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [57] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfWhileBlockUnterminatedAtEOF.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfWhileBlockUnterminatedAtEOF.diag.txt new file mode 100644 index 0000000000..8eb38d8911 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfWhileBlockUnterminatedAtEOF.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The while block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfWhileBlockUnterminatedAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfWhileBlockUnterminatedAtEOF.stree.txt new file mode 100644 index 0000000000..fc413e23b1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ReportsErrorIfWhileBlockUnterminatedAtEOF.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..57)::57 - [@while (foo) { var foo = bar; if(foo != null) { bar(); } ] + MarkupBlock - [0..57)::57 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..57)::57 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..57)::56 - [while (foo) { var foo = bar; if(foo != null) { bar(); } ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[while]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + NotEqual;[!=]; + Whitespace;[ ]; + Keyword;[null]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/RequiresControlFlowStatementsToHaveBraces.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/RequiresControlFlowStatementsToHaveBraces.cspans.txt new file mode 100644 index 0000000000..ab58e6a89e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/RequiresControlFlowStatementsToHaveBraces.cspans.txt @@ -0,0 +1,17 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [59] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [59] ) +Code span at (1:0,1 [8] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [59] ) +Markup span at (9:0,9 [3] ) (Accepts:None) - Parent: Tag block at (9:0,9 [3] ) +Markup span at (12:0,12 [3] ) (Accepts:Any) - Parent: Markup block at (9:0,9 [11] ) +Markup span at (15:0,15 [4] ) (Accepts:None) - Parent: Tag block at (15:0,15 [4] ) +Markup span at (19:0,19 [1] ) (Accepts:None) - Parent: Markup block at (9:0,9 [11] ) +Code span at (20:0,20 [13] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [59] ) +Markup span at (33:0,33 [3] ) (Accepts:None) - Parent: Tag block at (33:0,33 [3] ) +Markup span at (36:0,36 [3] ) (Accepts:Any) - Parent: Markup block at (33:0,33 [11] ) +Markup span at (39:0,39 [4] ) (Accepts:None) - Parent: Tag block at (39:0,39 [4] ) +Markup span at (43:0,43 [1] ) (Accepts:None) - Parent: Markup block at (33:0,33 [11] ) +Code span at (44:0,44 [5] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [59] ) +Markup span at (49:0,49 [3] ) (Accepts:None) - Parent: Tag block at (49:0,49 [3] ) +Markup span at (52:0,52 [3] ) (Accepts:Any) - Parent: Markup block at (49:0,49 [10] ) +Markup span at (55:0,55 [4] ) (Accepts:None) - Parent: Tag block at (55:0,55 [4] ) +Code span at (59:0,59 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [59] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/RequiresControlFlowStatementsToHaveBraces.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/RequiresControlFlowStatementsToHaveBraces.diag.txt new file mode 100644 index 0000000000..afc72ddf95 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/RequiresControlFlowStatementsToHaveBraces.diag.txt @@ -0,0 +1,30 @@ +(1,10): Error RZ1008: Expected a "{" but found a "<". Block statements must be enclosed in "{" and "}". You cannot use single-statement control-flow statements in CSHTML pages. For example, the following is not allowed: + +@if(isLoggedIn) +

                    Hello, @user

                    + +Instead, wrap the contents of the block in "{}": + +@if(isLoggedIn) { +

                    Hello, @user

                    +} +(1,34): Error RZ1008: Expected a "{" but found a "<". Block statements must be enclosed in "{" and "}". You cannot use single-statement control-flow statements in CSHTML pages. For example, the following is not allowed: + +@if(isLoggedIn) +

                    Hello, @user

                    + +Instead, wrap the contents of the block in "{}": + +@if(isLoggedIn) { +

                    Hello, @user

                    +} +(1,50): Error RZ1008: Expected a "{" but found a "<". Block statements must be enclosed in "{" and "}". You cannot use single-statement control-flow statements in CSHTML pages. For example, the following is not allowed: + +@if(isLoggedIn) +

                    Hello, @user

                    + +Instead, wrap the contents of the block in "{}": + +@if(isLoggedIn) { +

                    Hello, @user

                    +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/RequiresControlFlowStatementsToHaveBraces.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/RequiresControlFlowStatementsToHaveBraces.stree.txt new file mode 100644 index 0000000000..8d4a69e823 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/RequiresControlFlowStatementsToHaveBraces.stree.txt @@ -0,0 +1,69 @@ +RazorDocument - [0..59)::59 - [@if(foo)

                    Bar

                    else if(bar)

                    Baz

                    else

                    Boz

                    ] + MarkupBlock - [0..59)::59 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..59)::59 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..9)::8 - [if(foo) ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + MarkupBlock - [9..20)::11 + MarkupElement - [9..19)::10 + MarkupStartTag - [9..12)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [12..15)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupEndTag - [15..19)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [20..33)::13 - [else if(bar) ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + MarkupBlock - [33..44)::11 + MarkupElement - [33..43)::10 + MarkupStartTag - [33..36)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [36..39)::3 - [Baz] - Gen - SpanEditHandler;Accepts:Any + Text;[Baz]; + MarkupEndTag - [39..43)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [43..44)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [44..49)::5 - [else ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[else]; + Whitespace;[ ]; + MarkupBlock - [49..59)::10 + MarkupElement - [49..59)::10 + MarkupStartTag - [49..52)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [52..55)::3 - [Boz] - Gen - SpanEditHandler;Accepts:Any + Text;[Boz]; + MarkupEndTag - [55..59)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [59..59)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ResumesIfStatementAfterOpenParen.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ResumesIfStatementAfterOpenParen.cspans.txt new file mode 100644 index 0000000000..326a340872 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ResumesIfStatementAfterOpenParen.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +Code span at (1:0,1 [11] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [25] ) +Markup span at (12:1,6 [1] ) (Accepts:Any) - Parent: Markup block at (12:1,6 [12] ) +Markup span at (13:1,7 [3] ) (Accepts:None) - Parent: Tag block at (13:1,7 [3] ) +Markup span at (16:1,10 [3] ) (Accepts:Any) - Parent: Markup block at (12:1,6 [12] ) +Markup span at (19:1,13 [4] ) (Accepts:None) - Parent: Tag block at (19:1,13 [4] ) +Markup span at (23:1,17 [1] ) (Accepts:None) - Parent: Markup block at (12:1,6 [12] ) +Code span at (24:1,18 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +Markup span at (25:1,19 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ResumesIfStatementAfterOpenParen.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ResumesIfStatementAfterOpenParen.diag.txt new file mode 100644 index 0000000000..a08a836e65 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ResumesIfStatementAfterOpenParen.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ1027: An opening "(" is missing the corresponding closing ")". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ResumesIfStatementAfterOpenParen.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ResumesIfStatementAfterOpenParen.stree.txt new file mode 100644 index 0000000000..15e925d411 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ResumesIfStatementAfterOpenParen.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..25)::25 - [@if(LFelse {

                    Foo

                    }] + MarkupBlock - [0..25)::25 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..25)::25 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..12)::11 - [if(LFelse {] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + NewLine;[LF]; + Keyword;[else]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [12..24)::12 + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [13..23)::10 + MarkupStartTag - [13..16)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [16..19)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [19..23)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [24..25)::1 - [}] - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [25..25)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfBracketInImplicitExpressionUnclosed.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfBracketInImplicitExpressionUnclosed.cspans.txt new file mode 100644 index 0000000000..ac4d17eea7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfBracketInImplicitExpressionUnclosed.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [23] ) +Code span at (1:0,1 [22] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfBracketInImplicitExpressionUnclosed.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfBracketInImplicitExpressionUnclosed.diag.txt new file mode 100644 index 0000000000..5df09fd668 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfBracketInImplicitExpressionUnclosed.diag.txt @@ -0,0 +1 @@ +(1,5): Error RZ1027: An opening "[" is missing the corresponding closing "]". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfBracketInImplicitExpressionUnclosed.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfBracketInImplicitExpressionUnclosed.stree.txt new file mode 100644 index 0000000000..aaccbd8bc2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfBracketInImplicitExpressionUnclosed.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..23)::23 - [@Foo[Bar[Baz]LFBizLFBoz] + MarkupBlock - [0..23)::23 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..23)::23 + CSharpImplicitExpression - [0..23)::23 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..23)::22 + CSharpCodeBlock - [1..23)::22 + CSharpExpressionLiteral - [1..23)::22 - [Foo[Bar[Baz]LFBizLFBoz] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[Foo]; + LeftBracket;[[]; + Identifier;[Bar]; + LeftBracket;[[]; + Identifier;[Baz]; + RightBracket;[]]; + NewLine;[LF]; + Identifier;[Biz]; + NewLine;[LF]; + Identifier;[Boz]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfIfParenInExplicitExprUnclosed.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfIfParenInExplicitExprUnclosed.cspans.txt new file mode 100644 index 0000000000..65434a2d4c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfIfParenInExplicitExprUnclosed.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [14] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [14] ) +Code span at (2:0,2 [12] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [14] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfIfParenInExplicitExprUnclosed.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfIfParenInExplicitExprUnclosed.diag.txt new file mode 100644 index 0000000000..0b063402e6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfIfParenInExplicitExprUnclosed.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The explicit expression block is missing a closing ")" character. Make sure you have a matching ")" character for all the "(" characters within this block, and that none of the ")" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfIfParenInExplicitExprUnclosed.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfIfParenInExplicitExprUnclosed.stree.txt new file mode 100644 index 0000000000..1780ed95e9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfIfParenInExplicitExprUnclosed.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..14)::14 - [@(foo barLFbaz] + MarkupBlock - [0..14)::14 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..14)::14 + CSharpExplicitExpression - [0..14)::14 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [1..14)::13 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [2..14)::12 + CSharpExpressionLiteral - [2..14)::12 - [foo barLFbaz] - Gen - SpanEditHandler;Accepts:Any + Identifier;[foo]; + Whitespace;[ ]; + Identifier;[bar]; + NewLine;[LF]; + Identifier;[baz]; + RazorMetaCode - [14..14)::0 - Gen - SpanEditHandler;Accepts:Any + RightParenthesis;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfParenInImplicitExprUnclosed.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfParenInImplicitExprUnclosed.cspans.txt new file mode 100644 index 0000000000..ac4d17eea7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfParenInImplicitExprUnclosed.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [23] ) +Code span at (1:0,1 [22] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfParenInImplicitExprUnclosed.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfParenInImplicitExprUnclosed.diag.txt new file mode 100644 index 0000000000..ade6c85b25 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfParenInImplicitExprUnclosed.diag.txt @@ -0,0 +1 @@ +(1,5): Error RZ1027: An opening "(" is missing the corresponding closing ")". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfParenInImplicitExprUnclosed.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfParenInImplicitExprUnclosed.stree.txt new file mode 100644 index 0000000000..13233f5339 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtEOFIfParenInImplicitExprUnclosed.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..23)::23 - [@Foo(Bar(Baz)LFBizLFBoz] + MarkupBlock - [0..23)::23 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..23)::23 + CSharpImplicitExpression - [0..23)::23 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..23)::22 + CSharpCodeBlock - [1..23)::22 + CSharpExpressionLiteral - [1..23)::22 - [Foo(Bar(Baz)LFBizLFBoz] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[Foo]; + LeftParenthesis;[(]; + Identifier;[Bar]; + LeftParenthesis;[(]; + Identifier;[Baz]; + RightParenthesis;[)]; + NewLine;[LF]; + Identifier;[Biz]; + NewLine;[LF]; + Identifier;[Boz]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfBracketInImplicitExprUnclosed.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfBracketInImplicitExprUnclosed.cspans.txt new file mode 100644 index 0000000000..fb4c14a8e8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfBracketInImplicitExprUnclosed.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [20] ) +Code span at (1:0,1 [19] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [20] ) +Markup span at (20:2,0 [3] ) (Accepts:Any) - Parent: Tag block at (20:2,0 [3] ) +Markup span at (23:2,3 [7] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) +Markup span at (30:4,0 [4] ) (Accepts:Any) - Parent: Tag block at (30:4,0 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfBracketInImplicitExprUnclosed.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfBracketInImplicitExprUnclosed.diag.txt new file mode 100644 index 0000000000..5df09fd668 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfBracketInImplicitExprUnclosed.diag.txt @@ -0,0 +1 @@ +(1,5): Error RZ1027: An opening "[" is missing the corresponding closing "]". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfBracketInImplicitExprUnclosed.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfBracketInImplicitExprUnclosed.stree.txt new file mode 100644 index 0000000000..d1f2934008 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfBracketInImplicitExprUnclosed.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..34)::34 - [@Foo[Bar[Baz]LFBizLFLFBozLF] + MarkupBlock - [0..34)::34 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..20)::20 + CSharpImplicitExpression - [0..20)::20 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..20)::19 + CSharpCodeBlock - [1..20)::19 + CSharpExpressionLiteral - [1..20)::19 - [Foo[Bar[Baz]LFBizLF] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[Foo]; + LeftBracket;[[]; + Identifier;[Bar]; + LeftBracket;[[]; + Identifier;[Baz]; + RightBracket;[]]; + NewLine;[LF]; + Identifier;[Biz]; + NewLine;[LF]; + MarkupElement - [20..34)::14 + MarkupStartTag - [20..23)::3 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[b]; + CloseAngle;[>]; + MarkupTextLiteral - [23..30)::7 - [LFBozLF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[Boz]; + NewLine;[LF]; + MarkupEndTag - [30..34)::4 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[b]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfIfParenInExplicitExprUnclosed.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfIfParenInExplicitExprUnclosed.cspans.txt new file mode 100644 index 0000000000..e7181851fb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfIfParenInExplicitExprUnclosed.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [11] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [11] ) +Code span at (2:0,2 [9] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [11] ) +Markup span at (11:1,0 [6] ) (Accepts:Any) - Parent: Tag block at (11:1,0 [6] ) +Markup span at (17:1,6 [7] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Markup span at (24:3,0 [6] ) (Accepts:Any) - Parent: Tag block at (24:3,0 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfIfParenInExplicitExprUnclosed.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfIfParenInExplicitExprUnclosed.diag.txt new file mode 100644 index 0000000000..0b063402e6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfIfParenInExplicitExprUnclosed.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The explicit expression block is missing a closing ")" character. Make sure you have a matching ")" character for all the "(" characters within this block, and that none of the ")" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfIfParenInExplicitExprUnclosed.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfIfParenInExplicitExprUnclosed.stree.txt new file mode 100644 index 0000000000..0698d6ddec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfIfParenInExplicitExprUnclosed.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..30)::30 - [@(foo barLFLFbazLF - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..11)::11 + CSharpExplicitExpression - [0..11)::11 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [1..11)::10 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [2..11)::9 + CSharpExpressionLiteral - [2..11)::9 - [foo barLF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[foo]; + Whitespace;[ ]; + Identifier;[bar]; + NewLine;[LF]; + RazorMetaCode - [11..11)::0 - Gen - SpanEditHandler;Accepts:Any + RightParenthesis;[]; + MarkupElement - [11..30)::19 + MarkupStartTag - [11..17)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[html]; + CloseAngle;[>]; + MarkupTextLiteral - [17..24)::7 - [LFbazLF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[baz]; + NewLine;[LF]; + MarkupEndTag - [24..30)::6 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[html]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfParenInImplicitExpressionUnclosed.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfParenInImplicitExpressionUnclosed.cspans.txt new file mode 100644 index 0000000000..0d8a457d26 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfParenInImplicitExpressionUnclosed.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [40] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [20] ) +Code span at (1:0,1 [19] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [20] ) +Markup span at (20:2,0 [6] ) (Accepts:Any) - Parent: Tag block at (20:2,0 [6] ) +Markup span at (26:2,6 [7] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [40] ) +Markup span at (33:4,0 [7] ) (Accepts:Any) - Parent: Tag block at (33:4,0 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfParenInImplicitExpressionUnclosed.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfParenInImplicitExpressionUnclosed.diag.txt new file mode 100644 index 0000000000..ade6c85b25 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfParenInImplicitExpressionUnclosed.diag.txt @@ -0,0 +1 @@ +(1,5): Error RZ1027: An opening "(" is missing the corresponding closing ")". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfParenInImplicitExpressionUnclosed.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfParenInImplicitExpressionUnclosed.stree.txt new file mode 100644 index 0000000000..bb1196c88e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/ShouldReportErrorAndTerminateAtMarkupIfParenInImplicitExpressionUnclosed.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..40)::40 - [@Foo(Bar(Baz)LFBizLFLFBozLF] + MarkupBlock - [0..40)::40 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..20)::20 + CSharpImplicitExpression - [0..20)::20 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..20)::19 + CSharpCodeBlock - [1..20)::19 + CSharpExpressionLiteral - [1..20)::19 - [Foo(Bar(Baz)LFBizLF] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[Foo]; + LeftParenthesis;[(]; + Identifier;[Bar]; + LeftParenthesis;[(]; + Identifier;[Baz]; + RightParenthesis;[)]; + NewLine;[LF]; + Identifier;[Biz]; + NewLine;[LF]; + MarkupElement - [20..40)::20 + MarkupStartTag - [20..26)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[html]; + CloseAngle;[>]; + MarkupTextLiteral - [26..33)::7 - [LFBozLF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[Boz]; + NewLine;[LF]; + MarkupEndTag - [33..40)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[html]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesForeachBlockAtEOLWhenRecoveringFromMissingCloseParen.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesForeachBlockAtEOLWhenRecoveringFromMissingCloseParen.cspans.txt new file mode 100644 index 0000000000..6e9d765553 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesForeachBlockAtEOLWhenRecoveringFromMissingCloseParen.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [18] ) +Code span at (1:0,1 [17] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [18] ) +Markup span at (18:1,0 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesForeachBlockAtEOLWhenRecoveringFromMissingCloseParen.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesForeachBlockAtEOLWhenRecoveringFromMissingCloseParen.diag.txt new file mode 100644 index 0000000000..a40df1a410 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesForeachBlockAtEOLWhenRecoveringFromMissingCloseParen.diag.txt @@ -0,0 +1 @@ +(1,9): Error RZ1027: An opening "(" is missing the corresponding closing ")". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesForeachBlockAtEOLWhenRecoveringFromMissingCloseParen.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesForeachBlockAtEOLWhenRecoveringFromMissingCloseParen.stree.txt new file mode 100644 index 0000000000..6e28bbcdf9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesForeachBlockAtEOLWhenRecoveringFromMissingCloseParen.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..21)::21 - [@foreach(foo barLFbaz] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..18)::18 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..18)::17 - [foreach(foo barLF] - Gen - SpanEditHandler;Accepts:Any + Keyword;[foreach]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + Identifier;[bar]; + NewLine;[LF]; + MarkupTextLiteral - [18..21)::3 - [baz] - Gen - SpanEditHandler;Accepts:Any + Text;[baz]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesIfBlockAtEOLWhenRecoveringFromMissingCloseParen.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesIfBlockAtEOLWhenRecoveringFromMissingCloseParen.cspans.txt new file mode 100644 index 0000000000..9ca26d65c8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesIfBlockAtEOLWhenRecoveringFromMissingCloseParen.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [13] ) +Code span at (1:0,1 [12] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [13] ) +Markup span at (13:1,0 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesIfBlockAtEOLWhenRecoveringFromMissingCloseParen.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesIfBlockAtEOLWhenRecoveringFromMissingCloseParen.diag.txt new file mode 100644 index 0000000000..a08a836e65 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesIfBlockAtEOLWhenRecoveringFromMissingCloseParen.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ1027: An opening "(" is missing the corresponding closing ")". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesIfBlockAtEOLWhenRecoveringFromMissingCloseParen.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesIfBlockAtEOLWhenRecoveringFromMissingCloseParen.stree.txt new file mode 100644 index 0000000000..581e95bb66 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesIfBlockAtEOLWhenRecoveringFromMissingCloseParen.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..16)::16 - [@if(foo barLFbaz] + MarkupBlock - [0..16)::16 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..13)::13 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..13)::12 - [if(foo barLF] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + Identifier;[bar]; + NewLine;[LF]; + MarkupTextLiteral - [13..16)::3 - [baz] - Gen - SpanEditHandler;Accepts:Any + Text;[baz]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalCSharpStringsAtEOLIfEndQuoteMissing.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalCSharpStringsAtEOLIfEndQuoteMissing.cspans.txt new file mode 100644 index 0000000000..451037e71b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalCSharpStringsAtEOLIfEndQuoteMissing.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +Code span at (1:0,1 [41] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [42] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalCSharpStringsAtEOLIfEndQuoteMissing.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalCSharpStringsAtEOLIfEndQuoteMissing.diag.txt new file mode 100644 index 0000000000..73d5e27b67 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalCSharpStringsAtEOLIfEndQuoteMissing.diag.txt @@ -0,0 +1 @@ +(2,13): 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. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalCSharpStringsAtEOLIfEndQuoteMissing.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalCSharpStringsAtEOLIfEndQuoteMissing.stree.txt new file mode 100644 index 0000000000..272bf0ce6f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalCSharpStringsAtEOLIfEndQuoteMissing.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..42)::42 - [@if(foo) {LF var p = "foo bar bazLF;LF}] + MarkupBlock - [0..42)::42 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..42)::42 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..42)::41 - [if(foo) {LF var p = "foo bar bazLF;LF}] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[p]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["foo bar baz];RZ1000(24:1,12 [1] ) + NewLine;[LF]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalStringAtEndOfFile.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalStringAtEndOfFile.cspans.txt new file mode 100644 index 0000000000..70b420119b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalStringAtEndOfFile.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +Code span at (1:0,1 [45] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [46] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalStringAtEndOfFile.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalStringAtEndOfFile.diag.txt new file mode 100644 index 0000000000..da5c70dd69 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalStringAtEndOfFile.diag.txt @@ -0,0 +1,2 @@ +(1,22): 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. +(1,2): Error RZ1006: The if block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalStringAtEndOfFile.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalStringAtEndOfFile.stree.txt new file mode 100644 index 0000000000..2116937472 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesNormalStringAtEndOfFile.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..46)::46 - [@if(foo) { var foo = "blah blah blah blah blah] + MarkupBlock - [0..46)::46 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..46)::46 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..46)::45 - [if(foo) { var foo = "blah blah blah blah blah] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["blah blah blah blah blah];RZ1000(21:0,21 [1] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesUsingBlockAtEOLWhenRecoveringFromMissingCloseParen.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesUsingBlockAtEOLWhenRecoveringFromMissingCloseParen.cspans.txt new file mode 100644 index 0000000000..baf2c5c1f8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesUsingBlockAtEOLWhenRecoveringFromMissingCloseParen.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [16] ) +Code span at (1:0,1 [15] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [16] ) +Markup span at (16:1,0 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesUsingBlockAtEOLWhenRecoveringFromMissingCloseParen.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesUsingBlockAtEOLWhenRecoveringFromMissingCloseParen.diag.txt new file mode 100644 index 0000000000..a8733967de --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesUsingBlockAtEOLWhenRecoveringFromMissingCloseParen.diag.txt @@ -0,0 +1 @@ +(1,7): Error RZ1027: An opening "(" is missing the corresponding closing ")". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesUsingBlockAtEOLWhenRecoveringFromMissingCloseParen.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesUsingBlockAtEOLWhenRecoveringFromMissingCloseParen.stree.txt new file mode 100644 index 0000000000..2d8984304f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesUsingBlockAtEOLWhenRecoveringFromMissingCloseParen.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..19)::19 - [@using(foo barLFbaz] + MarkupBlock - [0..19)::19 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..16)::16 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..16)::15 - [using(foo barLF] - Gen - SpanEditHandler;Accepts:Any + Keyword;[using]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + Identifier;[bar]; + NewLine;[LF]; + MarkupTextLiteral - [16..19)::3 - [baz] - Gen - SpanEditHandler;Accepts:Any + Text;[baz]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesVerbatimStringAtEndOfFile.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesVerbatimStringAtEndOfFile.cspans.txt new file mode 100644 index 0000000000..cd8e624ee1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesVerbatimStringAtEndOfFile.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [61] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [61] ) +Code span at (1:0,1 [60] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [61] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesVerbatimStringAtEndOfFile.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesVerbatimStringAtEndOfFile.diag.txt new file mode 100644 index 0000000000..da5c70dd69 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesVerbatimStringAtEndOfFile.diag.txt @@ -0,0 +1,2 @@ +(1,22): 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. +(1,2): Error RZ1006: The if block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesVerbatimStringAtEndOfFile.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesVerbatimStringAtEndOfFile.stree.txt new file mode 100644 index 0000000000..67afb3874b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesVerbatimStringAtEndOfFile.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..61)::61 - [@if(foo) { var foo = @"blah LFblah; LF

                    Foo

                    LFblah LFblah] + MarkupBlock - [0..61)::61 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..61)::61 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..61)::60 - [if(foo) { var foo = @"blah LFblah; LF

                    Foo

                    LFblah LFblah] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;[@"blah LFblah; LF

                    Foo

                    LFblah LFblah];RZ1000(21:0,21 [1] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesWhileClauseInDoStmtAtEOLWhenRecoveringFromMissingCloseParen.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesWhileClauseInDoStmtAtEOLWhenRecoveringFromMissingCloseParen.cspans.txt new file mode 100644 index 0000000000..afd9a6256e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesWhileClauseInDoStmtAtEOLWhenRecoveringFromMissingCloseParen.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Code span at (1:0,1 [22] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (23:1,0 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesWhileClauseInDoStmtAtEOLWhenRecoveringFromMissingCloseParen.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesWhileClauseInDoStmtAtEOLWhenRecoveringFromMissingCloseParen.diag.txt new file mode 100644 index 0000000000..0d2c452b13 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesWhileClauseInDoStmtAtEOLWhenRecoveringFromMissingCloseParen.diag.txt @@ -0,0 +1 @@ +(1,14): Error RZ1027: An opening "(" is missing the corresponding closing ")". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesWhileClauseInDoStmtAtEOLWhenRecoveringFromMissingCloseParen.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesWhileClauseInDoStmtAtEOLWhenRecoveringFromMissingCloseParen.stree.txt new file mode 100644 index 0000000000..01f031ed08 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/TerminatesWhileClauseInDoStmtAtEOLWhenRecoveringFromMissingCloseParen.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..26)::26 - [@do { } while(foo barLFbaz] + MarkupBlock - [0..26)::26 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..23)::23 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..23)::22 - [do { } while(foo barLF] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[while]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + Identifier;[bar]; + NewLine;[LF]; + MarkupTextLiteral - [23..26)::3 - [baz] - Gen - SpanEditHandler;Accepts:Any + Text;[baz]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithHelperDirectiveProducesError.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithHelperDirectiveProducesError.cspans.txt new file mode 100644 index 0000000000..e6cc0f0ab4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithHelperDirectiveProducesError.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [7] ) +Code span at (1:0,1 [6] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [7] ) +Markup span at (7:0,7 [14] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithHelperDirectiveProducesError.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithHelperDirectiveProducesError.diag.txt new file mode 100644 index 0000000000..dafdc8f2e9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithHelperDirectiveProducesError.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1002: The helper directive is not supported. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithHelperDirectiveProducesError.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithHelperDirectiveProducesError.stree.txt new file mode 100644 index 0000000000..2edf3b29c0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithHelperDirectiveProducesError.stree.txt @@ -0,0 +1,19 @@ +RazorDocument - [0..21)::21 - [@helper fooHelper { }] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..7)::7 + CSharpImplicitExpression - [0..7)::7 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..7)::6 + CSharpCodeBlock - [1..7)::6 + CSharpExpressionLiteral - [1..7)::6 - [helper] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[helper]; + MarkupTextLiteral - [7..21)::14 - [ fooHelper { }] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[fooHelper]; + Whitespace;[ ]; + Text;[{]; + Whitespace;[ ]; + Text;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithNestedCodeBlockProducesError.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithNestedCodeBlockProducesError.cspans.txt new file mode 100644 index 0000000000..c9fe98a849 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithNestedCodeBlockProducesError.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [11] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +Code span at (1:0,1 [5] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [11] ) +Transition span at (6:0,6 [1] ) (Accepts:None) - Parent: Statement block at (6:0,6 [3] ) +MetaCode span at (7:0,7 [1] ) (Accepts:None) - Parent: Statement block at (6:0,6 [3] ) +Code span at (8:0,8 [0] ) (Accepts:Any) - Parent: Statement block at (6:0,6 [3] ) +MetaCode span at (8:0,8 [1] ) (Accepts:None) - Parent: Statement block at (6:0,6 [3] ) +Code span at (9:0,9 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [11] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithNestedCodeBlockProducesError.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithNestedCodeBlockProducesError.diag.txt new file mode 100644 index 0000000000..302b641580 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithNestedCodeBlockProducesError.diag.txt @@ -0,0 +1 @@ +(1,8): Error RZ1010: Unexpected "{" after "@" character. Once inside the body of a code block (@if {}, @{}, etc.) you do not need to use "@{" to switch to code. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithNestedCodeBlockProducesError.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithNestedCodeBlockProducesError.stree.txt new file mode 100644 index 0000000000..7b55422dd6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpErrorTest/WithNestedCodeBlockProducesError.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..11)::11 - [@if { @{} }] + MarkupBlock - [0..11)::11 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..11)::11 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..6)::5 - [if { ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + CSharpCodeBlock - [6..9)::3 + CSharpStatement - [6..9)::3 + CSharpTransition - [6..7)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [7..9)::2 + RazorMetaCode - [7..8)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [8..8)::0 + CSharpStatementLiteral - [8..8)::0 - [] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Marker;[]; + RazorMetaCode - [8..9)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + CSharpStatementLiteral - [9..11)::2 - [ }] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptConsecutiveEscapedQuotesInNonVerbatimStrings.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptConsecutiveEscapedQuotesInNonVerbatimStrings.cspans.txt new file mode 100644 index 0000000000..a09a5507a8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptConsecutiveEscapedQuotesInNonVerbatimStrings.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [9] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [9] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [9] ) +Code span at (2:0,2 [6] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [9] ) +MetaCode span at (8:0,8 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [9] ) +Markup span at (9:0,9 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptConsecutiveEscapedQuotesInNonVerbatimStrings.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptConsecutiveEscapedQuotesInNonVerbatimStrings.stree.txt new file mode 100644 index 0000000000..b32100887b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptConsecutiveEscapedQuotesInNonVerbatimStrings.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..9)::9 - [@("\"\"")] + MarkupBlock - [0..9)::9 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..9)::9 + CSharpExplicitExpression - [0..9)::9 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [1..9)::8 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [2..8)::6 + CSharpExpressionLiteral - [2..8)::6 - ["\"\""] - Gen - SpanEditHandler;Accepts:Any + StringLiteral;["\"\""]; + RazorMetaCode - [8..9)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + MarkupTextLiteral - [9..9)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptConsecutiveEscapedQuotesInVerbatimStrings.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptConsecutiveEscapedQuotesInVerbatimStrings.cspans.txt new file mode 100644 index 0000000000..b867104f46 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptConsecutiveEscapedQuotesInVerbatimStrings.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [10] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [10] ) +Code span at (2:0,2 [7] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [10] ) +MetaCode span at (9:0,9 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [10] ) +Markup span at (10:0,10 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptConsecutiveEscapedQuotesInVerbatimStrings.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptConsecutiveEscapedQuotesInVerbatimStrings.stree.txt new file mode 100644 index 0000000000..4e2a0d3ee8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptConsecutiveEscapedQuotesInVerbatimStrings.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..10)::10 - [@(@"""""")] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..10)::10 + CSharpExplicitExpression - [0..10)::10 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [1..10)::9 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [2..9)::7 + CSharpExpressionLiteral - [2..9)::7 - [@""""""] - Gen - SpanEditHandler;Accepts:Any + StringLiteral;[@""""""]; + RazorMetaCode - [9..10)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + MarkupTextLiteral - [10..10)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptEscapedQuoteInNonVerbatimStrings.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptEscapedQuoteInNonVerbatimStrings.cspans.txt new file mode 100644 index 0000000000..00911f1902 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptEscapedQuoteInNonVerbatimStrings.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [7] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [7] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [7] ) +Code span at (2:0,2 [4] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [7] ) +MetaCode span at (6:0,6 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [7] ) +Markup span at (7:0,7 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptEscapedQuoteInNonVerbatimStrings.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptEscapedQuoteInNonVerbatimStrings.stree.txt new file mode 100644 index 0000000000..f6b8e38665 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptEscapedQuoteInNonVerbatimStrings.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..7)::7 - [@("\"")] + MarkupBlock - [0..7)::7 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..7)::7 + CSharpExplicitExpression - [0..7)::7 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [1..7)::6 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [2..6)::4 + CSharpExpressionLiteral - [2..6)::4 - ["\""] - Gen - SpanEditHandler;Accepts:Any + StringLiteral;["\""]; + RazorMetaCode - [6..7)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + MarkupTextLiteral - [7..7)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptEscapedQuoteInVerbatimStrings.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptEscapedQuoteInVerbatimStrings.cspans.txt new file mode 100644 index 0000000000..a8175e85d9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptEscapedQuoteInVerbatimStrings.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [8] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [8] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [8] ) +Code span at (2:0,2 [5] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [8] ) +MetaCode span at (7:0,7 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [8] ) +Markup span at (8:0,8 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [8] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptEscapedQuoteInVerbatimStrings.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptEscapedQuoteInVerbatimStrings.stree.txt new file mode 100644 index 0000000000..3103f0223f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptEscapedQuoteInVerbatimStrings.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..8)::8 - [@(@"""")] + MarkupBlock - [0..8)::8 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + CSharpExplicitExpression - [0..8)::8 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [1..8)::7 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [2..7)::5 + CSharpExpressionLiteral - [2..7)::5 - [@""""] - Gen - SpanEditHandler;Accepts:Any + StringLiteral;[@""""]; + RazorMetaCode - [7..8)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + MarkupTextLiteral - [8..8)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultiLineVerbatimStrings.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultiLineVerbatimStrings.cspans.txt new file mode 100644 index 0000000000..1f223ecaf0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultiLineVerbatimStrings.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [23] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [23] ) +Code span at (2:0,2 [20] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [23] ) +MetaCode span at (22:4,1 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [23] ) +Markup span at (23:4,2 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultiLineVerbatimStrings.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultiLineVerbatimStrings.stree.txt new file mode 100644 index 0000000000..4120fe5a0c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultiLineVerbatimStrings.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..23)::23 - [@(@"LFFooLFBarLFBazLF")] + MarkupBlock - [0..23)::23 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..23)::23 + CSharpExplicitExpression - [0..23)::23 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [1..23)::22 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [2..22)::20 + CSharpExpressionLiteral - [2..22)::20 - [@"LFFooLFBarLFBazLF"] - Gen - SpanEditHandler;Accepts:Any + StringLiteral;[@"LFFooLFBarLFBazLF"]; + RazorMetaCode - [22..23)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + MarkupTextLiteral - [23..23)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleEscapedQuotesInNonVerbatimStrings.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleEscapedQuotesInNonVerbatimStrings.cspans.txt new file mode 100644 index 0000000000..e40d184265 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleEscapedQuotesInNonVerbatimStrings.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [21] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [21] ) +Code span at (2:0,2 [18] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [21] ) +MetaCode span at (20:0,20 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [21] ) +Markup span at (21:0,21 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleEscapedQuotesInNonVerbatimStrings.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleEscapedQuotesInNonVerbatimStrings.stree.txt new file mode 100644 index 0000000000..6444a0ba44 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleEscapedQuotesInNonVerbatimStrings.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..21)::21 - [@("\"hello, world\"")] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..21)::21 + CSharpExplicitExpression - [0..21)::21 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [1..21)::20 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [2..20)::18 + CSharpExpressionLiteral - [2..20)::18 - ["\"hello, world\""] - Gen - SpanEditHandler;Accepts:Any + StringLiteral;["\"hello, world\""]; + RazorMetaCode - [20..21)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + MarkupTextLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleEscapedQuotesInVerbatimStrings.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleEscapedQuotesInVerbatimStrings.cspans.txt new file mode 100644 index 0000000000..a45c531d17 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleEscapedQuotesInVerbatimStrings.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [22] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [22] ) +Code span at (2:0,2 [19] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [22] ) +MetaCode span at (21:0,21 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [22] ) +Markup span at (22:0,22 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleEscapedQuotesInVerbatimStrings.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleEscapedQuotesInVerbatimStrings.stree.txt new file mode 100644 index 0000000000..d68a700afc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleEscapedQuotesInVerbatimStrings.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..22)::22 - [@(@"""hello, world""")] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..22)::22 + CSharpExplicitExpression - [0..22)::22 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [1..22)::21 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [2..21)::19 + CSharpExpressionLiteral - [2..21)::19 - [@"""hello, world"""] - Gen - SpanEditHandler;Accepts:Any + StringLiteral;[@"""hello, world"""]; + RazorMetaCode - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + MarkupTextLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleRepeatedEscapedQuoteInVerbatimStrings.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleRepeatedEscapedQuoteInVerbatimStrings.cspans.txt new file mode 100644 index 0000000000..b867104f46 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleRepeatedEscapedQuoteInVerbatimStrings.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [10] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [10] ) +Code span at (2:0,2 [7] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [10] ) +MetaCode span at (9:0,9 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [10] ) +Markup span at (10:0,10 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleRepeatedEscapedQuoteInVerbatimStrings.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleRepeatedEscapedQuoteInVerbatimStrings.stree.txt new file mode 100644 index 0000000000..4e2a0d3ee8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldAcceptMultipleRepeatedEscapedQuoteInVerbatimStrings.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..10)::10 - [@(@"""""")] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..10)::10 + CSharpExplicitExpression - [0..10)::10 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [1..10)::9 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [2..9)::7 + CSharpExpressionLiteral - [2..9)::7 - [@""""""] - Gen - SpanEditHandler;Accepts:Any + StringLiteral;[@""""""]; + RazorMetaCode - [9..10)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + MarkupTextLiteral - [10..10)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfEOFOccursAfterStartOfExplicitExpr.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfEOFOccursAfterStartOfExplicitExpr.cspans.txt new file mode 100644 index 0000000000..db00568920 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfEOFOccursAfterStartOfExplicitExpr.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [2] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [2] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [2] ) +Code span at (2:0,2 [0] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [2] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfEOFOccursAfterStartOfExplicitExpr.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfEOFOccursAfterStartOfExplicitExpr.diag.txt new file mode 100644 index 0000000000..0b063402e6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfEOFOccursAfterStartOfExplicitExpr.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The explicit expression block is missing a closing ")" character. Make sure you have a matching ")" character for all the "(" characters within this block, and that none of the ")" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfEOFOccursAfterStartOfExplicitExpr.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfEOFOccursAfterStartOfExplicitExpr.stree.txt new file mode 100644 index 0000000000..7aa4d7138c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfEOFOccursAfterStartOfExplicitExpr.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..2)::2 - [@(] + MarkupBlock - [0..2)::2 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..2)::2 + CSharpExplicitExpression - [0..2)::2 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [1..2)::1 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [2..2)::0 + CSharpExpressionLiteral - [2..2)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [2..2)::0 - Gen - SpanEditHandler;Accepts:Any + RightParenthesis;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfExplicitExpressionIsEmpty.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfExplicitExpressionIsEmpty.cspans.txt new file mode 100644 index 0000000000..65a3c41a92 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfExplicitExpressionIsEmpty.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [3] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [3] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [3] ) +Code span at (2:0,2 [0] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [3] ) +MetaCode span at (2:0,2 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [3] ) +Markup span at (3:0,3 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfExplicitExpressionIsEmpty.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfExplicitExpressionIsEmpty.stree.txt new file mode 100644 index 0000000000..07a566bf89 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpExplicitExpressionTest/ShouldOutputZeroLengthCodeSpanIfExplicitExpressionIsEmpty.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..3)::3 - [@()] + MarkupBlock - [0..3)::3 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..3)::3 + CSharpExplicitExpression - [0..3)::3 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [1..3)::2 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [2..2)::0 + CSharpExpressionLiteral - [2..2)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + MarkupTextLiteral - [3..3)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_CanContainCurlyBraces.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_CanContainCurlyBraces.cspans.txt new file mode 100644 index 0000000000..8253b1a0b7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_CanContainCurlyBraces.cspans.txt @@ -0,0 +1,26 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [210] ) +Transition span at (2:1,0 [1] ) (Accepts:None) - Parent: Directive block at (2:1,0 [208] ) +MetaCode span at (3:1,1 [9] ) (Accepts:None) - Parent: Directive block at (2:1,0 [208] ) +None span at (12:1,10 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (2:1,0 [208] ) +MetaCode span at (13:1,11 [1] ) (Accepts:None) - Parent: Directive block at (2:1,0 [208] ) +Code span at (14:1,12 [47] ) (Accepts:Any) - Parent: Statement block at (14:1,12 [193] ) +Markup span at (61:4,0 [8] ) (Accepts:Any) - Parent: Markup block at (61:4,0 [139] ) +Markup span at (69:4,8 [5] ) (Accepts:None) - Parent: Tag block at (69:4,8 [5] ) +Markup span at (74:4,13 [2] ) (Accepts:Any) - Parent: Markup block at (61:4,0 [139] ) +Code span at (76:5,0 [12] ) (Accepts:Any) - Parent: Statement block at (76:5,0 [108] ) +Transition span at (88:5,12 [1] ) (Accepts:None) - Parent: Statement block at (76:5,0 [108] ) +Code span at (89:5,13 [40] ) (Accepts:Any) - Parent: Statement block at (76:5,0 [108] ) +Markup span at (129:7,0 [16] ) (Accepts:Any) - Parent: Markup block at (129:7,0 [40] ) +Markup span at (145:7,16 [3] ) (Accepts:None) - Parent: Tag block at (145:7,16 [3] ) +Markup span at (148:7,19 [0] ) (Accepts:Any) - Parent: Markup block at (129:7,0 [40] ) +Transition span at (148:7,19 [1] ) (Accepts:None) - Parent: Expression block at (148:7,19 [15] ) +Code span at (149:7,20 [14] ) (Accepts:NonWhitespace) - Parent: Expression block at (148:7,19 [15] ) +Markup span at (163:7,34 [4] ) (Accepts:None) - Parent: Tag block at (163:7,34 [4] ) +Markup span at (167:7,38 [2] ) (Accepts:None) - Parent: Markup block at (129:7,0 [40] ) +Code span at (169:8,0 [15] ) (Accepts:Any) - Parent: Statement block at (76:5,0 [108] ) +Markup span at (184:9,0 [8] ) (Accepts:Any) - Parent: Markup block at (61:4,0 [139] ) +Markup span at (192:9,8 [6] ) (Accepts:None) - Parent: Tag block at (192:9,8 [6] ) +Markup span at (198:9,14 [2] ) (Accepts:None) - Parent: Markup block at (61:4,0 [139] ) +Code span at (200:10,0 [7] ) (Accepts:Any) - Parent: Statement block at (14:1,12 [193] ) +MetaCode span at (207:11,0 [3] ) (Accepts:None) - Parent: Directive block at (2:1,0 [208] ) +Markup span at (210:12,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [210] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_CanContainCurlyBraces.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_CanContainCurlyBraces.stree.txt new file mode 100644 index 0000000000..f0ad4cc26c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_CanContainCurlyBraces.stree.txt @@ -0,0 +1,112 @@ +RazorDocument - [0..210)::210 - [LF@functions {LF void Announcment(string message)LF {LF
                    LF @if (message.Length > 0)LF {LF

                    @message.Length

                    LF }LF
                    LF }LF}LF] + MarkupBlock - [0..210)::210 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [2..210)::208 + RazorDirective - [2..210)::208 - Directive:{functions;CodeBlock;Unrestricted} + CSharpTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [3..210)::207 + RazorMetaCode - [3..12)::9 - Gen - SpanEditHandler;Accepts:None + Identifier;[functions]; + CSharpCodeBlock - [12..210)::198 + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + CSharpCodeBlock - [14..207)::193 + CSharpStatementLiteral - [14..61)::47 - [LF void Announcment(string message)LF {LF] - Gen - CodeBlockEditHandler;Accepts:Any;CodeBlock + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[void]; + Whitespace;[ ]; + Identifier;[Announcment]; + LeftParenthesis;[(]; + Keyword;[string]; + Whitespace;[ ]; + Identifier;[message]; + RightParenthesis;[)]; + NewLine;[LF]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + MarkupBlock - [61..200)::139 + MarkupTextLiteral - [61..69)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [69..198)::129 + MarkupStartTag - [69..74)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [74..76)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [76..184)::108 + CSharpStatementLiteral - [76..88)::12 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpTransition - [88..89)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [89..129)::40 - [if (message.Length > 0)LF {LF] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[message]; + Dot;[.]; + Identifier;[Length]; + Whitespace;[ ]; + GreaterThan;[>]; + Whitespace;[ ]; + IntegerLiteral;[0]; + RightParenthesis;[)]; + NewLine;[LF]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + MarkupBlock - [129..169)::40 + MarkupTextLiteral - [129..145)::16 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [145..167)::22 + MarkupStartTag - [145..148)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [148..148)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [148..163)::15 + CSharpImplicitExpression - [148..163)::15 + CSharpTransition - [148..149)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [149..163)::14 + CSharpCodeBlock - [149..163)::14 + CSharpExpressionLiteral - [149..163)::14 - [message.Length] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K15 + Identifier;[message]; + Dot;[.]; + Identifier;[Length]; + MarkupEndTag - [163..167)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [167..169)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [169..184)::15 - [ }LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + MarkupTextLiteral - [184..192)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [192..198)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [198..200)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [200..207)::7 - [ }LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + RazorMetaCode - [207..210)::3 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + NewLine;[LF]; + MarkupTextLiteral - [210..210)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseMarkupInString.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseMarkupInString.cspans.txt new file mode 100644 index 0000000000..e4bcfd4f62 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseMarkupInString.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [81] ) +Transition span at (2:1,0 [1] ) (Accepts:None) - Parent: Directive block at (2:1,0 [79] ) +MetaCode span at (3:1,1 [9] ) (Accepts:None) - Parent: Directive block at (2:1,0 [79] ) +None span at (12:1,10 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (2:1,0 [79] ) +MetaCode span at (13:1,11 [1] ) (Accepts:None) - Parent: Directive block at (2:1,0 [79] ) +Code span at (14:1,12 [64] ) (Accepts:Any) - Parent: Directive block at (2:1,0 [79] ) +MetaCode span at (78:3,0 [3] ) (Accepts:None) - Parent: Directive block at (2:1,0 [79] ) +Markup span at (81:4,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [81] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseMarkupInString.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseMarkupInString.stree.txt new file mode 100644 index 0000000000..ac779ab034 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseMarkupInString.stree.txt @@ -0,0 +1,39 @@ +RazorDocument - [0..81)::81 - [LF@functions {LF void Announcment(string message) => "

                    @message

                    ";LF}LF] + MarkupBlock - [0..81)::81 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [2..81)::79 + RazorDirective - [2..81)::79 - Directive:{functions;CodeBlock;Unrestricted} + CSharpTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [3..81)::78 + RazorMetaCode - [3..12)::9 - Gen - SpanEditHandler;Accepts:None + Identifier;[functions]; + CSharpCodeBlock - [12..81)::69 + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + CSharpCodeBlock - [14..78)::64 + CSharpStatementLiteral - [14..78)::64 - [LF void Announcment(string message) => "

                    @message

                    ";LF] - Gen - CodeBlockEditHandler;Accepts:Any;CodeBlock + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[void]; + Whitespace;[ ]; + Identifier;[Announcment]; + LeftParenthesis;[(]; + Keyword;[string]; + Whitespace;[ ]; + Identifier;[message]; + RightParenthesis;[)]; + Whitespace;[ ]; + GreaterThanEqual;[=>]; + Whitespace;[ ]; + StringLiteral;["

                    @message

                    "]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [78..81)::3 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + NewLine;[LF]; + MarkupTextLiteral - [81..81)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseMarkupInVerbatimString.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseMarkupInVerbatimString.cspans.txt new file mode 100644 index 0000000000..c908ca70cc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseMarkupInVerbatimString.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [82] ) +Transition span at (2:1,0 [1] ) (Accepts:None) - Parent: Directive block at (2:1,0 [80] ) +MetaCode span at (3:1,1 [9] ) (Accepts:None) - Parent: Directive block at (2:1,0 [80] ) +None span at (12:1,10 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (2:1,0 [80] ) +MetaCode span at (13:1,11 [1] ) (Accepts:None) - Parent: Directive block at (2:1,0 [80] ) +Code span at (14:1,12 [65] ) (Accepts:Any) - Parent: Directive block at (2:1,0 [80] ) +MetaCode span at (79:3,0 [3] ) (Accepts:None) - Parent: Directive block at (2:1,0 [80] ) +Markup span at (82:4,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [82] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseMarkupInVerbatimString.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseMarkupInVerbatimString.stree.txt new file mode 100644 index 0000000000..262c18d238 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseMarkupInVerbatimString.stree.txt @@ -0,0 +1,39 @@ +RazorDocument - [0..82)::82 - [LF@functions {LF void Announcment(string message) => @"

                    @message

                    ";LF}LF] + MarkupBlock - [0..82)::82 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [2..82)::80 + RazorDirective - [2..82)::80 - Directive:{functions;CodeBlock;Unrestricted} + CSharpTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [3..82)::79 + RazorMetaCode - [3..12)::9 - Gen - SpanEditHandler;Accepts:None + Identifier;[functions]; + CSharpCodeBlock - [12..82)::70 + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + CSharpCodeBlock - [14..79)::65 + CSharpStatementLiteral - [14..79)::65 - [LF void Announcment(string message) => @"

                    @message

                    ";LF] - Gen - CodeBlockEditHandler;Accepts:Any;CodeBlock + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[void]; + Whitespace;[ ]; + Identifier;[Announcment]; + LeftParenthesis;[(]; + Keyword;[string]; + Whitespace;[ ]; + Identifier;[message]; + RightParenthesis;[)]; + Whitespace;[ ]; + GreaterThanEqual;[=>]; + Whitespace;[ ]; + StringLiteral;[@"

                    @message

                    "]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [79..82)::3 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + NewLine;[LF]; + MarkupTextLiteral - [82..82)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseWhenNotSupported.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseWhenNotSupported.cspans.txt new file mode 100644 index 0000000000..3ff26adf1b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseWhenNotSupported.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [98] ) +Transition span at (2:1,0 [1] ) (Accepts:None) - Parent: Directive block at (2:1,0 [96] ) +MetaCode span at (3:1,1 [9] ) (Accepts:None) - Parent: Directive block at (2:1,0 [96] ) +None span at (12:1,10 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (2:1,0 [96] ) +MetaCode span at (13:1,11 [1] ) (Accepts:None) - Parent: Directive block at (2:1,0 [96] ) +Code span at (14:1,12 [81] ) (Accepts:Any) - Parent: Directive block at (2:1,0 [96] ) +MetaCode span at (95:6,0 [3] ) (Accepts:None) - Parent: Directive block at (2:1,0 [96] ) +Markup span at (98:7,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [98] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseWhenNotSupported.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseWhenNotSupported.stree.txt new file mode 100644 index 0000000000..c3d51822e6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_DoesNotParseWhenNotSupported.stree.txt @@ -0,0 +1,51 @@ +RazorDocument - [0..98)::98 - [LF@functions {LF void Announcment(string message)LF {LF

                    @message

                    LF }LF}LF] + MarkupBlock - [0..98)::98 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [2..98)::96 + RazorDirective - [2..98)::96 - Directive:{functions;CodeBlock;Unrestricted} + CSharpTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [3..98)::95 + RazorMetaCode - [3..12)::9 - Gen - SpanEditHandler;Accepts:None + Identifier;[functions]; + CSharpCodeBlock - [12..98)::86 + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + CSharpCodeBlock - [14..95)::81 + CSharpStatementLiteral - [14..95)::81 - [LF void Announcment(string message)LF {LF

                    @message

                    LF }LF] - Gen - CodeBlockEditHandler;Accepts:Any;CodeBlock + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[void]; + Whitespace;[ ]; + Identifier;[Announcment]; + LeftParenthesis;[(]; + Keyword;[string]; + Whitespace;[ ]; + Identifier;[message]; + RightParenthesis;[)]; + NewLine;[LF]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + LessThan;[<]; + Identifier;[h3]; + GreaterThan;[>]; + Transition;[@]; + Identifier;[message]; + LessThan;[<]; + Slash;[/]; + Identifier;[h3]; + GreaterThan;[>]; + NewLine;[LF]; + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + RazorMetaCode - [95..98)::3 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + NewLine;[LF]; + MarkupTextLiteral - [98..98)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_MarkupCanContainTemplate.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_MarkupCanContainTemplate.cspans.txt new file mode 100644 index 0000000000..fd4fc97ed3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_MarkupCanContainTemplate.cspans.txt @@ -0,0 +1,25 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [220] ) +Transition span at (2:1,0 [1] ) (Accepts:None) - Parent: Directive block at (2:1,0 [218] ) +MetaCode span at (3:1,1 [9] ) (Accepts:None) - Parent: Directive block at (2:1,0 [218] ) +None span at (12:1,10 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (2:1,0 [218] ) +MetaCode span at (13:1,11 [1] ) (Accepts:None) - Parent: Directive block at (2:1,0 [218] ) +Code span at (14:1,12 [47] ) (Accepts:Any) - Parent: Statement block at (14:1,12 [203] ) +Markup span at (61:4,0 [8] ) (Accepts:Any) - Parent: Markup block at (61:4,0 [149] ) +Markup span at (69:4,8 [5] ) (Accepts:None) - Parent: Tag block at (69:4,8 [5] ) +Markup span at (74:4,13 [2] ) (Accepts:Any) - Parent: Markup block at (61:4,0 [149] ) +Code span at (76:5,0 [12] ) (Accepts:Any) - Parent: Statement block at (76:5,0 [118] ) +Transition span at (88:5,12 [1] ) (Accepts:None) - Parent: Statement block at (76:5,0 [118] ) +Code span at (89:5,13 [63] ) (Accepts:Any) - Parent: Statement block at (76:5,0 [118] ) +Transition span at (152:7,23 [1] ) (Accepts:None) - Parent: Markup block at (152:7,23 [23] ) +Markup span at (153:7,24 [3] ) (Accepts:None) - Parent: Tag block at (153:7,24 [3] ) +Markup span at (156:7,27 [0] ) (Accepts:Any) - Parent: Markup block at (152:7,23 [23] ) +Transition span at (156:7,27 [1] ) (Accepts:None) - Parent: Expression block at (156:7,27 [15] ) +Code span at (157:7,28 [14] ) (Accepts:NonWhitespace) - Parent: Expression block at (156:7,27 [15] ) +Markup span at (171:7,42 [4] ) (Accepts:None) - Parent: Tag block at (171:7,42 [4] ) +Code span at (175:7,46 [19] ) (Accepts:Any) - Parent: Statement block at (76:5,0 [118] ) +Markup span at (194:9,0 [8] ) (Accepts:Any) - Parent: Markup block at (61:4,0 [149] ) +Markup span at (202:9,8 [6] ) (Accepts:None) - Parent: Tag block at (202:9,8 [6] ) +Markup span at (208:9,14 [2] ) (Accepts:None) - Parent: Markup block at (61:4,0 [149] ) +Code span at (210:10,0 [7] ) (Accepts:Any) - Parent: Statement block at (14:1,12 [203] ) +MetaCode span at (217:11,0 [3] ) (Accepts:None) - Parent: Directive block at (2:1,0 [218] ) +Markup span at (220:12,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [220] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_MarkupCanContainTemplate.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_MarkupCanContainTemplate.stree.txt new file mode 100644 index 0000000000..e6319cb686 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_MarkupCanContainTemplate.stree.txt @@ -0,0 +1,117 @@ +RazorDocument - [0..220)::220 - [LF@functions {LF void Announcment(string message)LF {LF
                    LF @if (message.Length > 0)LF {LF Repeat(@

                    @message.Length

                    );LF }LF
                    LF }LF}LF] + MarkupBlock - [0..220)::220 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [2..220)::218 + RazorDirective - [2..220)::218 - Directive:{functions;CodeBlock;Unrestricted} + CSharpTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [3..220)::217 + RazorMetaCode - [3..12)::9 - Gen - SpanEditHandler;Accepts:None + Identifier;[functions]; + CSharpCodeBlock - [12..220)::208 + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + CSharpCodeBlock - [14..217)::203 + CSharpStatementLiteral - [14..61)::47 - [LF void Announcment(string message)LF {LF] - Gen - CodeBlockEditHandler;Accepts:Any;CodeBlock + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[void]; + Whitespace;[ ]; + Identifier;[Announcment]; + LeftParenthesis;[(]; + Keyword;[string]; + Whitespace;[ ]; + Identifier;[message]; + RightParenthesis;[)]; + NewLine;[LF]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + MarkupBlock - [61..210)::149 + MarkupTextLiteral - [61..69)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [69..208)::139 + MarkupStartTag - [69..74)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [74..76)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [76..194)::118 + CSharpStatementLiteral - [76..88)::12 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpTransition - [88..89)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [89..152)::63 - [if (message.Length > 0)LF {LF Repeat(] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[message]; + Dot;[.]; + Identifier;[Length]; + Whitespace;[ ]; + GreaterThan;[>]; + Whitespace;[ ]; + IntegerLiteral;[0]; + RightParenthesis;[)]; + NewLine;[LF]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[Repeat]; + LeftParenthesis;[(]; + CSharpTemplateBlock - [152..175)::23 + MarkupBlock - [152..175)::23 + MarkupTransition - [152..153)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [153..175)::22 + MarkupStartTag - [153..156)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [156..156)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [156..171)::15 + CSharpImplicitExpression - [156..171)::15 + CSharpTransition - [156..157)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [157..171)::14 + CSharpCodeBlock - [157..171)::14 + CSharpExpressionLiteral - [157..171)::14 - [message.Length] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K15 + Identifier;[message]; + Dot;[.]; + Identifier;[Length]; + MarkupEndTag - [171..175)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [175..194)::19 - [);LF }LF] - Gen - SpanEditHandler;Accepts:Any + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + MarkupTextLiteral - [194..202)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [202..208)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [208..210)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [210..217)::7 - [ }LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + RazorMetaCode - [217..220)::3 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + NewLine;[LF]; + MarkupTextLiteral - [220..220)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_ParsesMarkupInsideMethod.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_ParsesMarkupInsideMethod.cspans.txt new file mode 100644 index 0000000000..4a14010156 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_ParsesMarkupInsideMethod.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [98] ) +Transition span at (2:1,0 [1] ) (Accepts:None) - Parent: Directive block at (2:1,0 [96] ) +MetaCode span at (3:1,1 [9] ) (Accepts:None) - Parent: Directive block at (2:1,0 [96] ) +None span at (12:1,10 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (2:1,0 [96] ) +MetaCode span at (13:1,11 [1] ) (Accepts:None) - Parent: Directive block at (2:1,0 [96] ) +Code span at (14:1,12 [47] ) (Accepts:Any) - Parent: Statement block at (14:1,12 [81] ) +Markup span at (61:4,0 [8] ) (Accepts:Any) - Parent: Markup block at (61:4,0 [27] ) +Markup span at (69:4,8 [4] ) (Accepts:None) - Parent: Tag block at (69:4,8 [4] ) +Markup span at (73:4,12 [0] ) (Accepts:Any) - Parent: Markup block at (61:4,0 [27] ) +Transition span at (73:4,12 [1] ) (Accepts:None) - Parent: Expression block at (73:4,12 [8] ) +Code span at (74:4,13 [7] ) (Accepts:NonWhitespace) - Parent: Expression block at (73:4,12 [8] ) +Markup span at (81:4,20 [5] ) (Accepts:None) - Parent: Tag block at (81:4,20 [5] ) +Markup span at (86:4,25 [2] ) (Accepts:None) - Parent: Markup block at (61:4,0 [27] ) +Code span at (88:5,0 [7] ) (Accepts:Any) - Parent: Statement block at (14:1,12 [81] ) +MetaCode span at (95:6,0 [3] ) (Accepts:None) - Parent: Directive block at (2:1,0 [96] ) +Markup span at (98:7,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [98] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_ParsesMarkupInsideMethod.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_ParsesMarkupInsideMethod.stree.txt new file mode 100644 index 0000000000..45946374fe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_ParsesMarkupInsideMethod.stree.txt @@ -0,0 +1,66 @@ +RazorDocument - [0..98)::98 - [LF@functions {LF void Announcment(string message)LF {LF

                    @message

                    LF }LF}LF] + MarkupBlock - [0..98)::98 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [2..98)::96 + RazorDirective - [2..98)::96 - Directive:{functions;CodeBlock;Unrestricted} + CSharpTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [3..98)::95 + RazorMetaCode - [3..12)::9 - Gen - SpanEditHandler;Accepts:None + Identifier;[functions]; + CSharpCodeBlock - [12..98)::86 + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + CSharpCodeBlock - [14..95)::81 + CSharpStatementLiteral - [14..61)::47 - [LF void Announcment(string message)LF {LF] - Gen - CodeBlockEditHandler;Accepts:Any;CodeBlock + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[void]; + Whitespace;[ ]; + Identifier;[Announcment]; + LeftParenthesis;[(]; + Keyword;[string]; + Whitespace;[ ]; + Identifier;[message]; + RightParenthesis;[)]; + NewLine;[LF]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + MarkupBlock - [61..88)::27 + MarkupTextLiteral - [61..69)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [69..86)::17 + MarkupStartTag - [69..73)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[h3]; + CloseAngle;[>]; + MarkupTextLiteral - [73..73)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [73..81)::8 + CSharpImplicitExpression - [73..81)::8 + CSharpTransition - [73..74)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [74..81)::7 + CSharpCodeBlock - [74..81)::7 + CSharpExpressionLiteral - [74..81)::7 - [message] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K15 + Identifier;[message]; + MarkupEndTag - [81..86)::5 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[h3]; + CloseAngle;[>]; + MarkupTextLiteral - [86..88)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [88..95)::7 - [ }LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + RazorMetaCode - [95..98)::3 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + NewLine;[LF]; + MarkupTextLiteral - [98..98)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_ParsesMarkupWithExpressionsMethod.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_ParsesMarkupWithExpressionsMethod.cspans.txt new file mode 100644 index 0000000000..fbc728c657 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_ParsesMarkupWithExpressionsMethod.cspans.txt @@ -0,0 +1,15 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [78] ) +Transition span at (2:1,0 [1] ) (Accepts:None) - Parent: Directive block at (2:1,0 [76] ) +MetaCode span at (3:1,1 [9] ) (Accepts:None) - Parent: Directive block at (2:1,0 [76] ) +None span at (12:1,10 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (2:1,0 [76] ) +MetaCode span at (13:1,11 [1] ) (Accepts:None) - Parent: Directive block at (2:1,0 [76] ) +Code span at (14:1,12 [42] ) (Accepts:Any) - Parent: Statement block at (14:1,12 [61] ) +Markup span at (56:2,40 [4] ) (Accepts:None) - Parent: Tag block at (56:2,40 [4] ) +Markup span at (60:2,44 [0] ) (Accepts:Any) - Parent: Markup block at (56:2,40 [19] ) +Transition span at (60:2,44 [1] ) (Accepts:None) - Parent: Expression block at (60:2,44 [8] ) +Code span at (61:2,45 [7] ) (Accepts:NonWhitespace) - Parent: Expression block at (60:2,44 [8] ) +Markup span at (68:2,52 [5] ) (Accepts:None) - Parent: Tag block at (68:2,52 [5] ) +Markup span at (73:2,57 [2] ) (Accepts:None) - Parent: Markup block at (56:2,40 [19] ) +Code span at (75:3,0 [0] ) (Accepts:Any) - Parent: Statement block at (14:1,12 [61] ) +MetaCode span at (75:3,0 [3] ) (Accepts:None) - Parent: Directive block at (2:1,0 [76] ) +Markup span at (78:4,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [78] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_ParsesMarkupWithExpressionsMethod.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_ParsesMarkupWithExpressionsMethod.stree.txt new file mode 100644 index 0000000000..e22da882cb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/MarkupInFunctionsBlock_ParsesMarkupWithExpressionsMethod.stree.txt @@ -0,0 +1,61 @@ +RazorDocument - [0..78)::78 - [LF@functions {LF void Announcment(string message) =>

                    @message

                    LF}LF] + MarkupBlock - [0..78)::78 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [2..78)::76 + RazorDirective - [2..78)::76 - Directive:{functions;CodeBlock;Unrestricted} + CSharpTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [3..78)::75 + RazorMetaCode - [3..12)::9 - Gen - SpanEditHandler;Accepts:None + Identifier;[functions]; + CSharpCodeBlock - [12..78)::66 + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + CSharpCodeBlock - [14..75)::61 + CSharpStatementLiteral - [14..56)::42 - [LF void Announcment(string message) => ] - Gen - CodeBlockEditHandler;Accepts:Any;CodeBlock + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[void]; + Whitespace;[ ]; + Identifier;[Announcment]; + LeftParenthesis;[(]; + Keyword;[string]; + Whitespace;[ ]; + Identifier;[message]; + RightParenthesis;[)]; + Whitespace;[ ]; + GreaterThanEqual;[=>]; + Whitespace;[ ]; + MarkupBlock - [56..75)::19 + MarkupElement - [56..73)::17 + MarkupStartTag - [56..60)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[h3]; + CloseAngle;[>]; + MarkupTextLiteral - [60..60)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [60..68)::8 + CSharpImplicitExpression - [60..68)::8 + CSharpTransition - [60..61)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [61..68)::7 + CSharpCodeBlock - [61..68)::7 + CSharpExpressionLiteral - [61..68)::7 - [message] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K15 + Identifier;[message]; + MarkupEndTag - [68..73)::5 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[h3]; + CloseAngle;[>]; + MarkupTextLiteral - [73..75)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [75..75)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [75..78)::3 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + NewLine;[LF]; + MarkupTextLiteral - [78..78)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/ReservedKeywordsInFunctionsBlock_WithMarkup.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/ReservedKeywordsInFunctionsBlock_WithMarkup.cspans.txt new file mode 100644 index 0000000000..356e5dbb5d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/ReservedKeywordsInFunctionsBlock_WithMarkup.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [140] ) +Transition span at (2:1,0 [1] ) (Accepts:None) - Parent: Directive block at (2:1,0 [138] ) +MetaCode span at (3:1,1 [9] ) (Accepts:None) - Parent: Directive block at (2:1,0 [138] ) +None span at (12:1,10 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (2:1,0 [138] ) +MetaCode span at (13:1,11 [1] ) (Accepts:None) - Parent: Directive block at (2:1,0 [138] ) +Code span at (14:1,12 [73] ) (Accepts:Any) - Parent: Statement block at (14:1,12 [123] ) +Markup span at (87:6,0 [12] ) (Accepts:Any) - Parent: Markup block at (87:6,0 [32] ) +Markup span at (99:6,12 [3] ) (Accepts:None) - Parent: Tag block at (99:6,12 [3] ) +Markup span at (102:6,15 [11] ) (Accepts:Any) - Parent: Markup block at (87:6,0 [32] ) +Markup span at (113:6,26 [4] ) (Accepts:None) - Parent: Tag block at (113:6,26 [4] ) +Markup span at (117:6,30 [2] ) (Accepts:None) - Parent: Markup block at (87:6,0 [32] ) +Code span at (119:7,0 [18] ) (Accepts:Any) - Parent: Statement block at (14:1,12 [123] ) +MetaCode span at (137:9,0 [3] ) (Accepts:None) - Parent: Directive block at (2:1,0 [138] ) +Markup span at (140:10,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [140] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/ReservedKeywordsInFunctionsBlock_WithMarkup.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/ReservedKeywordsInFunctionsBlock_WithMarkup.stree.txt new file mode 100644 index 0000000000..f994fcb86d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpFunctionsTest/ReservedKeywordsInFunctionsBlock_WithMarkup.stree.txt @@ -0,0 +1,73 @@ +RazorDocument - [0..140)::140 - [LF@functions {LF class PersonLF {LF public void DoSomething()LF {LF

                    Just do it!

                    LF }LF }LF}LF] + MarkupBlock - [0..140)::140 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [2..140)::138 + RazorDirective - [2..140)::138 - Directive:{functions;CodeBlock;Unrestricted} + CSharpTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [3..140)::137 + RazorMetaCode - [3..12)::9 - Gen - SpanEditHandler;Accepts:None + Identifier;[functions]; + CSharpCodeBlock - [12..140)::128 + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + CSharpCodeBlock - [14..137)::123 + CSharpStatementLiteral - [14..87)::73 - [LF class PersonLF {LF public void DoSomething()LF {LF] - Gen - CodeBlockEditHandler;Accepts:Any;CodeBlock + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[class]; + Whitespace;[ ]; + Identifier;[Person]; + NewLine;[LF]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[public]; + Whitespace;[ ]; + Keyword;[void]; + Whitespace;[ ]; + Identifier;[DoSomething]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + NewLine;[LF]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + MarkupBlock - [87..119)::32 + MarkupTextLiteral - [87..99)::12 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [99..117)::18 + MarkupStartTag - [99..102)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [102..113)::11 - [Just do it!] - Gen - SpanEditHandler;Accepts:Any + Text;[Just]; + Whitespace;[ ]; + Text;[do]; + Whitespace;[ ]; + Text;[it]; + Bang;[!]; + MarkupEndTag - [113..117)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [117..119)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [119..137)::18 - [ }LF }LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + RazorMetaCode - [137..140)::3 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + NewLine;[LF]; + MarkupTextLiteral - [140..140)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/AcceptsNonEnglishCharactersThatAreValidIdentifiers.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/AcceptsNonEnglishCharactersThatAreValidIdentifiers.cspans.txt new file mode 100644 index 0000000000..9811c622e5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/AcceptsNonEnglishCharactersThatAreValidIdentifiers.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [9] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [8] ) +Code span at (1:0,1 [7] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [8] ) +Markup span at (8:0,8 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/AcceptsNonEnglishCharactersThatAreValidIdentifiers.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/AcceptsNonEnglishCharactersThatAreValidIdentifiers.stree.txt new file mode 100644 index 0000000000..754aaddfac --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/AcceptsNonEnglishCharactersThatAreValidIdentifiers.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..9)::9 - [@हळूँजद॔.] + MarkupBlock - [0..9)::9 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + CSharpImplicitExpression - [0..8)::8 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..8)::7 + CSharpCodeBlock - [1..8)::7 + CSharpExpressionLiteral - [1..8)::7 - [हळूँजद॔] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[हळूँजद॔]; + MarkupTextLiteral - [8..9)::1 - [.] - Gen - SpanEditHandler;Accepts:Any + Text;[.]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotAcceptSemicolonIfExpressionTerminatedByWhitespace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotAcceptSemicolonIfExpressionTerminatedByWhitespace.cspans.txt new file mode 100644 index 0000000000..3af48c1d82 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotAcceptSemicolonIfExpressionTerminatedByWhitespace.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [6] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [4] ) +Code span at (1:0,1 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [4] ) +Markup span at (4:0,4 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotAcceptSemicolonIfExpressionTerminatedByWhitespace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotAcceptSemicolonIfExpressionTerminatedByWhitespace.stree.txt new file mode 100644 index 0000000000..4c51ced51e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotAcceptSemicolonIfExpressionTerminatedByWhitespace.stree.txt @@ -0,0 +1,15 @@ +RazorDocument - [0..6)::6 - [@foo ;] + MarkupBlock - [0..6)::6 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpImplicitExpression - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..4)::3 + CSharpCodeBlock - [1..4)::3 + CSharpExpressionLiteral - [1..4)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupTextLiteral - [4..6)::2 - [ ;] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[;]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotAtEOFInImplicitExpression.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotAtEOFInImplicitExpression.cspans.txt new file mode 100644 index 0000000000..9811c622e5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotAtEOFInImplicitExpression.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [9] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [8] ) +Code span at (1:0,1 [7] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [8] ) +Markup span at (8:0,8 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotAtEOFInImplicitExpression.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotAtEOFInImplicitExpression.stree.txt new file mode 100644 index 0000000000..9aeb491366 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotAtEOFInImplicitExpression.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..9)::9 - [@foo.bar.] + MarkupBlock - [0..9)::9 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + CSharpImplicitExpression - [0..8)::8 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..8)::7 + CSharpCodeBlock - [1..8)::7 + CSharpExpressionLiteral - [1..8)::7 - [foo.bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + Dot;[.]; + Identifier;[bar]; + MarkupTextLiteral - [8..9)::1 - [.] - Gen - SpanEditHandler;Accepts:Any + Text;[.]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr1.cspans.txt new file mode 100644 index 0000000000..fcb828addc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr1.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [8] ) +Code span at (1:0,1 [7] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [8] ) +Markup span at (8:0,8 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr1.stree.txt new file mode 100644 index 0000000000..6c80edc56e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr1.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..10)::10 - [@foo.bar.0] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + CSharpImplicitExpression - [0..8)::8 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..8)::7 + CSharpCodeBlock - [1..8)::7 + CSharpExpressionLiteral - [1..8)::7 - [foo.bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + Dot;[.]; + Identifier;[bar]; + MarkupTextLiteral - [8..10)::2 - [.0] - Gen - SpanEditHandler;Accepts:Any + Text;[.0]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr2.cspans.txt new file mode 100644 index 0000000000..3da06726a7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr2.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [8] ) +Code span at (1:0,1 [7] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [8] ) +Markup span at (8:0,8 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) +Markup span at (9:0,9 [4] ) (Accepts:Any) - Parent: Tag block at (9:0,9 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr2.stree.txt new file mode 100644 index 0000000000..ab3a3eaa71 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeDotFollowedByInvalidIdentifierCharInImplicitExpr2.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..13)::13 - [@foo.bar.

                    ] + MarkupBlock - [0..13)::13 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + CSharpImplicitExpression - [0..8)::8 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..8)::7 + CSharpCodeBlock - [1..8)::7 + CSharpExpressionLiteral - [1..8)::7 - [foo.bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + Dot;[.]; + Identifier;[bar]; + MarkupTextLiteral - [8..9)::1 - [.] - Gen - SpanEditHandler;Accepts:Any + Text;[.]; + MarkupElement - [9..13)::4 + MarkupEndTag - [9..13)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeSemicolonAfterDot.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeSemicolonAfterDot.cspans.txt new file mode 100644 index 0000000000..fcb828addc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeSemicolonAfterDot.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [8] ) +Code span at (1:0,1 [7] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [8] ) +Markup span at (8:0,8 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeSemicolonAfterDot.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeSemicolonAfterDot.stree.txt new file mode 100644 index 0000000000..8bcb3320d0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/DoesNotIncludeSemicolonAfterDot.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..10)::10 - [@foo.bar.;] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + CSharpImplicitExpression - [0..8)::8 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..8)::7 + CSharpCodeBlock - [1..8)::7 + CSharpExpressionLiteral - [1..8)::7 - [foo.bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + Dot;[.]; + Identifier;[bar]; + MarkupTextLiteral - [8..10)::2 - [.;] - Gen - SpanEditHandler;Accepts:Any + Text;[.;]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/IgnoresSemicolonAtEndOfDottedIdentifiers.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/IgnoresSemicolonAtEndOfDottedIdentifiers.cspans.txt new file mode 100644 index 0000000000..26a7df601b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/IgnoresSemicolonAtEndOfDottedIdentifiers.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [12] ) +Code span at (1:0,1 [11] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [12] ) +Markup span at (12:0,12 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/IgnoresSemicolonAtEndOfDottedIdentifiers.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/IgnoresSemicolonAtEndOfDottedIdentifiers.stree.txt new file mode 100644 index 0000000000..81dce166d0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/IgnoresSemicolonAtEndOfDottedIdentifiers.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..13)::13 - [@foo.bar.baz;] + MarkupBlock - [0..13)::13 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..12)::12 + CSharpImplicitExpression - [0..12)::12 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..12)::11 + CSharpCodeBlock - [1..12)::11 + CSharpExpressionLiteral - [1..12)::11 - [foo.bar.baz] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + Dot;[.]; + Identifier;[bar]; + Dot;[.]; + Identifier;[baz]; + MarkupTextLiteral - [12..13)::1 - [;] - Gen - SpanEditHandler;Accepts:Any + Text;[;]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/IgnoresSemicolonAtEndOfSimpleImplicitExpression.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/IgnoresSemicolonAtEndOfSimpleImplicitExpression.cspans.txt new file mode 100644 index 0000000000..2bb1fc91e0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/IgnoresSemicolonAtEndOfSimpleImplicitExpression.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [5] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [4] ) +Code span at (1:0,1 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [4] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/IgnoresSemicolonAtEndOfSimpleImplicitExpression.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/IgnoresSemicolonAtEndOfSimpleImplicitExpression.stree.txt new file mode 100644 index 0000000000..d0b3494b53 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/IgnoresSemicolonAtEndOfSimpleImplicitExpression.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..5)::5 - [@foo;] + MarkupBlock - [0..5)::5 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpImplicitExpression - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..4)::3 + CSharpCodeBlock - [1..4)::3 + CSharpExpressionLiteral - [1..4)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupTextLiteral - [4..5)::1 - [;] - Gen - SpanEditHandler;Accepts:Any + Text;[;]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/NestedImplicitExpression.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/NestedImplicitExpression.cspans.txt new file mode 100644 index 0000000000..ec56fd948c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/NestedImplicitExpression.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [12] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [18] ) +Transition span at (12:0,12 [1] ) (Accepts:None) - Parent: Expression block at (12:0,12 [4] ) +Code span at (13:0,13 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (12:0,12 [4] ) +Markup span at (16:0,16 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [18] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/NestedImplicitExpression.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/NestedImplicitExpression.stree.txt new file mode 100644 index 0000000000..183ab53d22 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/NestedImplicitExpression.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..18)::18 - [if (true) { @foo }] + MarkupBlock - [0..18)::18 + MarkupTextLiteral - [0..12)::12 - [if (true) { ] - Gen - SpanEditHandler;Accepts:Any + Text;[if]; + Whitespace;[ ]; + Text;[(true)]; + Whitespace;[ ]; + Text;[{]; + Whitespace;[ ]; + CSharpCodeBlock - [12..16)::4 + CSharpImplicitExpression - [12..16)::4 + CSharpTransition - [12..13)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [13..16)::3 + CSharpCodeBlock - [13..16)::3 + CSharpExpressionLiteral - [13..16)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupTextLiteral - [16..18)::2 - [ }] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputExpressionIfModuleTokenNotFollowedByBrace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputExpressionIfModuleTokenNotFollowedByBrace.cspans.txt new file mode 100644 index 0000000000..4b7b3ba3f0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputExpressionIfModuleTokenNotFollowedByBrace.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [13] ) +Code span at (1:0,1 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [13] ) +Markup span at (13:0,13 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputExpressionIfModuleTokenNotFollowedByBrace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputExpressionIfModuleTokenNotFollowedByBrace.stree.txt new file mode 100644 index 0000000000..d3500903b6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputExpressionIfModuleTokenNotFollowedByBrace.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..13)::13 - [@module.foo()] + MarkupBlock - [0..13)::13 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..13)::13 + CSharpImplicitExpression - [0..13)::13 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..13)::12 + CSharpCodeBlock - [1..13)::12 + CSharpExpressionLiteral - [1..13)::12 - [module.foo()] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[module]; + Dot;[.]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + MarkupTextLiteral - [13..13)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfEOFOccursAfterTransition.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfEOFOccursAfterTransition.cspans.txt new file mode 100644 index 0000000000..cd03a1193c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfEOFOccursAfterTransition.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [1] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [1] ) +Code span at (1:0,1 [0] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [1] ) +Markup span at (1:0,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [1] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfEOFOccursAfterTransition.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfEOFOccursAfterTransition.diag.txt new file mode 100644 index 0000000000..c6d6925451 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfEOFOccursAfterTransition.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1004: End-of-file was found after the "@" character. "@" must be followed by a valid code block. If you want to output an "@", escape it using the sequence: "@@" diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfEOFOccursAfterTransition.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfEOFOccursAfterTransition.stree.txt new file mode 100644 index 0000000000..1b3a186cb6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfEOFOccursAfterTransition.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..1)::1 - [@] + MarkupBlock - [0..1)::1 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..1)::1 + CSharpImplicitExpression - [0..1)::1 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..1)::0 + CSharpCodeBlock - [1..1)::0 + CSharpExpressionLiteral - [1..1)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Marker;[]; + MarkupTextLiteral - [1..1)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfInvalidCharacterFollowsTransition.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfInvalidCharacterFollowsTransition.cspans.txt new file mode 100644 index 0000000000..d06a3a71b6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfInvalidCharacterFollowsTransition.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [2] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [1] ) +Code span at (1:0,1 [0] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [1] ) +Markup span at (1:0,1 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [2] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfInvalidCharacterFollowsTransition.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfInvalidCharacterFollowsTransition.diag.txt new file mode 100644 index 0000000000..6d8d0cd1bb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfInvalidCharacterFollowsTransition.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1005: "/" is not valid at the start of a code block. Only identifiers, keywords, comments, "(" and "{" are valid. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfInvalidCharacterFollowsTransition.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfInvalidCharacterFollowsTransition.stree.txt new file mode 100644 index 0000000000..b5a86255d7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/OutputsZeroLengthCodeSpanIfInvalidCharacterFollowsTransition.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..2)::2 - [@/] + MarkupBlock - [0..2)::2 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..1)::1 + CSharpImplicitExpression - [0..1)::1 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..1)::0 + CSharpCodeBlock - [1..1)::0 + CSharpExpressionLiteral - [1..1)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Marker;[]; + MarkupTextLiteral - [1..2)::1 - [/] - Gen - SpanEditHandler;Accepts:Any + ForwardSlash;[/]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesDottedIdentifiersAsImplicitExpression.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesDottedIdentifiersAsImplicitExpression.cspans.txt new file mode 100644 index 0000000000..f22755e950 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesDottedIdentifiersAsImplicitExpression.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [12] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [12] ) +Code span at (1:0,1 [11] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [12] ) +Markup span at (12:0,12 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [12] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesDottedIdentifiersAsImplicitExpression.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesDottedIdentifiersAsImplicitExpression.stree.txt new file mode 100644 index 0000000000..705a500244 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesDottedIdentifiersAsImplicitExpression.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..12)::12 - [@foo.bar.baz] + MarkupBlock - [0..12)::12 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..12)::12 + CSharpImplicitExpression - [0..12)::12 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..12)::11 + CSharpCodeBlock - [1..12)::11 + CSharpExpressionLiteral - [1..12)::11 - [foo.bar.baz] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + Dot;[.]; + Identifier;[bar]; + Dot;[.]; + Identifier;[baz]; + MarkupTextLiteral - [12..12)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket1.cspans.txt new file mode 100644 index 0000000000..9449b5a267 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket1.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [7] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [4] ) +Code span at (1:0,1 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [4] ) +Markup span at (4:0,4 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket1.stree.txt new file mode 100644 index 0000000000..2a973adbb8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket1.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..7)::7 - [@val??[] + MarkupBlock - [0..7)::7 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpImplicitExpression - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..4)::3 + CSharpCodeBlock - [1..4)::3 + CSharpExpressionLiteral - [1..4)::3 - [val] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + MarkupTextLiteral - [4..7)::3 - [??[] - Gen - SpanEditHandler;Accepts:Any + QuestionMark;[?]; + QuestionMark;[?]; + LeftBracket;[[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket10.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket10.cspans.txt new file mode 100644 index 0000000000..aaa7127537 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket10.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [9] ) +Code span at (1:0,1 [8] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [9] ) +Markup span at (9:0,9 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket10.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket10.stree.txt new file mode 100644 index 0000000000..f4956e6999 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket10.stree.txt @@ -0,0 +1,19 @@ +RazorDocument - [0..10)::10 - [@val?[-1]?] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..9)::9 + CSharpImplicitExpression - [0..9)::9 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..9)::8 + CSharpCodeBlock - [1..9)::8 + CSharpExpressionLiteral - [1..9)::8 - [val?[-1]] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + LeftBracket;[[]; + Minus;[-]; + IntegerLiteral;[1]; + RightBracket;[]]; + MarkupTextLiteral - [9..10)::1 - [?] - Gen - SpanEditHandler;Accepts:Any + QuestionMark;[?]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket11.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket11.cspans.txt new file mode 100644 index 0000000000..3f873f6ea4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket11.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [15] ) +Code span at (1:0,1 [14] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [15] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket11.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket11.diag.txt new file mode 100644 index 0000000000..a6129d65d7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket11.diag.txt @@ -0,0 +1 @@ +(1,12): Error RZ1027: An opening "[" is missing the corresponding closing "]". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket11.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket11.stree.txt new file mode 100644 index 0000000000..8ccf243709 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket11.stree.txt @@ -0,0 +1,19 @@ +RazorDocument - [0..15)::15 - [@val?[abc]?[def] + MarkupBlock - [0..15)::15 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..15)::15 + CSharpImplicitExpression - [0..15)::15 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..15)::14 + CSharpCodeBlock - [1..15)::14 + CSharpExpressionLiteral - [1..15)::14 - [val?[abc]?[def] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + LeftBracket;[[]; + Identifier;[abc]; + RightBracket;[]]; + QuestionMark;[?]; + LeftBracket;[[]; + Identifier;[def]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket12.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket12.cspans.txt new file mode 100644 index 0000000000..92bb2a9863 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket12.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [14] ) +Code span at (1:0,1 [13] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [14] ) +Markup span at (14:0,14 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket12.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket12.stree.txt new file mode 100644 index 0000000000..bb2ddfa496 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket12.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..14)::14 - [@val?[abc]?[2]] + MarkupBlock - [0..14)::14 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..14)::14 + CSharpImplicitExpression - [0..14)::14 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..14)::13 + CSharpCodeBlock - [1..14)::13 + CSharpExpressionLiteral - [1..14)::13 - [val?[abc]?[2]] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + LeftBracket;[[]; + Identifier;[abc]; + RightBracket;[]]; + QuestionMark;[?]; + LeftBracket;[[]; + IntegerLiteral;[2]; + RightBracket;[]]; + MarkupTextLiteral - [14..14)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket13.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket13.cspans.txt new file mode 100644 index 0000000000..4afe3fa1bc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket13.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [22] ) +Code span at (1:0,1 [21] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [22] ) +Markup span at (22:0,22 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket13.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket13.stree.txt new file mode 100644 index 0000000000..483a875a7d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket13.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..22)::22 - [@val?[abc]?.more?[def]] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..22)::22 + CSharpImplicitExpression - [0..22)::22 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..22)::21 + CSharpCodeBlock - [1..22)::21 + CSharpExpressionLiteral - [1..22)::21 - [val?[abc]?.more?[def]] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + LeftBracket;[[]; + Identifier;[abc]; + RightBracket;[]]; + QuestionMark;[?]; + Dot;[.]; + Identifier;[more]; + QuestionMark;[?]; + LeftBracket;[[]; + Identifier;[def]; + RightBracket;[]]; + MarkupTextLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket14.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket14.cspans.txt new file mode 100644 index 0000000000..03103a61c2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket14.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [21] ) +Code span at (1:0,1 [20] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [21] ) +Markup span at (21:0,21 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket14.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket14.stree.txt new file mode 100644 index 0000000000..e484ae74f9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket14.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..21)::21 - [@val?[abc]?.more?.abc] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..21)::21 + CSharpImplicitExpression - [0..21)::21 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..21)::20 + CSharpCodeBlock - [1..21)::20 + CSharpExpressionLiteral - [1..21)::20 - [val?[abc]?.more?.abc] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + LeftBracket;[[]; + Identifier;[abc]; + RightBracket;[]]; + QuestionMark;[?]; + Dot;[.]; + Identifier;[more]; + QuestionMark;[?]; + Dot;[.]; + Identifier;[abc]; + MarkupTextLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket15.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket15.cspans.txt new file mode 100644 index 0000000000..bb0defcc69 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket15.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [19] ) +Code span at (1:0,1 [18] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [19] ) +Markup span at (19:0,19 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket15.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket15.stree.txt new file mode 100644 index 0000000000..49f0bd7d07 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket15.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..19)::19 - [@val?[null ?? true]] + MarkupBlock - [0..19)::19 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..19)::19 + CSharpImplicitExpression - [0..19)::19 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..19)::18 + CSharpCodeBlock - [1..19)::18 + CSharpExpressionLiteral - [1..19)::18 - [val?[null ?? true]] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + LeftBracket;[[]; + Keyword;[null]; + Whitespace;[ ]; + NullCoalesce;[??]; + Whitespace;[ ]; + Keyword;[true]; + RightBracket;[]]; + MarkupTextLiteral - [19..19)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket16.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket16.cspans.txt new file mode 100644 index 0000000000..0b32c2fccc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket16.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [20] ) +Code span at (1:0,1 [19] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [20] ) +Markup span at (20:0,20 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket16.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket16.stree.txt new file mode 100644 index 0000000000..ef28b6255c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket16.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..20)::20 - [@val?[abc?.gef?[-1]]] + MarkupBlock - [0..20)::20 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..20)::20 + CSharpImplicitExpression - [0..20)::20 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..20)::19 + CSharpCodeBlock - [1..20)::19 + CSharpExpressionLiteral - [1..20)::19 - [val?[abc?.gef?[-1]]] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + LeftBracket;[[]; + Identifier;[abc]; + QuestionMark;[?]; + Dot;[.]; + Identifier;[gef]; + QuestionMark;[?]; + LeftBracket;[[]; + Minus;[-]; + IntegerLiteral;[1]; + RightBracket;[]]; + RightBracket;[]]; + MarkupTextLiteral - [20..20)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket2.cspans.txt new file mode 100644 index 0000000000..b01f990159 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket2.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [8] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [4] ) +Code span at (1:0,1 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [4] ) +Markup span at (4:0,4 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [8] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket2.stree.txt new file mode 100644 index 0000000000..a09cafb40e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket2.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..8)::8 - [@val??[0] + MarkupBlock - [0..8)::8 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpImplicitExpression - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..4)::3 + CSharpCodeBlock - [1..4)::3 + CSharpExpressionLiteral - [1..4)::3 - [val] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + MarkupTextLiteral - [4..8)::4 - [??[0] - Gen - SpanEditHandler;Accepts:Any + QuestionMark;[?]; + QuestionMark;[?]; + LeftBracket;[[]; + Text;[0]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket3.cspans.txt new file mode 100644 index 0000000000..f1cf24e281 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket3.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [6] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [6] ) +Code span at (1:0,1 [5] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket3.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket3.diag.txt new file mode 100644 index 0000000000..34f020b41b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket3.diag.txt @@ -0,0 +1 @@ +(1,6): Error RZ1027: An opening "[" is missing the corresponding closing "]". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket3.stree.txt new file mode 100644 index 0000000000..c65cad563b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket3.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..6)::6 - [@val?[] + MarkupBlock - [0..6)::6 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..6)::6 + CSharpImplicitExpression - [0..6)::6 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..6)::5 + CSharpCodeBlock - [1..6)::5 + CSharpExpressionLiteral - [1..6)::5 - [val?[] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + LeftBracket;[[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket4.cspans.txt new file mode 100644 index 0000000000..3af48c1d82 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket4.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [6] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [4] ) +Code span at (1:0,1 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [4] ) +Markup span at (4:0,4 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket4.stree.txt new file mode 100644 index 0000000000..8591aa3eb2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket4.stree.txt @@ -0,0 +1,15 @@ +RazorDocument - [0..6)::6 - [@val?(] + MarkupBlock - [0..6)::6 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpImplicitExpression - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..4)::3 + CSharpCodeBlock - [1..4)::3 + CSharpExpressionLiteral - [1..4)::3 - [val] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + MarkupTextLiteral - [4..6)::2 - [?(] - Gen - SpanEditHandler;Accepts:Any + QuestionMark;[?]; + Text;[(]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket5.cspans.txt new file mode 100644 index 0000000000..540927e7d8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket5.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [10] ) +Code span at (1:0,1 [9] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket5.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket5.diag.txt new file mode 100644 index 0000000000..34f020b41b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket5.diag.txt @@ -0,0 +1 @@ +(1,6): Error RZ1027: An opening "[" is missing the corresponding closing "]". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket5.stree.txt new file mode 100644 index 0000000000..8071369d6a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket5.stree.txt @@ -0,0 +1,15 @@ +RazorDocument - [0..10)::10 - [@val?[more] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..10)::10 + CSharpImplicitExpression - [0..10)::10 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..10)::9 + CSharpCodeBlock - [1..10)::9 + CSharpExpressionLiteral - [1..10)::9 - [val?[more] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + LeftBracket;[[]; + Identifier;[more]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket6.cspans.txt new file mode 100644 index 0000000000..685d604d5b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket6.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [8] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [8] ) +Code span at (1:0,1 [7] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [8] ) +Markup span at (8:0,8 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [8] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket6.stree.txt new file mode 100644 index 0000000000..dad9336067 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket6.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..8)::8 - [@val?[0]] + MarkupBlock - [0..8)::8 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + CSharpImplicitExpression - [0..8)::8 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..8)::7 + CSharpCodeBlock - [1..8)::7 + CSharpExpressionLiteral - [1..8)::7 - [val?[0]] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + LeftBracket;[[]; + IntegerLiteral;[0]; + RightBracket;[]]; + MarkupTextLiteral - [8..8)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket7.cspans.txt new file mode 100644 index 0000000000..8ecc8ebeba --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket7.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [9] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [6] ) +Code span at (1:0,1 [5] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [6] ) +Markup span at (6:0,6 [3] ) (Accepts:Any) - Parent: Tag block at (6:0,6 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket7.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket7.diag.txt new file mode 100644 index 0000000000..34f020b41b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket7.diag.txt @@ -0,0 +1 @@ +(1,6): Error RZ1027: An opening "[" is missing the corresponding closing "]". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket7.stree.txt new file mode 100644 index 0000000000..a6ce27255a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket7.stree.txt @@ -0,0 +1,19 @@ +RazorDocument - [0..9)::9 - [@val?[

                    ] + MarkupBlock - [0..9)::9 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..6)::6 + CSharpImplicitExpression - [0..6)::6 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..6)::5 + CSharpCodeBlock - [1..6)::5 + CSharpExpressionLiteral - [1..6)::5 - [val?[] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + LeftBracket;[[]; + MarkupElement - [6..9)::3 + MarkupStartTag - [6..9)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket8.cspans.txt new file mode 100644 index 0000000000..5890f7654d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket8.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [11] ) +Code span at (1:0,1 [10] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [11] ) +Markup span at (11:0,11 [3] ) (Accepts:Any) - Parent: Tag block at (11:0,11 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket8.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket8.diag.txt new file mode 100644 index 0000000000..34f020b41b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket8.diag.txt @@ -0,0 +1 @@ +(1,6): Error RZ1027: An opening "[" is missing the corresponding closing "]". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket8.stree.txt new file mode 100644 index 0000000000..5e458aa0e8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket8.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..14)::14 - [@val?[more.

                    ] + MarkupBlock - [0..14)::14 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..11)::11 + CSharpImplicitExpression - [0..11)::11 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..11)::10 + CSharpCodeBlock - [1..11)::10 + CSharpExpressionLiteral - [1..11)::10 - [val?[more.] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + LeftBracket;[[]; + Identifier;[more]; + Dot;[.]; + MarkupElement - [11..14)::3 + MarkupStartTag - [11..14)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket9.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket9.cspans.txt new file mode 100644 index 0000000000..b93ef2adc4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket9.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [4] ) +Code span at (1:0,1 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [4] ) +Markup span at (4:0,4 [7] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) +Markup span at (11:0,11 [3] ) (Accepts:Any) - Parent: Tag block at (11:0,11 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket9.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket9.stree.txt new file mode 100644 index 0000000000..72be12795a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Bracket9.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..14)::14 - [@val??[more

                    ] + MarkupBlock - [0..14)::14 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpImplicitExpression - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..4)::3 + CSharpCodeBlock - [1..4)::3 + CSharpExpressionLiteral - [1..4)::3 - [val] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + MarkupTextLiteral - [4..11)::7 - [??[more] - Gen - SpanEditHandler;Accepts:Any + QuestionMark;[?]; + QuestionMark;[?]; + LeftBracket;[[]; + Text;[more]; + MarkupElement - [11..14)::3 + MarkupStartTag - [11..14)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot1.cspans.txt new file mode 100644 index 0000000000..2bb1fc91e0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot1.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [5] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [4] ) +Code span at (1:0,1 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [4] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot1.stree.txt new file mode 100644 index 0000000000..4ccc4619af --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot1.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..5)::5 - [@val?] + MarkupBlock - [0..5)::5 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpImplicitExpression - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..4)::3 + CSharpCodeBlock - [1..4)::3 + CSharpExpressionLiteral - [1..4)::3 - [val] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + MarkupTextLiteral - [4..5)::1 - [?] - Gen - SpanEditHandler;Accepts:Any + QuestionMark;[?]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot10.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot10.cspans.txt new file mode 100644 index 0000000000..0013e6c6e5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot10.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [10] ) +Code span at (1:0,1 [9] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [10] ) +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (10:0,10 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot10.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot10.stree.txt new file mode 100644 index 0000000000..3804d990ef --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot10.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..13)::13 - [@val?.more

                    ] + MarkupBlock - [0..13)::13 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..10)::10 + CSharpImplicitExpression - [0..10)::10 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..10)::9 + CSharpCodeBlock - [1..10)::9 + CSharpExpressionLiteral - [1..10)::9 - [val?.more] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + Dot;[.]; + Identifier;[more]; + MarkupElement - [10..13)::3 + MarkupStartTag - [10..13)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot11.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot11.cspans.txt new file mode 100644 index 0000000000..b93ef2adc4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot11.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [4] ) +Code span at (1:0,1 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [4] ) +Markup span at (4:0,4 [7] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) +Markup span at (11:0,11 [3] ) (Accepts:Any) - Parent: Tag block at (11:0,11 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot11.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot11.stree.txt new file mode 100644 index 0000000000..ce8be23cef --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot11.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..14)::14 - [@val??.more

                    ] + MarkupBlock - [0..14)::14 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpImplicitExpression - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..4)::3 + CSharpCodeBlock - [1..4)::3 + CSharpExpressionLiteral - [1..4)::3 - [val] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + MarkupTextLiteral - [4..11)::7 - [??.more] - Gen - SpanEditHandler;Accepts:Any + QuestionMark;[?]; + QuestionMark;[?]; + Text;[.more]; + MarkupElement - [11..14)::3 + MarkupStartTag - [11..14)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot12.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot12.cspans.txt new file mode 100644 index 0000000000..41f5f8c0d4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot12.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [19] ) +Code span at (1:0,1 [18] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [19] ) +Markup span at (19:0,19 [3] ) (Accepts:Any) - Parent: Tag block at (19:0,19 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot12.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot12.stree.txt new file mode 100644 index 0000000000..01eccdf9f7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot12.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..22)::22 - [@val?.more(false)?.

                    ] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..19)::19 + CSharpImplicitExpression - [0..19)::19 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..19)::18 + CSharpCodeBlock - [1..19)::18 + CSharpExpressionLiteral - [1..19)::18 - [val?.more(false)?.] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + Dot;[.]; + Identifier;[more]; + LeftParenthesis;[(]; + Keyword;[false]; + RightParenthesis;[)]; + QuestionMark;[?]; + Dot;[.]; + MarkupElement - [19..22)::3 + MarkupStartTag - [19..22)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot13.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot13.cspans.txt new file mode 100644 index 0000000000..4afe3fa1bc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot13.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [22] ) +Code span at (1:0,1 [21] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [22] ) +Markup span at (22:0,22 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot13.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot13.stree.txt new file mode 100644 index 0000000000..193c9dbc4e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot13.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..22)::22 - [@val?.more(false)?.abc] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..22)::22 + CSharpImplicitExpression - [0..22)::22 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..22)::21 + CSharpCodeBlock - [1..22)::21 + CSharpExpressionLiteral - [1..22)::21 - [val?.more(false)?.abc] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + Dot;[.]; + Identifier;[more]; + LeftParenthesis;[(]; + Keyword;[false]; + RightParenthesis;[)]; + QuestionMark;[?]; + Dot;[.]; + Identifier;[abc]; + MarkupTextLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot14.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot14.cspans.txt new file mode 100644 index 0000000000..3df6aca276 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot14.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [29] ) +Code span at (1:0,1 [28] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [29] ) +Markup span at (29:0,29 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot14.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot14.stree.txt new file mode 100644 index 0000000000..c70700ff24 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot14.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..29)::29 - [@val?.more(null ?? true)?.abc] + MarkupBlock - [0..29)::29 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..29)::29 + CSharpImplicitExpression - [0..29)::29 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..29)::28 + CSharpCodeBlock - [1..29)::28 + CSharpExpressionLiteral - [1..29)::28 - [val?.more(null ?? true)?.abc] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + Dot;[.]; + Identifier;[more]; + LeftParenthesis;[(]; + Keyword;[null]; + Whitespace;[ ]; + NullCoalesce;[??]; + Whitespace;[ ]; + Keyword;[true]; + RightParenthesis;[)]; + QuestionMark;[?]; + Dot;[.]; + Identifier;[abc]; + MarkupTextLiteral - [29..29)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot2.cspans.txt new file mode 100644 index 0000000000..3af48c1d82 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot2.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [6] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [4] ) +Code span at (1:0,1 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [4] ) +Markup span at (4:0,4 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot2.stree.txt new file mode 100644 index 0000000000..37455f2956 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot2.stree.txt @@ -0,0 +1,15 @@ +RazorDocument - [0..6)::6 - [@val??] + MarkupBlock - [0..6)::6 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpImplicitExpression - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..4)::3 + CSharpCodeBlock - [1..4)::3 + CSharpExpressionLiteral - [1..4)::3 - [val] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + MarkupTextLiteral - [4..6)::2 - [??] - Gen - SpanEditHandler;Accepts:Any + QuestionMark;[?]; + QuestionMark;[?]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot3.cspans.txt new file mode 100644 index 0000000000..ad423cd178 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot3.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [4] ) +Code span at (1:0,1 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [4] ) +Markup span at (4:0,4 [6] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot3.stree.txt new file mode 100644 index 0000000000..6ea6455932 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot3.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..10)::10 - [@val??more] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpImplicitExpression - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..4)::3 + CSharpCodeBlock - [1..4)::3 + CSharpExpressionLiteral - [1..4)::3 - [val] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + MarkupTextLiteral - [4..10)::6 - [??more] - Gen - SpanEditHandler;Accepts:Any + QuestionMark;[?]; + QuestionMark;[?]; + Text;[more]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot4.cspans.txt new file mode 100644 index 0000000000..3af48c1d82 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot4.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [6] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [4] ) +Code span at (1:0,1 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [4] ) +Markup span at (4:0,4 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot4.stree.txt new file mode 100644 index 0000000000..e90d2caa25 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot4.stree.txt @@ -0,0 +1,15 @@ +RazorDocument - [0..6)::6 - [@val?!] + MarkupBlock - [0..6)::6 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpImplicitExpression - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..4)::3 + CSharpCodeBlock - [1..4)::3 + CSharpExpressionLiteral - [1..4)::3 - [val] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + MarkupTextLiteral - [4..6)::2 - [?!] - Gen - SpanEditHandler;Accepts:Any + QuestionMark;[?]; + Bang;[!]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot5.cspans.txt new file mode 100644 index 0000000000..fb74b137cb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot5.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [6] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [6] ) +Code span at (1:0,1 [5] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [6] ) +Markup span at (6:0,6 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot5.stree.txt new file mode 100644 index 0000000000..cb4ae61a45 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot5.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..6)::6 - [@val?.] + MarkupBlock - [0..6)::6 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..6)::6 + CSharpImplicitExpression - [0..6)::6 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..6)::5 + CSharpCodeBlock - [1..6)::5 + CSharpExpressionLiteral - [1..6)::5 - [val?.] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + Dot;[.]; + MarkupTextLiteral - [6..6)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot6.cspans.txt new file mode 100644 index 0000000000..9449b5a267 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot6.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [7] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [4] ) +Code span at (1:0,1 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [4] ) +Markup span at (4:0,4 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot6.stree.txt new file mode 100644 index 0000000000..aaa2a274fb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot6.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..7)::7 - [@val??.] + MarkupBlock - [0..7)::7 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpImplicitExpression - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..4)::3 + CSharpCodeBlock - [1..4)::3 + CSharpExpressionLiteral - [1..4)::3 - [val] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + MarkupTextLiteral - [4..7)::3 - [??.] - Gen - SpanEditHandler;Accepts:Any + QuestionMark;[?]; + QuestionMark;[?]; + Text;[.]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot7.cspans.txt new file mode 100644 index 0000000000..922c9aa28d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot7.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [11] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [6] ) +Code span at (1:0,1 [5] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [6] ) +Markup span at (6:0,6 [5] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [11] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot7.stree.txt new file mode 100644 index 0000000000..6c7496a3a5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot7.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..11)::11 - [@val?.(abc)] + MarkupBlock - [0..11)::11 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..6)::6 + CSharpImplicitExpression - [0..6)::6 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..6)::5 + CSharpCodeBlock - [1..6)::5 + CSharpExpressionLiteral - [1..6)::5 - [val?.] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + Dot;[.]; + MarkupTextLiteral - [6..11)::5 - [(abc)] - Gen - SpanEditHandler;Accepts:Any + Text;[(abc)]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot8.cspans.txt new file mode 100644 index 0000000000..f39a70eff8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot8.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [9] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [6] ) +Code span at (1:0,1 [5] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [6] ) +Markup span at (6:0,6 [3] ) (Accepts:Any) - Parent: Tag block at (6:0,6 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot8.stree.txt new file mode 100644 index 0000000000..f47f2c3137 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot8.stree.txt @@ -0,0 +1,19 @@ +RazorDocument - [0..9)::9 - [@val?.

                    ] + MarkupBlock - [0..9)::9 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..6)::6 + CSharpImplicitExpression - [0..6)::6 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..6)::5 + CSharpCodeBlock - [1..6)::5 + CSharpExpressionLiteral - [1..6)::5 - [val?.] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + Dot;[.]; + MarkupElement - [6..9)::3 + MarkupStartTag - [6..9)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot9.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot9.cspans.txt new file mode 100644 index 0000000000..a325887027 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot9.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [10] ) +Code span at (1:0,1 [9] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [10] ) +Markup span at (10:0,10 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot9.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot9.stree.txt new file mode 100644 index 0000000000..3f147507dc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesNullConditionalOperatorImplicitExpression_Dot9.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..10)::10 - [@val?.more] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..10)::10 + CSharpImplicitExpression - [0..10)::10 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..10)::9 + CSharpCodeBlock - [1..10)::9 + CSharpExpressionLiteral - [1..10)::9 - [val?.more] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[val]; + QuestionMark;[?]; + Dot;[.]; + Identifier;[more]; + MarkupTextLiteral - [10..10)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesSingleIdentifierAsImplicitExpression.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesSingleIdentifierAsImplicitExpression.cspans.txt new file mode 100644 index 0000000000..490eb4a82f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesSingleIdentifierAsImplicitExpression.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [4] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [4] ) +Code span at (1:0,1 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [4] ) +Markup span at (4:0,4 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesSingleIdentifierAsImplicitExpression.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesSingleIdentifierAsImplicitExpression.stree.txt new file mode 100644 index 0000000000..5215a83230 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ParsesSingleIdentifierAsImplicitExpression.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..4)::4 - [@foo] + MarkupBlock - [0..4)::4 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpImplicitExpression - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..4)::3 + CSharpCodeBlock - [1..4)::3 + CSharpExpressionLiteral - [1..4)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupTextLiteral - [4..4)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ProperlyParsesBracketsAndBalancesThemInImplicitExpression.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ProperlyParsesBracketsAndBalancesThemInImplicitExpression.cspans.txt new file mode 100644 index 0000000000..b0120744b1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ProperlyParsesBracketsAndBalancesThemInImplicitExpression.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [34] ) +Code span at (1:0,1 [33] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [34] ) +Markup span at (34:0,34 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ProperlyParsesBracketsAndBalancesThemInImplicitExpression.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ProperlyParsesBracketsAndBalancesThemInImplicitExpression.stree.txt new file mode 100644 index 0000000000..119de13dfa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ProperlyParsesBracketsAndBalancesThemInImplicitExpression.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..34)::34 - [@foo.bar[4 * (8 + 7)]["fo\"o"].baz] + MarkupBlock - [0..34)::34 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..34)::34 + CSharpImplicitExpression - [0..34)::34 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..34)::33 + CSharpCodeBlock - [1..34)::33 + CSharpExpressionLiteral - [1..34)::33 - [foo.bar[4 * (8 + 7)]["fo\"o"].baz] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + Dot;[.]; + Identifier;[bar]; + LeftBracket;[[]; + IntegerLiteral;[4]; + Whitespace;[ ]; + Star;[*]; + Whitespace;[ ]; + LeftParenthesis;[(]; + IntegerLiteral;[8]; + Whitespace;[ ]; + Plus;[+]; + Whitespace;[ ]; + IntegerLiteral;[7]; + RightParenthesis;[)]; + RightBracket;[]]; + LeftBracket;[[]; + StringLiteral;["fo\"o"]; + RightBracket;[]]; + Dot;[.]; + Identifier;[baz]; + MarkupTextLiteral - [34..34)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ProperlyParsesParenthesesAndBalancesThemInImplicitExpression.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ProperlyParsesParenthesesAndBalancesThemInImplicitExpression.cspans.txt new file mode 100644 index 0000000000..c32f012803 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ProperlyParsesParenthesesAndBalancesThemInImplicitExpression.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [115] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [115] ) +Code span at (1:0,1 [114] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [115] ) +Markup span at (115:0,115 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [115] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ProperlyParsesParenthesesAndBalancesThemInImplicitExpression.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ProperlyParsesParenthesesAndBalancesThemInImplicitExpression.stree.txt new file mode 100644 index 0000000000..da9bcfb36f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/ProperlyParsesParenthesesAndBalancesThemInImplicitExpression.stree.txt @@ -0,0 +1,72 @@ +RazorDocument - [0..115)::115 - [@foo().bar("bi\"z", 4)("chained method; call").baz(@"bo""z", '\'', () => { return 4; }, (4+5+new { foo = bar[4] }))] + MarkupBlock - [0..115)::115 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..115)::115 + CSharpImplicitExpression - [0..115)::115 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..115)::114 + CSharpCodeBlock - [1..115)::114 + CSharpExpressionLiteral - [1..115)::114 - [foo().bar("bi\"z", 4)("chained method; call").baz(@"bo""z", '\'', () => { return 4; }, (4+5+new { foo = bar[4] }))] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Dot;[.]; + Identifier;[bar]; + LeftParenthesis;[(]; + StringLiteral;["bi\"z"]; + Comma;[,]; + Whitespace;[ ]; + IntegerLiteral;[4]; + RightParenthesis;[)]; + LeftParenthesis;[(]; + StringLiteral;["chained method; call"]; + RightParenthesis;[)]; + Dot;[.]; + Identifier;[baz]; + LeftParenthesis;[(]; + StringLiteral;[@"bo""z"]; + Comma;[,]; + Whitespace;[ ]; + CharacterLiteral;['\'']; + Comma;[,]; + Whitespace;[ ]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Whitespace;[ ]; + GreaterThanEqual;[=>]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Keyword;[return]; + Whitespace;[ ]; + IntegerLiteral;[4]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Comma;[,]; + Whitespace;[ ]; + LeftParenthesis;[(]; + IntegerLiteral;[4]; + Plus;[+]; + IntegerLiteral;[5]; + Plus;[+]; + Keyword;[new]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + LeftBracket;[[]; + IntegerLiteral;[4]; + RightBracket;[]]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + RightParenthesis;[)]; + MarkupTextLiteral - [115..115)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/StopsBalancingParenthesesAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/StopsBalancingParenthesesAtEOF.cspans.txt new file mode 100644 index 0000000000..fae6fdec1c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/StopsBalancingParenthesesAtEOF.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [7] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [7] ) +Code span at (1:0,1 [6] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/StopsBalancingParenthesesAtEOF.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/StopsBalancingParenthesesAtEOF.diag.txt new file mode 100644 index 0000000000..ade6c85b25 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/StopsBalancingParenthesesAtEOF.diag.txt @@ -0,0 +1 @@ +(1,5): Error RZ1027: An opening "(" is missing the corresponding closing ")". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/StopsBalancingParenthesesAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/StopsBalancingParenthesesAtEOF.stree.txt new file mode 100644 index 0000000000..cecb589f6b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/StopsBalancingParenthesesAtEOF.stree.txt @@ -0,0 +1,15 @@ +RazorDocument - [0..7)::7 - [@foo(()] + MarkupBlock - [0..7)::7 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..7)::7 + CSharpImplicitExpression - [0..7)::7 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..7)::6 + CSharpCodeBlock - [1..7)::6 + CSharpExpressionLiteral - [1..7)::6 - [foo(()] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[foo]; + LeftParenthesis;[(]; + LeftParenthesis;[(]; + RightParenthesis;[)]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/SupportsSlashesWithinComplexImplicitExpressions.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/SupportsSlashesWithinComplexImplicitExpressions.cspans.txt new file mode 100644 index 0000000000..4b9c5f7196 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/SupportsSlashesWithinComplexImplicitExpressions.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [103] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [103] ) +Code span at (1:0,1 [102] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [103] ) +Markup span at (103:0,103 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [103] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/SupportsSlashesWithinComplexImplicitExpressions.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/SupportsSlashesWithinComplexImplicitExpressions.stree.txt new file mode 100644 index 0000000000..ec25b4c750 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/SupportsSlashesWithinComplexImplicitExpressions.stree.txt @@ -0,0 +1,48 @@ +RazorDocument - [0..103)::103 - [@DataGridColumn.Template("Years of Service", e => (int)Math.Round((DateTime.Now - dt).TotalDays / 365))] + MarkupBlock - [0..103)::103 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..103)::103 + CSharpImplicitExpression - [0..103)::103 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..103)::102 + CSharpCodeBlock - [1..103)::102 + CSharpExpressionLiteral - [1..103)::102 - [DataGridColumn.Template("Years of Service", e => (int)Math.Round((DateTime.Now - dt).TotalDays / 365))] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DataGridColumn]; + Dot;[.]; + Identifier;[Template]; + LeftParenthesis;[(]; + StringLiteral;["Years of Service"]; + Comma;[,]; + Whitespace;[ ]; + Identifier;[e]; + Whitespace;[ ]; + GreaterThanEqual;[=>]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Keyword;[int]; + RightParenthesis;[)]; + Identifier;[Math]; + Dot;[.]; + Identifier;[Round]; + LeftParenthesis;[(]; + LeftParenthesis;[(]; + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + Whitespace;[ ]; + Minus;[-]; + Whitespace;[ ]; + Identifier;[dt]; + RightParenthesis;[)]; + Dot;[.]; + Identifier;[TotalDays]; + Whitespace;[ ]; + Slash;[/]; + Whitespace;[ ]; + IntegerLiteral;[365]; + RightParenthesis;[)]; + RightParenthesis;[)]; + MarkupTextLiteral - [103..103)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesAfterIdentifierUnlessFollowedByDotOrParenInImplicitExpr.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesAfterIdentifierUnlessFollowedByDotOrParenInImplicitExpr.cspans.txt new file mode 100644 index 0000000000..47ae3df07e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesAfterIdentifierUnlessFollowedByDotOrParenInImplicitExpr.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [12] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [8] ) +Code span at (1:0,1 [7] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [8] ) +Markup span at (8:0,8 [4] ) (Accepts:Any) - Parent: Tag block at (8:0,8 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesAfterIdentifierUnlessFollowedByDotOrParenInImplicitExpr.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesAfterIdentifierUnlessFollowedByDotOrParenInImplicitExpr.stree.txt new file mode 100644 index 0000000000..b6f3ffd448 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesAfterIdentifierUnlessFollowedByDotOrParenInImplicitExpr.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..12)::12 - [@foo.bar

                    ] + MarkupBlock - [0..12)::12 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + CSharpImplicitExpression - [0..8)::8 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..8)::7 + CSharpCodeBlock - [1..8)::7 + CSharpExpressionLiteral - [1..8)::7 - [foo.bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + Dot;[.]; + Identifier;[bar]; + MarkupElement - [8..12)::4 + MarkupEndTag - [8..12)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExprBeforeDotIfDotNotFollowedByIdentifierStartChar.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExprBeforeDotIfDotNotFollowedByIdentifierStartChar.cspans.txt new file mode 100644 index 0000000000..de2f605a48 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExprBeforeDotIfDotNotFollowedByIdentifierStartChar.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [14] ) +Code span at (1:0,1 [13] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [14] ) +Markup span at (14:0,14 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExprBeforeDotIfDotNotFollowedByIdentifierStartChar.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExprBeforeDotIfDotNotFollowedByIdentifierStartChar.stree.txt new file mode 100644 index 0000000000..e7f6e17881 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExprBeforeDotIfDotNotFollowedByIdentifierStartChar.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..17)::17 - [@foo().bar.baz.42] + MarkupBlock - [0..17)::17 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..14)::14 + CSharpImplicitExpression - [0..14)::14 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..14)::13 + CSharpCodeBlock - [1..14)::13 + CSharpExpressionLiteral - [1..14)::13 - [foo().bar.baz] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Dot;[.]; + Identifier;[bar]; + Dot;[.]; + Identifier;[baz]; + MarkupTextLiteral - [14..17)::3 - [.42] - Gen - SpanEditHandler;Accepts:Any + Text;[.42]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtHtmlEndTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtHtmlEndTag.cspans.txt new file mode 100644 index 0000000000..7e4212394b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtHtmlEndTag.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [14] ) +Code span at (1:0,1 [13] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [14] ) +Markup span at (14:0,14 [4] ) (Accepts:Any) - Parent: Tag block at (14:0,14 [4] ) +Markup span at (18:0,18 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtHtmlEndTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtHtmlEndTag.stree.txt new file mode 100644 index 0000000000..bd0ea4ac3a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtHtmlEndTag.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..22)::22 - [@foo().bar.baz

                    zoop] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..14)::14 + CSharpImplicitExpression - [0..14)::14 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..14)::13 + CSharpCodeBlock - [1..14)::13 + CSharpExpressionLiteral - [1..14)::13 - [foo().bar.baz] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Dot;[.]; + Identifier;[bar]; + Dot;[.]; + Identifier;[baz]; + MarkupElement - [14..18)::4 + MarkupEndTag - [14..18)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [18..22)::4 - [zoop] - Gen - SpanEditHandler;Accepts:Any + Text;[zoop]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtHtmlStartTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtHtmlStartTag.cspans.txt new file mode 100644 index 0000000000..d1cd526148 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtHtmlStartTag.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [14] ) +Code span at (1:0,1 [13] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [14] ) +Markup span at (14:0,14 [3] ) (Accepts:Any) - Parent: Tag block at (14:0,14 [3] ) +Markup span at (17:0,17 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtHtmlStartTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtHtmlStartTag.stree.txt new file mode 100644 index 0000000000..c0cc2a6788 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtHtmlStartTag.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..21)::21 - [@foo().bar.baz

                    zoop] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..14)::14 + CSharpImplicitExpression - [0..14)::14 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..14)::13 + CSharpCodeBlock - [1..14)::13 + CSharpExpressionLiteral - [1..14)::13 - [foo().bar.baz] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Dot;[.]; + Identifier;[bar]; + Dot;[.]; + Identifier;[baz]; + MarkupElement - [14..21)::7 + MarkupStartTag - [14..17)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [17..21)::4 - [zoop] - Gen - SpanEditHandler;Accepts:Any + Text;[zoop]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtLastValidPointIfDotFollowedByWhitespace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtLastValidPointIfDotFollowedByWhitespace.cspans.txt new file mode 100644 index 0000000000..d5399075f6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtLastValidPointIfDotFollowedByWhitespace.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [4] ) +Code span at (1:0,1 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [4] ) +Markup span at (4:0,4 [13] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtLastValidPointIfDotFollowedByWhitespace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtLastValidPointIfDotFollowedByWhitespace.stree.txt new file mode 100644 index 0000000000..53ca571528 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionAtLastValidPointIfDotFollowedByWhitespace.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..17)::17 - [@foo. bar() (baz)] + MarkupBlock - [0..17)::17 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpImplicitExpression - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..4)::3 + CSharpCodeBlock - [1..4)::3 + CSharpExpressionLiteral - [1..4)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupTextLiteral - [4..17)::13 - [. bar() (baz)] - Gen - SpanEditHandler;Accepts:Any + Text;[.]; + Whitespace;[ ]; + Text;[bar()]; + Whitespace;[ ]; + Text;[(baz)]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionIfCloseParenFollowedByAnyWhiteSpace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionIfCloseParenFollowedByAnyWhiteSpace.cspans.txt new file mode 100644 index 0000000000..52d6a4d612 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionIfCloseParenFollowedByAnyWhiteSpace.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [10] ) +Code span at (1:0,1 [9] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [10] ) +Markup span at (10:0,10 [6] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionIfCloseParenFollowedByAnyWhiteSpace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionIfCloseParenFollowedByAnyWhiteSpace.stree.txt new file mode 100644 index 0000000000..dfaef5653f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionIfCloseParenFollowedByAnyWhiteSpace.stree.txt @@ -0,0 +1,19 @@ +RazorDocument - [0..16)::16 - [@foo.bar() (baz)] + MarkupBlock - [0..16)::16 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..10)::10 + CSharpImplicitExpression - [0..10)::10 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..10)::9 + CSharpCodeBlock - [1..10)::9 + CSharpExpressionLiteral - [1..10)::9 - [foo.bar()] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + Dot;[.]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + MarkupTextLiteral - [10..16)::6 - [ (baz)] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[(baz)]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionIfIdentifierFollowedByAnyWhiteSpace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionIfIdentifierFollowedByAnyWhiteSpace.cspans.txt new file mode 100644 index 0000000000..d5399075f6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionIfIdentifierFollowedByAnyWhiteSpace.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [4] ) +Code span at (1:0,1 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [4] ) +Markup span at (4:0,4 [13] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionIfIdentifierFollowedByAnyWhiteSpace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionIfIdentifierFollowedByAnyWhiteSpace.stree.txt new file mode 100644 index 0000000000..baaaa2f435 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpImplicitExpressionTest/TerminatesImplicitExpressionIfIdentifierFollowedByAnyWhiteSpace.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..17)::17 - [@foo .bar() (baz)] + MarkupBlock - [0..17)::17 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpImplicitExpression - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..4)::3 + CSharpCodeBlock - [1..4)::3 + CSharpExpressionLiteral - [1..4)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupTextLiteral - [4..17)::13 - [ .bar() (baz)] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[.bar()]; + Whitespace;[ ]; + Text;[(baz)]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedCodeBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedCodeBlock.cspans.txt new file mode 100644 index 0000000000..dce52a5221 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedCodeBlock.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [35] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [35] ) +Code span at (1:0,1 [34] ) (Accepts:None) - Parent: Statement block at (0:0,0 [35] ) +Markup span at (35:0,35 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [35] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedCodeBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedCodeBlock.stree.txt new file mode 100644 index 0000000000..08c7c801a9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedCodeBlock.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..35)::35 - [@while(true) { { { { foo(); } } } }] + MarkupBlock - [0..35)::35 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..35)::35 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..35)::34 - [while(true) { { { { foo(); } } } }] - Gen - SpanEditHandler;Accepts:None + Keyword;[while]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [35..35)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedExplicitExpression.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedExplicitExpression.cspans.txt new file mode 100644 index 0000000000..67434c2daf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedExplicitExpression.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Code span at (1:0,1 [14] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [23] ) +Transition span at (15:0,15 [1] ) (Accepts:None) - Parent: Expression block at (15:0,15 [6] ) +MetaCode span at (16:0,16 [1] ) (Accepts:None) - Parent: Expression block at (15:0,15 [6] ) +Code span at (17:0,17 [3] ) (Accepts:Any) - Parent: Expression block at (15:0,15 [6] ) +MetaCode span at (20:0,20 [1] ) (Accepts:None) - Parent: Expression block at (15:0,15 [6] ) +Code span at (21:0,21 [2] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (23:0,23 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedExplicitExpression.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedExplicitExpression.stree.txt new file mode 100644 index 0000000000..b0ff0f1147 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedExplicitExpression.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..23)::23 - [@while(true) { @(foo) }] + MarkupBlock - [0..23)::23 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..23)::23 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..15)::14 - [while(true) { ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[while]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + CSharpCodeBlock - [15..21)::6 + CSharpExplicitExpression - [15..21)::6 + CSharpTransition - [15..16)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [16..21)::5 + RazorMetaCode - [16..17)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [17..20)::3 + CSharpExpressionLiteral - [17..20)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Identifier;[foo]; + RazorMetaCode - [20..21)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + CSharpStatementLiteral - [21..23)::2 - [ }] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [23..23)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedImplicitExpression.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedImplicitExpression.cspans.txt new file mode 100644 index 0000000000..4ab605085c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedImplicitExpression.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Code span at (1:0,1 [14] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [21] ) +Transition span at (15:0,15 [1] ) (Accepts:None) - Parent: Expression block at (15:0,15 [4] ) +Code span at (16:0,16 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (15:0,15 [4] ) +Code span at (19:0,19 [2] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Markup span at (21:0,21 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedImplicitExpression.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedImplicitExpression.stree.txt new file mode 100644 index 0000000000..fa46e8b529 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedImplicitExpression.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..21)::21 - [@while(true) { @foo }] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..21)::21 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..15)::14 - [while(true) { ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[while]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + CSharpCodeBlock - [15..19)::4 + CSharpImplicitExpression - [15..19)::4 + CSharpTransition - [15..16)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [16..19)::3 + CSharpCodeBlock - [16..19)::3 + CSharpExpressionLiteral - [16..19)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[ATD];K14 + Identifier;[foo]; + CSharpStatementLiteral - [19..21)::2 - [ }] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedKeywordStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedKeywordStatement.cspans.txt new file mode 100644 index 0000000000..ad7d618e3f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedKeywordStatement.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [55] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [55] ) +Code span at (1:0,1 [54] ) (Accepts:None) - Parent: Statement block at (0:0,0 [55] ) +Markup span at (55:0,55 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [55] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedKeywordStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedKeywordStatement.stree.txt new file mode 100644 index 0000000000..be2365d2d6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedKeywordStatement.stree.txt @@ -0,0 +1,49 @@ +RazorDocument - [0..55)::55 - [@while(true) { for(int i = 0; i < 10; i++) { foo(); } }] + MarkupBlock - [0..55)::55 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..55)::55 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..55)::54 - [while(true) { for(int i = 0; i < 10; i++) { foo(); } }] - Gen - SpanEditHandler;Accepts:None + Keyword;[while]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Keyword;[for]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Increment;[++]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [55..55)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedMarkupBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedMarkupBlock.cspans.txt new file mode 100644 index 0000000000..c56d0fd0f8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedMarkupBlock.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +Code span at (1:0,1 [13] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [29] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [14] ) +Markup span at (15:0,15 [3] ) (Accepts:None) - Parent: Tag block at (15:0,15 [3] ) +Markup span at (18:0,18 [5] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [14] ) +Markup span at (23:0,23 [4] ) (Accepts:None) - Parent: Tag block at (23:0,23 [4] ) +Markup span at (27:0,27 [1] ) (Accepts:None) - Parent: Markup block at (14:0,14 [14] ) +Code span at (28:0,28 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +Markup span at (29:0,29 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedMarkupBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedMarkupBlock.stree.txt new file mode 100644 index 0000000000..93f1331759 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedMarkupBlock.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..29)::29 - [@while(true) {

                    Hello

                    }] + MarkupBlock - [0..29)::29 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..29)::29 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..14)::13 - [while(true) {] - Gen - SpanEditHandler;Accepts:Any + Keyword;[while]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [14..28)::14 + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [15..27)::12 + MarkupStartTag - [15..18)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [18..23)::5 - [Hello] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + MarkupEndTag - [23..27)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [27..28)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [28..29)::1 - [}] - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [29..29)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedSimpleStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedSimpleStatement.cspans.txt new file mode 100644 index 0000000000..cdeba78164 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedSimpleStatement.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Code span at (1:0,1 [22] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (23:0,23 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedSimpleStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedSimpleStatement.stree.txt new file mode 100644 index 0000000000..4174c105bc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpNestedStatementsTest/NestedSimpleStatement.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..23)::23 - [@while(true) { foo(); }] + MarkupBlock - [0..23)::23 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..23)::23 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..23)::22 - [while(true) { foo(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[while]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [23..23)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/EmptyRazorComment.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/EmptyRazorComment.cspans.txt new file mode 100644 index 0000000000..2dcfb49765 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/EmptyRazorComment.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [4] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Comment block at (0:0,0 [4] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Comment block at (0:0,0 [4] ) +Comment span at (2:0,2 [0] ) (Accepts:Any) - Parent: Comment block at (0:0,0 [4] ) +MetaCode span at (2:0,2 [1] ) (Accepts:None) - Parent: Comment block at (0:0,0 [4] ) +Transition span at (3:0,3 [1] ) (Accepts:None) - Parent: Comment block at (0:0,0 [4] ) +Markup span at (4:0,4 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/EmptyRazorComment.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/EmptyRazorComment.stree.txt new file mode 100644 index 0000000000..4ffe83985c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/EmptyRazorComment.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..4)::4 - [@**@] + MarkupBlock - [0..4)::4 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorComment - [0..4)::4 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + MarkupTextLiteral - [4..4)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/MultipleRazorCommentInMarkup.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/MultipleRazorCommentInMarkup.cspans.txt new file mode 100644 index 0000000000..290c517695 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/MultipleRazorCommentInMarkup.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [3] ) +Markup span at (3:0,3 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Markup span at (5:1,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Transition span at (7:1,2 [1] ) (Accepts:None) - Parent: Comment block at (7:1,2 [4] ) +MetaCode span at (8:1,3 [1] ) (Accepts:None) - Parent: Comment block at (7:1,2 [4] ) +Comment span at (9:1,4 [0] ) (Accepts:Any) - Parent: Comment block at (7:1,2 [4] ) +MetaCode span at (9:1,4 [1] ) (Accepts:None) - Parent: Comment block at (7:1,2 [4] ) +Transition span at (10:1,5 [1] ) (Accepts:None) - Parent: Comment block at (7:1,2 [4] ) +Markup span at (11:1,6 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Transition span at (15:2,0 [1] ) (Accepts:None) - Parent: Comment block at (15:2,0 [4] ) +MetaCode span at (16:2,1 [1] ) (Accepts:None) - Parent: Comment block at (15:2,0 [4] ) +Comment span at (17:2,2 [0] ) (Accepts:Any) - Parent: Comment block at (15:2,0 [4] ) +MetaCode span at (17:2,2 [1] ) (Accepts:None) - Parent: Comment block at (15:2,0 [4] ) +Transition span at (18:2,3 [1] ) (Accepts:None) - Parent: Comment block at (15:2,0 [4] ) +Markup span at (19:2,4 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Markup span at (21:3,0 [4] ) (Accepts:Any) - Parent: Tag block at (21:3,0 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/MultipleRazorCommentInMarkup.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/MultipleRazorCommentInMarkup.stree.txt new file mode 100644 index 0000000000..ea99cb2206 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/MultipleRazorCommentInMarkup.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..25)::25 - [

                    LF @**@ LF@**@LF

                    ] + MarkupBlock - [0..25)::25 + MarkupElement - [0..25)::25 + MarkupStartTag - [0..3)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..5)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupEphemeralTextLiteral - [5..7)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorComment - [7..11)::4 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + MarkupEphemeralTextLiteral - [11..15)::4 - [ LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + RazorComment - [15..19)::4 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + MarkupEphemeralTextLiteral - [19..21)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupEndTag - [21..25)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/MultipleRazorCommentsInSameLineInMarkup.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/MultipleRazorCommentsInSameLineInMarkup.cspans.txt new file mode 100644 index 0000000000..45659c7dad --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/MultipleRazorCommentsInSameLineInMarkup.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [3] ) +Markup span at (3:0,3 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (5:1,0 [1] ) (Accepts:None) - Parent: Comment block at (5:1,0 [4] ) +MetaCode span at (6:1,1 [1] ) (Accepts:None) - Parent: Comment block at (5:1,0 [4] ) +Comment span at (7:1,2 [0] ) (Accepts:Any) - Parent: Comment block at (5:1,0 [4] ) +MetaCode span at (7:1,2 [1] ) (Accepts:None) - Parent: Comment block at (5:1,0 [4] ) +Transition span at (8:1,3 [1] ) (Accepts:None) - Parent: Comment block at (5:1,0 [4] ) +Markup span at (9:1,4 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Markup span at (9:1,4 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (11:1,6 [1] ) (Accepts:None) - Parent: Comment block at (11:1,6 [4] ) +MetaCode span at (12:1,7 [1] ) (Accepts:None) - Parent: Comment block at (11:1,6 [4] ) +Comment span at (13:1,8 [0] ) (Accepts:Any) - Parent: Comment block at (11:1,6 [4] ) +MetaCode span at (13:1,8 [1] ) (Accepts:None) - Parent: Comment block at (11:1,6 [4] ) +Transition span at (14:1,9 [1] ) (Accepts:None) - Parent: Comment block at (11:1,6 [4] ) +Markup span at (15:1,10 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Markup span at (17:2,0 [4] ) (Accepts:Any) - Parent: Tag block at (17:2,0 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/MultipleRazorCommentsInSameLineInMarkup.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/MultipleRazorCommentsInSameLineInMarkup.stree.txt new file mode 100644 index 0000000000..4d29f49bef --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/MultipleRazorCommentsInSameLineInMarkup.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..21)::21 - [

                    LF@**@ @**@LF

                    ] + MarkupBlock - [0..21)::21 + MarkupElement - [0..21)::21 + MarkupStartTag - [0..3)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..5)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + RazorComment - [5..9)::4 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + MarkupTextLiteral - [9..9)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + MarkupEphemeralTextLiteral - [9..11)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorComment - [11..15)::4 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + MarkupEphemeralTextLiteral - [15..17)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupEndTag - [17..21)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentBetweenCodeBlockAndMarkup.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentBetweenCodeBlockAndMarkup.cspans.txt new file mode 100644 index 0000000000..c8b487fccb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentBetweenCodeBlockAndMarkup.cspans.txt @@ -0,0 +1,15 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [39] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [4] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [4] ) +Code span at (2:0,2 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [4] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [4] ) +Markup span at (4:0,4 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [39] ) +Transition span at (6:1,0 [1] ) (Accepts:None) - Parent: Comment block at (6:1,0 [17] ) +MetaCode span at (7:1,1 [1] ) (Accepts:None) - Parent: Comment block at (6:1,0 [17] ) +Comment span at (8:1,2 [13] ) (Accepts:Any) - Parent: Comment block at (6:1,0 [17] ) +MetaCode span at (21:1,15 [1] ) (Accepts:None) - Parent: Comment block at (6:1,0 [17] ) +Transition span at (22:1,16 [1] ) (Accepts:None) - Parent: Comment block at (6:1,0 [17] ) +Markup span at (23:1,17 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [39] ) +Markup span at (25:2,0 [5] ) (Accepts:Any) - Parent: Tag block at (25:2,0 [5] ) +Markup span at (30:2,5 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [39] ) +Markup span at (33:2,8 [6] ) (Accepts:Any) - Parent: Tag block at (33:2,8 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentBetweenCodeBlockAndMarkup.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentBetweenCodeBlockAndMarkup.stree.txt new file mode 100644 index 0000000000..376b6017f9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentBetweenCodeBlockAndMarkup.stree.txt @@ -0,0 +1,38 @@ +RazorDocument - [0..39)::39 - [@{ }LF@* Hello World *@LF
                    Foo
                    ] + MarkupBlock - [0..39)::39 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpStatement - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..4)::3 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..3)::1 + CSharpStatementLiteral - [2..3)::1 - [ ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + RazorMetaCode - [3..4)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [4..6)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + RazorComment - [6..23)::17 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ Hello World ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + MarkupEphemeralTextLiteral - [23..25)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [25..39)::14 + MarkupStartTag - [25..30)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [30..33)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [33..39)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInClosingTagBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInClosingTagBlock.cspans.txt new file mode 100644 index 0000000000..af3dd82d31 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInClosingTagBlock.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [6] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [6] ) +Markup span at (6:0,6 [7] ) (Accepts:Any) - Parent: Tag block at (6:0,6 [7] ) +Transition span at (13:0,13 [1] ) (Accepts:None) - Parent: Comment block at (13:0,13 [19] ) +MetaCode span at (14:0,14 [1] ) (Accepts:None) - Parent: Comment block at (13:0,13 [19] ) +Comment span at (15:0,15 [15] ) (Accepts:Any) - Parent: Comment block at (13:0,13 [19] ) +MetaCode span at (30:0,30 [1] ) (Accepts:None) - Parent: Comment block at (13:0,13 [19] ) +Transition span at (31:0,31 [1] ) (Accepts:None) - Parent: Comment block at (13:0,13 [19] ) +Markup span at (32:0,32 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInClosingTagBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInClosingTagBlock.stree.txt new file mode 100644 index 0000000000..32cb55d39e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInClosingTagBlock.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..33)::33 - [] + MarkupBlock - [0..33)::33 + MarkupElement - [0..13)::13 + MarkupStartTag - [0..6)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupEndTag - [6..13)::7 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + MarkupMiscAttributeContent - [12..13)::1 + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[]; + RazorComment - [13..32)::19 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ razor comment ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + MarkupTextLiteral - [32..33)::1 - [>] - Gen - SpanEditHandler;Accepts:Any + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInImplicitExpressionMethodCall.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInImplicitExpressionMethodCall.cspans.txt new file mode 100644 index 0000000000..83bce06d39 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInImplicitExpressionMethodCall.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [13] ) +Code span at (1:0,1 [6] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [13] ) +Transition span at (7:1,0 [1] ) (Accepts:None) - Parent: Comment block at (7:1,0 [4] ) +MetaCode span at (8:1,1 [1] ) (Accepts:None) - Parent: Comment block at (7:1,0 [4] ) +Comment span at (9:1,2 [0] ) (Accepts:Any) - Parent: Comment block at (7:1,0 [4] ) +MetaCode span at (9:1,2 [1] ) (Accepts:None) - Parent: Comment block at (7:1,0 [4] ) +Transition span at (10:1,3 [1] ) (Accepts:None) - Parent: Comment block at (7:1,0 [4] ) +Code span at (11:1,4 [2] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInImplicitExpressionMethodCall.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInImplicitExpressionMethodCall.diag.txt new file mode 100644 index 0000000000..ade6c85b25 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInImplicitExpressionMethodCall.diag.txt @@ -0,0 +1 @@ +(1,5): Error RZ1027: An opening "(" is missing the corresponding closing ")". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInImplicitExpressionMethodCall.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInImplicitExpressionMethodCall.stree.txt new file mode 100644 index 0000000000..59217177a6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInImplicitExpressionMethodCall.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..13)::13 - [@foo(LF@**@LF] + MarkupBlock - [0..13)::13 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..13)::13 + CSharpImplicitExpression - [0..13)::13 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..13)::12 + CSharpCodeBlock - [1..13)::12 + CSharpExpressionLiteral - [1..7)::6 - [foo(LF] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[foo]; + LeftParenthesis;[(]; + NewLine;[LF]; + RazorComment - [7..11)::4 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + CSharpExpressionLiteral - [11..13)::2 - [LF] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInMarkup.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInMarkup.cspans.txt new file mode 100644 index 0000000000..cca88e4c9f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInMarkup.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [3] ) +Markup span at (3:0,3 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Transition span at (5:1,0 [1] ) (Accepts:None) - Parent: Comment block at (5:1,0 [4] ) +MetaCode span at (6:1,1 [1] ) (Accepts:None) - Parent: Comment block at (5:1,0 [4] ) +Comment span at (7:1,2 [0] ) (Accepts:Any) - Parent: Comment block at (5:1,0 [4] ) +MetaCode span at (7:1,2 [1] ) (Accepts:None) - Parent: Comment block at (5:1,0 [4] ) +Transition span at (8:1,3 [1] ) (Accepts:None) - Parent: Comment block at (5:1,0 [4] ) +Markup span at (9:1,4 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Markup span at (11:2,0 [4] ) (Accepts:Any) - Parent: Tag block at (11:2,0 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInMarkup.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInMarkup.stree.txt new file mode 100644 index 0000000000..32cc8dface --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInMarkup.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..15)::15 - [

                    LF@**@LF

                    ] + MarkupBlock - [0..15)::15 + MarkupElement - [0..15)::15 + MarkupStartTag - [0..3)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..5)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + RazorComment - [5..9)::4 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + MarkupEphemeralTextLiteral - [9..11)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupEndTag - [11..15)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInOpeningTagBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInOpeningTagBlock.cspans.txt new file mode 100644 index 0000000000..be8102eb0a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInOpeningTagBlock.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [6] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [26] ) +Transition span at (6:0,6 [1] ) (Accepts:None) - Parent: Comment block at (6:0,6 [19] ) +MetaCode span at (7:0,7 [1] ) (Accepts:None) - Parent: Comment block at (6:0,6 [19] ) +Comment span at (8:0,8 [15] ) (Accepts:Any) - Parent: Comment block at (6:0,6 [19] ) +MetaCode span at (23:0,23 [1] ) (Accepts:None) - Parent: Comment block at (6:0,6 [19] ) +Transition span at (24:0,24 [1] ) (Accepts:None) - Parent: Comment block at (6:0,6 [19] ) +Markup span at (25:0,25 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [26] ) +Markup span at (26:0,26 [7] ) (Accepts:Any) - Parent: Tag block at (26:0,26 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInOpeningTagBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInOpeningTagBlock.stree.txt new file mode 100644 index 0000000000..040888e640 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInOpeningTagBlock.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..33)::33 - [] + MarkupBlock - [0..33)::33 + MarkupElement - [0..33)::33 + MarkupStartTag - [0..26)::26 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[text]; + MarkupMiscAttributeContent - [5..25)::20 + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorComment - [6..25)::19 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ razor comment ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + CloseAngle;[>]; + MarkupEndTag - [26..33)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInVerbatimBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInVerbatimBlock.cspans.txt new file mode 100644 index 0000000000..f9d1433413 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInVerbatimBlock.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Code span at (2:0,2 [6] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) +Transition span at (8:1,4 [5] ) (Accepts:Any) - Parent: Tag block at (8:1,4 [5] ) +Markup span at (13:1,9 [2] ) (Accepts:Any) - Parent: Markup block at (8:1,4 [18] ) +Markup span at (15:2,0 [4] ) (Accepts:Any) - Parent: Markup block at (8:1,4 [18] ) +Transition span at (19:2,4 [1] ) (Accepts:None) - Parent: Comment block at (19:2,4 [4] ) +MetaCode span at (20:2,5 [1] ) (Accepts:None) - Parent: Comment block at (19:2,4 [4] ) +Comment span at (21:2,6 [0] ) (Accepts:Any) - Parent: Comment block at (19:2,4 [4] ) +MetaCode span at (21:2,6 [1] ) (Accepts:None) - Parent: Comment block at (19:2,4 [4] ) +Transition span at (22:2,7 [1] ) (Accepts:None) - Parent: Comment block at (19:2,4 [4] ) +Markup span at (23:2,8 [2] ) (Accepts:Any) - Parent: Markup block at (8:1,4 [18] ) +Markup span at (25:3,0 [1] ) (Accepts:Any) - Parent: Markup block at (8:1,4 [18] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInVerbatimBlock.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInVerbatimBlock.diag.txt new file mode 100644 index 0000000000..1567f665b6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInVerbatimBlock.diag.txt @@ -0,0 +1,3 @@ +(2,6): Error RZ1023: "" and "" tags cannot contain attributes. +(2,6): Error RZ1025: The "text" element was not closed. All elements must be either self-closing or have a matching end tag. +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInVerbatimBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInVerbatimBlock.stree.txt new file mode 100644 index 0000000000..74cfd937ab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentInVerbatimBlock.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..26)::26 - [@{LF - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..26)::26 + CSharpStatement - [0..26)::26 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..26)::25 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..26)::24 + CSharpStatementLiteral - [2..8)::6 - [LF ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[}];AtEOL + NewLine;[LF]; + Whitespace;[ ]; + MarkupBlock - [8..26)::18 + MarkupElement - [8..26)::18 + MarkupStartTag - [8..13)::5 - MarkupTransition - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[text]; + CloseAngle;[]; + MarkupTextLiteral - [13..15)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupEphemeralTextLiteral - [15..19)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorComment - [19..23)::4 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + MarkupEphemeralTextLiteral - [23..25)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupTextLiteral - [25..26)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + RazorMetaCode - [26..26)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentWithExtraNewLineInMarkup.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentWithExtraNewLineInMarkup.cspans.txt new file mode 100644 index 0000000000..d5a5996abb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentWithExtraNewLineInMarkup.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [3] ) +Markup span at (3:0,3 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [45] ) +Transition span at (7:2,0 [1] ) (Accepts:None) - Parent: Comment block at (7:2,0 [13] ) +MetaCode span at (8:2,1 [1] ) (Accepts:None) - Parent: Comment block at (7:2,0 [13] ) +Comment span at (9:2,2 [9] ) (Accepts:Any) - Parent: Comment block at (7:2,0 [13] ) +MetaCode span at (18:2,11 [1] ) (Accepts:None) - Parent: Comment block at (7:2,0 [13] ) +Transition span at (19:2,12 [1] ) (Accepts:None) - Parent: Comment block at (7:2,0 [13] ) +Markup span at (20:2,13 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [45] ) +Transition span at (22:3,0 [1] ) (Accepts:None) - Parent: Comment block at (22:3,0 [15] ) +MetaCode span at (23:3,1 [1] ) (Accepts:None) - Parent: Comment block at (22:3,0 [15] ) +Comment span at (24:3,2 [11] ) (Accepts:Any) - Parent: Comment block at (22:3,0 [15] ) +MetaCode span at (35:5,0 [1] ) (Accepts:None) - Parent: Comment block at (22:3,0 [15] ) +Transition span at (36:5,1 [1] ) (Accepts:None) - Parent: Comment block at (22:3,0 [15] ) +Markup span at (37:5,2 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [45] ) +Markup span at (39:6,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [45] ) +Markup span at (41:7,0 [4] ) (Accepts:Any) - Parent: Tag block at (41:7,0 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentWithExtraNewLineInMarkup.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentWithExtraNewLineInMarkup.stree.txt new file mode 100644 index 0000000000..c671706a27 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentWithExtraNewLineInMarkup.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..45)::45 - [

                    LFLF@* content *@LF@*LFcontentLF*@LFLF

                    ] + MarkupBlock - [0..45)::45 + MarkupElement - [0..45)::45 + MarkupStartTag - [0..3)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..7)::4 - [LFLF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + NewLine;[LF]; + RazorComment - [7..20)::13 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ content ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + MarkupEphemeralTextLiteral - [20..22)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + RazorComment - [22..37)::15 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[LFcontentLF]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + MarkupEphemeralTextLiteral - [37..39)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupTextLiteral - [39..41)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupEndTag - [41..45)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentsSurroundingMarkup.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentsSurroundingMarkup.cspans.txt new file mode 100644 index 0000000000..4c99d23962 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentsSurroundingMarkup.cspans.txt @@ -0,0 +1,15 @@ +Markup span at (0:0,0 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [3] ) +Markup span at (3:0,3 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) +Transition span at (5:1,0 [1] ) (Accepts:None) - Parent: Comment block at (5:1,0 [11] ) +MetaCode span at (6:1,1 [1] ) (Accepts:None) - Parent: Comment block at (5:1,0 [11] ) +Comment span at (7:1,2 [7] ) (Accepts:Any) - Parent: Comment block at (5:1,0 [11] ) +MetaCode span at (14:1,9 [1] ) (Accepts:None) - Parent: Comment block at (5:1,0 [11] ) +Transition span at (15:1,10 [1] ) (Accepts:None) - Parent: Comment block at (5:1,0 [11] ) +Markup span at (16:1,11 [9] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) +Transition span at (25:1,20 [1] ) (Accepts:None) - Parent: Comment block at (25:1,20 [11] ) +MetaCode span at (26:1,21 [1] ) (Accepts:None) - Parent: Comment block at (25:1,20 [11] ) +Comment span at (27:1,22 [7] ) (Accepts:Any) - Parent: Comment block at (25:1,20 [11] ) +MetaCode span at (34:1,29 [1] ) (Accepts:None) - Parent: Comment block at (25:1,20 [11] ) +Transition span at (35:1,30 [1] ) (Accepts:None) - Parent: Comment block at (25:1,20 [11] ) +Markup span at (36:1,31 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) +Markup span at (38:2,0 [4] ) (Accepts:Any) - Parent: Tag block at (38:2,0 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentsSurroundingMarkup.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentsSurroundingMarkup.stree.txt new file mode 100644 index 0000000000..54b44635ac --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorCommentsSurroundingMarkup.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..42)::42 - [

                    LF@* hello *@ content @* world *@LF

                    ] + MarkupBlock - [0..42)::42 + MarkupElement - [0..42)::42 + MarkupStartTag - [0..3)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..5)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + RazorComment - [5..16)::11 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ hello ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + MarkupTextLiteral - [16..25)::9 - [ content ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[content]; + Whitespace;[ ]; + RazorComment - [25..36)::11 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ world ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + MarkupTextLiteral - [36..38)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupEndTag - [38..42)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorMultilineCommentInBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorMultilineCommentInBlock.cspans.txt new file mode 100644 index 0000000000..7f93c44b8f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorMultilineCommentInBlock.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [44] ) +Transition span at (2:1,0 [1] ) (Accepts:None) - Parent: Statement block at (2:1,0 [40] ) +MetaCode span at (3:1,1 [1] ) (Accepts:None) - Parent: Statement block at (2:1,0 [40] ) +Code span at (4:1,2 [6] ) (Accepts:Any) - Parent: Statement block at (2:1,0 [40] ) +Transition span at (10:2,4 [1] ) (Accepts:None) - Parent: Comment block at (10:2,4 [29] ) +MetaCode span at (11:2,5 [1] ) (Accepts:None) - Parent: Comment block at (10:2,4 [29] ) +Comment span at (12:2,6 [25] ) (Accepts:Any) - Parent: Comment block at (10:2,4 [29] ) +MetaCode span at (37:4,4 [1] ) (Accepts:None) - Parent: Comment block at (10:2,4 [29] ) +Transition span at (38:4,5 [1] ) (Accepts:None) - Parent: Comment block at (10:2,4 [29] ) +Code span at (39:4,6 [2] ) (Accepts:Any) - Parent: Statement block at (2:1,0 [40] ) +MetaCode span at (41:5,0 [1] ) (Accepts:None) - Parent: Statement block at (2:1,0 [40] ) +Markup span at (42:5,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [44] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorMultilineCommentInBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorMultilineCommentInBlock.stree.txt new file mode 100644 index 0000000000..fa32dc202e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/RazorMultilineCommentInBlock.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..44)::44 - [LF@{LF @*LFThis is a commentLF *@LF}LF] + MarkupBlock - [0..44)::44 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [2..42)::40 + CSharpStatement - [2..42)::40 + CSharpTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [3..42)::39 + RazorMetaCode - [3..4)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [4..41)::37 + CSharpStatementLiteral - [4..10)::6 - [LF ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + Whitespace;[ ]; + RazorComment - [10..39)::29 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[LFThis is a commentLF ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + CSharpStatementLiteral - [39..41)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + RazorMetaCode - [41..42)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [42..44)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorComment.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorComment.cspans.txt new file mode 100644 index 0000000000..c75c972a0b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorComment.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [2] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Comment block at (0:0,0 [2] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Comment block at (0:0,0 [2] ) +Comment span at (2:0,2 [0] ) (Accepts:Any) - Parent: Comment block at (0:0,0 [2] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorComment.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorComment.diag.txt new file mode 100644 index 0000000000..4f3108141d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorComment.diag.txt @@ -0,0 +1 @@ +(1,1): Error RZ1028: End of file was reached before the end of the block comment. All comments that start with the "@*" sequence must be terminated with a matching "*@" sequence. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorComment.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorComment.stree.txt new file mode 100644 index 0000000000..60adcc438a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorComment.stree.txt @@ -0,0 +1,10 @@ +RazorDocument - [0..2)::2 - [@*] + MarkupBlock - [0..2)::2 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorComment - [0..2)::2 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[]; + RazorCommentStar;[];RZ1028(0:0,0 [2] ) + RazorCommentTransition;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInImplicitExpressionMethodCall.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInImplicitExpressionMethodCall.cspans.txt new file mode 100644 index 0000000000..3b417826e4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInImplicitExpressionMethodCall.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [7] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [7] ) +Code span at (1:0,1 [4] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [7] ) +Transition span at (5:0,5 [1] ) (Accepts:None) - Parent: Comment block at (5:0,5 [2] ) +MetaCode span at (6:0,6 [1] ) (Accepts:None) - Parent: Comment block at (5:0,5 [2] ) +Comment span at (7:0,7 [0] ) (Accepts:Any) - Parent: Comment block at (5:0,5 [2] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInImplicitExpressionMethodCall.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInImplicitExpressionMethodCall.diag.txt new file mode 100644 index 0000000000..b65a64c148 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInImplicitExpressionMethodCall.diag.txt @@ -0,0 +1,2 @@ +(1,6): Error RZ1028: End of file was reached before the end of the block comment. All comments that start with the "@*" sequence must be terminated with a matching "*@" sequence. +(1,5): Error RZ1027: An opening "(" is missing the corresponding closing ")". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInImplicitExpressionMethodCall.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInImplicitExpressionMethodCall.stree.txt new file mode 100644 index 0000000000..dc61b63396 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInImplicitExpressionMethodCall.stree.txt @@ -0,0 +1,19 @@ +RazorDocument - [0..7)::7 - [@foo(@*] + MarkupBlock - [0..7)::7 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..7)::7 + CSharpImplicitExpression - [0..7)::7 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..7)::6 + CSharpCodeBlock - [1..7)::6 + CSharpExpressionLiteral - [1..5)::4 - [foo(] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[foo]; + LeftParenthesis;[(]; + RazorComment - [5..7)::2 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[]; + RazorCommentStar;[];RZ1028(5:0,5 [2] ) + RazorCommentTransition;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInVerbatimBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInVerbatimBlock.cspans.txt new file mode 100644 index 0000000000..3ad5a4a25d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInVerbatimBlock.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [4] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [4] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [4] ) +Code span at (2:0,2 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [4] ) +Transition span at (2:0,2 [1] ) (Accepts:None) - Parent: Comment block at (2:0,2 [2] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Comment block at (2:0,2 [2] ) +Comment span at (4:0,4 [0] ) (Accepts:Any) - Parent: Comment block at (2:0,2 [2] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInVerbatimBlock.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInVerbatimBlock.diag.txt new file mode 100644 index 0000000000..37d6bd7155 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInVerbatimBlock.diag.txt @@ -0,0 +1,2 @@ +(1,3): Error RZ1028: End of file was reached before the end of the block comment. All comments that start with the "@*" sequence must be terminated with a matching "*@" sequence. +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInVerbatimBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInVerbatimBlock.stree.txt new file mode 100644 index 0000000000..6e7b2b4057 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpRazorCommentsTest/UnterminatedRazorCommentInVerbatimBlock.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..4)::4 - [@{@*] + MarkupBlock - [0..4)::4 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpStatement - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..4)::3 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..4)::2 + CSharpStatementLiteral - [2..2)::0 - [] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[}];AtEOL + Marker;[]; + RazorComment - [2..4)::2 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[]; + RazorCommentStar;[];RZ1028(2:0,2 [2] ) + RazorCommentTransition;[]; + RazorMetaCode - [4..4)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWord.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWord.cspans.txt new file mode 100644 index 0000000000..65fa84c6ab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWord.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [10] ) +MetaCode span at (1:0,1 [9] ) (Accepts:None) - Parent: Directive block at (0:0,0 [10] ) +Markup span at (10:0,10 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWord.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWord.diag.txt new file mode 100644 index 0000000000..a1c584f0d3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWord.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1007: "namespace" is a reserved word and cannot be used in implicit expressions. An explicit expression ("@()") must be used. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWord.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWord.stree.txt new file mode 100644 index 0000000000..76edc37a7f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWord.stree.txt @@ -0,0 +1,13 @@ +RazorDocument - [0..10)::10 - [@namespace] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..10)::10 + RazorDirective - [0..10)::10 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..10)::9 + RazorMetaCode - [1..10)::9 - Gen - SpanEditHandler;Accepts:None + Keyword;[namespace]; + MarkupTextLiteral - [10..10)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWordIsCaseSensitive.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWordIsCaseSensitive.cspans.txt new file mode 100644 index 0000000000..a325887027 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWordIsCaseSensitive.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [10] ) +Code span at (1:0,1 [9] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [10] ) +Markup span at (10:0,10 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWordIsCaseSensitive.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWordIsCaseSensitive.stree.txt new file mode 100644 index 0000000000..8067d08e58 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpReservedWordsTest/ReservedWordIsCaseSensitive.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..10)::10 - [@NameSpace] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..10)::10 + CSharpImplicitExpression - [0..10)::10 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..10)::9 + CSharpCodeBlock - [1..10)::9 + CSharpExpressionLiteral - [1..10)::9 - [NameSpace] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[NameSpace]; + MarkupTextLiteral - [10..10)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/AcceptsOpenBraceMultipleLinesBelowSectionName.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/AcceptsOpenBraceMultipleLinesBelowSectionName.cspans.txt new file mode 100644 index 0000000000..81c6af3935 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/AcceptsOpenBraceMultipleLinesBelowSectionName.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [46] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [46] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [46] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [46] ) +None span at (12:0,12 [18] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [46] ) +MetaCode span at (30:6,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [46] ) +Markup span at (31:6,1 [2] ) (Accepts:Any) - Parent: Markup block at (31:6,1 [14] ) +Markup span at (33:7,0 [3] ) (Accepts:Any) - Parent: Tag block at (33:7,0 [3] ) +Markup span at (36:7,3 [3] ) (Accepts:Any) - Parent: Markup block at (31:6,1 [14] ) +Markup span at (39:7,6 [4] ) (Accepts:Any) - Parent: Tag block at (39:7,6 [4] ) +Markup span at (43:7,10 [2] ) (Accepts:Any) - Parent: Markup block at (31:6,1 [14] ) +MetaCode span at (45:8,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [46] ) +Markup span at (46:8,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/AcceptsOpenBraceMultipleLinesBelowSectionName.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/AcceptsOpenBraceMultipleLinesBelowSectionName.stree.txt new file mode 100644 index 0000000000..bf7aa06f2c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/AcceptsOpenBraceMultipleLinesBelowSectionName.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..46)::46 - [@section foo LFLFLFLFLFLF{LF

                    Foo

                    LF}] + MarkupBlock - [0..46)::46 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..46)::46 + RazorDirective - [0..46)::46 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..46)::45 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..46)::38 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + UnclassifiedTextLiteral - [12..30)::18 - [ LFLFLFLFLFLF] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + NewLine;[LF]; + NewLine;[LF]; + NewLine;[LF]; + NewLine;[LF]; + NewLine;[LF]; + NewLine;[LF]; + RazorMetaCode - [30..31)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [31..45)::14 + MarkupTextLiteral - [31..33)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [33..43)::10 + MarkupStartTag - [33..36)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [36..39)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [39..43)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [43..45)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + RazorMetaCode - [45..46)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [46..46)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/AllowsBracesInCSharpExpression.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/AllowsBracesInCSharpExpression.cspans.txt new file mode 100644 index 0000000000..c3a621955f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/AllowsBracesInCSharpExpression.cspans.txt @@ -0,0 +1,15 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [76] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [76] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [76] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [76] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [76] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [76] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [76] ) +Markup span at (14:0,14 [54] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [61] ) +Transition span at (68:0,68 [1] ) (Accepts:None) - Parent: Expression block at (68:0,68 [6] ) +MetaCode span at (69:0,69 [1] ) (Accepts:None) - Parent: Expression block at (68:0,68 [6] ) +Code span at (70:0,70 [3] ) (Accepts:Any) - Parent: Expression block at (68:0,68 [6] ) +MetaCode span at (73:0,73 [1] ) (Accepts:None) - Parent: Expression block at (68:0,68 [6] ) +Markup span at (74:0,74 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [61] ) +MetaCode span at (75:0,75 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [76] ) +Markup span at (76:0,76 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [76] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/AllowsBracesInCSharpExpression.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/AllowsBracesInCSharpExpression.stree.txt new file mode 100644 index 0000000000..697f0d90a1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/AllowsBracesInCSharpExpression.stree.txt @@ -0,0 +1,65 @@ +RazorDocument - [0..76)::76 - [@section foo { I really want to render a close brace, so here I go: @("}") }] + MarkupBlock - [0..76)::76 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..76)::76 + RazorDirective - [0..76)::76 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..76)::75 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..76)::68 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..75)::61 + MarkupTextLiteral - [14..68)::54 - [ I really want to render a close brace, so here I go: ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[I]; + Whitespace;[ ]; + Text;[really]; + Whitespace;[ ]; + Text;[want]; + Whitespace;[ ]; + Text;[to]; + Whitespace;[ ]; + Text;[render]; + Whitespace;[ ]; + Text;[a]; + Whitespace;[ ]; + Text;[close]; + Whitespace;[ ]; + Text;[brace,]; + Whitespace;[ ]; + Text;[so]; + Whitespace;[ ]; + Text;[here]; + Whitespace;[ ]; + Text;[I]; + Whitespace;[ ]; + Text;[go:]; + Whitespace;[ ]; + CSharpCodeBlock - [68..74)::6 + CSharpExplicitExpression - [68..74)::6 + CSharpTransition - [68..69)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [69..74)::5 + RazorMetaCode - [69..70)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [70..73)::3 + CSharpExpressionLiteral - [70..73)::3 - ["}"] - Gen - SpanEditHandler;Accepts:Any + StringLiteral;["}"]; + RazorMetaCode - [73..74)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + MarkupTextLiteral - [74..75)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [75..76)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [76..76)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/BalancesBraces.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/BalancesBraces.cspans.txt new file mode 100644 index 0000000000..72e4322f98 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/BalancesBraces.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [67] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [67] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [67] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [67] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [67] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [67] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [67] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [52] ) +Markup span at (15:0,15 [8] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [8] ) +Markup span at (23:0,23 [33] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [52] ) +Markup span at (56:0,56 [9] ) (Accepts:Any) - Parent: Tag block at (56:0,56 [9] ) +Markup span at (65:0,65 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [52] ) +MetaCode span at (66:0,66 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [67] ) +Markup span at (67:0,67 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [67] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/BalancesBraces.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/BalancesBraces.stree.txt new file mode 100644 index 0000000000..e324726675 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/BalancesBraces.stree.txt @@ -0,0 +1,51 @@ +RazorDocument - [0..67)::67 - [@section foo { }] + MarkupBlock - [0..67)::67 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..67)::67 + RazorDirective - [0..67)::67 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..67)::66 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..67)::59 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..66)::52 + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [15..65)::50 + MarkupStartTag - [15..23)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; + MarkupTextLiteral - [65..66)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [66..67)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [67..67)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesNewlineImmediatelyFollowing.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesNewlineImmediatelyFollowing.cspans.txt new file mode 100644 index 0000000000..c10c843521 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesNewlineImmediatelyFollowing.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +Code span at (8:0,8 [0] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [8] ) +Markup span at (8:0,8 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesNewlineImmediatelyFollowing.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesNewlineImmediatelyFollowing.stree.txt new file mode 100644 index 0000000000..d336694b97 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesNewlineImmediatelyFollowing.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..10)::10 - [@sectionLF] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + RazorDirective - [0..8)::8 - Directive:{section;RazorBlock;Unrestricted} [RZ1015(8:0,8 [2] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..8)::7 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..8)::0 + CSharpStatementLiteral - [8..8)::0 - [] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Marker;[]; + MarkupTextLiteral - [8..10)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesWhitespaceToEndOfLineInSectionStatementMissingName.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesWhitespaceToEndOfLineInSectionStatementMissingName.cspans.txt new file mode 100644 index 0000000000..74bcdf61d7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesWhitespaceToEndOfLineInSectionStatementMissingName.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +Code span at (8:0,8 [9] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [17] ) +Code span at (17:0,17 [0] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [17] ) +Markup span at (17:0,17 [6] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesWhitespaceToEndOfLineInSectionStatementMissingName.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesWhitespaceToEndOfLineInSectionStatementMissingName.stree.txt new file mode 100644 index 0000000000..7f547e8173 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesWhitespaceToEndOfLineInSectionStatementMissingName.stree.txt @@ -0,0 +1,19 @@ +RazorDocument - [0..23)::23 - [@section LF ] + MarkupBlock - [0..23)::23 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..17)::17 + RazorDirective - [0..17)::17 - Directive:{section;RazorBlock;Unrestricted} [RZ1015(17:0,17 [2] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..17)::16 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..17)::9 + CSharpStatementLiteral - [8..17)::9 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [17..17)::0 - [] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Marker;[]; + MarkupTextLiteral - [17..23)::6 - [LF ] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesWhitespaceToEndOfLineInSectionStatementMissingOpenBrace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesWhitespaceToEndOfLineInSectionStatementMissingOpenBrace.cspans.txt new file mode 100644 index 0000000000..294ddf8df0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesWhitespaceToEndOfLineInSectionStatementMissingOpenBrace.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [27] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [27] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [27] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [27] ) +None span at (12:0,12 [15] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [27] ) +Markup span at (27:1,4 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesWhitespaceToEndOfLineInSectionStatementMissingOpenBrace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesWhitespaceToEndOfLineInSectionStatementMissingOpenBrace.stree.txt new file mode 100644 index 0000000000..8120e55a8e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CapturesWhitespaceToEndOfLineInSectionStatementMissingOpenBrace.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..27)::27 - [@section Foo LF ] + MarkupBlock - [0..27)::27 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..27)::27 + RazorDirective - [0..27)::27 - Directive:{section;RazorBlock;Unrestricted} [RZ1012(27:1,4 [1] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..27)::26 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..27)::19 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [Foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[Foo]; + UnclassifiedTextLiteral - [12..27)::15 - [ LF ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + NewLine;[LF]; + Whitespace;[ ]; + MarkupTextLiteral - [27..27)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CommentRecoversFromUnclosedTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CommentRecoversFromUnclosedTag.cspans.txt new file mode 100644 index 0000000000..00b79335ef --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CommentRecoversFromUnclosedTag.cspans.txt @@ -0,0 +1,15 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [33] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [33] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [33] ) +Code span at (9:0,9 [1] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [33] ) +None span at (10:0,10 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [33] ) +MetaCode span at (11:0,11 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [33] ) +Markup span at (12:0,12 [2] ) (Accepts:Any) - Parent: Markup block at (12:0,12 [20] ) +Markup span at (14:1,0 [4] ) (Accepts:Any) - Parent: Tag block at (14:1,0 [4] ) +Markup span at (18:2,0 [4] ) (Accepts:None) - Parent: HtmlComment block at (18:2,0 [14] ) +Markup span at (22:2,4 [7] ) (Accepts:Whitespace) - Parent: HtmlComment block at (18:2,0 [14] ) +Markup span at (29:2,11 [3] ) (Accepts:None) - Parent: HtmlComment block at (18:2,0 [14] ) +Markup span at (32:2,14 [0] ) (Accepts:Any) - Parent: Markup block at (12:0,12 [20] ) +MetaCode span at (32:2,14 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [33] ) +Markup span at (33:2,15 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CommentRecoversFromUnclosedTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CommentRecoversFromUnclosedTag.stree.txt new file mode 100644 index 0000000000..6031164f1b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CommentRecoversFromUnclosedTag.stree.txt @@ -0,0 +1,52 @@ +RazorDocument - [0..33)::33 - [@section s {LF " '-->}] + MarkupBlock - [0..33)::33 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..33)::33 + RazorDirective - [0..33)::33 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..33)::32 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..33)::25 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..10)::1 - [s] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[s]; + UnclassifiedTextLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [11..12)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [12..32)::20 + MarkupTextLiteral - [12..14)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [14..32)::18 + MarkupStartTag - [14..18)::4 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[a]; + MarkupMiscAttributeContent - [16..18)::2 + MarkupTextLiteral - [16..18)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CloseAngle;[]; + MarkupCommentBlock - [18..32)::14 + MarkupTextLiteral - [18..22)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupTextLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [32..33)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CorrectlyTerminatesWhenCloseBraceImmediatelyFollowsMarkup.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CorrectlyTerminatesWhenCloseBraceImmediatelyFollowsMarkup.cspans.txt new file mode 100644 index 0000000000..4373c216a2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CorrectlyTerminatesWhenCloseBraceImmediatelyFollowsMarkup.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [24] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [24] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [24] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [24] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [24] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [24] ) +Markup span at (14:0,14 [9] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [9] ) +MetaCode span at (23:0,23 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [24] ) +Markup span at (24:0,24 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CorrectlyTerminatesWhenCloseBraceImmediatelyFollowsMarkup.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CorrectlyTerminatesWhenCloseBraceImmediatelyFollowsMarkup.stree.txt new file mode 100644 index 0000000000..f1c5746916 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/CorrectlyTerminatesWhenCloseBraceImmediatelyFollowsMarkup.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..24)::24 - [@section foo {something}] + MarkupBlock - [0..24)::24 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..24)::24 + RazorDirective - [0..24)::24 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..24)::23 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..24)::16 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..23)::9 + MarkupTextLiteral - [14..23)::9 - [something] - Gen - SpanEditHandler;Accepts:Any + Text;[something]; + RazorMetaCode - [23..24)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [24..24)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/DoesNotRequireSpaceBetweenSectionNameAndOpenBrace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/DoesNotRequireSpaceBetweenSectionNameAndOpenBrace.cspans.txt new file mode 100644 index 0000000000..ecf1378f32 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/DoesNotRequireSpaceBetweenSectionNameAndOpenBrace.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [26] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [26] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [26] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [26] ) +MetaCode span at (12:0,12 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [26] ) +Markup span at (13:0,13 [1] ) (Accepts:Any) - Parent: Markup block at (13:0,13 [12] ) +Markup span at (14:0,14 [3] ) (Accepts:Any) - Parent: Tag block at (14:0,14 [3] ) +Markup span at (17:0,17 [3] ) (Accepts:Any) - Parent: Markup block at (13:0,13 [12] ) +Markup span at (20:0,20 [4] ) (Accepts:Any) - Parent: Tag block at (20:0,20 [4] ) +Markup span at (24:0,24 [1] ) (Accepts:Any) - Parent: Markup block at (13:0,13 [12] ) +MetaCode span at (25:0,25 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [26] ) +Markup span at (26:0,26 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/DoesNotRequireSpaceBetweenSectionNameAndOpenBrace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/DoesNotRequireSpaceBetweenSectionNameAndOpenBrace.stree.txt new file mode 100644 index 0000000000..ba64cef43e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/DoesNotRequireSpaceBetweenSectionNameAndOpenBrace.stree.txt @@ -0,0 +1,39 @@ +RazorDocument - [0..26)::26 - [@section foo{

                    Foo

                    }] + MarkupBlock - [0..26)::26 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..26)::26 + RazorDirective - [0..26)::26 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..26)::25 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..26)::18 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + RazorMetaCode - [12..13)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [13..25)::12 + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [14..24)::10 + MarkupStartTag - [14..17)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [17..20)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [20..24)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [24..25)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [25..26)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [26..26)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenBrace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenBrace.cspans.txt new file mode 100644 index 0000000000..074b66bfa3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenBrace.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [14] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [14] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [14] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [14] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [14] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [14] ) +Markup span at (14:0,14 [0] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [0] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenBrace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenBrace.stree.txt new file mode 100644 index 0000000000..8ced8d7768 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenBrace.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..14)::14 - [@section foo {] + MarkupBlock - [0..14)::14 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..14)::14 + RazorDirective - [0..14)::14 - Directive:{section;RazorBlock;Unrestricted} [RZ1006(13:0,13 [1] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..14)::13 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..14)::6 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[}];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..14)::0 + MarkupTextLiteral - [14..14)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [14..14)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent1.cspans.txt new file mode 100644 index 0000000000..c6e2742957 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent1.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [15] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [15] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [15] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [15] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [15] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [15] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [1] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent1.stree.txt new file mode 100644 index 0000000000..bf96aef353 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent1.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..15)::15 - [@section foo { ] + MarkupBlock - [0..15)::15 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..15)::15 + RazorDirective - [0..15)::15 - Directive:{section;RazorBlock;Unrestricted} [RZ1006(13:0,13 [1] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..15)::14 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..15)::7 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[}];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..15)::1 + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [15..15)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent2.cspans.txt new file mode 100644 index 0000000000..748a7fb61b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent2.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [16] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [16] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [16] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [16] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [16] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [16] ) +Markup span at (14:0,14 [2] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [2] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent2.stree.txt new file mode 100644 index 0000000000..c2addfe73d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent2.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..16)::16 - [@section foo {LF] + MarkupBlock - [0..16)::16 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..16)::16 + RazorDirective - [0..16)::16 - Directive:{section;RazorBlock;Unrestricted} [RZ1006(13:0,13 [1] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..16)::15 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..16)::8 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[}];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..16)::2 + MarkupTextLiteral - [14..16)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + RazorMetaCode - [16..16)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent3.cspans.txt new file mode 100644 index 0000000000..06a080b1a6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent3.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [17] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [17] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [17] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +Markup span at (14:0,14 [3] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent3.stree.txt new file mode 100644 index 0000000000..291855088b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent3.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..17)::17 - [@section foo {abc] + MarkupBlock - [0..17)::17 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..17)::17 + RazorDirective - [0..17)::17 - Directive:{section;RazorBlock;Unrestricted} [RZ1006(13:0,13 [1] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..17)::16 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..17)::9 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[}];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..17)::3 + MarkupTextLiteral - [14..17)::3 - [abc] - Gen - SpanEditHandler;Accepts:Any + Text;[abc]; + RazorMetaCode - [17..17)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent4.cspans.txt new file mode 100644 index 0000000000..34f459da77 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent4.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [20] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [20] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [20] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [20] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [20] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [20] ) +Markup span at (14:0,14 [6] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent4.stree.txt new file mode 100644 index 0000000000..ae074a707f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesEOFAfterOpenContent4.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..20)::20 - [@section foo {LF abc] + MarkupBlock - [0..20)::20 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..20)::20 + RazorDirective - [0..20)::20 - Directive:{section;RazorBlock;Unrestricted} [RZ1006(13:0,13 [1] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..20)::19 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..20)::12 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[}];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..20)::6 + MarkupTextLiteral - [14..20)::6 - [LF abc] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + Text;[abc]; + RazorMetaCode - [20..20)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesUnterminatedSection.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesUnterminatedSection.cspans.txt new file mode 100644 index 0000000000..5d0c1dc0ce --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesUnterminatedSection.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [27] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [27] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [27] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [27] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [27] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [27] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [13] ) +Markup span at (15:0,15 [3] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [3] ) +Markup span at (18:0,18 [5] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [13] ) +Markup span at (23:0,23 [4] ) (Accepts:Any) - Parent: Tag block at (23:0,23 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesUnterminatedSection.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesUnterminatedSection.stree.txt new file mode 100644 index 0000000000..376832ecd9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesUnterminatedSection.stree.txt @@ -0,0 +1,39 @@ +RazorDocument - [0..27)::27 - [@section foo {

                    Foo{}

                    ] + MarkupBlock - [0..27)::27 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..27)::27 + RazorDirective - [0..27)::27 - Directive:{section;RazorBlock;Unrestricted} [RZ1006(13:0,13 [1] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..27)::26 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..27)::19 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[}];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..27)::13 + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [15..27)::12 + MarkupStartTag - [15..18)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [18..23)::5 - [Foo{}] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Text;[{]; + Text;[}]; + MarkupEndTag - [23..27)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + RazorMetaCode - [27..27)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesUnterminatedSectionWithNestedIf.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesUnterminatedSectionWithNestedIf.cspans.txt new file mode 100644 index 0000000000..638db09576 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesUnterminatedSectionWithNestedIf.cspans.txt @@ -0,0 +1,17 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [73] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [73] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [73] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [73] ) +Code span at (9:0,9 [4] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [73] ) +None span at (13:0,13 [2] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [73] ) +MetaCode span at (15:1,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [73] ) +Markup span at (16:1,1 [2] ) (Accepts:Any) - Parent: Markup block at (16:1,1 [57] ) +Code span at (18:2,0 [4] ) (Accepts:Any) - Parent: Statement block at (18:2,0 [55] ) +Transition span at (22:2,4 [1] ) (Accepts:None) - Parent: Statement block at (18:2,0 [55] ) +Code span at (23:2,5 [17] ) (Accepts:Any) - Parent: Statement block at (18:2,0 [55] ) +Markup span at (40:4,0 [8] ) (Accepts:Any) - Parent: Markup block at (40:4,0 [28] ) +Markup span at (48:4,8 [3] ) (Accepts:None) - Parent: Tag block at (48:4,8 [3] ) +Markup span at (51:4,11 [11] ) (Accepts:Any) - Parent: Markup block at (40:4,0 [28] ) +Markup span at (62:4,22 [4] ) (Accepts:None) - Parent: Tag block at (62:4,22 [4] ) +Markup span at (66:4,26 [2] ) (Accepts:None) - Parent: Markup block at (40:4,0 [28] ) +Code span at (68:5,0 [5] ) (Accepts:Any) - Parent: Statement block at (18:2,0 [55] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesUnterminatedSectionWithNestedIf.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesUnterminatedSectionWithNestedIf.stree.txt new file mode 100644 index 0000000000..7152eb1c54 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/HandlesUnterminatedSectionWithNestedIf.stree.txt @@ -0,0 +1,61 @@ +RazorDocument - [0..73)::73 - [@section TestLF{LF @if(true)LF {LF

                    Hello World

                    LF }] + MarkupBlock - [0..73)::73 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..73)::73 + RazorDirective - [0..73)::73 - Directive:{section;RazorBlock;Unrestricted} [RZ1006(15:1,0 [1] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..73)::72 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..73)::65 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..13)::4 - [Test] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[Test]; + UnclassifiedTextLiteral - [13..15)::2 - [LF] - Gen - SpanEditHandler;Accepts:AllWhitespace + NewLine;[LF]; + RazorMetaCode - [15..16)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[}];AtEnd + LeftBrace;[{]; + MarkupBlock - [16..73)::57 + MarkupTextLiteral - [16..18)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [18..73)::55 + CSharpStatementLiteral - [18..22)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpTransition - [22..23)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [23..40)::17 - [if(true)LF {LF] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + NewLine;[LF]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + MarkupBlock - [40..68)::28 + MarkupTextLiteral - [40..48)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [48..66)::18 + MarkupStartTag - [48..51)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [51..62)::11 - [Hello World] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + MarkupEndTag - [62..66)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [66..68)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [68..73)::5 - [ }] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RightBrace;[}]; + RazorMetaCode - [73..73)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/IgnoresSectionUnlessAllLowerCase.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/IgnoresSectionUnlessAllLowerCase.cspans.txt new file mode 100644 index 0000000000..500fddb951 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/IgnoresSectionUnlessAllLowerCase.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [12] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [8] ) +Code span at (1:0,1 [7] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [8] ) +Markup span at (8:0,8 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [12] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/IgnoresSectionUnlessAllLowerCase.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/IgnoresSectionUnlessAllLowerCase.stree.txt new file mode 100644 index 0000000000..8f8cb089b8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/IgnoresSectionUnlessAllLowerCase.stree.txt @@ -0,0 +1,15 @@ +RazorDocument - [0..12)::12 - [@Section foo] + MarkupBlock - [0..12)::12 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + CSharpImplicitExpression - [0..8)::8 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..8)::7 + CSharpCodeBlock - [1..8)::7 + CSharpExpressionLiteral - [1..8)::7 - [Section] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K15 + Identifier;[Section]; + MarkupTextLiteral - [8..12)::4 - [ foo] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[foo]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserDoesNotOutputErrorOtherNestedDirectives.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserDoesNotOutputErrorOtherNestedDirectives.cspans.txt new file mode 100644 index 0000000000..8e87c7c6c9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserDoesNotOutputErrorOtherNestedDirectives.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [30] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [30] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [30] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [30] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [30] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [30] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [15] ) +Transition span at (15:0,15 [1] ) (Accepts:None) - Parent: Directive block at (15:0,15 [14] ) +MetaCode span at (16:0,16 [8] ) (Accepts:None) - Parent: Directive block at (15:0,15 [14] ) +Code span at (24:0,24 [1] ) (Accepts:Whitespace) - Parent: Directive block at (15:0,15 [14] ) +Code span at (25:0,25 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (15:0,15 [14] ) +None span at (28:0,28 [1] ) (Accepts:Whitespace) - Parent: Directive block at (15:0,15 [14] ) +Markup span at (29:0,29 [0] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [15] ) +MetaCode span at (29:0,29 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [30] ) +Markup span at (30:0,30 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserDoesNotOutputErrorOtherNestedDirectives.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserDoesNotOutputErrorOtherNestedDirectives.stree.txt new file mode 100644 index 0000000000..0a06cbca9a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserDoesNotOutputErrorOtherNestedDirectives.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..30)::30 - [@section foo { @inherits Bar }] + MarkupBlock - [0..30)::30 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..30)::30 + RazorDirective - [0..30)::30 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..30)::29 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..30)::22 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..29)::15 + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpCodeBlock - [15..29)::14 + RazorDirective - [15..29)::14 - Directive:{inherits;SingleLine;FileScopedSinglyOccurring} [RZ2005(16:0,16 [8] ), RZ1017(29:0,29 [1] )] + CSharpTransition - [15..16)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [16..29)::13 + RazorMetaCode - [16..24)::8 - Gen - SpanEditHandler;Accepts:None + Identifier;[inherits]; + CSharpCodeBlock - [24..29)::5 + CSharpStatementLiteral - [24..25)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [25..28)::3 - [Bar] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[Bar]; + UnclassifiedTextLiteral - [28..29)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + MarkupTextLiteral - [29..29)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [29..30)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [30..30)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnMultipleNestedSections.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnMultipleNestedSections.cspans.txt new file mode 100644 index 0000000000..7b1ac91e41 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnMultipleNestedSections.cspans.txt @@ -0,0 +1,32 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [61] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [61] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [61] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [61] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [61] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [61] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [61] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [46] ) +Transition span at (15:0,15 [1] ) (Accepts:None) - Parent: Directive block at (15:0,15 [44] ) +MetaCode span at (16:0,16 [7] ) (Accepts:None) - Parent: Directive block at (15:0,15 [44] ) +Code span at (23:0,23 [1] ) (Accepts:Whitespace) - Parent: Directive block at (15:0,15 [44] ) +Code span at (24:0,24 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (15:0,15 [44] ) +None span at (27:0,27 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (15:0,15 [44] ) +MetaCode span at (28:0,28 [1] ) (Accepts:None) - Parent: Directive block at (15:0,15 [44] ) +Markup span at (29:0,29 [1] ) (Accepts:Any) - Parent: Markup block at (29:0,29 [29] ) +Markup span at (30:0,30 [3] ) (Accepts:Any) - Parent: Tag block at (30:0,30 [3] ) +Markup span at (33:0,33 [3] ) (Accepts:Any) - Parent: Markup block at (29:0,29 [29] ) +Markup span at (36:0,36 [4] ) (Accepts:Any) - Parent: Tag block at (36:0,36 [4] ) +Markup span at (40:0,40 [1] ) (Accepts:Any) - Parent: Markup block at (29:0,29 [29] ) +Transition span at (41:0,41 [1] ) (Accepts:None) - Parent: Directive block at (41:0,41 [16] ) +MetaCode span at (42:0,42 [7] ) (Accepts:None) - Parent: Directive block at (41:0,41 [16] ) +Code span at (49:0,49 [1] ) (Accepts:Whitespace) - Parent: Directive block at (41:0,41 [16] ) +Code span at (50:0,50 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (41:0,41 [16] ) +None span at (53:0,53 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (41:0,41 [16] ) +MetaCode span at (54:0,54 [1] ) (Accepts:None) - Parent: Directive block at (41:0,41 [16] ) +Markup span at (55:0,55 [1] ) (Accepts:Any) - Parent: Markup block at (55:0,55 [1] ) +MetaCode span at (56:0,56 [1] ) (Accepts:None) - Parent: Directive block at (41:0,41 [16] ) +Markup span at (57:0,57 [1] ) (Accepts:Any) - Parent: Markup block at (29:0,29 [29] ) +MetaCode span at (58:0,58 [1] ) (Accepts:None) - Parent: Directive block at (15:0,15 [44] ) +Markup span at (59:0,59 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [46] ) +MetaCode span at (60:0,60 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [61] ) +Markup span at (61:0,61 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [61] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnMultipleNestedSections.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnMultipleNestedSections.stree.txt new file mode 100644 index 0000000000..adfbb5aa6d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnMultipleNestedSections.stree.txt @@ -0,0 +1,87 @@ +RazorDocument - [0..61)::61 - [@section foo { @section bar {

                    Foo

                    @section baz { } } }] + MarkupBlock - [0..61)::61 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..61)::61 + RazorDirective - [0..61)::61 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..61)::60 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..61)::53 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..60)::46 + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpCodeBlock - [15..59)::44 + RazorDirective - [15..59)::44 - Directive:{section;RazorBlock;Unrestricted} [RZ2005(16:0,16 [7] ), RZ2002(15:0,15 [8] )] + CSharpTransition - [15..16)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [16..59)::43 + RazorMetaCode - [16..23)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [23..59)::36 + CSharpStatementLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [24..27)::3 - [bar] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[bar]; + UnclassifiedTextLiteral - [27..28)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [28..29)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [29..58)::29 + MarkupTextLiteral - [29..30)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [30..40)::10 + MarkupStartTag - [30..33)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [33..36)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [36..40)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [40..41)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpCodeBlock - [41..57)::16 + RazorDirective - [41..57)::16 - Directive:{section;RazorBlock;Unrestricted} [RZ2005(42:0,42 [7] ), RZ2002(41:0,41 [8] )] + CSharpTransition - [41..42)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [42..57)::15 + RazorMetaCode - [42..49)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [49..57)::8 + CSharpStatementLiteral - [49..50)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [50..53)::3 - [baz] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[baz]; + UnclassifiedTextLiteral - [53..54)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [54..55)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [55..56)::1 + MarkupTextLiteral - [55..56)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [56..57)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [57..58)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [58..59)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [59..60)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [60..61)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [61..61)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnNestedSections.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnNestedSections.cspans.txt new file mode 100644 index 0000000000..f4b0f08c70 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnNestedSections.cspans.txt @@ -0,0 +1,23 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [44] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [44] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [44] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [44] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [44] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [44] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [44] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [29] ) +Transition span at (15:0,15 [1] ) (Accepts:None) - Parent: Directive block at (15:0,15 [27] ) +MetaCode span at (16:0,16 [7] ) (Accepts:None) - Parent: Directive block at (15:0,15 [27] ) +Code span at (23:0,23 [1] ) (Accepts:Whitespace) - Parent: Directive block at (15:0,15 [27] ) +Code span at (24:0,24 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (15:0,15 [27] ) +None span at (27:0,27 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (15:0,15 [27] ) +MetaCode span at (28:0,28 [1] ) (Accepts:None) - Parent: Directive block at (15:0,15 [27] ) +Markup span at (29:0,29 [1] ) (Accepts:Any) - Parent: Markup block at (29:0,29 [12] ) +Markup span at (30:0,30 [3] ) (Accepts:Any) - Parent: Tag block at (30:0,30 [3] ) +Markup span at (33:0,33 [3] ) (Accepts:Any) - Parent: Markup block at (29:0,29 [12] ) +Markup span at (36:0,36 [4] ) (Accepts:Any) - Parent: Tag block at (36:0,36 [4] ) +Markup span at (40:0,40 [1] ) (Accepts:Any) - Parent: Markup block at (29:0,29 [12] ) +MetaCode span at (41:0,41 [1] ) (Accepts:None) - Parent: Directive block at (15:0,15 [27] ) +Markup span at (42:0,42 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [29] ) +MetaCode span at (43:0,43 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [44] ) +Markup span at (44:0,44 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [44] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnNestedSections.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnNestedSections.stree.txt new file mode 100644 index 0000000000..50696e68f5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnNestedSections.stree.txt @@ -0,0 +1,64 @@ +RazorDocument - [0..44)::44 - [@section foo { @section bar {

                    Foo

                    } }] + MarkupBlock - [0..44)::44 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..44)::44 + RazorDirective - [0..44)::44 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..44)::43 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..44)::36 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..43)::29 + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpCodeBlock - [15..42)::27 + RazorDirective - [15..42)::27 - Directive:{section;RazorBlock;Unrestricted} [RZ2005(16:0,16 [7] ), RZ2002(15:0,15 [8] )] + CSharpTransition - [15..16)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [16..42)::26 + RazorMetaCode - [16..23)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [23..42)::19 + CSharpStatementLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [24..27)::3 - [bar] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[bar]; + UnclassifiedTextLiteral - [27..28)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [28..29)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [29..41)::12 + MarkupTextLiteral - [29..30)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [30..40)::10 + MarkupStartTag - [30..33)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [33..36)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [36..40)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [40..41)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [41..42)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [42..43)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [43..44)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [44..44)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesComment.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesComment.cspans.txt new file mode 100644 index 0000000000..3128f77ff8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesComment.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [21] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [21] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [21] ) +Code span at (9:0,9 [1] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [21] ) +None span at (10:0,10 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [21] ) +MetaCode span at (11:0,11 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [21] ) +Markup span at (12:0,12 [4] ) (Accepts:None) - Parent: HtmlComment block at (12:0,12 [8] ) +Markup span at (16:0,16 [1] ) (Accepts:Whitespace) - Parent: HtmlComment block at (12:0,12 [8] ) +Markup span at (17:0,17 [3] ) (Accepts:None) - Parent: HtmlComment block at (12:0,12 [8] ) +Markup span at (20:0,20 [0] ) (Accepts:Any) - Parent: Markup block at (12:0,12 [8] ) +MetaCode span at (20:0,20 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [21] ) +Markup span at (21:0,21 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesComment.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesComment.stree.txt new file mode 100644 index 0000000000..fe774d1047 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesComment.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..21)::21 - [@section s {}] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..21)::21 + RazorDirective - [0..21)::21 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..21)::20 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..21)::13 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..10)::1 - [s] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[s]; + UnclassifiedTextLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [11..12)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [12..20)::8 + MarkupCommentBlock - [12..20)::8 + MarkupTextLiteral - [12..16)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupTextLiteral - [20..20)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [20..21)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesCommentWithDelimiters.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesCommentWithDelimiters.cspans.txt new file mode 100644 index 0000000000..6303d19bff --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesCommentWithDelimiters.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [26] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [26] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [26] ) +Code span at (9:0,9 [1] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [26] ) +None span at (10:0,10 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [26] ) +MetaCode span at (11:0,11 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [26] ) +Markup span at (12:0,12 [4] ) (Accepts:None) - Parent: HtmlComment block at (12:0,12 [13] ) +Markup span at (16:0,16 [6] ) (Accepts:Whitespace) - Parent: HtmlComment block at (12:0,12 [13] ) +Markup span at (22:0,22 [3] ) (Accepts:None) - Parent: HtmlComment block at (12:0,12 [13] ) +Markup span at (25:0,25 [0] ) (Accepts:Any) - Parent: Markup block at (12:0,12 [13] ) +MetaCode span at (25:0,25 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [26] ) +Markup span at (26:0,26 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesCommentWithDelimiters.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesCommentWithDelimiters.stree.txt new file mode 100644 index 0000000000..3d67883302 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesCommentWithDelimiters.stree.txt @@ -0,0 +1,42 @@ +RazorDocument - [0..26)::26 - [@section s {}] + MarkupBlock - [0..26)::26 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..26)::26 + RazorDirective - [0..26)::26 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..26)::25 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..26)::18 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..10)::1 - [s] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[s]; + UnclassifiedTextLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [11..12)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [12..25)::13 + MarkupCommentBlock - [12..25)::13 + MarkupTextLiteral - [12..16)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupTextLiteral - [25..25)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [25..26)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [26..26)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesNamedSectionCorrectly.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesNamedSectionCorrectly.cspans.txt new file mode 100644 index 0000000000..288a8a8447 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesNamedSectionCorrectly.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [27] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [27] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [27] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [27] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [27] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [27] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [12] ) +Markup span at (15:0,15 [3] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [3] ) +Markup span at (18:0,18 [3] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [12] ) +Markup span at (21:0,21 [4] ) (Accepts:Any) - Parent: Tag block at (21:0,21 [4] ) +Markup span at (25:0,25 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [12] ) +MetaCode span at (26:0,26 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [27] ) +Markup span at (27:0,27 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesNamedSectionCorrectly.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesNamedSectionCorrectly.stree.txt new file mode 100644 index 0000000000..86825c5816 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesNamedSectionCorrectly.stree.txt @@ -0,0 +1,41 @@ +RazorDocument - [0..27)::27 - [@section foo {

                    Foo

                    }] + MarkupBlock - [0..27)::27 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..27)::27 + RazorDirective - [0..27)::27 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..27)::26 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..27)::19 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..26)::12 + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [15..25)::10 + MarkupStartTag - [15..18)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [18..21)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [21..25)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [26..27)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [27..27)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesXmlProcessingInstruction.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesXmlProcessingInstruction.cspans.txt new file mode 100644 index 0000000000..468ea2f186 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesXmlProcessingInstruction.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [28] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [28] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [28] ) +Code span at (9:0,9 [1] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [28] ) +None span at (10:0,10 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [28] ) +MetaCode span at (11:0,11 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [28] ) +Markup span at (12:0,12 [15] ) (Accepts:Any) - Parent: Markup block at (12:0,12 [15] ) +MetaCode span at (27:0,27 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [28] ) +Markup span at (28:0,28 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesXmlProcessingInstruction.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesXmlProcessingInstruction.stree.txt new file mode 100644 index 0000000000..a18fe82823 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParsesXmlProcessingInstruction.stree.txt @@ -0,0 +1,36 @@ +RazorDocument - [0..28)::28 - [@section s { }] + MarkupBlock - [0..28)::28 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..28)::28 + RazorDirective - [0..28)::28 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..28)::27 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..28)::20 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..10)::1 - [s] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[s]; + UnclassifiedTextLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [11..12)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [12..27)::15 + MarkupTextLiteral - [12..27)::15 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + OpenAngle;[<]; + QuestionMark;[?]; + Whitespace;[ ]; + Text;[xml]; + Whitespace;[ ]; + Text;[bleh]; + Whitespace;[ ]; + QuestionMark;[?]; + CloseAngle;[>]; + RazorMetaCode - [27..28)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [28..28)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndAcceptsWhitespaceToEOLIfSectionNotFollowedByOpenBrace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndAcceptsWhitespaceToEOLIfSectionNotFollowedByOpenBrace.cspans.txt new file mode 100644 index 0000000000..0b57ebf59f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndAcceptsWhitespaceToEOLIfSectionNotFollowedByOpenBrace.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [20] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [20] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [20] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [20] ) +None span at (12:0,12 [8] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [20] ) +Markup span at (20:1,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndAcceptsWhitespaceToEOLIfSectionNotFollowedByOpenBrace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndAcceptsWhitespaceToEOLIfSectionNotFollowedByOpenBrace.stree.txt new file mode 100644 index 0000000000..4aaa12bea3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndAcceptsWhitespaceToEOLIfSectionNotFollowedByOpenBrace.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..20)::20 - [@section foo LF] + MarkupBlock - [0..20)::20 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..20)::20 + RazorDirective - [0..20)::20 - Directive:{section;RazorBlock;Unrestricted} [RZ1012(20:1,0 [1] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..20)::19 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..20)::12 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + UnclassifiedTextLiteral - [12..20)::8 - [ LF] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + NewLine;[LF]; + MarkupTextLiteral - [20..20)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndTerminatesSectionBlockIfKeywordNotFollowedByIdentifierStartChar.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndTerminatesSectionBlockIfKeywordNotFollowedByIdentifierStartChar.cspans.txt new file mode 100644 index 0000000000..1b511f83f5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndTerminatesSectionBlockIfKeywordNotFollowedByIdentifierStartChar.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [9] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [9] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [9] ) +Markup span at (9:0,9 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Markup span at (13:0,13 [3] ) (Accepts:Any) - Parent: Tag block at (13:0,13 [3] ) +Markup span at (16:0,16 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Markup span at (19:0,19 [4] ) (Accepts:Any) - Parent: Tag block at (19:0,19 [4] ) +Markup span at (23:0,23 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndTerminatesSectionBlockIfKeywordNotFollowedByIdentifierStartChar.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndTerminatesSectionBlockIfKeywordNotFollowedByIdentifierStartChar.stree.txt new file mode 100644 index 0000000000..7ce390e0b2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndTerminatesSectionBlockIfKeywordNotFollowedByIdentifierStartChar.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..25)::25 - [@section 9 {

                    Foo

                    }] + MarkupBlock - [0..25)::25 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..9)::9 + RazorDirective - [0..9)::9 - Directive:{section;RazorBlock;Unrestricted} [RZ1015(9:0,9 [1] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..9)::8 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..9)::1 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + MarkupTextLiteral - [9..13)::4 - [9 { ] - Gen - SpanEditHandler;Accepts:Any + Text;[9]; + Whitespace;[ ]; + Text;[{]; + Whitespace;[ ]; + MarkupElement - [13..23)::10 + MarkupStartTag - [13..16)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [16..19)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [19..23)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [23..25)::2 - [ }] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndTerminatesSectionBlockIfNameNotFollowedByOpenBrace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndTerminatesSectionBlockIfNameNotFollowedByOpenBrace.cspans.txt new file mode 100644 index 0000000000..b1564f1bc8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndTerminatesSectionBlockIfNameNotFollowedByOpenBrace.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [12] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [12] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [12] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [12] ) +Markup span at (12:0,12 [7] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) +Markup span at (19:0,19 [3] ) (Accepts:Any) - Parent: Tag block at (19:0,19 [3] ) +Markup span at (22:0,22 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) +Markup span at (25:0,25 [4] ) (Accepts:Any) - Parent: Tag block at (25:0,25 [4] ) +Markup span at (29:0,29 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndTerminatesSectionBlockIfNameNotFollowedByOpenBrace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndTerminatesSectionBlockIfNameNotFollowedByOpenBrace.stree.txt new file mode 100644 index 0000000000..6ba250ccaa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ReportsErrorAndTerminatesSectionBlockIfNameNotFollowedByOpenBrace.stree.txt @@ -0,0 +1,36 @@ +RazorDocument - [0..31)::31 - [@section foo-bar {

                    Foo

                    }] + MarkupBlock - [0..31)::31 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..12)::12 + RazorDirective - [0..12)::12 - Directive:{section;RazorBlock;Unrestricted} [RZ1017(12:0,12 [1] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..12)::11 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..12)::4 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + MarkupTextLiteral - [12..19)::7 - [-bar { ] - Gen - SpanEditHandler;Accepts:Any + Text;[-bar]; + Whitespace;[ ]; + Text;[{]; + Whitespace;[ ]; + MarkupElement - [19..29)::10 + MarkupStartTag - [19..22)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [22..25)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [25..29)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [29..31)::2 - [ }] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/SectionCorrectlyTerminatedWhenCloseBraceFollowsCodeBlockNoWhitespace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/SectionCorrectlyTerminatedWhenCloseBraceFollowsCodeBlockNoWhitespace.cspans.txt new file mode 100644 index 0000000000..713abda61d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/SectionCorrectlyTerminatedWhenCloseBraceFollowsCodeBlockNoWhitespace.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [31] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [31] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [31] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [31] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [31] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [31] ) +Markup span at (14:0,14 [2] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [16] ) +Transition span at (16:1,0 [1] ) (Accepts:None) - Parent: Statement block at (16:1,0 [14] ) +Code span at (17:1,1 [13] ) (Accepts:Any) - Parent: Statement block at (16:1,0 [14] ) +MetaCode span at (30:2,1 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [31] ) +Markup span at (31:2,2 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/SectionCorrectlyTerminatedWhenCloseBraceFollowsCodeBlockNoWhitespace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/SectionCorrectlyTerminatedWhenCloseBraceFollowsCodeBlockNoWhitespace.stree.txt new file mode 100644 index 0000000000..f6f748f944 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/SectionCorrectlyTerminatedWhenCloseBraceFollowsCodeBlockNoWhitespace.stree.txt @@ -0,0 +1,39 @@ +RazorDocument - [0..31)::31 - [@section Foo {LF@if(true) {LF}}] + MarkupBlock - [0..31)::31 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..31)::31 + RazorDirective - [0..31)::31 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..31)::30 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..31)::23 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [Foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[Foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..30)::16 + MarkupTextLiteral - [14..16)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [16..30)::14 + CSharpTransition - [16..17)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [17..30)::13 - [if(true) {LF}] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + RightBrace;[}]; + RazorMetaCode - [30..31)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [31..31)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/SectionIsCorrectlyTerminatedWhenCloseBraceImmediatelyFollowsCodeBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/SectionIsCorrectlyTerminatedWhenCloseBraceImmediatelyFollowsCodeBlock.cspans.txt new file mode 100644 index 0000000000..4ef0cf352d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/SectionIsCorrectlyTerminatedWhenCloseBraceImmediatelyFollowsCodeBlock.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [33] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [33] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [33] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [33] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [33] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [33] ) +Markup span at (14:0,14 [2] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [18] ) +Transition span at (16:1,0 [1] ) (Accepts:None) - Parent: Statement block at (16:1,0 [16] ) +Code span at (17:1,1 [15] ) (Accepts:Any) - Parent: Statement block at (16:1,0 [16] ) +MetaCode span at (32:3,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [33] ) +Markup span at (33:3,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/SectionIsCorrectlyTerminatedWhenCloseBraceImmediatelyFollowsCodeBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/SectionIsCorrectlyTerminatedWhenCloseBraceImmediatelyFollowsCodeBlock.stree.txt new file mode 100644 index 0000000000..1dd0e69729 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/SectionIsCorrectlyTerminatedWhenCloseBraceImmediatelyFollowsCodeBlock.stree.txt @@ -0,0 +1,40 @@ +RazorDocument - [0..33)::33 - [@section Foo {LF@if(true) {LF}LF}] + MarkupBlock - [0..33)::33 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..33)::33 + RazorDirective - [0..33)::33 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..33)::32 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..33)::25 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [Foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[Foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..32)::18 + MarkupTextLiteral - [14..16)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [16..32)::16 + CSharpTransition - [16..17)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [17..32)::15 - [if(true) {LF}LF] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + RightBrace;[}]; + NewLine;[LF]; + RazorMetaCode - [32..33)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/_WithDoubleTransition1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/_WithDoubleTransition1.cspans.txt new file mode 100644 index 0000000000..fd7f466680 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/_WithDoubleTransition1.cspans.txt @@ -0,0 +1,15 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [30] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [30] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [30] ) +Code span at (9:0,9 [1] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [30] ) +None span at (10:0,10 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [30] ) +MetaCode span at (11:0,11 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [30] ) +Markup span at (12:0,12 [5] ) (Accepts:Any) - Parent: Tag block at (12:0,12 [17] ) +Markup span at (17:0,17 [6] ) (Accepts:Any) - Parent: Markup block at (17:0,17 [9] ) +Markup span at (23:0,23 [1] ) (Accepts:None) - Parent: Markup block at (23:0,23 [2] ) +Markup span at (24:0,24 [1] ) (Accepts:None) - Parent: Markup block at (23:0,23 [2] ) +Markup span at (25:0,25 [1] ) (Accepts:Any) - Parent: Markup block at (17:0,17 [9] ) +Markup span at (26:0,26 [3] ) (Accepts:Any) - Parent: Tag block at (12:0,12 [17] ) +MetaCode span at (29:0,29 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [30] ) +Markup span at (30:0,30 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/_WithDoubleTransition1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/_WithDoubleTransition1.stree.txt new file mode 100644 index 0000000000..48df1c0bfc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/_WithDoubleTransition1.stree.txt @@ -0,0 +1,50 @@ +RazorDocument - [0..30)::30 - [@section s {}] + MarkupBlock - [0..30)::30 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..30)::30 + RazorDirective - [0..30)::30 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..30)::29 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..30)::22 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..10)::1 - [s] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[s]; + UnclassifiedTextLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [11..12)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [12..29)::17 + MarkupElement - [12..29)::17 + MarkupStartTag - [12..29)::17 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [17..26)::9 - [ foo='@@'] + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [18..21)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + Equals;[=]; + MarkupTextLiteral - [22..23)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [23..25)::2 + MarkupBlock - [23..25)::2 + MarkupTextLiteral - [23..24)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupEphemeralTextLiteral - [24..25)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupTextLiteral - [25..26)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [26..27)::1 + MarkupTextLiteral - [26..27)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + RazorMetaCode - [29..30)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [30..30)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/_WithDoubleTransition2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/_WithDoubleTransition2.cspans.txt new file mode 100644 index 0000000000..0a4a2f665f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/_WithDoubleTransition2.cspans.txt @@ -0,0 +1,17 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [44] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [44] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [44] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [44] ) +Code span at (9:0,9 [1] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [44] ) +None span at (10:0,10 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [44] ) +MetaCode span at (11:0,11 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [44] ) +Markup span at (12:0,12 [5] ) (Accepts:Any) - Parent: Tag block at (12:0,12 [31] ) +Markup span at (17:0,17 [6] ) (Accepts:Any) - Parent: Markup block at (17:0,17 [23] ) +Transition span at (23:0,23 [1] ) (Accepts:None) - Parent: Expression block at (23:0,23 [13] ) +Code span at (24:0,24 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (23:0,23 [13] ) +Markup span at (36:0,36 [2] ) (Accepts:None) - Parent: Markup block at (36:0,36 [3] ) +Markup span at (38:0,38 [1] ) (Accepts:None) - Parent: Markup block at (36:0,36 [3] ) +Markup span at (39:0,39 [1] ) (Accepts:Any) - Parent: Markup block at (17:0,17 [23] ) +Markup span at (40:0,40 [3] ) (Accepts:Any) - Parent: Tag block at (12:0,12 [31] ) +MetaCode span at (43:0,43 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [44] ) +Markup span at (44:0,44 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [44] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/_WithDoubleTransition2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/_WithDoubleTransition2.stree.txt new file mode 100644 index 0000000000..2659456d6f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/_WithDoubleTransition2.stree.txt @@ -0,0 +1,63 @@ +RazorDocument - [0..44)::44 - [@section s {}] + MarkupBlock - [0..44)::44 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..44)::44 + RazorDirective - [0..44)::44 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..44)::43 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..44)::36 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..10)::1 - [s] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[s]; + UnclassifiedTextLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [11..12)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [12..43)::31 + MarkupElement - [12..43)::31 + MarkupStartTag - [12..43)::31 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [17..40)::23 - [ foo='@DateTime.Now @@'] + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [18..21)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + Equals;[=]; + MarkupTextLiteral - [22..23)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [23..39)::16 + MarkupDynamicAttributeValue - [23..36)::13 - [@DateTime.Now] + GenericBlock - [23..36)::13 + CSharpCodeBlock - [23..36)::13 + CSharpImplicitExpression - [23..36)::13 + CSharpTransition - [23..24)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [24..36)::12 + CSharpCodeBlock - [24..36)::12 + CSharpExpressionLiteral - [24..36)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K15 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupBlock - [36..39)::3 + MarkupTextLiteral - [36..38)::2 - [ @] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Transition;[@]; + MarkupEphemeralTextLiteral - [38..39)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupTextLiteral - [39..40)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [40..41)::1 + MarkupTextLiteral - [40..41)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + RazorMetaCode - [43..44)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [44..44)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/BalancesBracesOutsideStringsIfFirstCharIsBraceAndReturnsSpanOfTypeCode.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/BalancesBracesOutsideStringsIfFirstCharIsBraceAndReturnsSpanOfTypeCode.cspans.txt new file mode 100644 index 0000000000..58aa7eca66 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/BalancesBracesOutsideStringsIfFirstCharIsBraceAndReturnsSpanOfTypeCode.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [53] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [53] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [53] ) +Code span at (2:0,2 [50] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [53] ) +MetaCode span at (52:0,52 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [53] ) +Markup span at (53:0,53 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [53] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/BalancesBracesOutsideStringsIfFirstCharIsBraceAndReturnsSpanOfTypeCode.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/BalancesBracesOutsideStringsIfFirstCharIsBraceAndReturnsSpanOfTypeCode.stree.txt new file mode 100644 index 0000000000..74ff9e617e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/BalancesBracesOutsideStringsIfFirstCharIsBraceAndReturnsSpanOfTypeCode.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..53)::53 - [@{foo"b}ar" if(condition) { string.Format("{0}"); } }] + MarkupBlock - [0..53)::53 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..53)::53 + CSharpStatement - [0..53)::53 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..53)::52 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..52)::50 + CSharpStatementLiteral - [2..52)::50 - [foo"b}ar" if(condition) { string.Format("{0}"); } ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Identifier;[foo]; + StringLiteral;["b}ar"]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[condition]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Keyword;[string]; + Dot;[.]; + Identifier;[Format]; + LeftParenthesis;[(]; + StringLiteral;["{0}"]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RazorMetaCode - [52..53)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [53..53)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/BalancesParensOutsideStringsIfFirstCharIsParenAndReturnsSpanOfTypeExpr.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/BalancesParensOutsideStringsIfFirstCharIsParenAndReturnsSpanOfTypeExpr.cspans.txt new file mode 100644 index 0000000000..9941127366 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/BalancesParensOutsideStringsIfFirstCharIsParenAndReturnsSpanOfTypeExpr.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [53] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [53] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [53] ) +Code span at (2:0,2 [50] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [53] ) +MetaCode span at (52:0,52 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [53] ) +Markup span at (53:0,53 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [53] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/BalancesParensOutsideStringsIfFirstCharIsParenAndReturnsSpanOfTypeExpr.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/BalancesParensOutsideStringsIfFirstCharIsParenAndReturnsSpanOfTypeExpr.stree.txt new file mode 100644 index 0000000000..6304616645 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/BalancesParensOutsideStringsIfFirstCharIsParenAndReturnsSpanOfTypeExpr.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..53)::53 - [@(foo"b)ar" if(condition) { string.Format("{0}"); } )] + MarkupBlock - [0..53)::53 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..53)::53 + CSharpExplicitExpression - [0..53)::53 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [1..53)::52 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [2..52)::50 + CSharpExpressionLiteral - [2..52)::50 - [foo"b)ar" if(condition) { string.Format("{0}"); } ] - Gen - SpanEditHandler;Accepts:Any + Identifier;[foo]; + StringLiteral;["b)ar"]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[condition]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Keyword;[string]; + Dot;[.]; + Identifier;[Format]; + LeftParenthesis;[(]; + StringLiteral;["{0}"]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RazorMetaCode - [52..53)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + MarkupTextLiteral - [53..53)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/NamespaceImportInsideCodeBlockCausesError.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/NamespaceImportInsideCodeBlockCausesError.cspans.txt new file mode 100644 index 0000000000..5d386ce1ba --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/NamespaceImportInsideCodeBlockCausesError.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [38] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [38] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [38] ) +Code span at (2:0,2 [35] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [38] ) +MetaCode span at (37:0,37 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [38] ) +Markup span at (38:0,38 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [38] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/NamespaceImportInsideCodeBlockCausesError.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/NamespaceImportInsideCodeBlockCausesError.stree.txt new file mode 100644 index 0000000000..14cc48739f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/NamespaceImportInsideCodeBlockCausesError.stree.txt @@ -0,0 +1,36 @@ +RazorDocument - [0..38)::38 - [@{ using Foo.Bar.Baz; var foo = bar; }] + MarkupBlock - [0..38)::38 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..38)::38 + CSharpStatement - [0..38)::38 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..38)::37 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..37)::35 + CSharpStatementLiteral - [2..37)::35 - [ using Foo.Bar.Baz; var foo = bar; ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Keyword;[using]; + Whitespace;[ ]; + Identifier;[Foo]; + Dot;[.]; + Identifier;[Bar]; + Dot;[.]; + Identifier;[Baz]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + RazorMetaCode - [37..38)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [38..38)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/NonKeywordStatementInCodeBlockIsHandledCorrectly.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/NonKeywordStatementInCodeBlockIsHandledCorrectly.cspans.txt new file mode 100644 index 0000000000..6e4138ea53 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/NonKeywordStatementInCodeBlockIsHandledCorrectly.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [57] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [57] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [57] ) +Code span at (2:0,2 [54] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [57] ) +MetaCode span at (56:2,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [57] ) +Markup span at (57:2,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [57] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/NonKeywordStatementInCodeBlockIsHandledCorrectly.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/NonKeywordStatementInCodeBlockIsHandledCorrectly.stree.txt new file mode 100644 index 0000000000..bf39ca1547 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/NonKeywordStatementInCodeBlockIsHandledCorrectly.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..57)::57 - [@{LF List photos = gallery.Photo.ToList();LF}] + MarkupBlock - [0..57)::57 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..57)::57 + CSharpStatement - [0..57)::57 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..57)::56 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..56)::54 + CSharpStatementLiteral - [2..56)::54 - [LF List photos = gallery.Photo.ToList();LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[List]; + LessThan;[<]; + Identifier;[dynamic]; + GreaterThan;[>]; + Whitespace;[ ]; + Identifier;[photos]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[gallery]; + Dot;[.]; + Identifier;[Photo]; + Dot;[.]; + Identifier;[ToList]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [56..57)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [57..57)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockIgnoresSingleSlashAtStart.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockIgnoresSingleSlashAtStart.cspans.txt new file mode 100644 index 0000000000..320067e579 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockIgnoresSingleSlashAtStart.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [6] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [1] ) +Code span at (1:0,1 [0] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [1] ) +Markup span at (1:0,1 [5] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockIgnoresSingleSlashAtStart.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockIgnoresSingleSlashAtStart.diag.txt new file mode 100644 index 0000000000..6d8d0cd1bb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockIgnoresSingleSlashAtStart.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1005: "/" is not valid at the start of a code block. Only identifiers, keywords, comments, "(" and "{" are valid. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockIgnoresSingleSlashAtStart.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockIgnoresSingleSlashAtStart.stree.txt new file mode 100644 index 0000000000..f83ce55634 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockIgnoresSingleSlashAtStart.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..6)::6 - [@/ foo] + MarkupBlock - [0..6)::6 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..1)::1 + CSharpImplicitExpression - [0..1)::1 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..1)::0 + CSharpCodeBlock - [1..1)::0 + CSharpExpressionLiteral - [1..1)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Marker;[]; + MarkupTextLiteral - [1..6)::5 - [/ foo] - Gen - SpanEditHandler;Accepts:Any + ForwardSlash;[/]; + Whitespace;[ ]; + Text;[foo]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockTerminatesSingleLineCommentAtEndOfLine.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockTerminatesSingleLineCommentAtEndOfLine.cspans.txt new file mode 100644 index 0000000000..12ec38b2d1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockTerminatesSingleLineCommentAtEndOfLine.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [49] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [49] ) +Code span at (1:0,1 [26] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [49] ) +Markup span at (27:2,0 [1] ) (Accepts:Any) - Parent: Markup block at (27:2,0 [21] ) +Markup span at (28:2,1 [3] ) (Accepts:None) - Parent: Tag block at (28:2,1 [3] ) +Markup span at (31:2,4 [11] ) (Accepts:Any) - Parent: Markup block at (27:2,0 [21] ) +Markup span at (42:2,15 [4] ) (Accepts:None) - Parent: Tag block at (42:2,15 [4] ) +Markup span at (46:2,19 [2] ) (Accepts:None) - Parent: Markup block at (27:2,0 [21] ) +Code span at (48:3,0 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [49] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockTerminatesSingleLineCommentAtEndOfLine.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockTerminatesSingleLineCommentAtEndOfLine.stree.txt new file mode 100644 index 0000000000..a97f0f5812 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/ParseBlockTerminatesSingleLineCommentAtEndOfLine.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..49)::49 - [@if(!false) {LF // FooLF

                    A real tag!

                    LF}] + MarkupBlock - [0..49)::49 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..49)::49 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..27)::26 - [if(!false) {LF // FooLF] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Not;[!]; + Keyword;[false]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + CSharpComment;[// Foo]; + NewLine;[LF]; + MarkupBlock - [27..48)::21 + MarkupTextLiteral - [27..28)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [28..46)::18 + MarkupStartTag - [28..31)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [31..42)::11 - [A real tag!] - Gen - SpanEditHandler;Accepts:Any + Text;[A]; + Whitespace;[ ]; + Text;[real]; + Whitespace;[ ]; + Text;[tag]; + Bang;[!]; + MarkupEndTag - [42..46)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [46..48)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [48..49)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/TypeAliasInsideCodeBlockIsNotHandledSpecially.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/TypeAliasInsideCodeBlockIsNotHandledSpecially.cspans.txt new file mode 100644 index 0000000000..15f7b3d523 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/TypeAliasInsideCodeBlockIsNotHandledSpecially.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [40] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [40] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [40] ) +Code span at (2:0,2 [37] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [40] ) +MetaCode span at (39:0,39 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [40] ) +Markup span at (40:0,40 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [40] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/TypeAliasInsideCodeBlockIsNotHandledSpecially.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/TypeAliasInsideCodeBlockIsNotHandledSpecially.stree.txt new file mode 100644 index 0000000000..54a90a74b8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSpecialBlockTest/TypeAliasInsideCodeBlockIsNotHandledSpecially.stree.txt @@ -0,0 +1,38 @@ +RazorDocument - [0..40)::40 - [@{ using Foo = Bar.Baz; var foo = bar; }] + MarkupBlock - [0..40)::40 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..40)::40 + CSharpStatement - [0..40)::40 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..40)::39 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..39)::37 + CSharpStatementLiteral - [2..39)::37 - [ using Foo = Bar.Baz; var foo = bar; ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Keyword;[using]; + Whitespace;[ ]; + Identifier;[Foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[Bar]; + Dot;[.]; + Identifier;[Baz]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + RazorMetaCode - [39..40)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [40..40)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/AwaitForEachStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/AwaitForEachStatement.cspans.txt new file mode 100644 index 0000000000..d4911d2950 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/AwaitForEachStatement.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [41] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [41] ) +Code span at (1:0,1 [40] ) (Accepts:None) - Parent: Statement block at (0:0,0 [41] ) +Markup span at (41:0,41 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [41] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/AwaitForEachStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/AwaitForEachStatement.stree.txt new file mode 100644 index 0000000000..abd0bc235d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/AwaitForEachStatement.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..41)::41 - [@await foreach(var foo in bar) { foo(); }] + MarkupBlock - [0..41)::41 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..41)::41 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..41)::40 - [await foreach(var foo in bar) { foo(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[await]; + Whitespace;[ ]; + Keyword;[foreach]; + LeftParenthesis;[(]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Keyword;[in]; + Whitespace;[ ]; + Identifier;[bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [41..41)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/CatchClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/CatchClause.cspans.txt new file mode 100644 index 0000000000..a01e4584d3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/CatchClause.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [94] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [94] ) +Code span at (1:0,1 [93] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [94] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/CatchClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/CatchClause.stree.txt new file mode 100644 index 0000000000..d369b28d28 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/CatchClause.stree.txt @@ -0,0 +1,50 @@ +RazorDocument - [0..94)::94 - [@try { foo(); } catch(IOException ioex) { handleIO(); } catch(Exception ex) { handleOther(); }] + MarkupBlock - [0..94)::94 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..94)::94 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..94)::93 - [try { foo(); } catch(IOException ioex) { handleIO(); } catch(Exception ex) { handleOther(); }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[IOException]; + Whitespace;[ ]; + Identifier;[ioex]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[handleIO]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Exception]; + Whitespace;[ ]; + Identifier;[ex]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[handleOther]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/DoStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/DoStatement.cspans.txt new file mode 100644 index 0000000000..0ef53c991b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/DoStatement.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Code span at (1:0,1 [26] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Markup span at (27:0,27 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/DoStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/DoStatement.stree.txt new file mode 100644 index 0000000000..2861b1c596 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/DoStatement.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..27)::27 - [@do { foo(); } while(true);] + MarkupBlock - [0..27)::27 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..27)::27 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..27)::26 - [do { foo(); } while(true);] - Gen - SpanEditHandler;Accepts:None + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[while]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Semicolon;[;]; + MarkupTextLiteral - [27..27)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ElseClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ElseClause.cspans.txt new file mode 100644 index 0000000000..28d83350e9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ElseClause.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [36] ) +Code span at (1:0,1 [35] ) (Accepts:None) - Parent: Statement block at (0:0,0 [36] ) +Markup span at (36:0,36 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ElseClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ElseClause.stree.txt new file mode 100644 index 0000000000..fd032ca251 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ElseClause.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..36)::36 - [@if(true) { foo(); } else { foo(); }] + MarkupBlock - [0..36)::36 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..36)::36 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..36)::35 - [if(true) { foo(); } else { foo(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [36..36)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ElseIfClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ElseIfClause.cspans.txt new file mode 100644 index 0000000000..aeec5c79f9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ElseIfClause.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [73] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [73] ) +Code span at (1:0,1 [72] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [73] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ElseIfClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ElseIfClause.stree.txt new file mode 100644 index 0000000000..ba0efa1002 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ElseIfClause.stree.txt @@ -0,0 +1,54 @@ +RazorDocument - [0..73)::73 - [@if(true) { foo(); } else if(false) { foo(); } else if(!false) { foo(); }] + MarkupBlock - [0..73)::73 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..73)::73 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..73)::72 - [if(true) { foo(); } else if(false) { foo(); } else if(!false) { foo(); }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[false]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Not;[!]; + Keyword;[false]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteBody.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteBody.cspans.txt new file mode 100644 index 0000000000..a4f8405520 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteBody.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [53] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [53] ) +Code span at (1:0,1 [52] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [53] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteBody.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteBody.diag.txt new file mode 100644 index 0000000000..821f352b2c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteBody.diag.txt @@ -0,0 +1 @@ +(1,24): Error RZ1006: The catch block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteBody.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteBody.stree.txt new file mode 100644 index 0000000000..4c3534f86f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteBody.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..53)::53 - [@try { someMethod(); } catch(Exception) when (true) {] + MarkupBlock - [0..53)::53 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..53)::53 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..53)::52 - [try { someMethod(); } catch(Exception) when (true) {] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[someMethod]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Exception]; + RightParenthesis;[)]; + Whitespace;[ ]; + Keyword;[when]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteCondition.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteCondition.cspans.txt new file mode 100644 index 0000000000..70b420119b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteCondition.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +Code span at (1:0,1 [45] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [46] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteCondition.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteCondition.diag.txt new file mode 100644 index 0000000000..33043e2030 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteCondition.diag.txt @@ -0,0 +1 @@ +(1,46): Error RZ1027: An opening "(" is missing the corresponding closing ")". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteCondition.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteCondition.stree.txt new file mode 100644 index 0000000000..c4d32daa6c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilterError_TryCatchWhen_InCompleteCondition.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..46)::46 - [@try { someMethod(); } catch(Exception) when (] + MarkupBlock - [0..46)::46 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..46)::46 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..46)::45 - [try { someMethod(); } catch(Exception) when (] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[someMethod]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Exception]; + RightParenthesis;[)]; + Whitespace;[ ]; + Keyword;[when]; + Whitespace;[ ]; + LeftParenthesis;[(]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchNoBodyWhen.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchNoBodyWhen.cspans.txt new file mode 100644 index 0000000000..957b72bff8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchNoBodyWhen.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [65] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [65] ) +Code span at (1:0,1 [64] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [65] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchNoBodyWhen.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchNoBodyWhen.stree.txt new file mode 100644 index 0000000000..7ca00fefc7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchNoBodyWhen.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..65)::65 - [@try { someMethod(); } catch(Exception) when { anotherMethod(); }] + MarkupBlock - [0..65)::65 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..65)::65 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..65)::64 - [try { someMethod(); } catch(Exception) when { anotherMethod(); }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[someMethod]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Exception]; + RightParenthesis;[)]; + Whitespace;[ ]; + Keyword;[when]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[anotherMethod]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchWhen.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchWhen.cspans.txt new file mode 100644 index 0000000000..b12747ada5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchWhen.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [44] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [44] ) +Code span at (1:0,1 [43] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [44] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchWhen.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchWhen.stree.txt new file mode 100644 index 0000000000..adbef40a1d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchWhen.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..44)::44 - [@try { someMethod(); } catch(Exception) when] + MarkupBlock - [0..44)::44 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..44)::44 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..44)::43 - [try { someMethod(); } catch(Exception) when] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[someMethod]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Exception]; + RightParenthesis;[)]; + Whitespace;[ ]; + Keyword;[when]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchWhenNoBodies.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchWhenNoBodies.cspans.txt new file mode 100644 index 0000000000..4b8a2bb802 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchWhenNoBodies.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [51] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [51] ) +Code span at (1:0,1 [50] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [51] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchWhenNoBodies.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchWhenNoBodies.stree.txt new file mode 100644 index 0000000000..8bd5aa4ee0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryCatchWhenNoBodies.stree.txt @@ -0,0 +1,29 @@ +RazorDocument - [0..51)::51 - [@try { someMethod(); } catch(Exception) when (true)] + MarkupBlock - [0..51)::51 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..51)::51 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..51)::50 - [try { someMethod(); } catch(Exception) when (true)] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[someMethod]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Exception]; + RightParenthesis;[)]; + Whitespace;[ ]; + Keyword;[when]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryWhen.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryWhen.cspans.txt new file mode 100644 index 0000000000..70af370fb6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryWhen.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +Code span at (1:0,1 [21] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [22] ) +Markup span at (22:0,22 [5] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryWhen.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryWhen.stree.txt new file mode 100644 index 0000000000..9f1d367820 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_IncompleteTryWhen.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..27)::27 - [@try { someMethod(); } when] + MarkupBlock - [0..27)::27 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..22)::22 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..22)::21 - [try { someMethod(); }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[someMethod]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [22..27)::5 - [ when] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[when]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_MultiLine.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_MultiLine.cspans.txt new file mode 100644 index 0000000000..1c9dd5a659 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_MultiLine.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [103] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [103] ) +Code span at (1:0,1 [102] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [103] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_MultiLine.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_MultiLine.stree.txt new file mode 100644 index 0000000000..adbc2b8c66 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_MultiLine.stree.txt @@ -0,0 +1,58 @@ +RazorDocument - [0..103)::103 - [@tryLF{LFA();LF}LFcatch(Exception) when (true)LF{LFB();LF}LFcatch(IOException) when (false)LF{LFC();LF}] + MarkupBlock - [0..103)::103 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..103)::103 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..103)::102 - [tryLF{LFA();LF}LFcatch(Exception) when (true)LF{LFB();LF}LFcatch(IOException) when (false)LF{LFC();LF}] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + NewLine;[LF]; + LeftBrace;[{]; + NewLine;[LF]; + Identifier;[A]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; + NewLine;[LF]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Exception]; + RightParenthesis;[)]; + Whitespace;[ ]; + Keyword;[when]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + NewLine;[LF]; + LeftBrace;[{]; + NewLine;[LF]; + Identifier;[B]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; + NewLine;[LF]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[IOException]; + RightParenthesis;[)]; + Whitespace;[ ]; + Keyword;[when]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Keyword;[false]; + RightParenthesis;[)]; + NewLine;[LF]; + LeftBrace;[{]; + NewLine;[LF]; + Identifier;[C]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_NestedTryCatchWhen.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_NestedTryCatchWhen.cspans.txt new file mode 100644 index 0000000000..54e259787a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_NestedTryCatchWhen.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [69] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [69] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [69] ) +Code span at (2:0,2 [66] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [69] ) +MetaCode span at (68:0,68 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [69] ) +Markup span at (69:0,69 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [69] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_NestedTryCatchWhen.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_NestedTryCatchWhen.stree.txt new file mode 100644 index 0000000000..8afdc4bc9d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_NestedTryCatchWhen.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..69)::69 - [@{try { someMethod(); } catch(Exception) when (true) { handleIO(); }}] + MarkupBlock - [0..69)::69 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..69)::69 + CSharpStatement - [0..69)::69 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..69)::68 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..68)::66 + CSharpStatementLiteral - [2..68)::66 - [try { someMethod(); } catch(Exception) when (true) { handleIO(); }] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[someMethod]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Exception]; + RightParenthesis;[)]; + Whitespace;[ ]; + Keyword;[when]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[handleIO]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + RazorMetaCode - [68..69)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [69..69)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenCatchWhenComplete_SingleLine.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenCatchWhenComplete_SingleLine.cspans.txt new file mode 100644 index 0000000000..eaf9d4d880 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenCatchWhenComplete_SingleLine.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [92] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [92] ) +Code span at (1:0,1 [91] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [92] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenCatchWhenComplete_SingleLine.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenCatchWhenComplete_SingleLine.stree.txt new file mode 100644 index 0000000000..89d4307ace --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenCatchWhenComplete_SingleLine.stree.txt @@ -0,0 +1,58 @@ +RazorDocument - [0..92)::92 - [@try { A(); } catch(Exception) when (true) { B(); } catch(IOException) when (false) { C(); }] + MarkupBlock - [0..92)::92 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..92)::92 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..92)::91 - [try { A(); } catch(Exception) when (true) { B(); } catch(IOException) when (false) { C(); }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[A]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Exception]; + RightParenthesis;[)]; + Whitespace;[ ]; + Keyword;[when]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[B]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[IOException]; + RightParenthesis;[)]; + Whitespace;[ ]; + Keyword;[when]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Keyword;[false]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[C]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenComplete_SingleLine.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenComplete_SingleLine.cspans.txt new file mode 100644 index 0000000000..2d883a5590 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenComplete_SingleLine.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [67] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [67] ) +Code span at (1:0,1 [66] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [67] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenComplete_SingleLine.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenComplete_SingleLine.stree.txt new file mode 100644 index 0000000000..8a1e974063 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenComplete_SingleLine.stree.txt @@ -0,0 +1,38 @@ +RazorDocument - [0..67)::67 - [@try { someMethod(); } catch(Exception) when (true) { handleIO(); }] + MarkupBlock - [0..67)::67 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..67)::67 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..67)::66 - [try { someMethod(); } catch(Exception) when (true) { handleIO(); }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[someMethod]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Exception]; + RightParenthesis;[)]; + Whitespace;[ ]; + Keyword;[when]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[handleIO]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenFinallyComplete_SingleLine.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenFinallyComplete_SingleLine.cspans.txt new file mode 100644 index 0000000000..4852e2bc04 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenFinallyComplete_SingleLine.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [68] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [68] ) +Code span at (1:0,1 [67] ) (Accepts:None) - Parent: Statement block at (0:0,0 [68] ) +Markup span at (68:0,68 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [68] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenFinallyComplete_SingleLine.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenFinallyComplete_SingleLine.stree.txt new file mode 100644 index 0000000000..0a385e2668 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ExceptionFilter_TryCatchWhenFinallyComplete_SingleLine.stree.txt @@ -0,0 +1,51 @@ +RazorDocument - [0..68)::68 - [@try { A(); } catch(Exception) when (true) { B(); } finally { C(); }] + MarkupBlock - [0..68)::68 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..68)::68 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..68)::67 - [try { A(); } catch(Exception) when (true) { B(); } finally { C(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[A]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[catch]; + LeftParenthesis;[(]; + Identifier;[Exception]; + RightParenthesis;[)]; + Whitespace;[ ]; + Keyword;[when]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[B]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[finally]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[C]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [68..68)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/FinallyClause.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/FinallyClause.cspans.txt new file mode 100644 index 0000000000..0b4bcf4edf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/FinallyClause.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [38] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [38] ) +Code span at (1:0,1 [37] ) (Accepts:None) - Parent: Statement block at (0:0,0 [38] ) +Markup span at (38:0,38 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [38] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/FinallyClause.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/FinallyClause.stree.txt new file mode 100644 index 0000000000..a954f77c66 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/FinallyClause.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..38)::38 - [@try { foo(); } finally { Dispose(); }] + MarkupBlock - [0..38)::38 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..38)::38 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..38)::37 - [try { foo(); } finally { Dispose(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[finally]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Dispose]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [38..38)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ForEachStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ForEachStatement.cspans.txt new file mode 100644 index 0000000000..dce52a5221 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ForEachStatement.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [35] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [35] ) +Code span at (1:0,1 [34] ) (Accepts:None) - Parent: Statement block at (0:0,0 [35] ) +Markup span at (35:0,35 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [35] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ForEachStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ForEachStatement.stree.txt new file mode 100644 index 0000000000..5bf4fcfbaf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ForEachStatement.stree.txt @@ -0,0 +1,29 @@ +RazorDocument - [0..35)::35 - [@foreach(var foo in bar) { foo(); }] + MarkupBlock - [0..35)::35 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..35)::35 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..35)::34 - [foreach(var foo in bar) { foo(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[foreach]; + LeftParenthesis;[(]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Keyword;[in]; + Whitespace;[ ]; + Identifier;[bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [35..35)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ForStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ForStatement.cspans.txt new file mode 100644 index 0000000000..1c487bc0c6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ForStatement.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [43] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [43] ) +Code span at (1:0,1 [42] ) (Accepts:None) - Parent: Statement block at (0:0,0 [43] ) +Markup span at (43:0,43 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [43] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ForStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ForStatement.stree.txt new file mode 100644 index 0000000000..12634efa7e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/ForStatement.stree.txt @@ -0,0 +1,40 @@ +RazorDocument - [0..43)::43 - [@for(int i = 0; i++; i < length) { foo(); }] + MarkupBlock - [0..43)::43 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..43)::43 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..43)::42 - [for(int i = 0; i++; i < length) { foo(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[for]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Increment;[++]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + Identifier;[length]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [43..43)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/IfStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/IfStatement.cspans.txt new file mode 100644 index 0000000000..887f311722 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/IfStatement.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +Code span at (1:0,1 [19] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [20] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/IfStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/IfStatement.stree.txt new file mode 100644 index 0000000000..70766aa364 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/IfStatement.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..20)::20 - [@if(true) { foo(); }] + MarkupBlock - [0..20)::20 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..20)::20 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..20)::19 - [if(true) { foo(); }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/LockStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/LockStatement.cspans.txt new file mode 100644 index 0000000000..33dc768c7d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/LockStatement.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Code span at (1:0,1 [20] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Markup span at (21:0,21 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/LockStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/LockStatement.stree.txt new file mode 100644 index 0000000000..1bb156c26d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/LockStatement.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..21)::21 - [@lock(baz) { foo(); }] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..21)::21 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..21)::20 - [lock(baz) { foo(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[lock]; + LeftParenthesis;[(]; + Identifier;[baz]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/MalformedAwaitForEachStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/MalformedAwaitForEachStatement.cspans.txt new file mode 100644 index 0000000000..2ed26af598 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/MalformedAwaitForEachStatement.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [39] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [39] ) +Code span at (1:0,1 [38] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [39] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/MalformedAwaitForEachStatement.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/MalformedAwaitForEachStatement.diag.txt new file mode 100644 index 0000000000..994acd46f2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/MalformedAwaitForEachStatement.diag.txt @@ -0,0 +1 @@ +(1,15): Error RZ1027: An opening "(" is missing the corresponding closing ")". diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/MalformedAwaitForEachStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/MalformedAwaitForEachStatement.stree.txt new file mode 100644 index 0000000000..e0398c5923 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/MalformedAwaitForEachStatement.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..39)::39 - [@await foreach(var foo in bar { foo(); ] + MarkupBlock - [0..39)::39 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..39)::39 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..39)::38 - [await foreach(var foo in bar { foo(); ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[await]; + Whitespace;[ ]; + Keyword;[foreach]; + LeftParenthesis;[(]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Keyword;[in]; + Whitespace;[ ]; + Identifier;[bar]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/NonBlockKeywordTreatedAsImplicitExpression.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/NonBlockKeywordTreatedAsImplicitExpression.cspans.txt new file mode 100644 index 0000000000..11ff79adf0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/NonBlockKeywordTreatedAsImplicitExpression.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [7] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [3] ) +Code span at (1:0,1 [2] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [3] ) +Markup span at (3:0,3 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/NonBlockKeywordTreatedAsImplicitExpression.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/NonBlockKeywordTreatedAsImplicitExpression.stree.txt new file mode 100644 index 0000000000..a55975b613 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/NonBlockKeywordTreatedAsImplicitExpression.stree.txt @@ -0,0 +1,15 @@ +RazorDocument - [0..7)::7 - [@is foo] + MarkupBlock - [0..7)::7 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..3)::3 + CSharpImplicitExpression - [0..3)::3 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..3)::2 + CSharpCodeBlock - [1..3)::2 + CSharpExpressionLiteral - [1..3)::2 - [is] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Keyword;[is]; + MarkupTextLiteral - [3..7)::4 - [ foo] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[foo]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_Complete_Spaced.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_Complete_Spaced.cspans.txt new file mode 100644 index 0000000000..8ead4f60c2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_Complete_Spaced.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [40] ) +Code span at (1:0,1 [39] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [40] ) +Markup span at (40:0,40 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_Complete_Spaced.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_Complete_Spaced.stree.txt new file mode 100644 index 0000000000..6769177337 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_Complete_Spaced.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..42)::42 - [@using static global::System.Console ] + MarkupBlock - [0..42)::42 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..40)::40 + RazorDirective - [0..40)::40 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..40)::39 + CSharpStatementLiteral - [1..40)::39 - [using static global::System.Console] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Keyword;[using]; + Whitespace;[ ]; + Keyword;[static]; + Whitespace;[ ]; + Identifier;[global]; + DoubleColon;[::]; + Identifier;[System]; + Dot;[.]; + Identifier;[Console]; + MarkupTextLiteral - [40..42)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_GlobalPrefix.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_GlobalPrefix.cspans.txt new file mode 100644 index 0000000000..e4feb782e2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_GlobalPrefix.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [36] ) +Code span at (1:0,1 [35] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [36] ) +Markup span at (36:0,36 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_GlobalPrefix.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_GlobalPrefix.stree.txt new file mode 100644 index 0000000000..2944c79da1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_GlobalPrefix.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..36)::36 - [@using static global::System.Console] + MarkupBlock - [0..36)::36 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..36)::36 + RazorDirective - [0..36)::36 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..36)::35 + CSharpStatementLiteral - [1..36)::35 - [using static global::System.Console] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Keyword;[using]; + Whitespace;[ ]; + Keyword;[static]; + Whitespace;[ ]; + Identifier;[global]; + DoubleColon;[::]; + Identifier;[System]; + Dot;[.]; + Identifier;[Console]; + MarkupTextLiteral - [36..36)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_MultipleIdentifiers.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_MultipleIdentifiers.cspans.txt new file mode 100644 index 0000000000..8510b2c37d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_MultipleIdentifiers.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [28] ) +Code span at (1:0,1 [27] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [28] ) +Markup span at (28:0,28 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_MultipleIdentifiers.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_MultipleIdentifiers.stree.txt new file mode 100644 index 0000000000..553f6174f2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_MultipleIdentifiers.stree.txt @@ -0,0 +1,19 @@ +RazorDocument - [0..28)::28 - [@using static System.Console] + MarkupBlock - [0..28)::28 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..28)::28 + RazorDirective - [0..28)::28 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..28)::27 + CSharpStatementLiteral - [1..28)::27 - [using static System.Console] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Keyword;[using]; + Whitespace;[ ]; + Keyword;[static]; + Whitespace;[ ]; + Identifier;[System]; + Dot;[.]; + Identifier;[Console]; + MarkupTextLiteral - [28..28)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_NoUsing.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_NoUsing.cspans.txt new file mode 100644 index 0000000000..6baa3a6c93 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_NoUsing.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [13] ) +Code span at (1:0,1 [12] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [13] ) +Markup span at (13:0,13 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_NoUsing.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_NoUsing.stree.txt new file mode 100644 index 0000000000..25a5facf95 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_NoUsing.stree.txt @@ -0,0 +1,15 @@ +RazorDocument - [0..13)::13 - [@using static] + MarkupBlock - [0..13)::13 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..13)::13 + RazorDirective - [0..13)::13 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..13)::12 + CSharpStatementLiteral - [1..13)::12 - [using static] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Keyword;[using]; + Whitespace;[ ]; + Keyword;[static]; + MarkupTextLiteral - [13..13)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_SingleIdentifier.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_SingleIdentifier.cspans.txt new file mode 100644 index 0000000000..c2b5fb0a36 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_SingleIdentifier.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [20] ) +Code span at (1:0,1 [19] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [20] ) +Markup span at (20:0,20 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_SingleIdentifier.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_SingleIdentifier.stree.txt new file mode 100644 index 0000000000..87f25da2f1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/StaticUsing_SingleIdentifier.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..20)::20 - [@using static System] + MarkupBlock - [0..20)::20 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..20)::20 + RazorDirective - [0..20)::20 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..20)::19 + CSharpStatementLiteral - [1..20)::19 - [using static System] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Keyword;[using]; + Whitespace;[ ]; + Keyword;[static]; + Whitespace;[ ]; + Identifier;[System]; + MarkupTextLiteral - [20..20)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/SwitchStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/SwitchStatement.cspans.txt new file mode 100644 index 0000000000..cdeba78164 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/SwitchStatement.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Code span at (1:0,1 [22] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (23:0,23 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/SwitchStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/SwitchStatement.stree.txt new file mode 100644 index 0000000000..5ccdbf8b7e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/SwitchStatement.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..23)::23 - [@switch(foo) { foo(); }] + MarkupBlock - [0..23)::23 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..23)::23 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..23)::22 - [switch(foo) { foo(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[switch]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [23..23)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/TryStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/TryStatement.cspans.txt new file mode 100644 index 0000000000..11cc3bcb68 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/TryStatement.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [15] ) +Code span at (1:0,1 [14] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [15] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/TryStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/TryStatement.stree.txt new file mode 100644 index 0000000000..9f95d564bf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/TryStatement.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..15)::15 - [@try { foo(); }] + MarkupBlock - [0..15)::15 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..15)::15 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..15)::14 - [try { foo(); }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[try]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingNamespaceImport.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingNamespaceImport.cspans.txt new file mode 100644 index 0000000000..e3ee30b682 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingNamespaceImport.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [41] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [41] ) +Code span at (1:0,1 [40] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [41] ) +Markup span at (41:0,41 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [41] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingNamespaceImport.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingNamespaceImport.stree.txt new file mode 100644 index 0000000000..a3d95afa7e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingNamespaceImport.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..41)::41 - [@using System.Text.Encoding.ASCIIEncoding] + MarkupBlock - [0..41)::41 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..41)::41 + RazorDirective - [0..41)::41 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..41)::40 + CSharpStatementLiteral - [1..41)::40 - [using System.Text.Encoding.ASCIIEncoding] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Keyword;[using]; + Whitespace;[ ]; + Identifier;[System]; + Dot;[.]; + Identifier;[Text]; + Dot;[.]; + Identifier;[Encoding]; + Dot;[.]; + Identifier;[ASCIIEncoding]; + MarkupTextLiteral - [41..41)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingStatement.cspans.txt new file mode 100644 index 0000000000..6a5ad243c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingStatement.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +Code span at (1:0,1 [41] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +Markup span at (42:0,42 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingStatement.stree.txt new file mode 100644 index 0000000000..9747414ae4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingStatement.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..42)::42 - [@using(var foo = new Foo()) { foo.Bar(); }] + MarkupBlock - [0..42)::42 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..42)::42 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..42)::41 - [using(var foo = new Foo()) { foo.Bar(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[using]; + LeftParenthesis;[(]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[new]; + Whitespace;[ ]; + Identifier;[Foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + Dot;[.]; + Identifier;[Bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [42..42)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingTypeAlias.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingTypeAlias.cspans.txt new file mode 100644 index 0000000000..cde43d9d9b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingTypeAlias.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [79] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [79] ) +Code span at (1:0,1 [78] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [79] ) +Markup span at (79:0,79 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [79] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingTypeAlias.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingTypeAlias.stree.txt new file mode 100644 index 0000000000..ea46ea988b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/UsingTypeAlias.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..79)::79 - [@using StringDictionary = System.Collections.Generic.Dictionary] + MarkupBlock - [0..79)::79 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..79)::79 + RazorDirective - [0..79)::79 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..79)::78 + CSharpStatementLiteral - [1..79)::78 - [using StringDictionary = System.Collections.Generic.Dictionary] - Gen;> - SpanEditHandler;Accepts:AnyExceptNewline + Keyword;[using]; + Whitespace;[ ]; + Identifier;[StringDictionary]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[System]; + Dot;[.]; + Identifier;[Collections]; + Dot;[.]; + Identifier;[Generic]; + Dot;[.]; + Identifier;[Dictionary]; + LessThan;[<]; + Keyword;[string]; + Comma;[,]; + Whitespace;[ ]; + Keyword;[string]; + GreaterThan;[>]; + MarkupTextLiteral - [79..79)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/Using_VariableDeclaration_Complex.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/Using_VariableDeclaration_Complex.cspans.txt new file mode 100644 index 0000000000..8fd6b20bde --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/Using_VariableDeclaration_Complex.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [126] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [126] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [126] ) +Code span at (2:0,2 [123] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [126] ) +MetaCode span at (125:0,125 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [126] ) +Markup span at (126:0,126 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [126] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/Using_VariableDeclaration_Complex.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/Using_VariableDeclaration_Complex.stree.txt new file mode 100644 index 0000000000..a3eed94cbe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/Using_VariableDeclaration_Complex.stree.txt @@ -0,0 +1,61 @@ +RazorDocument - [0..126)::126 - [@{ using Some.Disposable.TypeName foo = GetDisposable(() => { using var bar = otherDisposable; }); }] + MarkupBlock - [0..126)::126 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..126)::126 + CSharpStatement - [0..126)::126 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..126)::125 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..125)::123 + CSharpStatementLiteral - [2..125)::123 - [ using Some.Disposable.TypeName foo = GetDisposable(() => { using var bar = otherDisposable; }); ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Keyword;[using]; + Whitespace;[ ]; + Identifier;[Some]; + Dot;[.]; + Identifier;[Disposable]; + Dot;[.]; + Identifier;[TypeName]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[GetDisposable]; + LessThan;[<]; + Identifier;[Some]; + Dot;[.]; + Identifier;[Disposable]; + Dot;[.]; + Identifier;[TypeName]; + GreaterThan;[>]; + LeftParenthesis;[(]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Whitespace;[ ]; + GreaterThanEqual;[=>]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Keyword;[using]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[bar]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[otherDisposable]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RazorMetaCode - [125..126)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [126..126)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/Using_VariableDeclaration_Simple.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/Using_VariableDeclaration_Simple.cspans.txt new file mode 100644 index 0000000000..3b71285c08 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/Using_VariableDeclaration_Simple.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [36] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [36] ) +Code span at (2:0,2 [33] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [36] ) +MetaCode span at (35:0,35 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [36] ) +Markup span at (36:0,36 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/Using_VariableDeclaration_Simple.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/Using_VariableDeclaration_Simple.stree.txt new file mode 100644 index 0000000000..3a8984ebc9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/Using_VariableDeclaration_Simple.stree.txt @@ -0,0 +1,29 @@ +RazorDocument - [0..36)::36 - [@{ using var foo = someDisposable; }] + MarkupBlock - [0..36)::36 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..36)::36 + CSharpStatement - [0..36)::36 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..36)::35 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..35)::33 + CSharpStatementLiteral - [2..35)::33 - [ using var foo = someDisposable; ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Keyword;[using]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[someDisposable]; + Semicolon;[;]; + Whitespace;[ ]; + RazorMetaCode - [35..36)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [36..36)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/WhileStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/WhileStatement.cspans.txt new file mode 100644 index 0000000000..cdeba78164 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/WhileStatement.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Code span at (1:0,1 [22] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (23:0,23 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/WhileStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/WhileStatement.stree.txt new file mode 100644 index 0000000000..4174c105bc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpStatementTest/WhileStatement.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..23)::23 - [@while(true) { foo(); }] + MarkupBlock - [0..23)::23 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..23)::23 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..23)::22 - [while(true) { foo(); }] - Gen - SpanEditHandler;Accepts:None + Keyword;[while]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [23..23)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInExplicitExpressionParens.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInExplicitExpressionParens.cspans.txt new file mode 100644 index 0000000000..91eb2c5b1d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInExplicitExpressionParens.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [38] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [38] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [38] ) +Code span at (2:0,2 [16] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [38] ) +Transition span at (18:0,18 [1] ) (Accepts:None) - Parent: Markup block at (18:0,18 [18] ) +Markup span at (19:0,19 [3] ) (Accepts:None) - Parent: Tag block at (19:0,19 [3] ) +Markup span at (22:0,22 [5] ) (Accepts:Any) - Parent: Markup block at (18:0,18 [18] ) +Transition span at (27:0,27 [1] ) (Accepts:None) - Parent: Expression block at (27:0,27 [5] ) +Code span at (28:0,28 [4] ) (Accepts:NonWhitespace) - Parent: Expression block at (27:0,27 [5] ) +Markup span at (32:0,32 [4] ) (Accepts:None) - Parent: Tag block at (32:0,32 [4] ) +Code span at (36:0,36 [1] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [38] ) +MetaCode span at (37:0,37 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [38] ) +Markup span at (38:0,38 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [38] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInExplicitExpressionParens.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInExplicitExpressionParens.stree.txt new file mode 100644 index 0000000000..d6482c071f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInExplicitExpressionParens.stree.txt @@ -0,0 +1,52 @@ +RazorDocument - [0..38)::38 - [@(Html.Repeat(10, @

                    Foo #@item

                    ))] + MarkupBlock - [0..38)::38 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..38)::38 + CSharpExplicitExpression - [0..38)::38 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [1..38)::37 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [2..37)::35 + CSharpExpressionLiteral - [2..18)::16 - [Html.Repeat(10, ] - Gen - SpanEditHandler;Accepts:Any + Identifier;[Html]; + Dot;[.]; + Identifier;[Repeat]; + LeftParenthesis;[(]; + IntegerLiteral;[10]; + Comma;[,]; + Whitespace;[ ]; + CSharpTemplateBlock - [18..36)::18 + MarkupBlock - [18..36)::18 + MarkupTransition - [18..19)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [19..36)::17 + MarkupStartTag - [19..22)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [22..27)::5 - [Foo #] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + Text;[#]; + CSharpCodeBlock - [27..32)::5 + CSharpImplicitExpression - [27..32)::5 + CSharpTransition - [27..28)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [28..32)::4 + CSharpCodeBlock - [28..32)::4 + CSharpExpressionLiteral - [28..32)::4 - [item] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[item]; + MarkupEndTag - [32..36)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpExpressionLiteral - [36..37)::1 - [)] - Gen - SpanEditHandler;Accepts:Any + RightParenthesis;[)]; + RazorMetaCode - [37..38)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + MarkupTextLiteral - [38..38)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInImplicitExpressionParens.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInImplicitExpressionParens.cspans.txt new file mode 100644 index 0000000000..90df13237d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInImplicitExpressionParens.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [36] ) +Code span at (1:0,1 [16] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [36] ) +Transition span at (17:0,17 [1] ) (Accepts:None) - Parent: Markup block at (17:0,17 [18] ) +Markup span at (18:0,18 [3] ) (Accepts:None) - Parent: Tag block at (18:0,18 [3] ) +Markup span at (21:0,21 [5] ) (Accepts:Any) - Parent: Markup block at (17:0,17 [18] ) +Transition span at (26:0,26 [1] ) (Accepts:None) - Parent: Expression block at (26:0,26 [5] ) +Code span at (27:0,27 [4] ) (Accepts:NonWhitespace) - Parent: Expression block at (26:0,26 [5] ) +Markup span at (31:0,31 [4] ) (Accepts:None) - Parent: Tag block at (31:0,31 [4] ) +Code span at (35:0,35 [1] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [36] ) +Markup span at (36:0,36 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInImplicitExpressionParens.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInImplicitExpressionParens.stree.txt new file mode 100644 index 0000000000..c12bad27f9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInImplicitExpressionParens.stree.txt @@ -0,0 +1,48 @@ +RazorDocument - [0..36)::36 - [@Html.Repeat(10, @

                    Foo #@item

                    )] + MarkupBlock - [0..36)::36 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..36)::36 + CSharpImplicitExpression - [0..36)::36 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..36)::35 + CSharpCodeBlock - [1..36)::35 + CSharpExpressionLiteral - [1..17)::16 - [Html.Repeat(10, ] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[Html]; + Dot;[.]; + Identifier;[Repeat]; + LeftParenthesis;[(]; + IntegerLiteral;[10]; + Comma;[,]; + Whitespace;[ ]; + CSharpTemplateBlock - [17..35)::18 + MarkupBlock - [17..35)::18 + MarkupTransition - [17..18)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [18..35)::17 + MarkupStartTag - [18..21)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [21..26)::5 - [Foo #] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + Text;[#]; + CSharpCodeBlock - [26..31)::5 + CSharpImplicitExpression - [26..31)::5 + CSharpTransition - [26..27)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [27..31)::4 + CSharpCodeBlock - [27..31)::4 + CSharpExpressionLiteral - [27..31)::4 - [item] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[item]; + MarkupEndTag - [31..35)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpExpressionLiteral - [35..36)::1 - [)] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + RightParenthesis;[)]; + MarkupTextLiteral - [36..36)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInStatementWithinCodeBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInStatementWithinCodeBlock.cspans.txt new file mode 100644 index 0000000000..185f8e0ad1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInStatementWithinCodeBlock.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [71] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [71] ) +Code span at (1:0,1 [48] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [71] ) +Transition span at (49:0,49 [1] ) (Accepts:None) - Parent: Markup block at (49:0,49 [18] ) +Markup span at (50:0,50 [3] ) (Accepts:None) - Parent: Tag block at (50:0,50 [3] ) +Markup span at (53:0,53 [5] ) (Accepts:Any) - Parent: Markup block at (49:0,49 [18] ) +Transition span at (58:0,58 [1] ) (Accepts:None) - Parent: Expression block at (58:0,58 [5] ) +Code span at (59:0,59 [4] ) (Accepts:NonWhitespace) - Parent: Expression block at (58:0,58 [5] ) +Markup span at (63:0,63 [4] ) (Accepts:None) - Parent: Tag block at (63:0,63 [4] ) +Code span at (67:0,67 [4] ) (Accepts:None) - Parent: Statement block at (0:0,0 [71] ) +Markup span at (71:0,71 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [71] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInStatementWithinCodeBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInStatementWithinCodeBlock.stree.txt new file mode 100644 index 0000000000..c5e726c705 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInStatementWithinCodeBlock.stree.txt @@ -0,0 +1,59 @@ +RazorDocument - [0..71)::71 - [@foreach(foo in Bar) { Html.ExecuteTemplate(foo, @

                    Foo #@item

                    ); }] + MarkupBlock - [0..71)::71 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..71)::71 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..49)::48 - [foreach(foo in Bar) { Html.ExecuteTemplate(foo, ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[foreach]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + Keyword;[in]; + Whitespace;[ ]; + Identifier;[Bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Html]; + Dot;[.]; + Identifier;[ExecuteTemplate]; + LeftParenthesis;[(]; + Identifier;[foo]; + Comma;[,]; + Whitespace;[ ]; + CSharpTemplateBlock - [49..67)::18 + MarkupBlock - [49..67)::18 + MarkupTransition - [49..50)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [50..67)::17 + MarkupStartTag - [50..53)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [53..58)::5 - [Foo #] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + Text;[#]; + CSharpCodeBlock - [58..63)::5 + CSharpImplicitExpression - [58..63)::5 + CSharpTransition - [58..59)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [59..63)::4 + CSharpCodeBlock - [59..63)::4 + CSharpExpressionLiteral - [59..63)::4 - [item] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[item]; + MarkupEndTag - [63..67)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [67..71)::4 - [); }] - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [71..71)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInStatementWithinStatementBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInStatementWithinStatementBlock.cspans.txt new file mode 100644 index 0000000000..f0f818c60c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInStatementWithinStatementBlock.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [66] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [66] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [66] ) +Code span at (2:0,2 [42] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [66] ) +Transition span at (44:0,44 [1] ) (Accepts:None) - Parent: Markup block at (44:0,44 [18] ) +Markup span at (45:0,45 [3] ) (Accepts:None) - Parent: Tag block at (45:0,45 [3] ) +Markup span at (48:0,48 [5] ) (Accepts:Any) - Parent: Markup block at (44:0,44 [18] ) +Transition span at (53:0,53 [1] ) (Accepts:None) - Parent: Expression block at (53:0,53 [5] ) +Code span at (54:0,54 [4] ) (Accepts:NonWhitespace) - Parent: Expression block at (53:0,53 [5] ) +Markup span at (58:0,58 [4] ) (Accepts:None) - Parent: Tag block at (58:0,58 [4] ) +Code span at (62:0,62 [3] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [66] ) +MetaCode span at (65:0,65 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [66] ) +Markup span at (66:0,66 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [66] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInStatementWithinStatementBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInStatementWithinStatementBlock.stree.txt new file mode 100644 index 0000000000..2073b33dd2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSimpleTemplateInStatementWithinStatementBlock.stree.txt @@ -0,0 +1,64 @@ +RazorDocument - [0..66)::66 - [@{ var foo = bar; Html.ExecuteTemplate(foo, @

                    Foo #@item

                    ); }] + MarkupBlock - [0..66)::66 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..66)::66 + CSharpStatement - [0..66)::66 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..66)::65 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..65)::63 + CSharpStatementLiteral - [2..44)::42 - [ var foo = bar; Html.ExecuteTemplate(foo, ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[Html]; + Dot;[.]; + Identifier;[ExecuteTemplate]; + LeftParenthesis;[(]; + Identifier;[foo]; + Comma;[,]; + Whitespace;[ ]; + CSharpTemplateBlock - [44..62)::18 + MarkupBlock - [44..62)::18 + MarkupTransition - [44..45)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [45..62)::17 + MarkupStartTag - [45..48)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [48..53)::5 - [Foo #] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + Text;[#]; + CSharpCodeBlock - [53..58)::5 + CSharpImplicitExpression - [53..58)::5 + CSharpTransition - [53..54)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [54..58)::4 + CSharpCodeBlock - [54..58)::4 + CSharpExpressionLiteral - [54..58)::4 - [item] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[item]; + MarkupEndTag - [58..62)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [62..65)::3 - [); ] - Gen - SpanEditHandler;Accepts:Any + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RazorMetaCode - [65..66)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [66..66)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSingleLineImmediatelyFollowingStatementChar.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSingleLineImmediatelyFollowingStatementChar.cspans.txt new file mode 100644 index 0000000000..bd2c061107 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSingleLineImmediatelyFollowingStatementChar.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [12] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [12] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [12] ) +Code span at (2:0,2 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [12] ) +Transition span at (3:0,3 [1] ) (Accepts:None) - Parent: Markup block at (3:0,3 [8] ) +MetaCode span at (4:0,4 [1] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [8] ) +Markup span at (5:0,5 [6] ) (Accepts:None) - Parent: Markup block at (3:0,3 [8] ) +Code span at (11:1,0 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [12] ) +MetaCode span at (11:1,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [12] ) +Markup span at (12:1,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [12] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSingleLineImmediatelyFollowingStatementChar.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSingleLineImmediatelyFollowingStatementChar.stree.txt new file mode 100644 index 0000000000..6f9495273c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSingleLineImmediatelyFollowingStatementChar.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..12)::12 - [@{i@: barLF}] + MarkupBlock - [0..12)::12 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..12)::12 + CSharpStatement - [0..12)::12 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..12)::11 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..11)::9 + CSharpStatementLiteral - [2..3)::1 - [i] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Identifier;[i]; + CSharpTemplateBlock - [3..11)::8 + MarkupBlock - [3..11)::8 + MarkupTransition - [3..4)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [4..5)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [5..11)::6 - [ barLF] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Text;[bar]; + NewLine;[LF]; + CSharpStatementLiteral - [11..11)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [11..12)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [12..12)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSingleLineTemplate.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSingleLineTemplate.cspans.txt new file mode 100644 index 0000000000..5c5175b1b7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSingleLineTemplate.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +Code span at (2:0,2 [11] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [24] ) +Transition span at (13:0,13 [1] ) (Accepts:None) - Parent: Markup block at (13:0,13 [8] ) +MetaCode span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (13:0,13 [8] ) +Markup span at (15:0,15 [6] ) (Accepts:None) - Parent: Markup block at (13:0,13 [8] ) +Code span at (21:1,0 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [24] ) +MetaCode span at (23:1,2 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +Markup span at (24:1,3 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSingleLineTemplate.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSingleLineTemplate.stree.txt new file mode 100644 index 0000000000..986b3afba4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesSingleLineTemplate.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..24)::24 - [@{ var foo = @: barLF; }] + MarkupBlock - [0..24)::24 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..24)::24 + CSharpStatement - [0..24)::24 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..24)::23 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..23)::21 + CSharpStatementLiteral - [2..13)::11 - [ var foo = ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + CSharpTemplateBlock - [13..21)::8 + MarkupBlock - [13..21)::8 + MarkupTransition - [13..14)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [14..15)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [15..21)::6 - [ barLF] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Text;[bar]; + NewLine;[LF]; + CSharpStatementLiteral - [21..23)::2 - [; ] - Gen - SpanEditHandler;Accepts:Any + Semicolon;[;]; + Whitespace;[ ]; + RazorMetaCode - [23..24)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [24..24)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesTwoTemplatesInImplicitExpressionParens.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesTwoTemplatesInImplicitExpressionParens.cspans.txt new file mode 100644 index 0000000000..f16349c57b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesTwoTemplatesInImplicitExpressionParens.cspans.txt @@ -0,0 +1,18 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [56] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [56] ) +Code span at (1:0,1 [16] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [56] ) +Transition span at (17:0,17 [1] ) (Accepts:None) - Parent: Markup block at (17:0,17 [18] ) +Markup span at (18:0,18 [3] ) (Accepts:None) - Parent: Tag block at (18:0,18 [3] ) +Markup span at (21:0,21 [5] ) (Accepts:Any) - Parent: Markup block at (17:0,17 [18] ) +Transition span at (26:0,26 [1] ) (Accepts:None) - Parent: Expression block at (26:0,26 [5] ) +Code span at (27:0,27 [4] ) (Accepts:NonWhitespace) - Parent: Expression block at (26:0,26 [5] ) +Markup span at (31:0,31 [4] ) (Accepts:None) - Parent: Tag block at (31:0,31 [4] ) +Code span at (35:0,35 [2] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [56] ) +Transition span at (37:0,37 [1] ) (Accepts:None) - Parent: Markup block at (37:0,37 [18] ) +Markup span at (38:0,38 [3] ) (Accepts:None) - Parent: Tag block at (38:0,38 [3] ) +Markup span at (41:0,41 [5] ) (Accepts:Any) - Parent: Markup block at (37:0,37 [18] ) +Transition span at (46:0,46 [1] ) (Accepts:None) - Parent: Expression block at (46:0,46 [5] ) +Code span at (47:0,47 [4] ) (Accepts:NonWhitespace) - Parent: Expression block at (46:0,46 [5] ) +Markup span at (51:0,51 [4] ) (Accepts:None) - Parent: Tag block at (51:0,51 [4] ) +Code span at (55:0,55 [1] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [56] ) +Markup span at (56:0,56 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [56] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesTwoTemplatesInImplicitExpressionParens.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesTwoTemplatesInImplicitExpressionParens.stree.txt new file mode 100644 index 0000000000..a14beedeab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesTwoTemplatesInImplicitExpressionParens.stree.txt @@ -0,0 +1,77 @@ +RazorDocument - [0..56)::56 - [@Html.Repeat(10, @

                    Foo #@item

                    , @

                    Foo #@item

                    )] + MarkupBlock - [0..56)::56 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..56)::56 + CSharpImplicitExpression - [0..56)::56 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..56)::55 + CSharpCodeBlock - [1..56)::55 + CSharpExpressionLiteral - [1..17)::16 - [Html.Repeat(10, ] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[Html]; + Dot;[.]; + Identifier;[Repeat]; + LeftParenthesis;[(]; + IntegerLiteral;[10]; + Comma;[,]; + Whitespace;[ ]; + CSharpTemplateBlock - [17..35)::18 + MarkupBlock - [17..35)::18 + MarkupTransition - [17..18)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [18..35)::17 + MarkupStartTag - [18..21)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [21..26)::5 - [Foo #] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + Text;[#]; + CSharpCodeBlock - [26..31)::5 + CSharpImplicitExpression - [26..31)::5 + CSharpTransition - [26..27)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [27..31)::4 + CSharpCodeBlock - [27..31)::4 + CSharpExpressionLiteral - [27..31)::4 - [item] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[item]; + MarkupEndTag - [31..35)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpExpressionLiteral - [35..37)::2 - [, ] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Comma;[,]; + Whitespace;[ ]; + CSharpTemplateBlock - [37..55)::18 + MarkupBlock - [37..55)::18 + MarkupTransition - [37..38)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [38..55)::17 + MarkupStartTag - [38..41)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [41..46)::5 - [Foo #] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + Text;[#]; + CSharpCodeBlock - [46..51)::5 + CSharpImplicitExpression - [46..51)::5 + CSharpTransition - [46..47)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [47..51)::4 + CSharpCodeBlock - [47..51)::4 + CSharpExpressionLiteral - [47..51)::4 - [item] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[item]; + MarkupEndTag - [51..55)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpExpressionLiteral - [55..56)::1 - [)] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + RightParenthesis;[)]; + MarkupTextLiteral - [56..56)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesTwoTemplatesInStatementWithinCodeBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesTwoTemplatesInStatementWithinCodeBlock.cspans.txt new file mode 100644 index 0000000000..995931257d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesTwoTemplatesInStatementWithinCodeBlock.cspans.txt @@ -0,0 +1,18 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [91] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [91] ) +Code span at (1:0,1 [48] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [91] ) +Transition span at (49:0,49 [1] ) (Accepts:None) - Parent: Markup block at (49:0,49 [18] ) +Markup span at (50:0,50 [3] ) (Accepts:None) - Parent: Tag block at (50:0,50 [3] ) +Markup span at (53:0,53 [5] ) (Accepts:Any) - Parent: Markup block at (49:0,49 [18] ) +Transition span at (58:0,58 [1] ) (Accepts:None) - Parent: Expression block at (58:0,58 [5] ) +Code span at (59:0,59 [4] ) (Accepts:NonWhitespace) - Parent: Expression block at (58:0,58 [5] ) +Markup span at (63:0,63 [4] ) (Accepts:None) - Parent: Tag block at (63:0,63 [4] ) +Code span at (67:0,67 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [91] ) +Transition span at (69:0,69 [1] ) (Accepts:None) - Parent: Markup block at (69:0,69 [18] ) +Markup span at (70:0,70 [3] ) (Accepts:None) - Parent: Tag block at (70:0,70 [3] ) +Markup span at (73:0,73 [5] ) (Accepts:Any) - Parent: Markup block at (69:0,69 [18] ) +Transition span at (78:0,78 [1] ) (Accepts:None) - Parent: Expression block at (78:0,78 [5] ) +Code span at (79:0,79 [4] ) (Accepts:NonWhitespace) - Parent: Expression block at (78:0,78 [5] ) +Markup span at (83:0,83 [4] ) (Accepts:None) - Parent: Tag block at (83:0,83 [4] ) +Code span at (87:0,87 [4] ) (Accepts:None) - Parent: Statement block at (0:0,0 [91] ) +Markup span at (91:0,91 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [91] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesTwoTemplatesInStatementWithinCodeBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesTwoTemplatesInStatementWithinCodeBlock.stree.txt new file mode 100644 index 0000000000..e304e697ff --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlesTwoTemplatesInStatementWithinCodeBlock.stree.txt @@ -0,0 +1,88 @@ +RazorDocument - [0..91)::91 - [@foreach(foo in Bar) { Html.ExecuteTemplate(foo, @

                    Foo #@item

                    , @

                    Foo #@item

                    ); }] + MarkupBlock - [0..91)::91 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..91)::91 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..49)::48 - [foreach(foo in Bar) { Html.ExecuteTemplate(foo, ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[foreach]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + Keyword;[in]; + Whitespace;[ ]; + Identifier;[Bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Html]; + Dot;[.]; + Identifier;[ExecuteTemplate]; + LeftParenthesis;[(]; + Identifier;[foo]; + Comma;[,]; + Whitespace;[ ]; + CSharpTemplateBlock - [49..67)::18 + MarkupBlock - [49..67)::18 + MarkupTransition - [49..50)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [50..67)::17 + MarkupStartTag - [50..53)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [53..58)::5 - [Foo #] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + Text;[#]; + CSharpCodeBlock - [58..63)::5 + CSharpImplicitExpression - [58..63)::5 + CSharpTransition - [58..59)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [59..63)::4 + CSharpCodeBlock - [59..63)::4 + CSharpExpressionLiteral - [59..63)::4 - [item] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[item]; + MarkupEndTag - [63..67)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [67..69)::2 - [, ] - Gen - SpanEditHandler;Accepts:Any + Comma;[,]; + Whitespace;[ ]; + CSharpTemplateBlock - [69..87)::18 + MarkupBlock - [69..87)::18 + MarkupTransition - [69..70)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [70..87)::17 + MarkupStartTag - [70..73)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [73..78)::5 - [Foo #] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + Text;[#]; + CSharpCodeBlock - [78..83)::5 + CSharpImplicitExpression - [78..83)::5 + CSharpTransition - [78..79)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [79..83)::4 + CSharpCodeBlock - [79..83)::4 + CSharpExpressionLiteral - [79..83)::4 - [item] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[item]; + MarkupEndTag - [83..87)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [87..91)::4 - [); }] - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [91..91)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlessTwoTemplatesInStatementWithinStatementBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlessTwoTemplatesInStatementWithinStatementBlock.cspans.txt new file mode 100644 index 0000000000..217bee2ec1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlessTwoTemplatesInStatementWithinStatementBlock.cspans.txt @@ -0,0 +1,20 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [86] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [86] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [86] ) +Code span at (2:0,2 [42] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [86] ) +Transition span at (44:0,44 [1] ) (Accepts:None) - Parent: Markup block at (44:0,44 [18] ) +Markup span at (45:0,45 [3] ) (Accepts:None) - Parent: Tag block at (45:0,45 [3] ) +Markup span at (48:0,48 [5] ) (Accepts:Any) - Parent: Markup block at (44:0,44 [18] ) +Transition span at (53:0,53 [1] ) (Accepts:None) - Parent: Expression block at (53:0,53 [5] ) +Code span at (54:0,54 [4] ) (Accepts:NonWhitespace) - Parent: Expression block at (53:0,53 [5] ) +Markup span at (58:0,58 [4] ) (Accepts:None) - Parent: Tag block at (58:0,58 [4] ) +Code span at (62:0,62 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [86] ) +Transition span at (64:0,64 [1] ) (Accepts:None) - Parent: Markup block at (64:0,64 [18] ) +Markup span at (65:0,65 [3] ) (Accepts:None) - Parent: Tag block at (65:0,65 [3] ) +Markup span at (68:0,68 [5] ) (Accepts:Any) - Parent: Markup block at (64:0,64 [18] ) +Transition span at (73:0,73 [1] ) (Accepts:None) - Parent: Expression block at (73:0,73 [5] ) +Code span at (74:0,74 [4] ) (Accepts:NonWhitespace) - Parent: Expression block at (73:0,73 [5] ) +Markup span at (78:0,78 [4] ) (Accepts:None) - Parent: Tag block at (78:0,78 [4] ) +Code span at (82:0,82 [3] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [86] ) +MetaCode span at (85:0,85 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [86] ) +Markup span at (86:0,86 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [86] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlessTwoTemplatesInStatementWithinStatementBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlessTwoTemplatesInStatementWithinStatementBlock.stree.txt new file mode 100644 index 0000000000..3d0ccca4b4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/HandlessTwoTemplatesInStatementWithinStatementBlock.stree.txt @@ -0,0 +1,93 @@ +RazorDocument - [0..86)::86 - [@{ var foo = bar; Html.ExecuteTemplate(foo, @

                    Foo #@item

                    , @

                    Foo #@item

                    ); }] + MarkupBlock - [0..86)::86 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..86)::86 + CSharpStatement - [0..86)::86 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..86)::85 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..85)::83 + CSharpStatementLiteral - [2..44)::42 - [ var foo = bar; Html.ExecuteTemplate(foo, ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[Html]; + Dot;[.]; + Identifier;[ExecuteTemplate]; + LeftParenthesis;[(]; + Identifier;[foo]; + Comma;[,]; + Whitespace;[ ]; + CSharpTemplateBlock - [44..62)::18 + MarkupBlock - [44..62)::18 + MarkupTransition - [44..45)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [45..62)::17 + MarkupStartTag - [45..48)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [48..53)::5 - [Foo #] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + Text;[#]; + CSharpCodeBlock - [53..58)::5 + CSharpImplicitExpression - [53..58)::5 + CSharpTransition - [53..54)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [54..58)::4 + CSharpCodeBlock - [54..58)::4 + CSharpExpressionLiteral - [54..58)::4 - [item] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[item]; + MarkupEndTag - [58..62)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [62..64)::2 - [, ] - Gen - SpanEditHandler;Accepts:Any + Comma;[,]; + Whitespace;[ ]; + CSharpTemplateBlock - [64..82)::18 + MarkupBlock - [64..82)::18 + MarkupTransition - [64..65)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [65..82)::17 + MarkupStartTag - [65..68)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [68..73)::5 - [Foo #] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + Text;[#]; + CSharpCodeBlock - [73..78)::5 + CSharpImplicitExpression - [73..78)::5 + CSharpTransition - [73..74)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [74..78)::4 + CSharpCodeBlock - [74..78)::4 + CSharpExpressionLiteral - [74..78)::4 - [item] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[item]; + MarkupEndTag - [78..82)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [82..85)::3 - [); ] - Gen - SpanEditHandler;Accepts:Any + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RazorMetaCode - [85..86)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [86..86)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInImplicitExprParens.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInImplicitExprParens.cspans.txt new file mode 100644 index 0000000000..c926c0bb0d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInImplicitExprParens.cspans.txt @@ -0,0 +1,18 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [62] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [62] ) +Code span at (1:0,1 [16] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [62] ) +Transition span at (17:0,17 [1] ) (Accepts:None) - Parent: Markup block at (17:0,17 [44] ) +Markup span at (18:0,18 [3] ) (Accepts:None) - Parent: Tag block at (18:0,18 [3] ) +Markup span at (21:0,21 [5] ) (Accepts:Any) - Parent: Markup block at (17:0,17 [44] ) +Transition span at (26:0,26 [1] ) (Accepts:None) - Parent: Expression block at (26:0,26 [31] ) +Code span at (27:0,27 [16] ) (Accepts:Any) - Parent: Expression block at (26:0,26 [31] ) +Transition span at (43:0,43 [1] ) (Accepts:None) - Parent: Markup block at (43:0,43 [13] ) +Markup span at (44:0,44 [3] ) (Accepts:None) - Parent: Tag block at (44:0,44 [3] ) +Markup span at (47:0,47 [0] ) (Accepts:Any) - Parent: Markup block at (43:0,43 [13] ) +Transition span at (47:0,47 [1] ) (Accepts:None) - Parent: Expression block at (47:0,47 [5] ) +Code span at (48:0,48 [4] ) (Accepts:NonWhitespace) - Parent: Expression block at (47:0,47 [5] ) +Markup span at (52:0,52 [4] ) (Accepts:None) - Parent: Tag block at (52:0,52 [4] ) +Code span at (56:0,56 [1] ) (Accepts:NonWhitespace) - Parent: Expression block at (26:0,26 [31] ) +Markup span at (57:0,57 [4] ) (Accepts:None) - Parent: Tag block at (57:0,57 [4] ) +Code span at (61:0,61 [1] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [62] ) +Markup span at (62:0,62 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [62] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInImplicitExprParens.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInImplicitExprParens.diag.txt new file mode 100644 index 0000000000..f634e63ad3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInImplicitExprParens.diag.txt @@ -0,0 +1 @@ +(1,44): Error RZ2003: Inline markup blocks (@

                    Content

                    ) cannot be nested. Only one level of inline markup is allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInImplicitExprParens.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInImplicitExprParens.stree.txt new file mode 100644 index 0000000000..df8ed3f5c9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInImplicitExprParens.stree.txt @@ -0,0 +1,80 @@ +RazorDocument - [0..62)::62 - [@Html.Repeat(10, @

                    Foo #@Html.Repeat(10, @

                    @item

                    )

                    )] + MarkupBlock - [0..62)::62 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..62)::62 + CSharpImplicitExpression - [0..62)::62 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..62)::61 + CSharpCodeBlock - [1..62)::61 + CSharpExpressionLiteral - [1..17)::16 - [Html.Repeat(10, ] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[Html]; + Dot;[.]; + Identifier;[Repeat]; + LeftParenthesis;[(]; + IntegerLiteral;[10]; + Comma;[,]; + Whitespace;[ ]; + CSharpTemplateBlock - [17..61)::44 + MarkupBlock - [17..61)::44 + MarkupTransition - [17..18)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [18..61)::43 + MarkupStartTag - [18..21)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [21..26)::5 - [Foo #] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + Text;[#]; + CSharpCodeBlock - [26..57)::31 + CSharpImplicitExpression - [26..57)::31 + CSharpTransition - [26..27)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [27..57)::30 + CSharpCodeBlock - [27..57)::30 + CSharpExpressionLiteral - [27..43)::16 - [Html.Repeat(10, ] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[Html]; + Dot;[.]; + Identifier;[Repeat]; + LeftParenthesis;[(]; + IntegerLiteral;[10]; + Comma;[,]; + Whitespace;[ ]; + CSharpTemplateBlock - [43..56)::13 + MarkupBlock - [43..56)::13 + MarkupTransition - [43..44)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [44..56)::12 + MarkupStartTag - [44..47)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [47..47)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [47..52)::5 + CSharpImplicitExpression - [47..52)::5 + CSharpTransition - [47..48)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [48..52)::4 + CSharpCodeBlock - [48..52)::4 + CSharpExpressionLiteral - [48..52)::4 - [item] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[item]; + MarkupEndTag - [52..56)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpExpressionLiteral - [56..57)::1 - [)] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + RightParenthesis;[)]; + MarkupEndTag - [57..61)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpExpressionLiteral - [61..62)::1 - [)] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + RightParenthesis;[)]; + MarkupTextLiteral - [62..62)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinCodeBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinCodeBlock.cspans.txt new file mode 100644 index 0000000000..338b4bec5d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinCodeBlock.cspans.txt @@ -0,0 +1,18 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [97] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [97] ) +Code span at (1:0,1 [48] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [97] ) +Transition span at (49:0,49 [1] ) (Accepts:None) - Parent: Markup block at (49:0,49 [44] ) +Markup span at (50:0,50 [3] ) (Accepts:None) - Parent: Tag block at (50:0,50 [3] ) +Markup span at (53:0,53 [5] ) (Accepts:Any) - Parent: Markup block at (49:0,49 [44] ) +Transition span at (58:0,58 [1] ) (Accepts:None) - Parent: Expression block at (58:0,58 [31] ) +Code span at (59:0,59 [16] ) (Accepts:Any) - Parent: Expression block at (58:0,58 [31] ) +Transition span at (75:0,75 [1] ) (Accepts:None) - Parent: Markup block at (75:0,75 [13] ) +Markup span at (76:0,76 [3] ) (Accepts:None) - Parent: Tag block at (76:0,76 [3] ) +Markup span at (79:0,79 [0] ) (Accepts:Any) - Parent: Markup block at (75:0,75 [13] ) +Transition span at (79:0,79 [1] ) (Accepts:None) - Parent: Expression block at (79:0,79 [5] ) +Code span at (80:0,80 [4] ) (Accepts:NonWhitespace) - Parent: Expression block at (79:0,79 [5] ) +Markup span at (84:0,84 [4] ) (Accepts:None) - Parent: Tag block at (84:0,84 [4] ) +Code span at (88:0,88 [1] ) (Accepts:NonWhitespace) - Parent: Expression block at (58:0,58 [31] ) +Markup span at (89:0,89 [4] ) (Accepts:None) - Parent: Tag block at (89:0,89 [4] ) +Code span at (93:0,93 [4] ) (Accepts:None) - Parent: Statement block at (0:0,0 [97] ) +Markup span at (97:0,97 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [97] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinCodeBlock.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinCodeBlock.diag.txt new file mode 100644 index 0000000000..2f60746b35 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinCodeBlock.diag.txt @@ -0,0 +1 @@ +(1,76): Error RZ2003: Inline markup blocks (@

                    Content

                    ) cannot be nested. Only one level of inline markup is allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinCodeBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinCodeBlock.stree.txt new file mode 100644 index 0000000000..f55be998e9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinCodeBlock.stree.txt @@ -0,0 +1,91 @@ +RazorDocument - [0..97)::97 - [@foreach(foo in Bar) { Html.ExecuteTemplate(foo, @

                    Foo #@Html.Repeat(10, @

                    @item

                    )

                    ); }] + MarkupBlock - [0..97)::97 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..97)::97 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..49)::48 - [foreach(foo in Bar) { Html.ExecuteTemplate(foo, ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[foreach]; + LeftParenthesis;[(]; + Identifier;[foo]; + Whitespace;[ ]; + Keyword;[in]; + Whitespace;[ ]; + Identifier;[Bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[Html]; + Dot;[.]; + Identifier;[ExecuteTemplate]; + LeftParenthesis;[(]; + Identifier;[foo]; + Comma;[,]; + Whitespace;[ ]; + CSharpTemplateBlock - [49..93)::44 + MarkupBlock - [49..93)::44 + MarkupTransition - [49..50)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [50..93)::43 + MarkupStartTag - [50..53)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [53..58)::5 - [Foo #] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + Text;[#]; + CSharpCodeBlock - [58..89)::31 + CSharpImplicitExpression - [58..89)::31 + CSharpTransition - [58..59)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [59..89)::30 + CSharpCodeBlock - [59..89)::30 + CSharpExpressionLiteral - [59..75)::16 - [Html.Repeat(10, ] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[Html]; + Dot;[.]; + Identifier;[Repeat]; + LeftParenthesis;[(]; + IntegerLiteral;[10]; + Comma;[,]; + Whitespace;[ ]; + CSharpTemplateBlock - [75..88)::13 + MarkupBlock - [75..88)::13 + MarkupTransition - [75..76)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [76..88)::12 + MarkupStartTag - [76..79)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [79..79)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [79..84)::5 + CSharpImplicitExpression - [79..84)::5 + CSharpTransition - [79..80)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [80..84)::4 + CSharpCodeBlock - [80..84)::4 + CSharpExpressionLiteral - [80..84)::4 - [item] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[item]; + MarkupEndTag - [84..88)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpExpressionLiteral - [88..89)::1 - [)] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + RightParenthesis;[)]; + MarkupEndTag - [89..93)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [93..97)::4 - [); }] - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [97..97)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinStmtBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinStmtBlock.cspans.txt new file mode 100644 index 0000000000..5ab2d1d144 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinStmtBlock.cspans.txt @@ -0,0 +1,20 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [92] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [92] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [92] ) +Code span at (2:0,2 [42] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [92] ) +Transition span at (44:0,44 [1] ) (Accepts:None) - Parent: Markup block at (44:0,44 [44] ) +Markup span at (45:0,45 [3] ) (Accepts:None) - Parent: Tag block at (45:0,45 [3] ) +Markup span at (48:0,48 [5] ) (Accepts:Any) - Parent: Markup block at (44:0,44 [44] ) +Transition span at (53:0,53 [1] ) (Accepts:None) - Parent: Expression block at (53:0,53 [31] ) +Code span at (54:0,54 [16] ) (Accepts:Any) - Parent: Expression block at (53:0,53 [31] ) +Transition span at (70:0,70 [1] ) (Accepts:None) - Parent: Markup block at (70:0,70 [13] ) +Markup span at (71:0,71 [3] ) (Accepts:None) - Parent: Tag block at (71:0,71 [3] ) +Markup span at (74:0,74 [0] ) (Accepts:Any) - Parent: Markup block at (70:0,70 [13] ) +Transition span at (74:0,74 [1] ) (Accepts:None) - Parent: Expression block at (74:0,74 [5] ) +Code span at (75:0,75 [4] ) (Accepts:NonWhitespace) - Parent: Expression block at (74:0,74 [5] ) +Markup span at (79:0,79 [4] ) (Accepts:None) - Parent: Tag block at (79:0,79 [4] ) +Code span at (83:0,83 [1] ) (Accepts:NonWhitespace) - Parent: Expression block at (53:0,53 [31] ) +Markup span at (84:0,84 [4] ) (Accepts:None) - Parent: Tag block at (84:0,84 [4] ) +Code span at (88:0,88 [3] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [92] ) +MetaCode span at (91:0,91 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [92] ) +Markup span at (92:0,92 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [92] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinStmtBlock.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinStmtBlock.diag.txt new file mode 100644 index 0000000000..94b69b6efc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinStmtBlock.diag.txt @@ -0,0 +1 @@ +(1,71): Error RZ2003: Inline markup blocks (@

                    Content

                    ) cannot be nested. Only one level of inline markup is allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinStmtBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinStmtBlock.stree.txt new file mode 100644 index 0000000000..23a9e76520 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/ProducesErrorButCorrectlyParsesNestedTemplateInStmtWithinStmtBlock.stree.txt @@ -0,0 +1,96 @@ +RazorDocument - [0..92)::92 - [@{ var foo = bar; Html.ExecuteTemplate(foo, @

                    Foo #@Html.Repeat(10, @

                    @item

                    )

                    ); }] + MarkupBlock - [0..92)::92 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..92)::92 + CSharpStatement - [0..92)::92 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..92)::91 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..91)::89 + CSharpStatementLiteral - [2..44)::42 - [ var foo = bar; Html.ExecuteTemplate(foo, ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[Html]; + Dot;[.]; + Identifier;[ExecuteTemplate]; + LeftParenthesis;[(]; + Identifier;[foo]; + Comma;[,]; + Whitespace;[ ]; + CSharpTemplateBlock - [44..88)::44 + MarkupBlock - [44..88)::44 + MarkupTransition - [44..45)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [45..88)::43 + MarkupStartTag - [45..48)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [48..53)::5 - [Foo #] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + Text;[#]; + CSharpCodeBlock - [53..84)::31 + CSharpImplicitExpression - [53..84)::31 + CSharpTransition - [53..54)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [54..84)::30 + CSharpCodeBlock - [54..84)::30 + CSharpExpressionLiteral - [54..70)::16 - [Html.Repeat(10, ] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[Html]; + Dot;[.]; + Identifier;[Repeat]; + LeftParenthesis;[(]; + IntegerLiteral;[10]; + Comma;[,]; + Whitespace;[ ]; + CSharpTemplateBlock - [70..83)::13 + MarkupBlock - [70..83)::13 + MarkupTransition - [70..71)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [71..83)::12 + MarkupStartTag - [71..74)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [74..74)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [74..79)::5 + CSharpImplicitExpression - [74..79)::5 + CSharpTransition - [74..75)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [75..79)::4 + CSharpCodeBlock - [75..79)::4 + CSharpExpressionLiteral - [75..79)::4 - [item] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[item]; + MarkupEndTag - [79..83)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpExpressionLiteral - [83..84)::1 - [)] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + RightParenthesis;[)]; + MarkupEndTag - [84..88)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [88..91)::3 - [); ] - Gen - SpanEditHandler;Accepts:Any + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RazorMetaCode - [91..92)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [92..92)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/_WithDoubleTransition_DoesNotThrow.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/_WithDoubleTransition_DoesNotThrow.cspans.txt new file mode 100644 index 0000000000..ccfd591f1b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/_WithDoubleTransition_DoesNotThrow.cspans.txt @@ -0,0 +1,18 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [75] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [75] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [75] ) +Code span at (2:0,2 [42] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [75] ) +Transition span at (44:0,44 [1] ) (Accepts:None) - Parent: Markup block at (44:0,44 [27] ) +Markup span at (45:0,45 [2] ) (Accepts:Any) - Parent: Tag block at (45:0,45 [12] ) +Markup span at (47:0,47 [6] ) (Accepts:Any) - Parent: Markup block at (47:0,47 [9] ) +Markup span at (53:0,53 [1] ) (Accepts:None) - Parent: Markup block at (53:0,53 [2] ) +Markup span at (54:0,54 [1] ) (Accepts:None) - Parent: Markup block at (53:0,53 [2] ) +Markup span at (55:0,55 [1] ) (Accepts:Any) - Parent: Markup block at (47:0,47 [9] ) +Markup span at (56:0,56 [1] ) (Accepts:None) - Parent: Tag block at (45:0,45 [12] ) +Markup span at (57:0,57 [5] ) (Accepts:Any) - Parent: Markup block at (44:0,44 [27] ) +Transition span at (62:0,62 [1] ) (Accepts:None) - Parent: Expression block at (62:0,62 [5] ) +Code span at (63:0,63 [4] ) (Accepts:NonWhitespace) - Parent: Expression block at (62:0,62 [5] ) +Markup span at (67:0,67 [4] ) (Accepts:None) - Parent: Tag block at (67:0,67 [4] ) +Code span at (71:0,71 [3] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [75] ) +MetaCode span at (74:0,74 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [75] ) +Markup span at (75:0,75 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [75] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/_WithDoubleTransition_DoesNotThrow.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/_WithDoubleTransition_DoesNotThrow.stree.txt new file mode 100644 index 0000000000..63dbd49360 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpTemplateTest/_WithDoubleTransition_DoesNotThrow.stree.txt @@ -0,0 +1,80 @@ +RazorDocument - [0..75)::75 - [@{ var foo = bar; Html.ExecuteTemplate(foo, @

                    Foo #@item

                    ); }] + MarkupBlock - [0..75)::75 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..75)::75 + CSharpStatement - [0..75)::75 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..75)::74 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..74)::72 + CSharpStatementLiteral - [2..44)::42 - [ var foo = bar; Html.ExecuteTemplate(foo, ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[Html]; + Dot;[.]; + Identifier;[ExecuteTemplate]; + LeftParenthesis;[(]; + Identifier;[foo]; + Comma;[,]; + Whitespace;[ ]; + CSharpTemplateBlock - [44..71)::27 + MarkupBlock - [44..71)::27 + MarkupTransition - [44..45)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [45..71)::26 + MarkupStartTag - [45..57)::12 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + MarkupAttributeBlock - [47..56)::9 - [ foo='@@'] + MarkupTextLiteral - [47..48)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [48..51)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + Equals;[=]; + MarkupTextLiteral - [52..53)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [53..55)::2 + MarkupBlock - [53..55)::2 + MarkupTextLiteral - [53..54)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupEphemeralTextLiteral - [54..55)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupTextLiteral - [55..56)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTextLiteral - [57..62)::5 - [Foo #] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + Text;[#]; + CSharpCodeBlock - [62..67)::5 + CSharpImplicitExpression - [62..67)::5 + CSharpTransition - [62..63)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [63..67)::4 + CSharpCodeBlock - [63..67)::4 + CSharpExpressionLiteral - [63..67)::4 - [item] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[item]; + MarkupEndTag - [67..71)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [71..74)::3 - [); ] - Gen - SpanEditHandler;Accepts:Any + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RazorMetaCode - [74..75)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [75..75)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/AllowsMarkupInIfBodyWithBraces.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/AllowsMarkupInIfBodyWithBraces.cspans.txt new file mode 100644 index 0000000000..ba8948b5ef --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/AllowsMarkupInIfBodyWithBraces.cspans.txt @@ -0,0 +1,22 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [71] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [71] ) +Code span at (1:0,1 [9] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [71] ) +Markup span at (10:0,10 [1] ) (Accepts:Any) - Parent: Markup block at (10:0,10 [12] ) +Markup span at (11:0,11 [3] ) (Accepts:None) - Parent: Tag block at (11:0,11 [3] ) +Markup span at (14:0,14 [3] ) (Accepts:Any) - Parent: Markup block at (10:0,10 [12] ) +Markup span at (17:0,17 [4] ) (Accepts:None) - Parent: Tag block at (17:0,17 [4] ) +Markup span at (21:0,21 [1] ) (Accepts:None) - Parent: Markup block at (10:0,10 [12] ) +Code span at (22:0,22 [16] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [71] ) +Markup span at (38:0,38 [1] ) (Accepts:Any) - Parent: Markup block at (38:0,38 [12] ) +Markup span at (39:0,39 [3] ) (Accepts:None) - Parent: Tag block at (39:0,39 [3] ) +Markup span at (42:0,42 [3] ) (Accepts:Any) - Parent: Markup block at (38:0,38 [12] ) +Markup span at (45:0,45 [4] ) (Accepts:None) - Parent: Tag block at (45:0,45 [4] ) +Markup span at (49:0,49 [1] ) (Accepts:None) - Parent: Markup block at (38:0,38 [12] ) +Code span at (50:0,50 [8] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [71] ) +Markup span at (58:0,58 [1] ) (Accepts:Any) - Parent: Markup block at (58:0,58 [12] ) +Markup span at (59:0,59 [3] ) (Accepts:None) - Parent: Tag block at (59:0,59 [3] ) +Markup span at (62:0,62 [3] ) (Accepts:Any) - Parent: Markup block at (58:0,58 [12] ) +Markup span at (65:0,65 [4] ) (Accepts:None) - Parent: Tag block at (65:0,65 [4] ) +Markup span at (69:0,69 [1] ) (Accepts:None) - Parent: Markup block at (58:0,58 [12] ) +Code span at (70:0,70 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [71] ) +Markup span at (71:0,71 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [71] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/AllowsMarkupInIfBodyWithBraces.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/AllowsMarkupInIfBodyWithBraces.stree.txt new file mode 100644 index 0000000000..c13cff2566 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/AllowsMarkupInIfBodyWithBraces.stree.txt @@ -0,0 +1,86 @@ +RazorDocument - [0..71)::71 - [@if(foo) {

                    Bar

                    } else if(bar) {

                    Baz

                    } else {

                    Boz

                    }] + MarkupBlock - [0..71)::71 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..71)::71 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..10)::9 - [if(foo) {] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [10..22)::12 + MarkupTextLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [11..21)::10 + MarkupStartTag - [11..14)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [14..17)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupEndTag - [17..21)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [21..22)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [22..38)::16 - [} else if(bar) {] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [38..50)::12 + MarkupTextLiteral - [38..39)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [39..49)::10 + MarkupStartTag - [39..42)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [42..45)::3 - [Baz] - Gen - SpanEditHandler;Accepts:Any + Text;[Baz]; + MarkupEndTag - [45..49)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [49..50)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [50..58)::8 - [} else {] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [58..70)::12 + MarkupTextLiteral - [58..59)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [59..69)::10 + MarkupStartTag - [59..62)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [62..65)::3 - [Boz] - Gen - SpanEditHandler;Accepts:Any + Text;[Boz]; + MarkupEndTag - [65..69)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [69..70)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [70..71)::1 - [}] - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [71..71)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/AllowsMarkupInIfBodyWithBracesWithinCodeBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/AllowsMarkupInIfBodyWithBracesWithinCodeBlock.cspans.txt new file mode 100644 index 0000000000..adb029e02e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/AllowsMarkupInIfBodyWithBracesWithinCodeBlock.cspans.txt @@ -0,0 +1,24 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [75] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [75] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [75] ) +Code span at (2:0,2 [10] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [75] ) +Markup span at (12:0,12 [1] ) (Accepts:Any) - Parent: Markup block at (12:0,12 [12] ) +Markup span at (13:0,13 [3] ) (Accepts:None) - Parent: Tag block at (13:0,13 [3] ) +Markup span at (16:0,16 [3] ) (Accepts:Any) - Parent: Markup block at (12:0,12 [12] ) +Markup span at (19:0,19 [4] ) (Accepts:None) - Parent: Tag block at (19:0,19 [4] ) +Markup span at (23:0,23 [1] ) (Accepts:None) - Parent: Markup block at (12:0,12 [12] ) +Code span at (24:0,24 [16] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [75] ) +Markup span at (40:0,40 [1] ) (Accepts:Any) - Parent: Markup block at (40:0,40 [12] ) +Markup span at (41:0,41 [3] ) (Accepts:None) - Parent: Tag block at (41:0,41 [3] ) +Markup span at (44:0,44 [3] ) (Accepts:Any) - Parent: Markup block at (40:0,40 [12] ) +Markup span at (47:0,47 [4] ) (Accepts:None) - Parent: Tag block at (47:0,47 [4] ) +Markup span at (51:0,51 [1] ) (Accepts:None) - Parent: Markup block at (40:0,40 [12] ) +Code span at (52:0,52 [8] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [75] ) +Markup span at (60:0,60 [1] ) (Accepts:Any) - Parent: Markup block at (60:0,60 [12] ) +Markup span at (61:0,61 [3] ) (Accepts:None) - Parent: Tag block at (61:0,61 [3] ) +Markup span at (64:0,64 [3] ) (Accepts:Any) - Parent: Markup block at (60:0,60 [12] ) +Markup span at (67:0,67 [4] ) (Accepts:None) - Parent: Tag block at (67:0,67 [4] ) +Markup span at (71:0,71 [1] ) (Accepts:None) - Parent: Markup block at (60:0,60 [12] ) +Code span at (72:0,72 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [75] ) +MetaCode span at (74:0,74 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [75] ) +Markup span at (75:0,75 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [75] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/AllowsMarkupInIfBodyWithBracesWithinCodeBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/AllowsMarkupInIfBodyWithBracesWithinCodeBlock.stree.txt new file mode 100644 index 0000000000..8caaea2097 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/AllowsMarkupInIfBodyWithBracesWithinCodeBlock.stree.txt @@ -0,0 +1,95 @@ +RazorDocument - [0..75)::75 - [@{ if(foo) {

                    Bar

                    } else if(bar) {

                    Baz

                    } else {

                    Boz

                    } }] + MarkupBlock - [0..75)::75 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..75)::75 + CSharpStatement - [0..75)::75 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..75)::74 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..74)::72 + CSharpStatementLiteral - [2..12)::10 - [ if(foo) {] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [12..24)::12 + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [13..23)::10 + MarkupStartTag - [13..16)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [16..19)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupEndTag - [19..23)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [24..40)::16 - [} else if(bar) {] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[bar]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [40..52)::12 + MarkupTextLiteral - [40..41)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [41..51)::10 + MarkupStartTag - [41..44)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [44..47)::3 - [Baz] - Gen - SpanEditHandler;Accepts:Any + Text;[Baz]; + MarkupEndTag - [47..51)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [51..52)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [52..60)::8 - [} else {] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[else]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [60..72)::12 + MarkupTextLiteral - [60..61)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [61..71)::10 + MarkupStartTag - [61..64)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [64..67)::3 - [Boz] - Gen - SpanEditHandler;Accepts:Any + Text;[Boz]; + MarkupEndTag - [67..71)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [71..72)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [72..74)::2 - [} ] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; + Whitespace;[ ]; + RazorMetaCode - [74..75)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [75..75)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/CorrectlyReturnsFromMarkupBlockWithPseudoTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/CorrectlyReturnsFromMarkupBlockWithPseudoTag.cspans.txt new file mode 100644 index 0000000000..b996780bfc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/CorrectlyReturnsFromMarkupBlockWithPseudoTag.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [30] ) +Code span at (1:0,1 [13] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [30] ) +Transition span at (14:0,14 [6] ) (Accepts:None) - Parent: Tag block at (14:0,14 [6] ) +Markup span at (20:0,20 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [14] ) +Transition span at (21:0,21 [7] ) (Accepts:None) - Parent: Tag block at (21:0,21 [7] ) +Code span at (28:0,28 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [30] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/CorrectlyReturnsFromMarkupBlockWithPseudoTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/CorrectlyReturnsFromMarkupBlockWithPseudoTag.stree.txt new file mode 100644 index 0000000000..bf3516ae2c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/CorrectlyReturnsFromMarkupBlockWithPseudoTag.stree.txt @@ -0,0 +1,36 @@ +RazorDocument - [0..30)::30 - [@if (i > 0) { ; }] + MarkupBlock - [0..30)::30 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..30)::30 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..14)::13 - [if (i > 0) { ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[i]; + Whitespace;[ ]; + GreaterThan;[>]; + Whitespace;[ ]; + IntegerLiteral;[0]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + MarkupBlock - [14..28)::14 + MarkupElement - [14..28)::14 + MarkupStartTag - [14..20)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [20..21)::1 - [;] - Gen - SpanEditHandler;Accepts:Any + Text;[;]; + MarkupEndTag - [21..28)::7 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [28..30)::2 - [ }] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/CorrectlyReturnsFromMarkupBlockWithPseudoTagInCodeBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/CorrectlyReturnsFromMarkupBlockWithPseudoTagInCodeBlock.cspans.txt new file mode 100644 index 0000000000..2c37a80334 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/CorrectlyReturnsFromMarkupBlockWithPseudoTagInCodeBlock.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Code span at (2:0,2 [14] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [34] ) +Transition span at (16:0,16 [6] ) (Accepts:None) - Parent: Tag block at (16:0,16 [6] ) +Markup span at (22:0,22 [1] ) (Accepts:Any) - Parent: Markup block at (16:0,16 [14] ) +Transition span at (23:0,23 [7] ) (Accepts:None) - Parent: Tag block at (23:0,23 [7] ) +Code span at (30:0,30 [3] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (33:0,33 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (34:0,34 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/CorrectlyReturnsFromMarkupBlockWithPseudoTagInCodeBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/CorrectlyReturnsFromMarkupBlockWithPseudoTagInCodeBlock.stree.txt new file mode 100644 index 0000000000..980017555f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/CorrectlyReturnsFromMarkupBlockWithPseudoTagInCodeBlock.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..34)::34 - [@{ if (i > 0) { ; } }] + MarkupBlock - [0..34)::34 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..34)::34 + CSharpStatement - [0..34)::34 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..34)::33 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..33)::31 + CSharpStatementLiteral - [2..16)::14 - [ if (i > 0) { ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Keyword;[if]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[i]; + Whitespace;[ ]; + GreaterThan;[>]; + Whitespace;[ ]; + IntegerLiteral;[0]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + MarkupBlock - [16..30)::14 + MarkupElement - [16..30)::14 + MarkupStartTag - [16..22)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [22..23)::1 - [;] - Gen - SpanEditHandler;Accepts:Any + Text;[;]; + MarkupEndTag - [23..30)::7 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [30..33)::3 - [ } ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + RazorMetaCode - [33..34)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [34..34)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesAllWhitespaceOnSameLineWithTrailingNewLineToMarkupExclPreceedingNewline.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesAllWhitespaceOnSameLineWithTrailingNewLineToMarkupExclPreceedingNewline.cspans.txt new file mode 100644 index 0000000000..8ce52132ea --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesAllWhitespaceOnSameLineWithTrailingNewLineToMarkupExclPreceedingNewline.cspans.txt @@ -0,0 +1,17 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [162] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [162] ) +Code span at (1:0,1 [80] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [162] ) +Markup span at (81:2,0 [4] ) (Accepts:Any) - Parent: Markup block at (81:2,0 [46] ) +Markup span at (85:2,4 [3] ) (Accepts:None) - Parent: Tag block at (85:2,4 [3] ) +Markup span at (88:2,7 [15] ) (Accepts:Any) - Parent: Markup block at (81:2,0 [46] ) +Code span at (103:4,0 [8] ) (Accepts:Any) - Parent: Statement block at (103:4,0 [12] ) +Transition span at (111:4,8 [1] ) (Accepts:None) - Parent: Expression block at (111:4,8 [4] ) +Code span at (112:4,9 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (111:4,8 [4] ) +Markup span at (115:4,12 [6] ) (Accepts:Any) - Parent: Markup block at (81:2,0 [46] ) +Markup span at (121:5,4 [4] ) (Accepts:None) - Parent: Tag block at (121:5,4 [4] ) +Markup span at (125:5,8 [2] ) (Accepts:None) - Parent: Markup block at (81:2,0 [46] ) +Markup span at (127:6,0 [4] ) (Accepts:Any) - Parent: Markup block at (127:6,0 [14] ) +Transition span at (131:6,4 [1] ) (Accepts:None) - Parent: Markup block at (127:6,0 [14] ) +MetaCode span at (132:6,5 [1] ) (Accepts:Any) - Parent: Markup block at (127:6,0 [14] ) +Markup span at (133:6,6 [8] ) (Accepts:None) - Parent: Markup block at (127:6,0 [14] ) +Code span at (141:7,0 [21] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [162] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesAllWhitespaceOnSameLineWithTrailingNewLineToMarkupExclPreceedingNewline.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesAllWhitespaceOnSameLineWithTrailingNewLineToMarkupExclPreceedingNewline.stree.txt new file mode 100644 index 0000000000..f9c1f89c55 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesAllWhitespaceOnSameLineWithTrailingNewLineToMarkupExclPreceedingNewline.stree.txt @@ -0,0 +1,82 @@ +RazorDocument - [0..162)::162 - [@if(foo) {LF var foo = "After this statement there are 10 spaces"; LF

                    LF FooLF @barLF

                    LF @:Hello!LF var biz = boz;LF}] + MarkupBlock - [0..162)::162 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..162)::162 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..81)::80 - [if(foo) {LF var foo = "After this statement there are 10 spaces"; LF] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + StringLiteral;["After this statement there are 10 spaces"]; + Semicolon;[;]; + Whitespace;[ ]; + NewLine;[LF]; + MarkupBlock - [81..127)::46 + MarkupTextLiteral - [81..85)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [85..125)::40 + MarkupStartTag - [85..88)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [88..103)::15 - [LF FooLF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + Text;[Foo]; + NewLine;[LF]; + CSharpCodeBlock - [103..115)::12 + CSharpStatementLiteral - [103..111)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpImplicitExpression - [111..115)::4 + CSharpTransition - [111..112)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [112..115)::3 + CSharpCodeBlock - [112..115)::3 + CSharpExpressionLiteral - [112..115)::3 - [bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[bar]; + MarkupTextLiteral - [115..121)::6 - [LF ] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + MarkupEndTag - [121..125)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [125..127)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + MarkupBlock - [127..141)::14 + MarkupTextLiteral - [127..131)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTransition - [131..132)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [132..133)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [133..141)::8 - [Hello!LF] - Gen - SpanEditHandler;Accepts:None + Text;[Hello]; + Bang;[!]; + NewLine;[LF]; + CSharpStatementLiteral - [141..162)::21 - [ var biz = boz;LF}] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[biz]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[boz]; + Semicolon;[;]; + NewLine;[LF]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtColonTemplateTransitionInDesignTimeMode.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtColonTemplateTransitionInDesignTimeMode.cspans.txt new file mode 100644 index 0000000000..f1fa226b75 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtColonTemplateTransitionInDesignTimeMode.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [30] ) +Code span at (1:0,1 [10] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [30] ) +Transition span at (11:1,0 [1] ) (Accepts:None) - Parent: Markup block at (11:1,0 [18] ) +MetaCode span at (12:1,1 [1] ) (Accepts:Any) - Parent: Markup block at (11:1,0 [18] ) +Markup span at (13:1,2 [16] ) (Accepts:None) - Parent: Markup block at (11:1,0 [18] ) +Code span at (29:2,0 [1] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [30] ) +Markup span at (30:2,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtColonTemplateTransitionInDesignTimeMode.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtColonTemplateTransitionInDesignTimeMode.stree.txt new file mode 100644 index 0000000000..4e046e53ee --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtColonTemplateTransitionInDesignTimeMode.stree.txt @@ -0,0 +1,36 @@ +RazorDocument - [0..30)::30 - [@Foo( LF@:

                    Foo

                    LF)] + MarkupBlock - [0..30)::30 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..30)::30 + CSharpImplicitExpression - [0..30)::30 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..30)::29 + CSharpCodeBlock - [1..30)::29 + CSharpExpressionLiteral - [1..11)::10 - [Foo( LF] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[Foo]; + LeftParenthesis;[(]; + Whitespace;[ ]; + NewLine;[LF]; + CSharpTemplateBlock - [11..29)::18 + MarkupBlock - [11..29)::18 + MarkupTransition - [11..12)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [12..13)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [13..29)::16 - [

                    Foo

                    LF] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + Text;[Foo]; + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + Whitespace;[ ]; + NewLine;[LF]; + CSharpExpressionLiteral - [29..30)::1 - [)] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + RightParenthesis;[)]; + MarkupTextLiteral - [30..30)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtColonTransitionInDesignTimeMode.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtColonTransitionInDesignTimeMode.cspans.txt new file mode 100644 index 0000000000..1bd9c8867a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtColonTransitionInDesignTimeMode.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Code span at (2:0,2 [6] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [27] ) +Transition span at (8:1,4 [1] ) (Accepts:None) - Parent: Markup block at (8:1,4 [18] ) +MetaCode span at (9:1,5 [1] ) (Accepts:Any) - Parent: Markup block at (8:1,4 [18] ) +Markup span at (10:1,6 [16] ) (Accepts:None) - Parent: Markup block at (8:1,4 [18] ) +Code span at (26:2,0 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (26:2,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Markup span at (27:2,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtColonTransitionInDesignTimeMode.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtColonTransitionInDesignTimeMode.stree.txt new file mode 100644 index 0000000000..ec8316ecf8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtColonTransitionInDesignTimeMode.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..27)::27 - [@{LF @:

                    Foo

                    LF}] + MarkupBlock - [0..27)::27 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..27)::27 + CSharpStatement - [0..27)::27 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..27)::26 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..26)::24 + CSharpStatementLiteral - [2..8)::6 - [LF ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + Whitespace;[ ]; + MarkupBlock - [8..26)::18 + MarkupTransition - [8..9)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [9..10)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [10..26)::16 - [

                    Foo

                    LF] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + Text;[Foo]; + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + Whitespace;[ ]; + NewLine;[LF]; + CSharpStatementLiteral - [26..26)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [26..27)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [27..27)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtTagTemplateTransitionInDesignTimeMode.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtTagTemplateTransitionInDesignTimeMode.cspans.txt new file mode 100644 index 0000000000..a687eaf720 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtTagTemplateTransitionInDesignTimeMode.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [25] ) +Code span at (1:0,1 [8] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [25] ) +Transition span at (9:0,9 [1] ) (Accepts:None) - Parent: Markup block at (9:0,9 [11] ) +Markup span at (10:0,10 [3] ) (Accepts:None) - Parent: Tag block at (10:0,10 [3] ) +Markup span at (13:0,13 [3] ) (Accepts:Any) - Parent: Markup block at (9:0,9 [11] ) +Markup span at (16:0,16 [4] ) (Accepts:None) - Parent: Tag block at (16:0,16 [4] ) +Code span at (20:0,20 [5] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [25] ) +Markup span at (25:0,25 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtTagTemplateTransitionInDesignTimeMode.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtTagTemplateTransitionInDesignTimeMode.stree.txt new file mode 100644 index 0000000000..b271586561 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnAtTagTemplateTransitionInDesignTimeMode.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..25)::25 - [@Foo( @

                    Foo

                    )] + MarkupBlock - [0..25)::25 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..25)::25 + CSharpImplicitExpression - [0..25)::25 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..25)::24 + CSharpCodeBlock - [1..25)::24 + CSharpExpressionLiteral - [1..9)::8 - [Foo( ] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[Foo]; + LeftParenthesis;[(]; + Whitespace;[ ]; + CSharpTemplateBlock - [9..20)::11 + MarkupBlock - [9..20)::11 + MarkupTransition - [9..10)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [10..20)::10 + MarkupStartTag - [10..13)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [13..16)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [16..20)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpExpressionLiteral - [20..25)::5 - [ )] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Whitespace;[ ]; + RightParenthesis;[)]; + MarkupTextLiteral - [25..25)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnInvalidAtTagTransitionInDesignTimeMode.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnInvalidAtTagTransitionInDesignTimeMode.cspans.txt new file mode 100644 index 0000000000..5b0b252277 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnInvalidAtTagTransitionInDesignTimeMode.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Code span at (2:0,2 [6] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) +Transition span at (8:1,4 [1] ) (Accepts:None) - Parent: Markup block at (8:1,4 [11] ) +Markup span at (9:1,5 [3] ) (Accepts:None) - Parent: Tag block at (9:1,5 [3] ) +Markup span at (12:1,8 [3] ) (Accepts:Any) - Parent: Markup block at (8:1,4 [11] ) +Markup span at (15:1,11 [4] ) (Accepts:None) - Parent: Tag block at (15:1,11 [4] ) +Code span at (19:1,15 [6] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) +MetaCode span at (25:2,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Markup span at (26:2,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnInvalidAtTagTransitionInDesignTimeMode.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnInvalidAtTagTransitionInDesignTimeMode.diag.txt new file mode 100644 index 0000000000..fd4615efa6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnInvalidAtTagTransitionInDesignTimeMode.diag.txt @@ -0,0 +1,5 @@ +(2,5): Error RZ1009: The "@" character must be followed by a ":", "(", or a C# identifier. If you intended to switch to markup, use an HTML start tag, for example: + +@if(isLoggedIn) { +

                    Hello, @user!

                    +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnInvalidAtTagTransitionInDesignTimeMode.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnInvalidAtTagTransitionInDesignTimeMode.stree.txt new file mode 100644 index 0000000000..630bd75bbb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnInvalidAtTagTransitionInDesignTimeMode.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..26)::26 - [@{LF @

                    Foo

                    LF}] + MarkupBlock - [0..26)::26 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..26)::26 + CSharpStatement - [0..26)::26 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..26)::25 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..25)::23 + CSharpStatementLiteral - [2..8)::6 - [LF ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + Whitespace;[ ]; + MarkupBlock - [8..19)::11 + MarkupTransition - [8..9)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupElement - [9..19)::10 + MarkupStartTag - [9..12)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [12..15)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [15..19)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [19..25)::6 - [ LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + RazorMetaCode - [25..26)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [26..26)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnTagTransitionInDesignTimeMode.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnTagTransitionInDesignTimeMode.cspans.txt new file mode 100644 index 0000000000..a8076b5e94 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnTagTransitionInDesignTimeMode.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +Code span at (2:0,2 [6] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [25] ) +Markup span at (8:1,4 [3] ) (Accepts:None) - Parent: Tag block at (8:1,4 [3] ) +Markup span at (11:1,7 [3] ) (Accepts:Any) - Parent: Markup block at (8:1,4 [10] ) +Markup span at (14:1,10 [4] ) (Accepts:None) - Parent: Tag block at (14:1,10 [4] ) +Code span at (18:1,14 [6] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [25] ) +MetaCode span at (24:2,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +Markup span at (25:2,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnTagTransitionInDesignTimeMode.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnTagTransitionInDesignTimeMode.stree.txt new file mode 100644 index 0000000000..736cbe9532 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/GivesSpacesToCodeOnTagTransitionInDesignTimeMode.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..25)::25 - [@{LF

                    Foo

                    LF}] + MarkupBlock - [0..25)::25 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..25)::25 + CSharpStatement - [0..25)::25 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..25)::24 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..24)::22 + CSharpStatementLiteral - [2..8)::6 - [LF ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + Whitespace;[ ]; + MarkupBlock - [8..18)::10 + MarkupElement - [8..18)::10 + MarkupStartTag - [8..11)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [11..14)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [14..18)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [18..24)::6 - [ LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + RazorMetaCode - [24..25)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [25..25)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnOpenAngleBracket.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnOpenAngleBracket.cspans.txt new file mode 100644 index 0000000000..8d8980837d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnOpenAngleBracket.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [43] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [43] ) +Code span at (1:0,1 [29] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [43] ) +Markup span at (30:0,30 [1] ) (Accepts:Any) - Parent: Markup block at (30:0,30 [12] ) +Markup span at (31:0,31 [3] ) (Accepts:None) - Parent: Tag block at (31:0,31 [3] ) +Markup span at (34:0,34 [3] ) (Accepts:Any) - Parent: Markup block at (30:0,30 [12] ) +Markup span at (37:0,37 [4] ) (Accepts:None) - Parent: Tag block at (37:0,37 [4] ) +Markup span at (41:0,41 [1] ) (Accepts:None) - Parent: Markup block at (30:0,30 [12] ) +Code span at (42:0,42 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [43] ) +Markup span at (43:0,43 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [43] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnOpenAngleBracket.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnOpenAngleBracket.stree.txt new file mode 100644 index 0000000000..831e37ead9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnOpenAngleBracket.stree.txt @@ -0,0 +1,52 @@ +RazorDocument - [0..43)::43 - [@for(int i = 0; i < 10; i++) {

                    Foo

                    }] + MarkupBlock - [0..43)::43 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..43)::43 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..30)::29 - [for(int i = 0; i < 10; i++) {] - Gen - SpanEditHandler;Accepts:Any + Keyword;[for]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Increment;[++]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [30..42)::12 + MarkupTextLiteral - [30..31)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [31..41)::10 + MarkupStartTag - [31..34)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [34..37)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [37..41)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [41..42)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [42..43)::1 - [}] - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [43..43)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnOpenAngleBracketInCodeBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnOpenAngleBracketInCodeBlock.cspans.txt new file mode 100644 index 0000000000..308cd5d14f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnOpenAngleBracketInCodeBlock.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [47] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [47] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [47] ) +Code span at (2:0,2 [30] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [47] ) +Markup span at (32:0,32 [1] ) (Accepts:Any) - Parent: Markup block at (32:0,32 [12] ) +Markup span at (33:0,33 [3] ) (Accepts:None) - Parent: Tag block at (33:0,33 [3] ) +Markup span at (36:0,36 [3] ) (Accepts:Any) - Parent: Markup block at (32:0,32 [12] ) +Markup span at (39:0,39 [4] ) (Accepts:None) - Parent: Tag block at (39:0,39 [4] ) +Markup span at (43:0,43 [1] ) (Accepts:None) - Parent: Markup block at (32:0,32 [12] ) +Code span at (44:0,44 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [47] ) +MetaCode span at (46:0,46 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [47] ) +Markup span at (47:0,47 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [47] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnOpenAngleBracketInCodeBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnOpenAngleBracketInCodeBlock.stree.txt new file mode 100644 index 0000000000..338f7b1022 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnOpenAngleBracketInCodeBlock.stree.txt @@ -0,0 +1,61 @@ +RazorDocument - [0..47)::47 - [@{ for(int i = 0; i < 10; i++) {

                    Foo

                    } }] + MarkupBlock - [0..47)::47 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..47)::47 + CSharpStatement - [0..47)::47 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..47)::46 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..46)::44 + CSharpStatementLiteral - [2..32)::30 - [ for(int i = 0; i < 10; i++) {] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Keyword;[for]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Whitespace;[ ]; + LessThan;[<]; + Whitespace;[ ]; + IntegerLiteral;[10]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[i]; + Increment;[++]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [32..44)::12 + MarkupTextLiteral - [32..33)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [33..43)::10 + MarkupStartTag - [33..36)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [36..39)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [39..43)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [43..44)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [44..46)::2 - [} ] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; + Whitespace;[ ]; + RazorMetaCode - [46..47)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [47..47)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByColon.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByColon.cspans.txt new file mode 100644 index 0000000000..e759ba2bed --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByColon.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +Code span at (1:0,1 [9] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [19] ) +Markup span at (10:0,10 [1] ) (Accepts:Any) - Parent: Markup block at (10:0,10 [8] ) +Transition span at (11:0,11 [1] ) (Accepts:None) - Parent: Markup block at (10:0,10 [8] ) +MetaCode span at (12:0,12 [1] ) (Accepts:Any) - Parent: Markup block at (10:0,10 [8] ) +Markup span at (13:0,13 [5] ) (Accepts:None) - Parent: Markup block at (10:0,10 [8] ) +Code span at (18:1,0 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [19] ) +Markup span at (19:1,1 [5] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByColon.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByColon.stree.txt new file mode 100644 index 0000000000..be98669bd5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByColon.stree.txt @@ -0,0 +1,29 @@ +RazorDocument - [0..24)::24 - [@if(foo) { @:BarLF} zoop] + MarkupBlock - [0..24)::24 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..19)::19 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..10)::9 - [if(foo) {] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [10..18)::8 + MarkupTextLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTransition - [11..12)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [12..13)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [13..18)::5 - [BarLF] - Gen - SpanEditHandler;Accepts:None + Text;[Bar]; + NewLine;[LF]; + CSharpStatementLiteral - [18..19)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; + MarkupTextLiteral - [19..24)::5 - [ zoop] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[zoop]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByColonInCodeBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByColonInCodeBlock.cspans.txt new file mode 100644 index 0000000000..985b278a3a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByColonInCodeBlock.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Code span at (2:0,2 [10] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (12:0,12 [1] ) (Accepts:Any) - Parent: Markup block at (12:0,12 [8] ) +Transition span at (13:0,13 [1] ) (Accepts:None) - Parent: Markup block at (12:0,12 [8] ) +MetaCode span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (12:0,12 [8] ) +Markup span at (15:0,15 [5] ) (Accepts:None) - Parent: Markup block at (12:0,12 [8] ) +Code span at (20:1,0 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [23] ) +MetaCode span at (22:1,2 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (23:1,3 [5] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByColonInCodeBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByColonInCodeBlock.stree.txt new file mode 100644 index 0000000000..6b53cd40f9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByColonInCodeBlock.stree.txt @@ -0,0 +1,38 @@ +RazorDocument - [0..28)::28 - [@{ if(foo) { @:BarLF} } zoop] + MarkupBlock - [0..28)::28 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..23)::23 + CSharpStatement - [0..23)::23 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..23)::22 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..22)::20 + CSharpStatementLiteral - [2..12)::10 - [ if(foo) {] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [12..20)::8 + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTransition - [13..14)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [14..15)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [15..20)::5 - [BarLF] - Gen - SpanEditHandler;Accepts:None + Text;[Bar]; + NewLine;[LF]; + CSharpStatementLiteral - [20..22)::2 - [} ] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; + Whitespace;[ ]; + RazorMetaCode - [22..23)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [23..28)::5 - [ zoop] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[zoop]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByDoubleColon.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByDoubleColon.cspans.txt new file mode 100644 index 0000000000..8ca4ca163f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByDoubleColon.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +Code span at (1:0,1 [9] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [25] ) +Markup span at (10:0,10 [1] ) (Accepts:Any) - Parent: Markup block at (10:0,10 [14] ) +Transition span at (11:0,11 [1] ) (Accepts:None) - Parent: Markup block at (10:0,10 [14] ) +MetaCode span at (12:0,12 [1] ) (Accepts:Any) - Parent: Markup block at (10:0,10 [14] ) +Markup span at (13:0,13 [11] ) (Accepts:None) - Parent: Markup block at (10:0,10 [14] ) +Code span at (24:1,0 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [25] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByDoubleColon.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByDoubleColon.stree.txt new file mode 100644 index 0000000000..a495874e27 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByDoubleColon.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..25)::25 - [@if(foo) { @::SometextLF}] + MarkupBlock - [0..25)::25 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..25)::25 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..10)::9 - [if(foo) {] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [10..24)::14 + MarkupTextLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTransition - [11..12)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [12..13)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [13..24)::11 - [:SometextLF] - Gen - SpanEditHandler;Accepts:None + Text;[:Sometext]; + NewLine;[LF]; + CSharpStatementLiteral - [24..25)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByTripleColon.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByTripleColon.cspans.txt new file mode 100644 index 0000000000..284bead87a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByTripleColon.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Code span at (1:0,1 [9] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) +Markup span at (10:0,10 [1] ) (Accepts:Any) - Parent: Markup block at (10:0,10 [15] ) +Transition span at (11:0,11 [1] ) (Accepts:None) - Parent: Markup block at (10:0,10 [15] ) +MetaCode span at (12:0,12 [1] ) (Accepts:Any) - Parent: Markup block at (10:0,10 [15] ) +Markup span at (13:0,13 [12] ) (Accepts:None) - Parent: Markup block at (10:0,10 [15] ) +Code span at (25:1,0 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByTripleColon.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByTripleColon.stree.txt new file mode 100644 index 0000000000..64cf48ac22 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ParsesMarkupStatementOnSwitchCharacterFollowedByTripleColon.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..26)::26 - [@if(foo) { @:::SometextLF}] + MarkupBlock - [0..26)::26 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..26)::26 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..10)::9 - [if(foo) {] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [10..25)::15 + MarkupTextLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTransition - [11..12)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [12..13)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [13..25)::12 - [::SometextLF] - Gen - SpanEditHandler;Accepts:None + Text;[::Sometext]; + NewLine;[LF]; + CSharpStatementLiteral - [25..26)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ShouldSupportMarkupWithoutPreceedingWhitespace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ShouldSupportMarkupWithoutPreceedingWhitespace.cspans.txt new file mode 100644 index 0000000000..ba66ea2b8f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ShouldSupportMarkupWithoutPreceedingWhitespace.cspans.txt @@ -0,0 +1,17 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [68] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [68] ) +Code span at (1:0,1 [33] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [68] ) +Transition span at (34:3,0 [1] ) (Accepts:None) - Parent: Markup block at (34:3,0 [7] ) +MetaCode span at (35:3,1 [1] ) (Accepts:Any) - Parent: Markup block at (34:3,0 [7] ) +Markup span at (36:3,2 [5] ) (Accepts:None) - Parent: Markup block at (34:3,0 [7] ) +Markup span at (41:4,0 [5] ) (Accepts:None) - Parent: Tag block at (41:4,0 [5] ) +Markup span at (46:4,5 [2] ) (Accepts:None) - Parent: Markup block at (41:4,0 [7] ) +Markup span at (48:5,0 [3] ) (Accepts:None) - Parent: Tag block at (48:5,0 [3] ) +Markup span at (51:5,3 [3] ) (Accepts:Any) - Parent: Markup block at (48:5,0 [12] ) +Markup span at (54:5,6 [4] ) (Accepts:None) - Parent: Tag block at (54:5,6 [4] ) +Markup span at (58:5,10 [2] ) (Accepts:None) - Parent: Markup block at (48:5,0 [12] ) +Transition span at (60:6,0 [1] ) (Accepts:None) - Parent: Markup block at (60:6,0 [7] ) +MetaCode span at (61:6,1 [1] ) (Accepts:Any) - Parent: Markup block at (60:6,0 [7] ) +Markup span at (62:6,2 [5] ) (Accepts:None) - Parent: Markup block at (60:6,0 [7] ) +Code span at (67:7,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [68] ) +Markup span at (68:7,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [68] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ShouldSupportMarkupWithoutPreceedingWhitespace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ShouldSupportMarkupWithoutPreceedingWhitespace.stree.txt new file mode 100644 index 0000000000..bb699f4b93 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ShouldSupportMarkupWithoutPreceedingWhitespace.stree.txt @@ -0,0 +1,66 @@ +RazorDocument - [0..68)::68 - [@foreach(var file in files){LFLFLF@:BazLF
                    LFFooLF@:BarLF}] + MarkupBlock - [0..68)::68 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..68)::68 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..34)::33 - [foreach(var file in files){LFLFLF] - Gen - SpanEditHandler;Accepts:Any + Keyword;[foreach]; + LeftParenthesis;[(]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[file]; + Whitespace;[ ]; + Keyword;[in]; + Whitespace;[ ]; + Identifier;[files]; + RightParenthesis;[)]; + LeftBrace;[{]; + NewLine;[LF]; + NewLine;[LF]; + NewLine;[LF]; + MarkupBlock - [34..41)::7 + MarkupTransition - [34..35)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [35..36)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [36..41)::5 - [BazLF] - Gen - SpanEditHandler;Accepts:None + Text;[Baz]; + NewLine;[LF]; + MarkupBlock - [41..48)::7 + MarkupElement - [41..46)::5 + MarkupStartTag - [41..46)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[br]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTextLiteral - [46..48)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + MarkupBlock - [48..60)::12 + MarkupElement - [48..58)::10 + MarkupStartTag - [48..51)::3 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + CloseAngle;[>]; + MarkupTextLiteral - [51..54)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [54..58)::4 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[a]; + CloseAngle;[>]; + MarkupTextLiteral - [58..60)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + MarkupBlock - [60..67)::7 + MarkupTransition - [60..61)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [61..62)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [62..67)::5 - [BarLF] - Gen - SpanEditHandler;Accepts:None + Text;[Bar]; + NewLine;[LF]; + CSharpStatementLiteral - [67..68)::1 - [}] - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [68..68)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ShouldSupportSingleLineMarkupContainingStatementBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ShouldSupportSingleLineMarkupContainingStatementBlock.cspans.txt new file mode 100644 index 0000000000..1bc4567d7f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ShouldSupportSingleLineMarkupContainingStatementBlock.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [26] ) +Code span at (1:0,1 [16] ) (Accepts:Any) - Parent: Expression block at (0:0,0 [26] ) +Transition span at (17:1,4 [1] ) (Accepts:None) - Parent: Markup block at (17:1,4 [8] ) +MetaCode span at (18:1,5 [1] ) (Accepts:Any) - Parent: Markup block at (17:1,4 [8] ) +Markup span at (19:1,6 [1] ) (Accepts:Any) - Parent: Markup block at (17:1,4 [8] ) +Transition span at (20:1,7 [1] ) (Accepts:None) - Parent: Statement block at (20:1,7 [3] ) +MetaCode span at (21:1,8 [1] ) (Accepts:None) - Parent: Statement block at (20:1,7 [3] ) +Code span at (22:1,9 [0] ) (Accepts:Any) - Parent: Statement block at (20:1,7 [3] ) +MetaCode span at (22:1,9 [1] ) (Accepts:None) - Parent: Statement block at (20:1,7 [3] ) +Markup span at (23:1,10 [2] ) (Accepts:None) - Parent: Markup block at (17:1,4 [8] ) +Code span at (25:2,0 [1] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [26] ) +Markup span at (26:2,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ShouldSupportSingleLineMarkupContainingStatementBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ShouldSupportSingleLineMarkupContainingStatementBlock.stree.txt new file mode 100644 index 0000000000..63d7684102 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/ShouldSupportSingleLineMarkupContainingStatementBlock.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..26)::26 - [@Repeat(10,LF @: @{}LF)] + MarkupBlock - [0..26)::26 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..26)::26 + CSharpImplicitExpression - [0..26)::26 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..26)::25 + CSharpCodeBlock - [1..26)::25 + CSharpExpressionLiteral - [1..17)::16 - [Repeat(10,LF ] - Gen - ImplicitExpressionEditHandler;Accepts:Any;ImplicitExpression[RTD];K14 + Identifier;[Repeat]; + LeftParenthesis;[(]; + IntegerLiteral;[10]; + Comma;[,]; + NewLine;[LF]; + Whitespace;[ ]; + CSharpTemplateBlock - [17..25)::8 + MarkupBlock - [17..25)::8 + MarkupTransition - [17..18)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [18..19)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpCodeBlock - [20..23)::3 + CSharpStatement - [20..23)::3 + CSharpTransition - [20..21)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [21..23)::2 + RazorMetaCode - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [22..22)::0 + CSharpStatementLiteral - [22..22)::0 - [] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Marker;[]; + RazorMetaCode - [22..23)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [23..25)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpExpressionLiteral - [25..26)::1 - [)] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + RightParenthesis;[)]; + MarkupTextLiteral - [26..26)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SingleAngleBracketDoesNotCauseSwitchIfOuterBlockIsTerminated.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SingleAngleBracketDoesNotCauseSwitchIfOuterBlockIsTerminated.cspans.txt new file mode 100644 index 0000000000..71420aa95e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SingleAngleBracketDoesNotCauseSwitchIfOuterBlockIsTerminated.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +Code span at (2:0,2 [7] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [10] ) +MetaCode span at (9:0,9 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +Markup span at (10:0,10 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SingleAngleBracketDoesNotCauseSwitchIfOuterBlockIsTerminated.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SingleAngleBracketDoesNotCauseSwitchIfOuterBlockIsTerminated.stree.txt new file mode 100644 index 0000000000..9cd8630955 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SingleAngleBracketDoesNotCauseSwitchIfOuterBlockIsTerminated.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..10)::10 - [@{ List< }] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..10)::10 + CSharpStatement - [0..10)::10 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..10)::9 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..9)::7 + CSharpStatementLiteral - [2..9)::7 - [ List< ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Identifier;[List]; + LessThan;[<]; + Whitespace;[ ]; + RazorMetaCode - [9..10)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [10..10)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsAllKindsOfImplicitMarkupInCodeBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsAllKindsOfImplicitMarkupInCodeBlock.cspans.txt new file mode 100644 index 0000000000..df3f126852 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsAllKindsOfImplicitMarkupInCodeBlock.cspans.txt @@ -0,0 +1,23 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [207] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [207] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [207] ) +Code span at (2:0,2 [18] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [207] ) +Markup span at (20:2,0 [8] ) (Accepts:Any) - Parent: Markup block at (20:2,0 [30] ) +Transition span at (28:2,8 [1] ) (Accepts:None) - Parent: Markup block at (20:2,0 [30] ) +MetaCode span at (29:2,9 [1] ) (Accepts:Any) - Parent: Markup block at (20:2,0 [30] ) +Markup span at (30:2,10 [20] ) (Accepts:None) - Parent: Markup block at (20:2,0 [30] ) +Code span at (50:3,0 [65] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [207] ) +Transition span at (115:5,8 [6] ) (Accepts:None) - Parent: Tag block at (115:5,8 [6] ) +Markup span at (121:5,14 [14] ) (Accepts:Any) - Parent: Markup block at (115:5,8 [29] ) +Transition span at (135:5,28 [1] ) (Accepts:None) - Parent: Expression block at (135:5,28 [2] ) +Code span at (136:5,29 [1] ) (Accepts:NonWhitespace) - Parent: Expression block at (135:5,28 [2] ) +Transition span at (137:5,30 [7] ) (Accepts:None) - Parent: Tag block at (137:5,30 [7] ) +Code span at (144:5,37 [27] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [207] ) +Markup span at (171:8,0 [8] ) (Accepts:Any) - Parent: Markup block at (171:8,0 [28] ) +Markup span at (179:8,8 [3] ) (Accepts:None) - Parent: Tag block at (179:8,8 [3] ) +Markup span at (182:8,11 [11] ) (Accepts:Any) - Parent: Markup block at (171:8,0 [28] ) +Markup span at (193:8,22 [4] ) (Accepts:None) - Parent: Tag block at (193:8,22 [4] ) +Markup span at (197:8,26 [2] ) (Accepts:None) - Parent: Markup block at (171:8,0 [28] ) +Code span at (199:9,0 [7] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [207] ) +MetaCode span at (206:10,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [207] ) +Markup span at (207:10,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [207] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsAllKindsOfImplicitMarkupInCodeBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsAllKindsOfImplicitMarkupInCodeBlock.stree.txt new file mode 100644 index 0000000000..020255d2f7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsAllKindsOfImplicitMarkupInCodeBlock.stree.txt @@ -0,0 +1,134 @@ +RazorDocument - [0..207)::207 - [@{LF if(true) {LF @:Single Line MarkupLF }LF foreach (var p in Enumerable.Range(1, 10)) {LF The number is @pLF }LF if(!false) {LF

                    A real tag!

                    LF }LF}] + MarkupBlock - [0..207)::207 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..207)::207 + CSharpStatement - [0..207)::207 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..207)::206 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..206)::204 + CSharpStatementLiteral - [2..20)::18 - [LF if(true) {LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + MarkupBlock - [20..50)::30 + MarkupTextLiteral - [20..28)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTransition - [28..29)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [29..30)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [30..50)::20 - [Single Line MarkupLF] - Gen - SpanEditHandler;Accepts:None + Text;[Single]; + Whitespace;[ ]; + Text;[Line]; + Whitespace;[ ]; + Text;[Markup]; + NewLine;[LF]; + CSharpStatementLiteral - [50..115)::65 - [ }LF foreach (var p in Enumerable.Range(1, 10)) {LF ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[foreach]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[p]; + Whitespace;[ ]; + Keyword;[in]; + Whitespace;[ ]; + Identifier;[Enumerable]; + Dot;[.]; + Identifier;[Range]; + LeftParenthesis;[(]; + IntegerLiteral;[1]; + Comma;[,]; + Whitespace;[ ]; + IntegerLiteral;[10]; + RightParenthesis;[)]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + MarkupBlock - [115..144)::29 + MarkupElement - [115..144)::29 + MarkupStartTag - [115..121)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [121..135)::14 - [The number is ] - Gen - SpanEditHandler;Accepts:Any + Text;[The]; + Whitespace;[ ]; + Text;[number]; + Whitespace;[ ]; + Text;[is]; + Whitespace;[ ]; + CSharpCodeBlock - [135..137)::2 + CSharpImplicitExpression - [135..137)::2 + CSharpTransition - [135..136)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [136..137)::1 + CSharpCodeBlock - [136..137)::1 + CSharpExpressionLiteral - [136..137)::1 - [p] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[p]; + MarkupEndTag - [137..144)::7 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [144..171)::27 - [LF }LF if(!false) {LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[if]; + LeftParenthesis;[(]; + Not;[!]; + Keyword;[false]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + MarkupBlock - [171..199)::28 + MarkupTextLiteral - [171..179)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [179..197)::18 + MarkupStartTag - [179..182)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [182..193)::11 - [A real tag!] - Gen - SpanEditHandler;Accepts:Any + Text;[A]; + Whitespace;[ ]; + Text;[real]; + Whitespace;[ ]; + Text;[tag]; + Bang;[!]; + MarkupEndTag - [193..197)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [197..199)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [199..206)::7 - [ }LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + RazorMetaCode - [206..207)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [207..207)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsMarkupInCaseAndDefaultBranchesOfSwitch.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsMarkupInCaseAndDefaultBranchesOfSwitch.cspans.txt new file mode 100644 index 0000000000..08846c99c5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsMarkupInCaseAndDefaultBranchesOfSwitch.cspans.txt @@ -0,0 +1,33 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [233] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [233] ) +Code span at (1:0,1 [28] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [233] ) +Markup span at (29:2,0 [8] ) (Accepts:Any) - Parent: Markup block at (29:2,0 [20] ) +Markup span at (37:2,8 [3] ) (Accepts:None) - Parent: Tag block at (37:2,8 [3] ) +Markup span at (40:2,11 [3] ) (Accepts:Any) - Parent: Markup block at (29:2,0 [20] ) +Markup span at (43:2,14 [4] ) (Accepts:None) - Parent: Tag block at (43:2,14 [4] ) +Markup span at (47:2,18 [2] ) (Accepts:None) - Parent: Markup block at (29:2,0 [20] ) +Code span at (49:3,0 [29] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [233] ) +Markup span at (78:5,0 [8] ) (Accepts:Any) - Parent: Markup block at (78:5,0 [20] ) +Markup span at (86:5,8 [3] ) (Accepts:None) - Parent: Tag block at (86:5,8 [3] ) +Markup span at (89:5,11 [3] ) (Accepts:Any) - Parent: Markup block at (78:5,0 [20] ) +Markup span at (92:5,14 [4] ) (Accepts:None) - Parent: Tag block at (92:5,14 [4] ) +Markup span at (96:5,18 [2] ) (Accepts:None) - Parent: Markup block at (78:5,0 [20] ) +Code span at (98:6,0 [41] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [233] ) +Markup span at (139:9,0 [12] ) (Accepts:Any) - Parent: Markup block at (139:9,0 [24] ) +Markup span at (151:9,12 [3] ) (Accepts:None) - Parent: Tag block at (151:9,12 [3] ) +Markup span at (154:9,15 [3] ) (Accepts:Any) - Parent: Markup block at (139:9,0 [24] ) +Markup span at (157:9,18 [4] ) (Accepts:None) - Parent: Tag block at (157:9,18 [4] ) +Markup span at (161:9,22 [2] ) (Accepts:None) - Parent: Markup block at (139:9,0 [24] ) +Markup span at (163:10,0 [12] ) (Accepts:Any) - Parent: Markup block at (163:10,0 [24] ) +Markup span at (175:10,12 [3] ) (Accepts:None) - Parent: Tag block at (175:10,12 [3] ) +Markup span at (178:10,15 [3] ) (Accepts:Any) - Parent: Markup block at (163:10,0 [24] ) +Markup span at (181:10,18 [4] ) (Accepts:None) - Parent: Tag block at (181:10,18 [4] ) +Markup span at (185:10,22 [2] ) (Accepts:None) - Parent: Markup block at (163:10,0 [24] ) +Code span at (187:11,0 [25] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [233] ) +Markup span at (212:13,0 [8] ) (Accepts:Any) - Parent: Markup block at (212:13,0 [20] ) +Markup span at (220:13,8 [3] ) (Accepts:None) - Parent: Tag block at (220:13,8 [3] ) +Markup span at (223:13,11 [3] ) (Accepts:Any) - Parent: Markup block at (212:13,0 [20] ) +Markup span at (226:13,14 [4] ) (Accepts:None) - Parent: Tag block at (226:13,14 [4] ) +Markup span at (230:13,18 [2] ) (Accepts:None) - Parent: Markup block at (212:13,0 [20] ) +Code span at (232:14,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [233] ) +Markup span at (233:14,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [233] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsMarkupInCaseAndDefaultBranchesOfSwitch.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsMarkupInCaseAndDefaultBranchesOfSwitch.stree.txt new file mode 100644 index 0000000000..7f17709368 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsMarkupInCaseAndDefaultBranchesOfSwitch.stree.txt @@ -0,0 +1,143 @@ +RazorDocument - [0..233)::233 - [@switch(foo) {LF case 0:LF

                    Foo

                    LF break;LF case 1:LF

                    Bar

                    LF return;LF case 2:LF {LF

                    Baz

                    LF

                    Boz

                    LF }LF default:LF

                    Biz

                    LF}] + MarkupBlock - [0..233)::233 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..233)::233 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..29)::28 - [switch(foo) {LF case 0:LF] - Gen - SpanEditHandler;Accepts:Any + Keyword;[switch]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[case]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Colon;[:]; + NewLine;[LF]; + MarkupBlock - [29..49)::20 + MarkupTextLiteral - [29..37)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [37..47)::10 + MarkupStartTag - [37..40)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [40..43)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [43..47)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [47..49)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [49..78)::29 - [ break;LF case 1:LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Keyword;[break]; + Semicolon;[;]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[case]; + Whitespace;[ ]; + IntegerLiteral;[1]; + Colon;[:]; + NewLine;[LF]; + MarkupBlock - [78..98)::20 + MarkupTextLiteral - [78..86)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [86..96)::10 + MarkupStartTag - [86..89)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [89..92)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupEndTag - [92..96)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [96..98)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [98..139)::41 - [ return;LF case 2:LF {LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Keyword;[return]; + Semicolon;[;]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[case]; + Whitespace;[ ]; + IntegerLiteral;[2]; + Colon;[:]; + NewLine;[LF]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + MarkupBlock - [139..163)::24 + MarkupTextLiteral - [139..151)::12 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [151..161)::10 + MarkupStartTag - [151..154)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [154..157)::3 - [Baz] - Gen - SpanEditHandler;Accepts:Any + Text;[Baz]; + MarkupEndTag - [157..161)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [161..163)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + MarkupBlock - [163..187)::24 + MarkupTextLiteral - [163..175)::12 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [175..185)::10 + MarkupStartTag - [175..178)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [178..181)::3 - [Boz] - Gen - SpanEditHandler;Accepts:Any + Text;[Boz]; + MarkupEndTag - [181..185)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [185..187)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [187..212)::25 - [ }LF default:LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[default]; + Colon;[:]; + NewLine;[LF]; + MarkupBlock - [212..232)::20 + MarkupTextLiteral - [212..220)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [220..230)::10 + MarkupStartTag - [220..223)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [223..226)::3 - [Biz] - Gen - SpanEditHandler;Accepts:Any + Text;[Biz]; + MarkupEndTag - [226..230)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [230..232)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [232..233)::1 - [}] - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [233..233)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsMarkupInCaseAndDefaultBranchesOfSwitchInCodeBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsMarkupInCaseAndDefaultBranchesOfSwitchInCodeBlock.cspans.txt new file mode 100644 index 0000000000..371412c07f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsMarkupInCaseAndDefaultBranchesOfSwitchInCodeBlock.cspans.txt @@ -0,0 +1,35 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [237] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [237] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [237] ) +Code span at (2:0,2 [29] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [237] ) +Markup span at (31:2,0 [8] ) (Accepts:Any) - Parent: Markup block at (31:2,0 [20] ) +Markup span at (39:2,8 [3] ) (Accepts:None) - Parent: Tag block at (39:2,8 [3] ) +Markup span at (42:2,11 [3] ) (Accepts:Any) - Parent: Markup block at (31:2,0 [20] ) +Markup span at (45:2,14 [4] ) (Accepts:None) - Parent: Tag block at (45:2,14 [4] ) +Markup span at (49:2,18 [2] ) (Accepts:None) - Parent: Markup block at (31:2,0 [20] ) +Code span at (51:3,0 [29] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [237] ) +Markup span at (80:5,0 [8] ) (Accepts:Any) - Parent: Markup block at (80:5,0 [20] ) +Markup span at (88:5,8 [3] ) (Accepts:None) - Parent: Tag block at (88:5,8 [3] ) +Markup span at (91:5,11 [3] ) (Accepts:Any) - Parent: Markup block at (80:5,0 [20] ) +Markup span at (94:5,14 [4] ) (Accepts:None) - Parent: Tag block at (94:5,14 [4] ) +Markup span at (98:5,18 [2] ) (Accepts:None) - Parent: Markup block at (80:5,0 [20] ) +Code span at (100:6,0 [41] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [237] ) +Markup span at (141:9,0 [12] ) (Accepts:Any) - Parent: Markup block at (141:9,0 [24] ) +Markup span at (153:9,12 [3] ) (Accepts:None) - Parent: Tag block at (153:9,12 [3] ) +Markup span at (156:9,15 [3] ) (Accepts:Any) - Parent: Markup block at (141:9,0 [24] ) +Markup span at (159:9,18 [4] ) (Accepts:None) - Parent: Tag block at (159:9,18 [4] ) +Markup span at (163:9,22 [2] ) (Accepts:None) - Parent: Markup block at (141:9,0 [24] ) +Markup span at (165:10,0 [12] ) (Accepts:Any) - Parent: Markup block at (165:10,0 [24] ) +Markup span at (177:10,12 [3] ) (Accepts:None) - Parent: Tag block at (177:10,12 [3] ) +Markup span at (180:10,15 [3] ) (Accepts:Any) - Parent: Markup block at (165:10,0 [24] ) +Markup span at (183:10,18 [4] ) (Accepts:None) - Parent: Tag block at (183:10,18 [4] ) +Markup span at (187:10,22 [2] ) (Accepts:None) - Parent: Markup block at (165:10,0 [24] ) +Code span at (189:11,0 [25] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [237] ) +Markup span at (214:13,0 [8] ) (Accepts:Any) - Parent: Markup block at (214:13,0 [20] ) +Markup span at (222:13,8 [3] ) (Accepts:None) - Parent: Tag block at (222:13,8 [3] ) +Markup span at (225:13,11 [3] ) (Accepts:Any) - Parent: Markup block at (214:13,0 [20] ) +Markup span at (228:13,14 [4] ) (Accepts:None) - Parent: Tag block at (228:13,14 [4] ) +Markup span at (232:13,18 [2] ) (Accepts:None) - Parent: Markup block at (214:13,0 [20] ) +Code span at (234:14,0 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [237] ) +MetaCode span at (236:14,2 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [237] ) +Markup span at (237:14,3 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [237] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsMarkupInCaseAndDefaultBranchesOfSwitchInCodeBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsMarkupInCaseAndDefaultBranchesOfSwitchInCodeBlock.stree.txt new file mode 100644 index 0000000000..63e92358d1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpToMarkupSwitchTest/SupportsMarkupInCaseAndDefaultBranchesOfSwitchInCodeBlock.stree.txt @@ -0,0 +1,152 @@ +RazorDocument - [0..237)::237 - [@{ switch(foo) {LF case 0:LF

                    Foo

                    LF break;LF case 1:LF

                    Bar

                    LF return;LF case 2:LF {LF

                    Baz

                    LF

                    Boz

                    LF }LF default:LF

                    Biz

                    LF} }] + MarkupBlock - [0..237)::237 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..237)::237 + CSharpStatement - [0..237)::237 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..237)::236 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..236)::234 + CSharpStatementLiteral - [2..31)::29 - [ switch(foo) {LF case 0:LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Keyword;[switch]; + LeftParenthesis;[(]; + Identifier;[foo]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[case]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Colon;[:]; + NewLine;[LF]; + MarkupBlock - [31..51)::20 + MarkupTextLiteral - [31..39)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [39..49)::10 + MarkupStartTag - [39..42)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [42..45)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [45..49)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [49..51)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [51..80)::29 - [ break;LF case 1:LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Keyword;[break]; + Semicolon;[;]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[case]; + Whitespace;[ ]; + IntegerLiteral;[1]; + Colon;[:]; + NewLine;[LF]; + MarkupBlock - [80..100)::20 + MarkupTextLiteral - [80..88)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [88..98)::10 + MarkupStartTag - [88..91)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [91..94)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupEndTag - [94..98)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [98..100)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [100..141)::41 - [ return;LF case 2:LF {LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Keyword;[return]; + Semicolon;[;]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[case]; + Whitespace;[ ]; + IntegerLiteral;[2]; + Colon;[:]; + NewLine;[LF]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + MarkupBlock - [141..165)::24 + MarkupTextLiteral - [141..153)::12 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [153..163)::10 + MarkupStartTag - [153..156)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [156..159)::3 - [Baz] - Gen - SpanEditHandler;Accepts:Any + Text;[Baz]; + MarkupEndTag - [159..163)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [163..165)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + MarkupBlock - [165..189)::24 + MarkupTextLiteral - [165..177)::12 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [177..187)::10 + MarkupStartTag - [177..180)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [180..183)::3 - [Boz] - Gen - SpanEditHandler;Accepts:Any + Text;[Boz]; + MarkupEndTag - [183..187)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [187..189)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [189..214)::25 - [ }LF default:LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + Whitespace;[ ]; + Keyword;[default]; + Colon;[:]; + NewLine;[LF]; + MarkupBlock - [214..234)::20 + MarkupTextLiteral - [214..222)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [222..232)::10 + MarkupStartTag - [222..225)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [225..228)::3 - [Biz] - Gen - SpanEditHandler;Accepts:Any + Text;[Biz]; + MarkupEndTag - [228..232)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [232..234)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [234..236)::2 - [} ] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; + Whitespace;[ ]; + RazorMetaCode - [236..237)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [237..237)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprAcceptsTrailingNewlineInDesignTimeMode.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprAcceptsTrailingNewlineInDesignTimeMode.cspans.txt new file mode 100644 index 0000000000..73d431f67b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprAcceptsTrailingNewlineInDesignTimeMode.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +Code span at (2:0,2 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [10] ) +Transition span at (2:0,2 [1] ) (Accepts:None) - Parent: Expression block at (2:0,2 [5] ) +Code span at (3:0,3 [4] ) (Accepts:NonWhitespace) - Parent: Expression block at (2:0,2 [5] ) +Code span at (7:0,7 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [10] ) +MetaCode span at (9:1,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +Markup span at (10:1,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprAcceptsTrailingNewlineInDesignTimeMode.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprAcceptsTrailingNewlineInDesignTimeMode.stree.txt new file mode 100644 index 0000000000..537ca2fd70 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprAcceptsTrailingNewlineInDesignTimeMode.stree.txt @@ -0,0 +1,29 @@ +RazorDocument - [0..10)::10 - [@{@foo.LF}] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..10)::10 + CSharpStatement - [0..10)::10 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..10)::9 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..9)::7 + CSharpStatementLiteral - [2..2)::0 - [] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Marker;[]; + CSharpCodeBlock - [2..7)::5 + CSharpImplicitExpression - [2..7)::5 + CSharpTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [3..7)::4 + CSharpCodeBlock - [3..7)::4 + CSharpExpressionLiteral - [3..7)::4 - [foo.] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[ATD];K14 + Identifier;[foo]; + Dot;[.]; + CSharpStatementLiteral - [7..9)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + RazorMetaCode - [9..10)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [10..10)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptDotAfterAt.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptDotAfterAt.cspans.txt new file mode 100644 index 0000000000..2caa075c0c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptDotAfterAt.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [5] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +Code span at (2:0,2 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [5] ) +Transition span at (2:0,2 [1] ) (Accepts:None) - Parent: Expression block at (2:0,2 [1] ) +Code span at (3:0,3 [0] ) (Accepts:NonWhitespace) - Parent: Expression block at (2:0,2 [1] ) +Code span at (3:0,3 [1] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [5] ) +MetaCode span at (4:0,4 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +Markup span at (5:0,5 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptDotAfterAt.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptDotAfterAt.diag.txt new file mode 100644 index 0000000000..af4954d89e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptDotAfterAt.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ1005: "." is not valid at the start of a code block. Only identifiers, keywords, comments, "(" and "{" are valid. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptDotAfterAt.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptDotAfterAt.stree.txt new file mode 100644 index 0000000000..6efc85bc18 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptDotAfterAt.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..5)::5 - [@{@.}] + MarkupBlock - [0..5)::5 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..5)::5 + CSharpStatement - [0..5)::5 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..5)::4 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..4)::2 + CSharpStatementLiteral - [2..2)::0 - [] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Marker;[]; + CSharpCodeBlock - [2..3)::1 + CSharpImplicitExpression - [2..3)::1 + CSharpTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [3..3)::0 + CSharpCodeBlock - [3..3)::0 + CSharpExpressionLiteral - [3..3)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[ATD];K14 + Marker;[]; + CSharpStatementLiteral - [3..4)::1 - [.] - Gen - SpanEditHandler;Accepts:Any + Dot;[.]; + RazorMetaCode - [4..5)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [5..5)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptTrailingNewlineInRunTimeMode.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptTrailingNewlineInRunTimeMode.cspans.txt new file mode 100644 index 0000000000..73d431f67b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptTrailingNewlineInRunTimeMode.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +Code span at (2:0,2 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [10] ) +Transition span at (2:0,2 [1] ) (Accepts:None) - Parent: Expression block at (2:0,2 [5] ) +Code span at (3:0,3 [4] ) (Accepts:NonWhitespace) - Parent: Expression block at (2:0,2 [5] ) +Code span at (7:0,7 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [10] ) +MetaCode span at (9:1,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +Markup span at (10:1,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptTrailingNewlineInRunTimeMode.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptTrailingNewlineInRunTimeMode.stree.txt new file mode 100644 index 0000000000..537ca2fd70 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprDoesNotAcceptTrailingNewlineInRunTimeMode.stree.txt @@ -0,0 +1,29 @@ +RazorDocument - [0..10)::10 - [@{@foo.LF}] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..10)::10 + CSharpStatement - [0..10)::10 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..10)::9 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..9)::7 + CSharpStatementLiteral - [2..2)::0 - [] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Marker;[]; + CSharpCodeBlock - [2..7)::5 + CSharpImplicitExpression - [2..7)::5 + CSharpTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [3..7)::4 + CSharpCodeBlock - [3..7)::4 + CSharpExpressionLiteral - [3..7)::4 - [foo.] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[ATD];K14 + Identifier;[foo]; + Dot;[.]; + CSharpStatementLiteral - [7..9)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + RazorMetaCode - [9..10)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [10..10)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtAcceptsSingleSpaceOrNewlineAtDesignTime.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtAcceptsSingleSpaceOrNewlineAtDesignTime.cspans.txt new file mode 100644 index 0000000000..cfb01939e7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtAcceptsSingleSpaceOrNewlineAtDesignTime.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [12] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [12] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [12] ) +Code span at (2:0,2 [6] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [12] ) +Transition span at (8:1,4 [1] ) (Accepts:None) - Parent: Expression block at (8:1,4 [1] ) +Code span at (9:1,5 [0] ) (Accepts:NonWhitespace) - Parent: Expression block at (8:1,4 [1] ) +Code span at (9:1,5 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [12] ) +MetaCode span at (11:2,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [12] ) +Markup span at (12:2,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [12] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtAcceptsSingleSpaceOrNewlineAtDesignTime.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtAcceptsSingleSpaceOrNewlineAtDesignTime.diag.txt new file mode 100644 index 0000000000..a8f6dc0930 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtAcceptsSingleSpaceOrNewlineAtDesignTime.diag.txt @@ -0,0 +1 @@ +(2,6): Error RZ1003: A space or line break was encountered after the "@" character. Only valid identifiers, keywords, comments, "(" and "{" are valid at the start of a code block and they must occur immediately following "@" with no space in between. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtAcceptsSingleSpaceOrNewlineAtDesignTime.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtAcceptsSingleSpaceOrNewlineAtDesignTime.stree.txt new file mode 100644 index 0000000000..a83496ddd1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtAcceptsSingleSpaceOrNewlineAtDesignTime.stree.txt @@ -0,0 +1,29 @@ +RazorDocument - [0..12)::12 - [@{LF @LF}] + MarkupBlock - [0..12)::12 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..12)::12 + CSharpStatement - [0..12)::12 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..12)::11 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..11)::9 + CSharpStatementLiteral - [2..8)::6 - [LF ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + Whitespace;[ ]; + CSharpCodeBlock - [8..9)::1 + CSharpImplicitExpression - [8..9)::1 + CSharpTransition - [8..9)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [9..9)::0 + CSharpCodeBlock - [9..9)::0 + CSharpExpressionLiteral - [9..9)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[ATD];K14 + Marker;[]; + CSharpStatementLiteral - [9..11)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + RazorMetaCode - [11..12)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [12..12)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtOutputsZeroLengthCodeSpan.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtOutputsZeroLengthCodeSpan.cspans.txt new file mode 100644 index 0000000000..38b8899f16 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtOutputsZeroLengthCodeSpan.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [4] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [4] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [4] ) +Code span at (2:0,2 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [4] ) +Transition span at (2:0,2 [1] ) (Accepts:None) - Parent: Expression block at (2:0,2 [1] ) +Code span at (3:0,3 [0] ) (Accepts:NonWhitespace) - Parent: Expression block at (2:0,2 [1] ) +Code span at (3:0,3 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [4] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [4] ) +Markup span at (4:0,4 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtOutputsZeroLengthCodeSpan.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtOutputsZeroLengthCodeSpan.diag.txt new file mode 100644 index 0000000000..ca1dc596ab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtOutputsZeroLengthCodeSpan.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ1005: "}" is not valid at the start of a code block. Only identifiers, keywords, comments, "(" and "{" are valid. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtOutputsZeroLengthCodeSpan.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtOutputsZeroLengthCodeSpan.stree.txt new file mode 100644 index 0000000000..7d2bc1804c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/InnerImplicitExprWithOnlySingleAtOutputsZeroLengthCodeSpan.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..4)::4 - [@{@}] + MarkupBlock - [0..4)::4 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpStatement - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..4)::3 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..3)::1 + CSharpStatementLiteral - [2..2)::0 - [] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Marker;[]; + CSharpCodeBlock - [2..3)::1 + CSharpImplicitExpression - [2..3)::1 + CSharpTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [3..3)::0 + CSharpCodeBlock - [3..3)::0 + CSharpExpressionLiteral - [3..3)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[ATD];K14 + Marker;[]; + CSharpStatementLiteral - [3..3)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [3..4)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [4..4)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/VerbatimBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/VerbatimBlock.cspans.txt new file mode 100644 index 0000000000..d86374cf4e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/VerbatimBlock.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [11] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +Code span at (2:0,2 [8] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [11] ) +MetaCode span at (10:0,10 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +Markup span at (11:0,11 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [11] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/VerbatimBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/VerbatimBlock.stree.txt new file mode 100644 index 0000000000..fed47f7288 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpVerbatimBlockTest/VerbatimBlock.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..11)::11 - [@{ foo(); }] + MarkupBlock - [0..11)::11 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..11)::11 + CSharpStatement - [0..11)::11 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..11)::10 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..10)::8 + CSharpStatementLiteral - [2..10)::8 - [ foo(); ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RazorMetaCode - [10..11)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [11..11)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpWhitespaceHandlingTest/StmtBlockDoesNotAcceptTrailingNewlineIfTheyAreSignificantToAncestor.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpWhitespaceHandlingTest/StmtBlockDoesNotAcceptTrailingNewlineIfTheyAreSignificantToAncestor.cspans.txt new file mode 100644 index 0000000000..86b0e40245 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpWhitespaceHandlingTest/StmtBlockDoesNotAcceptTrailingNewlineIfTheyAreSignificantToAncestor.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +Transition span at (2:0,2 [1] ) (Accepts:None) - Parent: Markup block at (2:0,2 [19] ) +MetaCode span at (3:0,3 [1] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [19] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [19] ) +Transition span at (5:0,5 [1] ) (Accepts:None) - Parent: Statement block at (5:0,5 [14] ) +Code span at (6:0,6 [13] ) (Accepts:Any) - Parent: Statement block at (5:0,5 [14] ) +Markup span at (19:0,19 [2] ) (Accepts:None) - Parent: Markup block at (2:0,2 [19] ) +Code span at (21:1,0 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [22] ) +MetaCode span at (21:1,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +Markup span at (22:1,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpWhitespaceHandlingTest/StmtBlockDoesNotAcceptTrailingNewlineIfTheyAreSignificantToAncestor.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpWhitespaceHandlingTest/StmtBlockDoesNotAcceptTrailingNewlineIfTheyAreSignificantToAncestor.stree.txt new file mode 100644 index 0000000000..b40e6c93fd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpWhitespaceHandlingTest/StmtBlockDoesNotAcceptTrailingNewlineIfTheyAreSignificantToAncestor.stree.txt @@ -0,0 +1,40 @@ +RazorDocument - [0..22)::22 - [@{@: @if (true) { }LF}] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..22)::22 + CSharpStatement - [0..22)::22 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..22)::21 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..21)::19 + MarkupBlock - [2..21)::19 + MarkupTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [3..4)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpCodeBlock - [5..19)::14 + CSharpTransition - [5..6)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [6..19)::13 - [if (true) { }] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [19..21)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreDisabledForDataAttributesInBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreDisabledForDataAttributesInBlock.cspans.txt new file mode 100644 index 0000000000..afd40eccab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreDisabledForDataAttributesInBlock.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Markup span at (2:0,2 [5] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [22] ) +Markup span at (7:0,7 [11] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [16] ) +Transition span at (18:0,18 [1] ) (Accepts:None) - Parent: Expression block at (18:0,18 [4] ) +Code span at (19:0,19 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (18:0,18 [4] ) +Markup span at (22:0,22 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [16] ) +Markup span at (23:0,23 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [22] ) +Markup span at (24:0,24 [7] ) (Accepts:None) - Parent: Tag block at (24:0,24 [7] ) +Code span at (31:0,31 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (31:0,31 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Markup span at (32:0,32 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreDisabledForDataAttributesInBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreDisabledForDataAttributesInBlock.stree.txt new file mode 100644 index 0000000000..4e4b3a1ee0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreDisabledForDataAttributesInBlock.stree.txt @@ -0,0 +1,48 @@ +RazorDocument - [0..32)::32 - [@{}] + MarkupBlock - [0..32)::32 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..32)::32 + CSharpStatement - [0..32)::32 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..32)::31 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..31)::29 + MarkupBlock - [2..31)::29 + MarkupElement - [2..31)::29 + MarkupStartTag - [2..24)::22 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [7..23)::16 - [ data-foo='@foo'] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..16)::8 - [data-foo] - Gen - SpanEditHandler;Accepts:Any + Text;[data-foo]; + Equals;[=]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [18..22)::4 + CSharpCodeBlock - [18..22)::4 + CSharpImplicitExpression - [18..22)::4 + CSharpTransition - [18..19)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [19..22)::3 + CSharpCodeBlock - [19..22)::3 + CSharpExpressionLiteral - [19..22)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupTextLiteral - [22..23)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupEndTag - [24..31)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[span]; + CloseAngle;[>]; + CSharpStatementLiteral - [31..31)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [31..32)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreDisabledForDataAttributesInDocument.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreDisabledForDataAttributesInDocument.cspans.txt new file mode 100644 index 0000000000..afd40eccab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreDisabledForDataAttributesInDocument.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Markup span at (2:0,2 [5] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [22] ) +Markup span at (7:0,7 [11] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [16] ) +Transition span at (18:0,18 [1] ) (Accepts:None) - Parent: Expression block at (18:0,18 [4] ) +Code span at (19:0,19 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (18:0,18 [4] ) +Markup span at (22:0,22 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [16] ) +Markup span at (23:0,23 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [22] ) +Markup span at (24:0,24 [7] ) (Accepts:None) - Parent: Tag block at (24:0,24 [7] ) +Code span at (31:0,31 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (31:0,31 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Markup span at (32:0,32 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreDisabledForDataAttributesInDocument.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreDisabledForDataAttributesInDocument.stree.txt new file mode 100644 index 0000000000..4e4b3a1ee0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreDisabledForDataAttributesInDocument.stree.txt @@ -0,0 +1,48 @@ +RazorDocument - [0..32)::32 - [@{}] + MarkupBlock - [0..32)::32 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..32)::32 + CSharpStatement - [0..32)::32 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..32)::31 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..31)::29 + MarkupBlock - [2..31)::29 + MarkupElement - [2..31)::29 + MarkupStartTag - [2..24)::22 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [7..23)::16 - [ data-foo='@foo'] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..16)::8 - [data-foo] - Gen - SpanEditHandler;Accepts:Any + Text;[data-foo]; + Equals;[=]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [18..22)::4 + CSharpCodeBlock - [18..22)::4 + CSharpImplicitExpression - [18..22)::4 + CSharpTransition - [18..19)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [19..22)::3 + CSharpCodeBlock - [19..22)::3 + CSharpExpressionLiteral - [19..22)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupTextLiteral - [22..23)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupEndTag - [24..31)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[span]; + CloseAngle;[>]; + CSharpStatementLiteral - [31..31)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [31..32)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreEnabledForDataAttributesWithExperimentalFlag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreEnabledForDataAttributesWithExperimentalFlag.cspans.txt new file mode 100644 index 0000000000..afd40eccab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreEnabledForDataAttributesWithExperimentalFlag.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Markup span at (2:0,2 [5] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [22] ) +Markup span at (7:0,7 [11] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [16] ) +Transition span at (18:0,18 [1] ) (Accepts:None) - Parent: Expression block at (18:0,18 [4] ) +Code span at (19:0,19 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (18:0,18 [4] ) +Markup span at (22:0,22 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [16] ) +Markup span at (23:0,23 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [22] ) +Markup span at (24:0,24 [7] ) (Accepts:None) - Parent: Tag block at (24:0,24 [7] ) +Code span at (31:0,31 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (31:0,31 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Markup span at (32:0,32 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreEnabledForDataAttributesWithExperimentalFlag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreEnabledForDataAttributesWithExperimentalFlag.stree.txt new file mode 100644 index 0000000000..91ef6c8bd3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesAreEnabledForDataAttributesWithExperimentalFlag.stree.txt @@ -0,0 +1,50 @@ +RazorDocument - [0..32)::32 - [@{}] + MarkupBlock - [0..32)::32 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..32)::32 + CSharpStatement - [0..32)::32 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..32)::31 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..31)::29 + MarkupBlock - [2..31)::29 + MarkupElement - [2..31)::29 + MarkupStartTag - [2..24)::22 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [7..23)::16 - [ data-foo='@foo'] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..16)::8 - [data-foo] - Gen - SpanEditHandler;Accepts:Any + Text;[data-foo]; + Equals;[=]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [18..22)::4 + MarkupDynamicAttributeValue - [18..22)::4 - [@foo] + GenericBlock - [18..22)::4 + CSharpCodeBlock - [18..22)::4 + CSharpImplicitExpression - [18..22)::4 + CSharpTransition - [18..19)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [19..22)::3 + CSharpCodeBlock - [19..22)::3 + CSharpExpressionLiteral - [19..22)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupTextLiteral - [22..23)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupEndTag - [24..31)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[span]; + CloseAngle;[>]; + CSharpStatementLiteral - [31..31)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [31..32)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInBlock.cspans.txt new file mode 100644 index 0000000000..d4c9ee0a56 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInBlock.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [36] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [36] ) +Markup span at (2:0,2 [5] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [26] ) +Markup span at (7:0,7 [15] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [20] ) +Transition span at (22:0,22 [1] ) (Accepts:None) - Parent: Expression block at (22:0,22 [4] ) +Code span at (23:0,23 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (22:0,22 [4] ) +Markup span at (26:0,26 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [20] ) +Markup span at (27:0,27 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [26] ) +Markup span at (28:0,28 [7] ) (Accepts:None) - Parent: Tag block at (28:0,28 [7] ) +Code span at (35:0,35 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [36] ) +MetaCode span at (35:0,35 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [36] ) +Markup span at (36:0,36 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInBlock.stree.txt new file mode 100644 index 0000000000..f4602b1fde --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInBlock.stree.txt @@ -0,0 +1,51 @@ +RazorDocument - [0..36)::36 - [@{}] + MarkupBlock - [0..36)::36 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..36)::36 + CSharpStatement - [0..36)::36 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..36)::35 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..35)::33 + MarkupBlock - [2..35)::33 + MarkupElement - [2..35)::33 + MarkupStartTag - [2..28)::26 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [7..27)::20 - [ data-foo = '@foo'] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..16)::8 - [data-foo] - Gen - SpanEditHandler;Accepts:Any + Text;[data-foo]; + MarkupTextLiteral - [16..18)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Equals;[=]; + MarkupTextLiteral - [19..22)::3 - [ '] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + SingleQuote;[']; + GenericBlock - [22..26)::4 + CSharpCodeBlock - [22..26)::4 + CSharpImplicitExpression - [22..26)::4 + CSharpTransition - [22..23)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [23..26)::3 + CSharpCodeBlock - [23..26)::3 + CSharpExpressionLiteral - [23..26)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupTextLiteral - [26..27)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupEndTag - [28..35)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[span]; + CloseAngle;[>]; + CSharpStatementLiteral - [35..35)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [35..36)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [36..36)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInDocument.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInDocument.cspans.txt new file mode 100644 index 0000000000..b00cc5d9fa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInDocument.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +Markup span at (2:0,2 [5] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [21] ) +Markup span at (7:0,7 [10] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [14] ) +Transition span at (17:0,17 [1] ) (Accepts:None) - Parent: Expression block at (17:0,17 [4] ) +Code span at (18:0,18 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (17:0,17 [4] ) +Markup span at (21:0,21 [2] ) (Accepts:None) - Parent: Tag block at (2:0,2 [21] ) +Markup span at (23:0,23 [7] ) (Accepts:None) - Parent: Tag block at (23:0,23 [7] ) +Code span at (30:0,30 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [31] ) +MetaCode span at (30:0,30 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +Markup span at (31:0,31 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInDocument.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInDocument.stree.txt new file mode 100644 index 0000000000..77907906b9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/ConditionalAttributesWithWeirdSpacingAreDisabledForDataAttributesInDocument.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..31)::31 - [@{}] + MarkupBlock - [0..31)::31 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..31)::31 + CSharpStatement - [0..31)::31 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..31)::30 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..30)::28 + MarkupBlock - [2..30)::28 + MarkupElement - [2..30)::28 + MarkupStartTag - [2..23)::21 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[span]; + MarkupAttributeBlock - [7..21)::14 - [ data-foo=@foo] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..16)::8 - [data-foo] - Gen - SpanEditHandler;Accepts:Any + Text;[data-foo]; + Equals;[=]; + GenericBlock - [17..21)::4 + CSharpCodeBlock - [17..21)::4 + CSharpImplicitExpression - [17..21)::4 + CSharpTransition - [17..18)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [18..21)::3 + CSharpCodeBlock - [18..21)::3 + CSharpExpressionLiteral - [18..21)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupMiscAttributeContent - [21..22)::1 + MarkupTextLiteral - [21..22)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[>]; + MarkupEndTag - [23..30)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[span]; + CloseAngle;[>]; + CSharpStatementLiteral - [30..30)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [30..31)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [31..31)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/DoubleQuotedLiteralAttribute.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/DoubleQuotedLiteralAttribute.cspans.txt new file mode 100644 index 0000000000..d2e1dc16d5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/DoubleQuotedLiteralAttribute.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [24] ) +Markup span at (4:0,4 [7] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (11:0,11 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (14:0,14 [4] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (18:0,18 [4] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (22:0,22 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (23:0,23 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [24] ) +Code span at (26:0,26 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (26:0,26 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Markup span at (27:0,27 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/DoubleQuotedLiteralAttribute.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/DoubleQuotedLiteralAttribute.stree.txt new file mode 100644 index 0000000000..eaab6eb162 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/DoubleQuotedLiteralAttribute.stree.txt @@ -0,0 +1,52 @@ +RazorDocument - [0..27)::27 - [@{}] + MarkupBlock - [0..27)::27 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..27)::27 + CSharpStatement - [0..27)::27 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..27)::26 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..26)::24 + MarkupBlock - [2..26)::24 + MarkupElement - [2..26)::24 + MarkupStartTag - [2..26)::24 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..23)::19 - [ href="Foo Bar Baz"] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..9)::4 - [href] - Gen - SpanEditHandler;Accepts:Any + Text;[href]; + Equals;[=]; + MarkupTextLiteral - [10..11)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [11..22)::11 + MarkupLiteralAttributeValue - [11..14)::3 - [Foo] + MarkupTextLiteral - [11..14)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupLiteralAttributeValue - [14..18)::4 - [ Bar] + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [15..18)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupLiteralAttributeValue - [18..22)::4 - [ Baz] + MarkupTextLiteral - [18..19)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [19..22)::3 - [Baz] - Gen - SpanEditHandler;Accepts:Any + Text;[Baz]; + MarkupTextLiteral - [22..23)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [23..24)::1 + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [26..26)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [26..27)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [27..27)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/DynamicAttributeWithWhitespaceSurroundingEquals.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/DynamicAttributeWithWhitespaceSurroundingEquals.cspans.txt new file mode 100644 index 0000000000..2b04b0aff1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/DynamicAttributeWithWhitespaceSurroundingEquals.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [23] ) +Markup span at (4:0,4 [13] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [18] ) +Transition span at (17:2,1 [1] ) (Accepts:None) - Parent: Expression block at (17:2,1 [4] ) +Code span at (18:2,2 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (17:2,1 [4] ) +Markup span at (21:2,5 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [18] ) +Markup span at (22:2,6 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [23] ) +Code span at (25:2,9 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) +MetaCode span at (25:2,9 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Markup span at (26:2,10 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/DynamicAttributeWithWhitespaceSurroundingEquals.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/DynamicAttributeWithWhitespaceSurroundingEquals.stree.txt new file mode 100644 index 0000000000..da6e6fd85b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/DynamicAttributeWithWhitespaceSurroundingEquals.stree.txt @@ -0,0 +1,54 @@ +RazorDocument - [0..26)::26 - [@{}] + MarkupBlock - [0..26)::26 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..26)::26 + CSharpStatement - [0..26)::26 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..26)::25 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..25)::23 + MarkupBlock - [2..25)::23 + MarkupElement - [2..25)::23 + MarkupStartTag - [2..25)::23 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..22)::18 - [ href LF= LF'@Foo'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..9)::4 - [href] - Gen - SpanEditHandler;Accepts:Any + Text;[href]; + MarkupTextLiteral - [9..12)::3 - [ LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + Equals;[=]; + MarkupTextLiteral - [13..17)::4 - [ LF'] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + SingleQuote;[']; + GenericBlock - [17..21)::4 + MarkupDynamicAttributeValue - [17..21)::4 - [@Foo] + GenericBlock - [17..21)::4 + CSharpCodeBlock - [17..21)::4 + CSharpImplicitExpression - [17..21)::4 + CSharpTransition - [17..18)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [18..21)::3 + CSharpCodeBlock - [18..21)::3 + CSharpExpressionLiteral - [18..21)::3 - [Foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[Foo]; + MarkupTextLiteral - [21..22)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [22..23)::1 + MarkupTextLiteral - [22..23)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [25..25)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [25..26)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [26..26)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/MultiPartLiteralAttribute.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/MultiPartLiteralAttribute.cspans.txt new file mode 100644 index 0000000000..d2e1dc16d5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/MultiPartLiteralAttribute.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [24] ) +Markup span at (4:0,4 [7] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (11:0,11 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (14:0,14 [4] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (18:0,18 [4] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (22:0,22 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (23:0,23 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [24] ) +Code span at (26:0,26 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (26:0,26 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Markup span at (27:0,27 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/MultiPartLiteralAttribute.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/MultiPartLiteralAttribute.stree.txt new file mode 100644 index 0000000000..32849f4eed --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/MultiPartLiteralAttribute.stree.txt @@ -0,0 +1,52 @@ +RazorDocument - [0..27)::27 - [@{}] + MarkupBlock - [0..27)::27 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..27)::27 + CSharpStatement - [0..27)::27 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..27)::26 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..26)::24 + MarkupBlock - [2..26)::24 + MarkupElement - [2..26)::24 + MarkupStartTag - [2..26)::24 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..23)::19 - [ href='Foo Bar Baz'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..9)::4 - [href] - Gen - SpanEditHandler;Accepts:Any + Text;[href]; + Equals;[=]; + MarkupTextLiteral - [10..11)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [11..22)::11 + MarkupLiteralAttributeValue - [11..14)::3 - [Foo] + MarkupTextLiteral - [11..14)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupLiteralAttributeValue - [14..18)::4 - [ Bar] + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [15..18)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupLiteralAttributeValue - [18..22)::4 - [ Baz] + MarkupTextLiteral - [18..19)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [19..22)::3 - [Baz] - Gen - SpanEditHandler;Accepts:Any + Text;[Baz]; + MarkupTextLiteral - [22..23)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [23..24)::1 + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [26..26)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [26..27)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [27..27)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/MultiValueExpressionAttribute.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/MultiValueExpressionAttribute.cspans.txt new file mode 100644 index 0000000000..a859fd716e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/MultiValueExpressionAttribute.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [26] ) +Markup span at (4:0,4 [7] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [21] ) +Transition span at (11:0,11 [1] ) (Accepts:None) - Parent: Expression block at (11:0,11 [4] ) +Code span at (12:0,12 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (11:0,11 [4] ) +Markup span at (15:0,15 [4] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [21] ) +Markup span at (19:0,19 [1] ) (Accepts:Any) - Parent: Markup block at (19:0,19 [5] ) +Transition span at (20:0,20 [1] ) (Accepts:None) - Parent: Expression block at (20:0,20 [4] ) +Code span at (21:0,21 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (20:0,20 [4] ) +Markup span at (24:0,24 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [21] ) +Markup span at (25:0,25 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [26] ) +Code span at (28:0,28 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [29] ) +MetaCode span at (28:0,28 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +Markup span at (29:0,29 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/MultiValueExpressionAttribute.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/MultiValueExpressionAttribute.stree.txt new file mode 100644 index 0000000000..810f3a08c7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/MultiValueExpressionAttribute.stree.txt @@ -0,0 +1,66 @@ +RazorDocument - [0..29)::29 - [@{}] + MarkupBlock - [0..29)::29 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..29)::29 + CSharpStatement - [0..29)::29 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..29)::28 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..28)::26 + MarkupBlock - [2..28)::26 + MarkupElement - [2..28)::26 + MarkupStartTag - [2..28)::26 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..25)::21 - [ href='@foo bar @baz'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..9)::4 - [href] - Gen - SpanEditHandler;Accepts:Any + Text;[href]; + Equals;[=]; + MarkupTextLiteral - [10..11)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [11..24)::13 + MarkupDynamicAttributeValue - [11..15)::4 - [@foo] + GenericBlock - [11..15)::4 + CSharpCodeBlock - [11..15)::4 + CSharpImplicitExpression - [11..15)::4 + CSharpTransition - [11..12)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [12..15)::3 + CSharpCodeBlock - [12..15)::3 + CSharpExpressionLiteral - [12..15)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupLiteralAttributeValue - [15..19)::4 - [ bar] + MarkupTextLiteral - [15..16)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [16..19)::3 - [bar] - Gen - SpanEditHandler;Accepts:Any + Text;[bar]; + MarkupDynamicAttributeValue - [19..24)::5 - [ @baz] + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + GenericBlock - [20..24)::4 + CSharpCodeBlock - [20..24)::4 + CSharpImplicitExpression - [20..24)::4 + CSharpTransition - [20..21)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [21..24)::3 + CSharpCodeBlock - [21..24)::3 + CSharpExpressionLiteral - [21..24)::3 - [baz] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[baz]; + MarkupTextLiteral - [24..25)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [25..26)::1 + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [28..28)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [28..29)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [29..29)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/NewLineBetweenAttributes.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/NewLineBetweenAttributes.cspans.txt new file mode 100644 index 0000000000..4ec6f65e2f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/NewLineBetweenAttributes.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [29] ) +Markup span at (4:0,4 [8] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [12] ) +Markup span at (12:1,6 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [12] ) +Markup span at (15:1,9 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [12] ) +Markup span at (16:1,10 [8] ) (Accepts:Any) - Parent: Markup block at (16:1,10 [12] ) +Markup span at (24:2,6 [3] ) (Accepts:Any) - Parent: Markup block at (16:1,10 [12] ) +Markup span at (27:2,9 [1] ) (Accepts:Any) - Parent: Markup block at (16:1,10 [12] ) +Markup span at (28:2,10 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [29] ) +Code span at (31:2,13 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (31:2,13 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Markup span at (32:2,14 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/NewLineBetweenAttributes.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/NewLineBetweenAttributes.stree.txt new file mode 100644 index 0000000000..91de5c77b1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/NewLineBetweenAttributes.stree.txt @@ -0,0 +1,56 @@ +RazorDocument - [0..32)::32 - [@{}] + MarkupBlock - [0..32)::32 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..32)::32 + CSharpStatement - [0..32)::32 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..32)::31 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..31)::29 + MarkupBlock - [2..31)::29 + MarkupElement - [2..31)::29 + MarkupStartTag - [2..31)::29 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..16)::12 - [LFhref='Foo'] + MarkupTextLiteral - [4..6)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupTextLiteral - [6..10)::4 - [href] - Gen - SpanEditHandler;Accepts:Any + Text;[href]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [12..15)::3 + MarkupLiteralAttributeValue - [12..15)::3 - [Foo] + MarkupTextLiteral - [12..15)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [15..16)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [16..28)::12 - [LFabcd='Bar'] + MarkupTextLiteral - [16..18)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupTextLiteral - [18..22)::4 - [abcd] - Gen - SpanEditHandler;Accepts:Any + Text;[abcd]; + Equals;[=]; + MarkupTextLiteral - [23..24)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [24..27)::3 + MarkupLiteralAttributeValue - [24..27)::3 - [Bar] + MarkupTextLiteral - [24..27)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupTextLiteral - [27..28)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [28..29)::1 + MarkupTextLiteral - [28..29)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [31..31)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [31..32)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/NewLinePrecedingAttribute.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/NewLinePrecedingAttribute.cspans.txt new file mode 100644 index 0000000000..abb2545da4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/NewLinePrecedingAttribute.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [17] ) +Markup span at (4:0,4 [8] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [12] ) +Markup span at (12:1,6 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [12] ) +Markup span at (15:1,9 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [12] ) +Markup span at (16:1,10 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [17] ) +Code span at (19:1,13 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [20] ) +MetaCode span at (19:1,13 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +Markup span at (20:1,14 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/NewLinePrecedingAttribute.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/NewLinePrecedingAttribute.stree.txt new file mode 100644 index 0000000000..219a8eaa05 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/NewLinePrecedingAttribute.stree.txt @@ -0,0 +1,42 @@ +RazorDocument - [0..20)::20 - [@{}] + MarkupBlock - [0..20)::20 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..20)::20 + CSharpStatement - [0..20)::20 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..20)::19 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..19)::17 + MarkupBlock - [2..19)::17 + MarkupElement - [2..19)::17 + MarkupStartTag - [2..19)::17 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..16)::12 - [LFhref='Foo'] + MarkupTextLiteral - [4..6)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupTextLiteral - [6..10)::4 - [href] - Gen - SpanEditHandler;Accepts:Any + Text;[href]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [12..15)::3 + MarkupLiteralAttributeValue - [12..15)::3 - [Foo] + MarkupTextLiteral - [12..15)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [15..16)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [16..17)::1 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [19..19)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [19..20)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [20..20)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleExpressionAttribute.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleExpressionAttribute.cspans.txt new file mode 100644 index 0000000000..d427da460b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleExpressionAttribute.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [17] ) +Markup span at (4:0,4 [7] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [12] ) +Transition span at (11:0,11 [1] ) (Accepts:None) - Parent: Expression block at (11:0,11 [4] ) +Code span at (12:0,12 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (11:0,11 [4] ) +Markup span at (15:0,15 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [12] ) +Markup span at (16:0,16 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [17] ) +Code span at (19:0,19 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [20] ) +MetaCode span at (19:0,19 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +Markup span at (20:0,20 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleExpressionAttribute.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleExpressionAttribute.stree.txt new file mode 100644 index 0000000000..87ce1cb744 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleExpressionAttribute.stree.txt @@ -0,0 +1,49 @@ +RazorDocument - [0..20)::20 - [@{}] + MarkupBlock - [0..20)::20 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..20)::20 + CSharpStatement - [0..20)::20 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..20)::19 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..19)::17 + MarkupBlock - [2..19)::17 + MarkupElement - [2..19)::17 + MarkupStartTag - [2..19)::17 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..16)::12 - [ href='@foo'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..9)::4 - [href] - Gen - SpanEditHandler;Accepts:Any + Text;[href]; + Equals;[=]; + MarkupTextLiteral - [10..11)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [11..15)::4 + MarkupDynamicAttributeValue - [11..15)::4 - [@foo] + GenericBlock - [11..15)::4 + CSharpCodeBlock - [11..15)::4 + CSharpImplicitExpression - [11..15)::4 + CSharpTransition - [11..12)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [12..15)::3 + CSharpCodeBlock - [12..15)::3 + CSharpExpressionLiteral - [12..15)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupTextLiteral - [15..16)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [16..17)::1 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [19..19)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [19..20)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [20..20)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleLiteralAttribute.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleLiteralAttribute.cspans.txt new file mode 100644 index 0000000000..ef0c16944f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleLiteralAttribute.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [16] ) +Markup span at (4:0,4 [7] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [11] ) +Markup span at (11:0,11 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [11] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [11] ) +Markup span at (15:0,15 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [16] ) +Code span at (18:0,18 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [19] ) +MetaCode span at (18:0,18 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +Markup span at (19:0,19 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleLiteralAttribute.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleLiteralAttribute.stree.txt new file mode 100644 index 0000000000..243a97aba5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleLiteralAttribute.stree.txt @@ -0,0 +1,42 @@ +RazorDocument - [0..19)::19 - [@{}] + MarkupBlock - [0..19)::19 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..19)::19 + CSharpStatement - [0..19)::19 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..19)::18 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..18)::16 + MarkupBlock - [2..18)::16 + MarkupElement - [2..18)::16 + MarkupStartTag - [2..18)::16 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..15)::11 - [ href='Foo'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..9)::4 - [href] - Gen - SpanEditHandler;Accepts:Any + Text;[href]; + Equals;[=]; + MarkupTextLiteral - [10..11)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [11..14)::3 + MarkupLiteralAttributeValue - [11..14)::3 - [Foo] + MarkupTextLiteral - [11..14)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [14..15)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [15..16)::1 + MarkupTextLiteral - [15..16)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [18..18)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [18..19)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [19..19)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleLiteralAttributeWithWhitespaceSurroundingEquals.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleLiteralAttributeWithWhitespaceSurroundingEquals.cspans.txt new file mode 100644 index 0000000000..1cbe6752de --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleLiteralAttributeWithWhitespaceSurroundingEquals.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [24] ) +Markup span at (4:0,4 [15] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (19:2,1 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (22:2,4 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (23:2,5 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [24] ) +Code span at (26:2,8 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (26:2,8 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Markup span at (27:2,9 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleLiteralAttributeWithWhitespaceSurroundingEquals.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleLiteralAttributeWithWhitespaceSurroundingEquals.stree.txt new file mode 100644 index 0000000000..4633a61d10 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SimpleLiteralAttributeWithWhitespaceSurroundingEquals.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..27)::27 - [@{}] + MarkupBlock - [0..27)::27 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..27)::27 + CSharpStatement - [0..27)::27 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..27)::26 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..26)::24 + MarkupBlock - [2..26)::24 + MarkupElement - [2..26)::24 + MarkupStartTag - [2..26)::24 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..23)::19 - [ href LF= LF'Foo'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..9)::4 - [href] - Gen - SpanEditHandler;Accepts:Any + Text;[href]; + MarkupTextLiteral - [9..13)::4 - [ LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + Equals;[=]; + MarkupTextLiteral - [14..19)::5 - [ LF'] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + SingleQuote;[']; + GenericBlock - [19..22)::3 + MarkupLiteralAttributeValue - [19..22)::3 - [Foo] + MarkupTextLiteral - [19..22)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [22..23)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [23..24)::1 + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [26..26)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [26..27)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [27..27)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes1.cspans.txt new file mode 100644 index 0000000000..10b7d1d16f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes1.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [18] ) +Markup span at (4:0,4 [9] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [13] ) +Markup span at (13:0,13 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [13] ) +Markup span at (16:0,16 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [13] ) +Markup span at (17:0,17 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [18] ) +Code span at (20:0,20 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [21] ) +MetaCode span at (20:0,20 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Markup span at (21:0,21 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes1.stree.txt new file mode 100644 index 0000000000..6a0b8855a0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes1.stree.txt @@ -0,0 +1,44 @@ +RazorDocument - [0..21)::21 - [@{}] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..21)::21 + CSharpStatement - [0..21)::21 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..21)::20 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..20)::18 + MarkupBlock - [2..20)::18 + MarkupElement - [2..20)::18 + MarkupStartTag - [2..20)::18 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..17)::13 - [ [item]='Foo'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..11)::6 - [[item]] - Gen - SpanEditHandler;Accepts:Any + LeftBracket;[[]; + Text;[item]; + RightBracket;[]]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [13..16)::3 + MarkupLiteralAttributeValue - [13..16)::3 - [Foo] + MarkupTextLiteral - [13..16)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [16..17)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [17..18)::1 + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [20..20)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [20..21)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes2.cspans.txt new file mode 100644 index 0000000000..e1faf07262 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes2.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [19] ) +Markup span at (4:0,4 [10] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [14] ) +Markup span at (14:0,14 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [14] ) +Markup span at (17:0,17 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [14] ) +Markup span at (18:0,18 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [19] ) +Code span at (21:0,21 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [22] ) +MetaCode span at (21:0,21 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +Markup span at (22:0,22 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes2.stree.txt new file mode 100644 index 0000000000..55515d7460 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes2.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..22)::22 - [@{}] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..22)::22 + CSharpStatement - [0..22)::22 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..22)::21 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..21)::19 + MarkupBlock - [2..21)::19 + MarkupElement - [2..21)::19 + MarkupStartTag - [2..21)::19 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..18)::14 - [ [(item,='Foo'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..12)::7 - [[(item,] - Gen - SpanEditHandler;Accepts:Any + LeftBracket;[[]; + Text;[(item,]; + Equals;[=]; + MarkupTextLiteral - [13..14)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [14..17)::3 + MarkupLiteralAttributeValue - [14..17)::3 - [Foo] + MarkupTextLiteral - [14..17)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [18..19)::1 + MarkupTextLiteral - [18..19)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes3.cspans.txt new file mode 100644 index 0000000000..e1faf07262 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes3.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [19] ) +Markup span at (4:0,4 [10] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [14] ) +Markup span at (14:0,14 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [14] ) +Markup span at (17:0,17 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [14] ) +Markup span at (18:0,18 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [19] ) +Code span at (21:0,21 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [22] ) +MetaCode span at (21:0,21 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +Markup span at (22:0,22 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes3.stree.txt new file mode 100644 index 0000000000..7e9f79e40f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes3.stree.txt @@ -0,0 +1,42 @@ +RazorDocument - [0..22)::22 - [@{}] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..22)::22 + CSharpStatement - [0..22)::22 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..22)::21 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..21)::19 + MarkupBlock - [2..21)::19 + MarkupElement - [2..21)::19 + MarkupStartTag - [2..21)::19 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..18)::14 - [ (click)='Foo'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..12)::7 - [(click)] - Gen - SpanEditHandler;Accepts:Any + Text;[(click)]; + Equals;[=]; + MarkupTextLiteral - [13..14)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [14..17)::3 + MarkupLiteralAttributeValue - [14..17)::3 - [Foo] + MarkupTextLiteral - [14..17)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [18..19)::1 + MarkupTextLiteral - [18..19)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes4.cspans.txt new file mode 100644 index 0000000000..13c38bf943 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes4.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [20] ) +Markup span at (4:0,4 [11] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [15] ) +Markup span at (15:0,15 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [15] ) +Markup span at (18:0,18 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [15] ) +Markup span at (19:0,19 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [20] ) +Code span at (22:0,22 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [23] ) +MetaCode span at (22:0,22 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (23:0,23 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes4.stree.txt new file mode 100644 index 0000000000..cc0ee42338 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes4.stree.txt @@ -0,0 +1,42 @@ +RazorDocument - [0..23)::23 - [@{}] + MarkupBlock - [0..23)::23 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..23)::23 + CSharpStatement - [0..23)::23 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..23)::22 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..22)::20 + MarkupBlock - [2..22)::20 + MarkupElement - [2..22)::20 + MarkupStartTag - [2..22)::20 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..19)::15 - [ (^click)='Foo'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..13)::8 - [(^click)] - Gen - SpanEditHandler;Accepts:Any + Text;[(^click)]; + Equals;[=]; + MarkupTextLiteral - [14..15)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [15..18)::3 + MarkupLiteralAttributeValue - [15..18)::3 - [Foo] + MarkupTextLiteral - [15..18)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [18..19)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [19..20)::1 + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [22..23)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [23..23)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes5.cspans.txt new file mode 100644 index 0000000000..680860b7d8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes5.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [22] ) +Markup span at (4:0,4 [13] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [17] ) +Markup span at (17:0,17 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [17] ) +Markup span at (20:0,20 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [17] ) +Markup span at (21:0,21 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [22] ) +Code span at (24:0,24 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [25] ) +MetaCode span at (24:0,24 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +Markup span at (25:0,25 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes5.stree.txt new file mode 100644 index 0000000000..2bceb1e701 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes5.stree.txt @@ -0,0 +1,42 @@ +RazorDocument - [0..25)::25 - [@{}] + MarkupBlock - [0..25)::25 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..25)::25 + CSharpStatement - [0..25)::25 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..25)::24 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..24)::22 + MarkupBlock - [2..24)::22 + MarkupElement - [2..24)::22 + MarkupStartTag - [2..24)::22 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..21)::17 - [ *something='Foo'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..15)::10 - [*something] - Gen - SpanEditHandler;Accepts:Any + Text;[*something]; + Equals;[=]; + MarkupTextLiteral - [16..17)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [17..20)::3 + MarkupLiteralAttributeValue - [17..20)::3 - [Foo] + MarkupTextLiteral - [17..20)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [20..21)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [21..22)::1 + MarkupTextLiteral - [21..22)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [24..24)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [24..25)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [25..25)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes6.cspans.txt new file mode 100644 index 0000000000..10b7d1d16f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes6.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [18] ) +Markup span at (4:0,4 [9] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [13] ) +Markup span at (13:0,13 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [13] ) +Markup span at (16:0,16 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [13] ) +Markup span at (17:0,17 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [18] ) +Code span at (20:0,20 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [21] ) +MetaCode span at (20:0,20 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Markup span at (21:0,21 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes6.stree.txt new file mode 100644 index 0000000000..42409d68bb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes6.stree.txt @@ -0,0 +1,42 @@ +RazorDocument - [0..21)::21 - [@{}] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..21)::21 + CSharpStatement - [0..21)::21 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..21)::20 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..20)::18 + MarkupBlock - [2..20)::18 + MarkupElement - [2..20)::18 + MarkupStartTag - [2..20)::18 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..17)::13 - [ #local='Foo'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..11)::6 - [#local] - Gen - SpanEditHandler;Accepts:Any + Text;[#local]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [13..16)::3 + MarkupLiteralAttributeValue - [13..16)::3 - [Foo] + MarkupTextLiteral - [13..16)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [16..17)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [17..18)::1 + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [20..20)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [20..21)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace1.cspans.txt new file mode 100644 index 0000000000..a20afccd16 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace1.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [38] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [38] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [38] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [35] ) +Markup span at (4:0,4 [11] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [15] ) +Markup span at (15:1,2 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [15] ) +Markup span at (18:1,5 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [15] ) +Markup span at (19:1,6 [11] ) (Accepts:Any) - Parent: Markup block at (19:1,6 [15] ) +Markup span at (30:2,1 [3] ) (Accepts:Any) - Parent: Markup block at (19:1,6 [15] ) +Markup span at (33:2,4 [1] ) (Accepts:Any) - Parent: Markup block at (19:1,6 [15] ) +Markup span at (34:2,5 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [35] ) +Code span at (37:2,8 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [38] ) +MetaCode span at (37:2,8 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [38] ) +Markup span at (38:2,9 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [38] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace1.stree.txt new file mode 100644 index 0000000000..948765f401 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace1.stree.txt @@ -0,0 +1,63 @@ +RazorDocument - [0..38)::38 - [@{}] + MarkupBlock - [0..38)::38 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..38)::38 + CSharpStatement - [0..38)::38 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..38)::37 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..37)::35 + MarkupBlock - [2..37)::35 + MarkupElement - [2..37)::35 + MarkupStartTag - [2..37)::35 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..19)::15 - [ [item]LF='Foo'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..11)::6 - [[item]] - Gen - SpanEditHandler;Accepts:Any + LeftBracket;[[]; + Text;[item]; + RightBracket;[]]; + MarkupTextLiteral - [11..13)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Equals;[=]; + MarkupTextLiteral - [14..15)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [15..18)::3 + MarkupLiteralAttributeValue - [15..18)::3 - [Foo] + MarkupTextLiteral - [15..18)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [18..19)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [19..34)::15 - [ [item]=LF'Bar'] + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [20..26)::6 - [[item]] - Gen - SpanEditHandler;Accepts:Any + LeftBracket;[[]; + Text;[item]; + RightBracket;[]]; + Equals;[=]; + MarkupTextLiteral - [27..30)::3 - [LF'] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + SingleQuote;[']; + GenericBlock - [30..33)::3 + MarkupLiteralAttributeValue - [30..33)::3 - [Bar] + MarkupTextLiteral - [30..33)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupTextLiteral - [33..34)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [34..35)::1 + MarkupTextLiteral - [34..35)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [37..37)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [37..38)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [38..38)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace2.cspans.txt new file mode 100644 index 0000000000..83bb3afe4d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace2.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [40] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [40] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [40] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [37] ) +Markup span at (4:0,4 [12] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [16] ) +Markup span at (16:1,2 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [16] ) +Markup span at (19:1,5 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [16] ) +Markup span at (20:1,6 [12] ) (Accepts:Any) - Parent: Markup block at (20:1,6 [16] ) +Markup span at (32:2,1 [3] ) (Accepts:Any) - Parent: Markup block at (20:1,6 [16] ) +Markup span at (35:2,4 [1] ) (Accepts:Any) - Parent: Markup block at (20:1,6 [16] ) +Markup span at (36:2,5 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [37] ) +Code span at (39:2,8 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [40] ) +MetaCode span at (39:2,8 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [40] ) +Markup span at (40:2,9 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [40] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace2.stree.txt new file mode 100644 index 0000000000..f4752e38b0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace2.stree.txt @@ -0,0 +1,61 @@ +RazorDocument - [0..40)::40 - [@{}] + MarkupBlock - [0..40)::40 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..40)::40 + CSharpStatement - [0..40)::40 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..40)::39 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..39)::37 + MarkupBlock - [2..39)::37 + MarkupElement - [2..39)::37 + MarkupStartTag - [2..39)::37 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..20)::16 - [ [(item,LF='Foo'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..12)::7 - [[(item,] - Gen - SpanEditHandler;Accepts:Any + LeftBracket;[[]; + Text;[(item,]; + MarkupTextLiteral - [12..14)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [16..19)::3 + MarkupLiteralAttributeValue - [16..19)::3 - [Foo] + MarkupTextLiteral - [16..19)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [19..20)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [20..36)::16 - [ [(item,=LF'Bar'] + MarkupTextLiteral - [20..21)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [21..28)::7 - [[(item,] - Gen - SpanEditHandler;Accepts:Any + LeftBracket;[[]; + Text;[(item,]; + Equals;[=]; + MarkupTextLiteral - [29..32)::3 - [LF'] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + SingleQuote;[']; + GenericBlock - [32..35)::3 + MarkupLiteralAttributeValue - [32..35)::3 - [Bar] + MarkupTextLiteral - [32..35)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupTextLiteral - [35..36)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [36..37)::1 + MarkupTextLiteral - [36..37)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [39..39)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [39..40)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [40..40)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace3.cspans.txt new file mode 100644 index 0000000000..83bb3afe4d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace3.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [40] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [40] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [40] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [37] ) +Markup span at (4:0,4 [12] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [16] ) +Markup span at (16:1,2 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [16] ) +Markup span at (19:1,5 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [16] ) +Markup span at (20:1,6 [12] ) (Accepts:Any) - Parent: Markup block at (20:1,6 [16] ) +Markup span at (32:2,1 [3] ) (Accepts:Any) - Parent: Markup block at (20:1,6 [16] ) +Markup span at (35:2,4 [1] ) (Accepts:Any) - Parent: Markup block at (20:1,6 [16] ) +Markup span at (36:2,5 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [37] ) +Code span at (39:2,8 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [40] ) +MetaCode span at (39:2,8 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [40] ) +Markup span at (40:2,9 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [40] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace3.stree.txt new file mode 100644 index 0000000000..adfbf037c6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace3.stree.txt @@ -0,0 +1,59 @@ +RazorDocument - [0..40)::40 - [@{}] + MarkupBlock - [0..40)::40 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..40)::40 + CSharpStatement - [0..40)::40 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..40)::39 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..39)::37 + MarkupBlock - [2..39)::37 + MarkupElement - [2..39)::37 + MarkupStartTag - [2..39)::37 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..20)::16 - [ (click)LF='Foo'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..12)::7 - [(click)] - Gen - SpanEditHandler;Accepts:Any + Text;[(click)]; + MarkupTextLiteral - [12..14)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [16..19)::3 + MarkupLiteralAttributeValue - [16..19)::3 - [Foo] + MarkupTextLiteral - [16..19)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [19..20)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [20..36)::16 - [ (click)=LF'Bar'] + MarkupTextLiteral - [20..21)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [21..28)::7 - [(click)] - Gen - SpanEditHandler;Accepts:Any + Text;[(click)]; + Equals;[=]; + MarkupTextLiteral - [29..32)::3 - [LF'] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + SingleQuote;[']; + GenericBlock - [32..35)::3 + MarkupLiteralAttributeValue - [32..35)::3 - [Bar] + MarkupTextLiteral - [32..35)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupTextLiteral - [35..36)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [36..37)::1 + MarkupTextLiteral - [36..37)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [39..39)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [39..40)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [40..40)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace4.cspans.txt new file mode 100644 index 0000000000..fbac8eaab7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace4.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [39] ) +Markup span at (4:0,4 [13] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [17] ) +Markup span at (17:1,2 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [17] ) +Markup span at (20:1,5 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [17] ) +Markup span at (21:1,6 [13] ) (Accepts:Any) - Parent: Markup block at (21:1,6 [17] ) +Markup span at (34:2,1 [3] ) (Accepts:Any) - Parent: Markup block at (21:1,6 [17] ) +Markup span at (37:2,4 [1] ) (Accepts:Any) - Parent: Markup block at (21:1,6 [17] ) +Markup span at (38:2,5 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [39] ) +Code span at (41:2,8 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [42] ) +MetaCode span at (41:2,8 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +Markup span at (42:2,9 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace4.stree.txt new file mode 100644 index 0000000000..14b11adff4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace4.stree.txt @@ -0,0 +1,59 @@ +RazorDocument - [0..42)::42 - [@{}] + MarkupBlock - [0..42)::42 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..42)::42 + CSharpStatement - [0..42)::42 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..42)::41 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..41)::39 + MarkupBlock - [2..41)::39 + MarkupElement - [2..41)::39 + MarkupStartTag - [2..41)::39 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..21)::17 - [ (^click)LF='Foo'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..13)::8 - [(^click)] - Gen - SpanEditHandler;Accepts:Any + Text;[(^click)]; + MarkupTextLiteral - [13..15)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Equals;[=]; + MarkupTextLiteral - [16..17)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [17..20)::3 + MarkupLiteralAttributeValue - [17..20)::3 - [Foo] + MarkupTextLiteral - [17..20)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [20..21)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [21..38)::17 - [ (^click)=LF'Bar'] + MarkupTextLiteral - [21..22)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [22..30)::8 - [(^click)] - Gen - SpanEditHandler;Accepts:Any + Text;[(^click)]; + Equals;[=]; + MarkupTextLiteral - [31..34)::3 - [LF'] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + SingleQuote;[']; + GenericBlock - [34..37)::3 + MarkupLiteralAttributeValue - [34..37)::3 - [Bar] + MarkupTextLiteral - [34..37)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupTextLiteral - [37..38)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [38..39)::1 + MarkupTextLiteral - [38..39)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [41..41)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [41..42)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [42..42)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace5.cspans.txt new file mode 100644 index 0000000000..38ddcc3004 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace5.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [43] ) +Markup span at (4:0,4 [15] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (19:1,2 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (22:1,5 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (23:1,6 [15] ) (Accepts:Any) - Parent: Markup block at (23:1,6 [19] ) +Markup span at (38:2,1 [3] ) (Accepts:Any) - Parent: Markup block at (23:1,6 [19] ) +Markup span at (41:2,4 [1] ) (Accepts:Any) - Parent: Markup block at (23:1,6 [19] ) +Markup span at (42:2,5 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [43] ) +Code span at (45:2,8 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [46] ) +MetaCode span at (45:2,8 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +Markup span at (46:2,9 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace5.stree.txt new file mode 100644 index 0000000000..400be0767b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace5.stree.txt @@ -0,0 +1,59 @@ +RazorDocument - [0..46)::46 - [@{}] + MarkupBlock - [0..46)::46 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..46)::46 + CSharpStatement - [0..46)::46 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..46)::45 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..45)::43 + MarkupBlock - [2..45)::43 + MarkupElement - [2..45)::43 + MarkupStartTag - [2..45)::43 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..23)::19 - [ *somethingLF='Foo'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..15)::10 - [*something] - Gen - SpanEditHandler;Accepts:Any + Text;[*something]; + MarkupTextLiteral - [15..17)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Equals;[=]; + MarkupTextLiteral - [18..19)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [19..22)::3 + MarkupLiteralAttributeValue - [19..22)::3 - [Foo] + MarkupTextLiteral - [19..22)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [22..23)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [23..42)::19 - [ *something=LF'Bar'] + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [24..34)::10 - [*something] - Gen - SpanEditHandler;Accepts:Any + Text;[*something]; + Equals;[=]; + MarkupTextLiteral - [35..38)::3 - [LF'] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + SingleQuote;[']; + GenericBlock - [38..41)::3 + MarkupLiteralAttributeValue - [38..41)::3 - [Bar] + MarkupTextLiteral - [38..41)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupTextLiteral - [41..42)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [42..43)::1 + MarkupTextLiteral - [42..43)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [45..45)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [45..46)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [46..46)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace6.cspans.txt new file mode 100644 index 0000000000..a20afccd16 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace6.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [38] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [38] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [38] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [35] ) +Markup span at (4:0,4 [11] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [15] ) +Markup span at (15:1,2 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [15] ) +Markup span at (18:1,5 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [15] ) +Markup span at (19:1,6 [11] ) (Accepts:Any) - Parent: Markup block at (19:1,6 [15] ) +Markup span at (30:2,1 [3] ) (Accepts:Any) - Parent: Markup block at (19:1,6 [15] ) +Markup span at (33:2,4 [1] ) (Accepts:Any) - Parent: Markup block at (19:1,6 [15] ) +Markup span at (34:2,5 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [35] ) +Code span at (37:2,8 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [38] ) +MetaCode span at (37:2,8 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [38] ) +Markup span at (38:2,9 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [38] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace6.stree.txt new file mode 100644 index 0000000000..789dfc7621 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_BeforeEqualWhitespace6.stree.txt @@ -0,0 +1,59 @@ +RazorDocument - [0..38)::38 - [@{}] + MarkupBlock - [0..38)::38 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..38)::38 + CSharpStatement - [0..38)::38 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..38)::37 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..37)::35 + MarkupBlock - [2..37)::35 + MarkupElement - [2..37)::35 + MarkupStartTag - [2..37)::35 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..19)::15 - [ #localLF='Foo'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..11)::6 - [#local] - Gen - SpanEditHandler;Accepts:Any + Text;[#local]; + MarkupTextLiteral - [11..13)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Equals;[=]; + MarkupTextLiteral - [14..15)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [15..18)::3 + MarkupLiteralAttributeValue - [15..18)::3 - [Foo] + MarkupTextLiteral - [15..18)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [18..19)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [19..34)::15 - [ #local=LF'Bar'] + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [20..26)::6 - [#local] - Gen - SpanEditHandler;Accepts:Any + Text;[#local]; + Equals;[=]; + MarkupTextLiteral - [27..30)::3 - [LF'] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + SingleQuote;[']; + GenericBlock - [30..33)::3 + MarkupLiteralAttributeValue - [30..33)::3 - [Bar] + MarkupTextLiteral - [30..33)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupTextLiteral - [33..34)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [34..35)::1 + MarkupTextLiteral - [34..35)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [37..37)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [37..38)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [38..38)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace1.cspans.txt new file mode 100644 index 0000000000..58b825a092 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace1.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [40] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [40] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [40] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [37] ) +Markup span at (4:0,4 [13] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [17] ) +Markup span at (17:1,10 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [17] ) +Markup span at (20:1,13 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [17] ) +Markup span at (21:1,14 [11] ) (Accepts:Any) - Parent: Markup block at (21:1,14 [15] ) +Markup span at (32:2,8 [3] ) (Accepts:Any) - Parent: Markup block at (21:1,14 [15] ) +Markup span at (35:2,11 [1] ) (Accepts:Any) - Parent: Markup block at (21:1,14 [15] ) +Markup span at (36:2,12 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [37] ) +Code span at (39:2,15 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [40] ) +MetaCode span at (39:2,15 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [40] ) +Markup span at (40:2,16 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [40] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace1.stree.txt new file mode 100644 index 0000000000..627579c898 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace1.stree.txt @@ -0,0 +1,63 @@ +RazorDocument - [0..40)::40 - [@{}] + MarkupBlock - [0..40)::40 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..40)::40 + CSharpStatement - [0..40)::40 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..40)::39 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..39)::37 + MarkupBlock - [2..39)::37 + MarkupElement - [2..39)::37 + MarkupStartTag - [2..39)::37 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..21)::17 - [ LF [item]='Foo'] + MarkupTextLiteral - [4..9)::5 - [ LF ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + Whitespace;[ ]; + MarkupTextLiteral - [9..15)::6 - [[item]] - Gen - SpanEditHandler;Accepts:Any + LeftBracket;[[]; + Text;[item]; + RightBracket;[]]; + Equals;[=]; + MarkupTextLiteral - [16..17)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [17..20)::3 + MarkupLiteralAttributeValue - [17..20)::3 - [Foo] + MarkupTextLiteral - [17..20)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [20..21)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [21..36)::15 - [ LF[item]='Bar'] + MarkupTextLiteral - [21..24)::3 - [ LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + MarkupTextLiteral - [24..30)::6 - [[item]] - Gen - SpanEditHandler;Accepts:Any + LeftBracket;[[]; + Text;[item]; + RightBracket;[]]; + Equals;[=]; + MarkupTextLiteral - [31..32)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [32..35)::3 + MarkupLiteralAttributeValue - [32..35)::3 - [Bar] + MarkupTextLiteral - [32..35)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupTextLiteral - [35..36)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [36..37)::1 + MarkupTextLiteral - [36..37)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [39..39)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [39..40)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [40..40)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace2.cspans.txt new file mode 100644 index 0000000000..a3d8894755 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace2.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [39] ) +Markup span at (4:0,4 [14] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [18] ) +Markup span at (18:1,11 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [18] ) +Markup span at (21:1,14 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [18] ) +Markup span at (22:1,15 [12] ) (Accepts:Any) - Parent: Markup block at (22:1,15 [16] ) +Markup span at (34:2,9 [3] ) (Accepts:Any) - Parent: Markup block at (22:1,15 [16] ) +Markup span at (37:2,12 [1] ) (Accepts:Any) - Parent: Markup block at (22:1,15 [16] ) +Markup span at (38:2,13 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [39] ) +Code span at (41:2,16 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [42] ) +MetaCode span at (41:2,16 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +Markup span at (42:2,17 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace2.stree.txt new file mode 100644 index 0000000000..49cff6166b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace2.stree.txt @@ -0,0 +1,61 @@ +RazorDocument - [0..42)::42 - [@{}] + MarkupBlock - [0..42)::42 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..42)::42 + CSharpStatement - [0..42)::42 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..42)::41 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..41)::39 + MarkupBlock - [2..41)::39 + MarkupElement - [2..41)::39 + MarkupStartTag - [2..41)::39 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..22)::18 - [ LF [(item,='Foo'] + MarkupTextLiteral - [4..9)::5 - [ LF ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + Whitespace;[ ]; + MarkupTextLiteral - [9..16)::7 - [[(item,] - Gen - SpanEditHandler;Accepts:Any + LeftBracket;[[]; + Text;[(item,]; + Equals;[=]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [18..21)::3 + MarkupLiteralAttributeValue - [18..21)::3 - [Foo] + MarkupTextLiteral - [18..21)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [21..22)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [22..38)::16 - [ LF[(item,='Bar'] + MarkupTextLiteral - [22..25)::3 - [ LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + MarkupTextLiteral - [25..32)::7 - [[(item,] - Gen - SpanEditHandler;Accepts:Any + LeftBracket;[[]; + Text;[(item,]; + Equals;[=]; + MarkupTextLiteral - [33..34)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [34..37)::3 + MarkupLiteralAttributeValue - [34..37)::3 - [Bar] + MarkupTextLiteral - [34..37)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupTextLiteral - [37..38)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [38..39)::1 + MarkupTextLiteral - [38..39)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [41..41)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [41..42)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [42..42)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace3.cspans.txt new file mode 100644 index 0000000000..a3d8894755 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace3.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [39] ) +Markup span at (4:0,4 [14] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [18] ) +Markup span at (18:1,11 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [18] ) +Markup span at (21:1,14 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [18] ) +Markup span at (22:1,15 [12] ) (Accepts:Any) - Parent: Markup block at (22:1,15 [16] ) +Markup span at (34:2,9 [3] ) (Accepts:Any) - Parent: Markup block at (22:1,15 [16] ) +Markup span at (37:2,12 [1] ) (Accepts:Any) - Parent: Markup block at (22:1,15 [16] ) +Markup span at (38:2,13 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [39] ) +Code span at (41:2,16 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [42] ) +MetaCode span at (41:2,16 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +Markup span at (42:2,17 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace3.stree.txt new file mode 100644 index 0000000000..bb34ae31da --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace3.stree.txt @@ -0,0 +1,59 @@ +RazorDocument - [0..42)::42 - [@{}] + MarkupBlock - [0..42)::42 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..42)::42 + CSharpStatement - [0..42)::42 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..42)::41 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..41)::39 + MarkupBlock - [2..41)::39 + MarkupElement - [2..41)::39 + MarkupStartTag - [2..41)::39 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..22)::18 - [ LF (click)='Foo'] + MarkupTextLiteral - [4..9)::5 - [ LF ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + Whitespace;[ ]; + MarkupTextLiteral - [9..16)::7 - [(click)] - Gen - SpanEditHandler;Accepts:Any + Text;[(click)]; + Equals;[=]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [18..21)::3 + MarkupLiteralAttributeValue - [18..21)::3 - [Foo] + MarkupTextLiteral - [18..21)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [21..22)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [22..38)::16 - [ LF(click)='Bar'] + MarkupTextLiteral - [22..25)::3 - [ LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + MarkupTextLiteral - [25..32)::7 - [(click)] - Gen - SpanEditHandler;Accepts:Any + Text;[(click)]; + Equals;[=]; + MarkupTextLiteral - [33..34)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [34..37)::3 + MarkupLiteralAttributeValue - [34..37)::3 - [Bar] + MarkupTextLiteral - [34..37)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupTextLiteral - [37..38)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [38..39)::1 + MarkupTextLiteral - [38..39)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [41..41)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [41..42)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [42..42)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace4.cspans.txt new file mode 100644 index 0000000000..294e7d4526 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace4.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [44] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [44] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [44] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [41] ) +Markup span at (4:0,4 [15] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (19:1,12 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (22:1,15 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [19] ) +Markup span at (23:1,16 [13] ) (Accepts:Any) - Parent: Markup block at (23:1,16 [17] ) +Markup span at (36:2,10 [3] ) (Accepts:Any) - Parent: Markup block at (23:1,16 [17] ) +Markup span at (39:2,13 [1] ) (Accepts:Any) - Parent: Markup block at (23:1,16 [17] ) +Markup span at (40:2,14 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [41] ) +Code span at (43:2,17 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [44] ) +MetaCode span at (43:2,17 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [44] ) +Markup span at (44:2,18 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [44] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace4.stree.txt new file mode 100644 index 0000000000..00eddb322f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace4.stree.txt @@ -0,0 +1,59 @@ +RazorDocument - [0..44)::44 - [@{}] + MarkupBlock - [0..44)::44 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..44)::44 + CSharpStatement - [0..44)::44 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..44)::43 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..43)::41 + MarkupBlock - [2..43)::41 + MarkupElement - [2..43)::41 + MarkupStartTag - [2..43)::41 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..23)::19 - [ LF (^click)='Foo'] + MarkupTextLiteral - [4..9)::5 - [ LF ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + Whitespace;[ ]; + MarkupTextLiteral - [9..17)::8 - [(^click)] - Gen - SpanEditHandler;Accepts:Any + Text;[(^click)]; + Equals;[=]; + MarkupTextLiteral - [18..19)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [19..22)::3 + MarkupLiteralAttributeValue - [19..22)::3 - [Foo] + MarkupTextLiteral - [19..22)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [22..23)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [23..40)::17 - [ LF(^click)='Bar'] + MarkupTextLiteral - [23..26)::3 - [ LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + MarkupTextLiteral - [26..34)::8 - [(^click)] - Gen - SpanEditHandler;Accepts:Any + Text;[(^click)]; + Equals;[=]; + MarkupTextLiteral - [35..36)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [36..39)::3 + MarkupLiteralAttributeValue - [36..39)::3 - [Bar] + MarkupTextLiteral - [36..39)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupTextLiteral - [39..40)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [40..41)::1 + MarkupTextLiteral - [40..41)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [43..43)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [43..44)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [44..44)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace5.cspans.txt new file mode 100644 index 0000000000..3c145a8469 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace5.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [48] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [48] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [48] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [45] ) +Markup span at (4:0,4 [17] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [21] ) +Markup span at (21:1,14 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [21] ) +Markup span at (24:1,17 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [21] ) +Markup span at (25:1,18 [15] ) (Accepts:Any) - Parent: Markup block at (25:1,18 [19] ) +Markup span at (40:2,12 [3] ) (Accepts:Any) - Parent: Markup block at (25:1,18 [19] ) +Markup span at (43:2,15 [1] ) (Accepts:Any) - Parent: Markup block at (25:1,18 [19] ) +Markup span at (44:2,16 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [45] ) +Code span at (47:2,19 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [48] ) +MetaCode span at (47:2,19 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [48] ) +Markup span at (48:2,20 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [48] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace5.stree.txt new file mode 100644 index 0000000000..f832c6c058 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace5.stree.txt @@ -0,0 +1,59 @@ +RazorDocument - [0..48)::48 - [@{}] + MarkupBlock - [0..48)::48 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..48)::48 + CSharpStatement - [0..48)::48 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..48)::47 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..47)::45 + MarkupBlock - [2..47)::45 + MarkupElement - [2..47)::45 + MarkupStartTag - [2..47)::45 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..25)::21 - [ LF *something='Foo'] + MarkupTextLiteral - [4..9)::5 - [ LF ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + Whitespace;[ ]; + MarkupTextLiteral - [9..19)::10 - [*something] - Gen - SpanEditHandler;Accepts:Any + Text;[*something]; + Equals;[=]; + MarkupTextLiteral - [20..21)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [21..24)::3 + MarkupLiteralAttributeValue - [21..24)::3 - [Foo] + MarkupTextLiteral - [21..24)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [24..25)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [25..44)::19 - [ LF*something='Bar'] + MarkupTextLiteral - [25..28)::3 - [ LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + MarkupTextLiteral - [28..38)::10 - [*something] - Gen - SpanEditHandler;Accepts:Any + Text;[*something]; + Equals;[=]; + MarkupTextLiteral - [39..40)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [40..43)::3 + MarkupLiteralAttributeValue - [40..43)::3 - [Bar] + MarkupTextLiteral - [40..43)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupTextLiteral - [43..44)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [44..45)::1 + MarkupTextLiteral - [44..45)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [47..47)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [47..48)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [48..48)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace6.cspans.txt new file mode 100644 index 0000000000..58b825a092 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace6.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [40] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [40] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [40] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [37] ) +Markup span at (4:0,4 [13] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [17] ) +Markup span at (17:1,10 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [17] ) +Markup span at (20:1,13 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [17] ) +Markup span at (21:1,14 [11] ) (Accepts:Any) - Parent: Markup block at (21:1,14 [15] ) +Markup span at (32:2,8 [3] ) (Accepts:Any) - Parent: Markup block at (21:1,14 [15] ) +Markup span at (35:2,11 [1] ) (Accepts:Any) - Parent: Markup block at (21:1,14 [15] ) +Markup span at (36:2,12 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [37] ) +Code span at (39:2,15 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [40] ) +MetaCode span at (39:2,15 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [40] ) +Markup span at (40:2,16 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [40] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace6.stree.txt new file mode 100644 index 0000000000..5b0311ff46 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/SymbolBoundAttributes_Whitespace6.stree.txt @@ -0,0 +1,59 @@ +RazorDocument - [0..40)::40 - [@{}] + MarkupBlock - [0..40)::40 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..40)::40 + CSharpStatement - [0..40)::40 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..40)::39 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..39)::37 + MarkupBlock - [2..39)::37 + MarkupElement - [2..39)::37 + MarkupStartTag - [2..39)::37 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..21)::17 - [ LF #local='Foo'] + MarkupTextLiteral - [4..9)::5 - [ LF ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + Whitespace;[ ]; + MarkupTextLiteral - [9..15)::6 - [#local] - Gen - SpanEditHandler;Accepts:Any + Text;[#local]; + Equals;[=]; + MarkupTextLiteral - [16..17)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [17..20)::3 + MarkupLiteralAttributeValue - [17..20)::3 - [Foo] + MarkupTextLiteral - [17..20)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [20..21)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [21..36)::15 - [ LF#local='Bar'] + MarkupTextLiteral - [21..24)::3 - [ LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + MarkupTextLiteral - [24..30)::6 - [#local] - Gen - SpanEditHandler;Accepts:Any + Text;[#local]; + Equals;[=]; + MarkupTextLiteral - [31..32)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [32..35)::3 + MarkupLiteralAttributeValue - [32..35)::3 - [Bar] + MarkupTextLiteral - [32..35)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupTextLiteral - [35..36)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [36..37)::1 + MarkupTextLiteral - [36..37)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [39..39)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [39..40)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [40..40)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedAttributeWithCodeWithSpacesInBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedAttributeWithCodeWithSpacesInBlock.cspans.txt new file mode 100644 index 0000000000..5869ff5ca4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedAttributeWithCodeWithSpacesInBlock.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (2:0,2 [6] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [20] ) +Markup span at (8:0,8 [7] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [11] ) +Transition span at (15:0,15 [1] ) (Accepts:None) - Parent: Expression block at (15:0,15 [4] ) +Code span at (16:0,16 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (15:0,15 [4] ) +Markup span at (19:0,19 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [20] ) +Code span at (22:0,22 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [23] ) +MetaCode span at (22:0,22 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (23:0,23 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedAttributeWithCodeWithSpacesInBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedAttributeWithCodeWithSpacesInBlock.stree.txt new file mode 100644 index 0000000000..0afdde8d78 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedAttributeWithCodeWithSpacesInBlock.stree.txt @@ -0,0 +1,45 @@ +RazorDocument - [0..23)::23 - [@{}] + MarkupBlock - [0..23)::23 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..23)::23 + CSharpStatement - [0..23)::23 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..23)::22 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..22)::20 + MarkupBlock - [2..22)::20 + MarkupElement - [2..22)::20 + MarkupStartTag - [2..22)::20 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupAttributeBlock - [8..19)::11 - [ value=@foo] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..14)::5 - [value] - Gen - SpanEditHandler;Accepts:Any + Text;[value]; + Equals;[=]; + GenericBlock - [15..19)::4 + MarkupDynamicAttributeValue - [15..19)::4 - [@foo] + GenericBlock - [15..19)::4 + CSharpCodeBlock - [15..19)::4 + CSharpImplicitExpression - [15..19)::4 + CSharpTransition - [15..16)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [16..19)::3 + CSharpCodeBlock - [16..19)::3 + CSharpExpressionLiteral - [16..19)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupMiscAttributeContent - [19..20)::1 + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [22..23)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [23..23)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedAttributeWithCodeWithSpacesInDocument.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedAttributeWithCodeWithSpacesInDocument.cspans.txt new file mode 100644 index 0000000000..764f3bb0e8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedAttributeWithCodeWithSpacesInDocument.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [6] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [20] ) +Markup span at (6:0,6 [7] ) (Accepts:Any) - Parent: Markup block at (6:0,6 [11] ) +Transition span at (13:0,13 [1] ) (Accepts:None) - Parent: Expression block at (13:0,13 [4] ) +Code span at (14:0,14 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (13:0,13 [4] ) +Markup span at (17:0,17 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [20] ) +Markup span at (20:0,20 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedAttributeWithCodeWithSpacesInDocument.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedAttributeWithCodeWithSpacesInDocument.stree.txt new file mode 100644 index 0000000000..cd4499af20 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedAttributeWithCodeWithSpacesInDocument.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..21)::21 - [}] + MarkupBlock - [0..21)::21 + MarkupElement - [0..20)::20 + MarkupStartTag - [0..20)::20 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupAttributeBlock - [6..17)::11 - [ value=@foo] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..12)::5 - [value] - Gen - SpanEditHandler;Accepts:Any + Text;[value]; + Equals;[=]; + GenericBlock - [13..17)::4 + MarkupDynamicAttributeValue - [13..17)::4 - [@foo] + GenericBlock - [13..17)::4 + CSharpCodeBlock - [13..17)::4 + CSharpImplicitExpression - [13..17)::4 + CSharpTransition - [13..14)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [14..17)::3 + CSharpCodeBlock - [14..17)::3 + CSharpExpressionLiteral - [14..17)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupMiscAttributeContent - [17..18)::1 + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTextLiteral - [20..21)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedLiteralAttribute.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedLiteralAttribute.cspans.txt new file mode 100644 index 0000000000..ea9b1b25c8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedLiteralAttribute.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [22] ) +Markup span at (4:0,4 [6] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [9] ) +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [9] ) +Markup span at (13:0,13 [4] ) (Accepts:Any) - Parent: Markup block at (13:0,13 [4] ) +Markup span at (17:0,17 [4] ) (Accepts:Any) - Parent: Markup block at (17:0,17 [4] ) +Markup span at (21:0,21 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [22] ) +Code span at (24:0,24 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [25] ) +MetaCode span at (24:0,24 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +Markup span at (25:0,25 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedLiteralAttribute.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedLiteralAttribute.stree.txt new file mode 100644 index 0000000000..2e77374d79 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/UnquotedLiteralAttribute.stree.txt @@ -0,0 +1,48 @@ +RazorDocument - [0..25)::25 - [@{}] + MarkupBlock - [0..25)::25 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..25)::25 + CSharpStatement - [0..25)::25 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..25)::24 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..24)::22 + MarkupBlock - [2..24)::22 + MarkupElement - [2..24)::22 + MarkupStartTag - [2..24)::22 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..13)::9 - [ href=Foo] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..9)::4 - [href] - Gen - SpanEditHandler;Accepts:Any + Text;[href]; + Equals;[=]; + GenericBlock - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [Foo] + MarkupTextLiteral - [10..13)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupMinimizedAttributeBlock - [13..17)::4 - [ Bar] + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [14..17)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupMinimizedAttributeBlock - [17..21)::4 - [ Baz] + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [18..21)::3 - [Baz] - Gen - SpanEditHandler;Accepts:Any + Text;[Baz]; + MarkupMiscAttributeContent - [21..22)::1 + MarkupTextLiteral - [21..22)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [24..24)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [24..25)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [25..25)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/VirtualPathAttributesWorkWithConditionalAttributes.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/VirtualPathAttributesWorkWithConditionalAttributes.cspans.txt new file mode 100644 index 0000000000..0fa9f90bf0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/VirtualPathAttributesWorkWithConditionalAttributes.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [30] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [30] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [27] ) +Markup span at (4:0,4 [7] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [22] ) +Transition span at (11:0,11 [1] ) (Accepts:None) - Parent: Expression block at (11:0,11 [4] ) +Code span at (12:0,12 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (11:0,11 [4] ) +Markup span at (15:0,15 [10] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [22] ) +Markup span at (25:0,25 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [22] ) +Markup span at (26:0,26 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [27] ) +Code span at (29:0,29 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [30] ) +MetaCode span at (29:0,29 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [30] ) +Markup span at (30:0,30 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/VirtualPathAttributesWorkWithConditionalAttributes.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/VirtualPathAttributesWorkWithConditionalAttributes.stree.txt new file mode 100644 index 0000000000..40509adc08 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/VirtualPathAttributesWorkWithConditionalAttributes.stree.txt @@ -0,0 +1,58 @@ +RazorDocument - [0..30)::30 - [@{}] + MarkupBlock - [0..30)::30 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..30)::30 + CSharpStatement - [0..30)::30 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..30)::29 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..29)::27 + MarkupBlock - [2..29)::27 + MarkupElement - [2..29)::27 + MarkupStartTag - [2..29)::27 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..26)::22 - [ href='@foo ~/Foo/Bar'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..9)::4 - [href] - Gen - SpanEditHandler;Accepts:Any + Text;[href]; + Equals;[=]; + MarkupTextLiteral - [10..11)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [11..25)::14 + MarkupDynamicAttributeValue - [11..15)::4 - [@foo] + GenericBlock - [11..15)::4 + CSharpCodeBlock - [11..15)::4 + CSharpImplicitExpression - [11..15)::4 + CSharpTransition - [11..12)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [12..15)::3 + CSharpCodeBlock - [12..15)::3 + CSharpExpressionLiteral - [12..15)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupLiteralAttributeValue - [15..25)::10 - [ ~/Foo/Bar] + MarkupTextLiteral - [15..16)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [16..25)::9 - [~/Foo/Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[~]; + ForwardSlash;[/]; + Text;[Foo]; + ForwardSlash;[/]; + Text;[Bar]; + MarkupTextLiteral - [25..26)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [26..27)::1 + MarkupTextLiteral - [26..27)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [29..29)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [29..30)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [30..30)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/WhitespaceAndNewLinePrecedingAttribute.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/WhitespaceAndNewLinePrecedingAttribute.cspans.txt new file mode 100644 index 0000000000..0a74de6c35 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/WhitespaceAndNewLinePrecedingAttribute.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [19] ) +Markup span at (4:0,4 [10] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [14] ) +Markup span at (14:1,6 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [14] ) +Markup span at (17:1,9 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [14] ) +Markup span at (18:1,10 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [19] ) +Code span at (21:1,13 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [22] ) +MetaCode span at (21:1,13 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +Markup span at (22:1,14 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/WhitespaceAndNewLinePrecedingAttribute.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/WhitespaceAndNewLinePrecedingAttribute.stree.txt new file mode 100644 index 0000000000..0c757c152f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlAttributeTest/WhitespaceAndNewLinePrecedingAttribute.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..22)::22 - [@{}] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..22)::22 + CSharpStatement - [0..22)::22 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..22)::21 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..21)::19 + MarkupBlock - [2..21)::19 + MarkupElement - [2..21)::19 + MarkupStartTag - [2..21)::19 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..18)::14 - [ LFhref='Foo'] + MarkupTextLiteral - [4..8)::4 - [ LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + MarkupTextLiteral - [8..12)::4 - [href] - Gen - SpanEditHandler;Accepts:Any + Text;[href]; + Equals;[=]; + MarkupTextLiteral - [13..14)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [14..17)::3 + MarkupLiteralAttributeValue - [14..17)::3 - [Foo] + MarkupTextLiteral - [14..17)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [18..19)::1 + MarkupTextLiteral - [18..19)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AcceptsEmptyTextTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AcceptsEmptyTextTag.cspans.txt new file mode 100644 index 0000000000..0bd53ac932 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AcceptsEmptyTextTag.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +Transition span at (2:0,2 [7] ) (Accepts:None) - Parent: Tag block at (2:0,2 [7] ) +Code span at (9:0,9 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [10] ) +MetaCode span at (9:0,9 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +Markup span at (10:0,10 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AcceptsEmptyTextTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AcceptsEmptyTextTag.stree.txt new file mode 100644 index 0000000000..1d3c357c03 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AcceptsEmptyTextTag.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..10)::10 - [@{}] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..10)::10 + CSharpStatement - [0..10)::10 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..10)::9 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..9)::7 + MarkupBlock - [2..9)::7 + MarkupElement - [2..9)::7 + MarkupStartTag - [2..9)::7 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [9..9)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [9..10)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [10..10)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AcceptsTextTagAsOuterTagButDoesNotRender.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AcceptsTextTagAsOuterTagButDoesNotRender.cspans.txt new file mode 100644 index 0000000000..07d11db795 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AcceptsTextTagAsOuterTagButDoesNotRender.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [38] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [38] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [38] ) +Transition span at (2:0,2 [6] ) (Accepts:None) - Parent: Tag block at (2:0,2 [6] ) +Markup span at (8:0,8 [8] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [30] ) +Markup span at (16:0,16 [5] ) (Accepts:None) - Parent: Tag block at (16:0,16 [5] ) +Markup span at (21:0,21 [4] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [30] ) +Transition span at (25:0,25 [7] ) (Accepts:None) - Parent: Tag block at (25:0,25 [7] ) +Code span at (32:0,32 [5] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [38] ) +MetaCode span at (37:0,37 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [38] ) +Markup span at (38:0,38 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [38] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AcceptsTextTagAsOuterTagButDoesNotRender.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AcceptsTextTagAsOuterTagButDoesNotRender.stree.txt new file mode 100644 index 0000000000..59086b2f9a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AcceptsTextTagAsOuterTagButDoesNotRender.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..38)::38 - [@{Foo Bar Baz zoop}] + MarkupBlock - [0..38)::38 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..38)::38 + CSharpStatement - [0..38)::38 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..38)::37 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..37)::35 + MarkupBlock - [2..32)::30 + MarkupElement - [2..32)::30 + MarkupStartTag - [2..8)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [8..16)::8 - [Foo Bar ] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + Text;[Bar]; + Whitespace;[ ]; + MarkupElement - [16..25)::9 + MarkupStartTag - [16..21)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [21..25)::4 - [ Baz] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[Baz]; + MarkupEndTag - [25..32)::7 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [32..37)::5 - [ zoop] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Identifier;[zoop]; + RazorMetaCode - [37..38)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [38..38)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsCloseAngleBracketInAttributeValueIfDoubleQuoted.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsCloseAngleBracketInAttributeValueIfDoubleQuoted.cspans.txt new file mode 100644 index 0000000000..2573b6dc22 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsCloseAngleBracketInAttributeValueIfDoubleQuoted.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [4] ) (Accepts:Any) - Parent: Tag block at (7:0,7 [15] ) +Markup span at (11:0,11 [6] ) (Accepts:Any) - Parent: Markup block at (11:0,11 [8] ) +Markup span at (17:0,17 [1] ) (Accepts:Any) - Parent: Markup block at (11:0,11 [8] ) +Markup span at (18:0,18 [1] ) (Accepts:Any) - Parent: Markup block at (11:0,11 [8] ) +Markup span at (19:0,19 [3] ) (Accepts:None) - Parent: Tag block at (7:0,7 [15] ) +Markup span at (22:0,22 [6] ) (Accepts:None) - Parent: Tag block at (22:0,22 [6] ) +Code span at (28:0,28 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [29] ) +MetaCode span at (28:0,28 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +Markup span at (29:0,29 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsCloseAngleBracketInAttributeValueIfDoubleQuoted.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsCloseAngleBracketInAttributeValueIfDoubleQuoted.stree.txt new file mode 100644 index 0000000000..9e2ebb7588 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsCloseAngleBracketInAttributeValueIfDoubleQuoted.stree.txt @@ -0,0 +1,52 @@ +RazorDocument - [0..29)::29 - [@{}] + MarkupBlock - [0..29)::29 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..29)::29 + CSharpStatement - [0..29)::29 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..29)::28 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..28)::26 + MarkupBlock - [2..28)::26 + MarkupElement - [2..28)::26 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupElement - [7..22)::15 + MarkupStartTag - [7..22)::15 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[bar]; + MarkupAttributeBlock - [11..19)::8 - [ baz=">"] + MarkupTextLiteral - [11..12)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [12..15)::3 - [baz] - Gen - SpanEditHandler;Accepts:Any + Text;[baz]; + Equals;[=]; + MarkupTextLiteral - [16..17)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [17..18)::1 + MarkupLiteralAttributeValue - [17..18)::1 - [>] + MarkupTextLiteral - [17..18)::1 - [>] - Gen - SpanEditHandler;Accepts:Any + CloseAngle;[>]; + MarkupTextLiteral - [18..19)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [19..20)::1 + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupEndTag - [22..28)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [28..28)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [28..29)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [29..29)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsCloseAngleBracketInAttributeValueIfSingleQuoted.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsCloseAngleBracketInAttributeValueIfSingleQuoted.cspans.txt new file mode 100644 index 0000000000..2573b6dc22 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsCloseAngleBracketInAttributeValueIfSingleQuoted.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [4] ) (Accepts:Any) - Parent: Tag block at (7:0,7 [15] ) +Markup span at (11:0,11 [6] ) (Accepts:Any) - Parent: Markup block at (11:0,11 [8] ) +Markup span at (17:0,17 [1] ) (Accepts:Any) - Parent: Markup block at (11:0,11 [8] ) +Markup span at (18:0,18 [1] ) (Accepts:Any) - Parent: Markup block at (11:0,11 [8] ) +Markup span at (19:0,19 [3] ) (Accepts:None) - Parent: Tag block at (7:0,7 [15] ) +Markup span at (22:0,22 [6] ) (Accepts:None) - Parent: Tag block at (22:0,22 [6] ) +Code span at (28:0,28 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [29] ) +MetaCode span at (28:0,28 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +Markup span at (29:0,29 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsCloseAngleBracketInAttributeValueIfSingleQuoted.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsCloseAngleBracketInAttributeValueIfSingleQuoted.stree.txt new file mode 100644 index 0000000000..c99bb7f478 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsCloseAngleBracketInAttributeValueIfSingleQuoted.stree.txt @@ -0,0 +1,52 @@ +RazorDocument - [0..29)::29 - [@{}] + MarkupBlock - [0..29)::29 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..29)::29 + CSharpStatement - [0..29)::29 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..29)::28 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..28)::26 + MarkupBlock - [2..28)::26 + MarkupElement - [2..28)::26 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupElement - [7..22)::15 + MarkupStartTag - [7..22)::15 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[bar]; + MarkupAttributeBlock - [11..19)::8 - [ baz='>'] + MarkupTextLiteral - [11..12)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [12..15)::3 - [baz] - Gen - SpanEditHandler;Accepts:Any + Text;[baz]; + Equals;[=]; + MarkupTextLiteral - [16..17)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [17..18)::1 + MarkupLiteralAttributeValue - [17..18)::1 - [>] + MarkupTextLiteral - [17..18)::1 - [>] - Gen - SpanEditHandler;Accepts:Any + CloseAngle;[>]; + MarkupTextLiteral - [18..19)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [19..20)::1 + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupEndTag - [22..28)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [28..28)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [28..29)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [29..29)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsSlashInAttributeValueIfDoubleQuoted.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsSlashInAttributeValueIfDoubleQuoted.cspans.txt new file mode 100644 index 0000000000..8fee8f2662 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsSlashInAttributeValueIfDoubleQuoted.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [4] ) (Accepts:Any) - Parent: Tag block at (7:0,7 [13] ) +Markup span at (11:0,11 [6] ) (Accepts:Any) - Parent: Markup block at (11:0,11 [8] ) +Markup span at (17:0,17 [1] ) (Accepts:Any) - Parent: Markup block at (11:0,11 [8] ) +Markup span at (18:0,18 [1] ) (Accepts:Any) - Parent: Markup block at (11:0,11 [8] ) +Markup span at (19:0,19 [1] ) (Accepts:None) - Parent: Tag block at (7:0,7 [13] ) +Markup span at (20:0,20 [6] ) (Accepts:None) - Parent: Tag block at (20:0,20 [6] ) +Markup span at (26:0,26 [6] ) (Accepts:None) - Parent: Tag block at (26:0,26 [6] ) +Code span at (32:0,32 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [33] ) +MetaCode span at (32:0,32 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +Markup span at (33:0,33 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsSlashInAttributeValueIfDoubleQuoted.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsSlashInAttributeValueIfDoubleQuoted.stree.txt new file mode 100644 index 0000000000..b3bf3e616d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsSlashInAttributeValueIfDoubleQuoted.stree.txt @@ -0,0 +1,53 @@ +RazorDocument - [0..33)::33 - [@{}] + MarkupBlock - [0..33)::33 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..33)::33 + CSharpStatement - [0..33)::33 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..33)::32 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..32)::30 + MarkupBlock - [2..32)::30 + MarkupElement - [2..32)::30 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupElement - [7..26)::19 + MarkupStartTag - [7..20)::13 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[bar]; + MarkupAttributeBlock - [11..19)::8 - [ baz="/"] + MarkupTextLiteral - [11..12)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [12..15)::3 - [baz] - Gen - SpanEditHandler;Accepts:Any + Text;[baz]; + Equals;[=]; + MarkupTextLiteral - [16..17)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [17..18)::1 + MarkupLiteralAttributeValue - [17..18)::1 - [/] + MarkupTextLiteral - [17..18)::1 - [/] - Gen - SpanEditHandler;Accepts:Any + ForwardSlash;[/]; + MarkupTextLiteral - [18..19)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupEndTag - [20..26)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[bar]; + CloseAngle;[>]; + MarkupEndTag - [26..32)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [32..33)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsSlashInAttributeValueIfSingleQuoted.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsSlashInAttributeValueIfSingleQuoted.cspans.txt new file mode 100644 index 0000000000..8fee8f2662 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsSlashInAttributeValueIfSingleQuoted.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [4] ) (Accepts:Any) - Parent: Tag block at (7:0,7 [13] ) +Markup span at (11:0,11 [6] ) (Accepts:Any) - Parent: Markup block at (11:0,11 [8] ) +Markup span at (17:0,17 [1] ) (Accepts:Any) - Parent: Markup block at (11:0,11 [8] ) +Markup span at (18:0,18 [1] ) (Accepts:Any) - Parent: Markup block at (11:0,11 [8] ) +Markup span at (19:0,19 [1] ) (Accepts:None) - Parent: Tag block at (7:0,7 [13] ) +Markup span at (20:0,20 [6] ) (Accepts:None) - Parent: Tag block at (20:0,20 [6] ) +Markup span at (26:0,26 [6] ) (Accepts:None) - Parent: Tag block at (26:0,26 [6] ) +Code span at (32:0,32 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [33] ) +MetaCode span at (32:0,32 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +Markup span at (33:0,33 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsSlashInAttributeValueIfSingleQuoted.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsSlashInAttributeValueIfSingleQuoted.stree.txt new file mode 100644 index 0000000000..5881782048 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsSlashInAttributeValueIfSingleQuoted.stree.txt @@ -0,0 +1,53 @@ +RazorDocument - [0..33)::33 - [@{}] + MarkupBlock - [0..33)::33 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..33)::33 + CSharpStatement - [0..33)::33 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..33)::32 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..32)::30 + MarkupBlock - [2..32)::30 + MarkupElement - [2..32)::30 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupElement - [7..26)::19 + MarkupStartTag - [7..20)::13 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[bar]; + MarkupAttributeBlock - [11..19)::8 - [ baz='/'] + MarkupTextLiteral - [11..12)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [12..15)::3 - [baz] - Gen - SpanEditHandler;Accepts:Any + Text;[baz]; + Equals;[=]; + MarkupTextLiteral - [16..17)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [17..18)::1 + MarkupLiteralAttributeValue - [17..18)::1 - [/] + MarkupTextLiteral - [17..18)::1 - [/] - Gen - SpanEditHandler;Accepts:Any + ForwardSlash;[/]; + MarkupTextLiteral - [18..19)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupEndTag - [20..26)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[bar]; + CloseAngle;[>]; + MarkupEndTag - [26..32)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [32..33)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsStartAndEndTagsToDifferInCase.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsStartAndEndTagsToDifferInCase.cspans.txt new file mode 100644 index 0000000000..f7d0febda1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsStartAndEndTagsToDifferInCase.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +Markup span at (2:0,2 [4] ) (Accepts:None) - Parent: Tag block at (2:0,2 [4] ) +Markup span at (6:0,6 [3] ) (Accepts:None) - Parent: Tag block at (6:0,6 [3] ) +Markup span at (9:0,9 [3] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [19] ) +Markup span at (12:0,12 [4] ) (Accepts:None) - Parent: Tag block at (12:0,12 [4] ) +Markup span at (16:0,16 [5] ) (Accepts:None) - Parent: Tag block at (16:0,16 [5] ) +Code span at (21:0,21 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [22] ) +MetaCode span at (21:0,21 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +Markup span at (22:0,22 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsStartAndEndTagsToDifferInCase.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsStartAndEndTagsToDifferInCase.stree.txt new file mode 100644 index 0000000000..39206aa1d8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsStartAndEndTagsToDifferInCase.stree.txt @@ -0,0 +1,41 @@ +RazorDocument - [0..22)::22 - [@{
                  • Foo

                  • }] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..22)::22 + CSharpStatement - [0..22)::22 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..22)::21 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..21)::19 + MarkupBlock - [2..21)::19 + MarkupElement - [2..21)::19 + MarkupStartTag - [2..6)::4 - [
                  • ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[li]; + CloseAngle;[>]; + MarkupElement - [6..16)::10 + MarkupStartTag - [6..9)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [9..12)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [12..16)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[P]; + CloseAngle;[>]; + MarkupEndTag - [16..21)::5 - [
                  • ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[lI]; + CloseAngle;[>]; + CSharpStatementLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsUnclosedTagsAsLongAsItCanRecoverToAnExpectedEndTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsUnclosedTagsAsLongAsItCanRecoverToAnExpectedEndTag.cspans.txt new file mode 100644 index 0000000000..755c699fd4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsUnclosedTagsAsLongAsItCanRecoverToAnExpectedEndTag.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [5] ) (Accepts:None) - Parent: Tag block at (7:0,7 [5] ) +Markup span at (12:0,12 [5] ) (Accepts:None) - Parent: Tag block at (12:0,12 [5] ) +Markup span at (17:0,17 [6] ) (Accepts:None) - Parent: Tag block at (17:0,17 [6] ) +Code span at (23:0,23 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [24] ) +MetaCode span at (23:0,23 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +Markup span at (24:0,24 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsUnclosedTagsAsLongAsItCanRecoverToAnExpectedEndTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsUnclosedTagsAsLongAsItCanRecoverToAnExpectedEndTag.stree.txt new file mode 100644 index 0000000000..977c4f3c70 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/AllowsUnclosedTagsAsLongAsItCanRecoverToAnExpectedEndTag.stree.txt @@ -0,0 +1,39 @@ +RazorDocument - [0..24)::24 - [@{}] + MarkupBlock - [0..24)::24 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..24)::24 + CSharpStatement - [0..24)::24 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..24)::23 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..23)::21 + MarkupBlock - [2..23)::21 + MarkupElement - [2..23)::21 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupElement - [7..17)::10 + MarkupStartTag - [7..12)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[bar]; + CloseAngle;[>]; + MarkupElement - [12..17)::5 + MarkupStartTag - [12..17)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[baz]; + CloseAngle;[>]; + MarkupEndTag - [17..23)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [23..23)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [23..24)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [24..24)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/CanHandleSelfClosingTagsWithinBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/CanHandleSelfClosingTagsWithinBlock.cspans.txt new file mode 100644 index 0000000000..815df70ed1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/CanHandleSelfClosingTagsWithinBlock.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [7] ) (Accepts:None) - Parent: Tag block at (7:0,7 [7] ) +Markup span at (14:0,14 [6] ) (Accepts:None) - Parent: Tag block at (14:0,14 [6] ) +Code span at (20:0,20 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [21] ) +MetaCode span at (20:0,20 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Markup span at (21:0,21 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/CanHandleSelfClosingTagsWithinBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/CanHandleSelfClosingTagsWithinBlock.stree.txt new file mode 100644 index 0000000000..589ca4a47b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/CanHandleSelfClosingTagsWithinBlock.stree.txt @@ -0,0 +1,38 @@ +RazorDocument - [0..21)::21 - [@{}] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..21)::21 + CSharpStatement - [0..21)::21 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..21)::20 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..20)::18 + MarkupBlock - [2..20)::18 + MarkupElement - [2..20)::18 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupElement - [7..14)::7 + MarkupStartTag - [7..14)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[bar]; + MarkupMiscAttributeContent - [11..12)::1 + MarkupTextLiteral - [11..12)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupEndTag - [14..20)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [20..20)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [20..21)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/CorrectlyHandlesSingleLineOfMarkupWithEmbeddedStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/CorrectlyHandlesSingleLineOfMarkupWithEmbeddedStatement.cspans.txt new file mode 100644 index 0000000000..8f124b66de --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/CorrectlyHandlesSingleLineOfMarkupWithEmbeddedStatement.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [4] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [31] ) +Transition span at (11:0,11 [1] ) (Accepts:None) - Parent: Statement block at (11:0,11 [12] ) +Code span at (12:0,12 [11] ) (Accepts:Any) - Parent: Statement block at (11:0,11 [12] ) +Markup span at (23:0,23 [4] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [31] ) +Markup span at (27:0,27 [6] ) (Accepts:None) - Parent: Tag block at (27:0,27 [6] ) +Code span at (33:0,33 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (33:0,33 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (34:0,34 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/CorrectlyHandlesSingleLineOfMarkupWithEmbeddedStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/CorrectlyHandlesSingleLineOfMarkupWithEmbeddedStatement.stree.txt new file mode 100644 index 0000000000..27ac92cec8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/CorrectlyHandlesSingleLineOfMarkupWithEmbeddedStatement.stree.txt @@ -0,0 +1,46 @@ +RazorDocument - [0..34)::34 - [@{
                    Foo @if(true) {} Bar
                    }] + MarkupBlock - [0..34)::34 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..34)::34 + CSharpStatement - [0..34)::34 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..34)::33 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..33)::31 + MarkupBlock - [2..33)::31 + MarkupElement - [2..33)::31 + MarkupStartTag - [2..7)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [7..11)::4 - [Foo ] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + CSharpCodeBlock - [11..23)::12 + CSharpTransition - [11..12)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [12..23)::11 - [if(true) {}] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + RightBrace;[}]; + MarkupTextLiteral - [23..27)::4 - [ Bar] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[Bar]; + MarkupEndTag - [27..33)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + CSharpStatementLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [33..34)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [34..34)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/DoesNotConsiderPsuedoTagWithinMarkupBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/DoesNotConsiderPsuedoTagWithinMarkupBlock.cspans.txt new file mode 100644 index 0000000000..63a6914d4e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/DoesNotConsiderPsuedoTagWithinMarkupBlock.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [6] ) (Accepts:None) - Parent: Tag block at (7:0,7 [6] ) +Markup span at (13:0,13 [5] ) (Accepts:None) - Parent: Tag block at (13:0,13 [5] ) +Markup span at (18:0,18 [6] ) (Accepts:None) - Parent: Tag block at (18:0,18 [6] ) +Markup span at (24:0,24 [6] ) (Accepts:None) - Parent: Tag block at (24:0,24 [6] ) +Code span at (30:0,30 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [31] ) +MetaCode span at (30:0,30 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +Markup span at (31:0,31 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/DoesNotConsiderPsuedoTagWithinMarkupBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/DoesNotConsiderPsuedoTagWithinMarkupBlock.stree.txt new file mode 100644 index 0000000000..3efea968b3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/DoesNotConsiderPsuedoTagWithinMarkupBlock.stree.txt @@ -0,0 +1,44 @@ +RazorDocument - [0..31)::31 - [@{}] + MarkupBlock - [0..31)::31 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..31)::31 + CSharpStatement - [0..31)::31 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..31)::30 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..30)::28 + MarkupBlock - [2..30)::28 + MarkupElement - [2..30)::28 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupElement - [7..24)::17 + MarkupStartTag - [7..13)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupElement - [13..24)::11 + MarkupStartTag - [13..18)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[bar]; + CloseAngle;[>]; + MarkupEndTag - [18..24)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[bar]; + CloseAngle;[>]; + MarkupEndTag - [24..30)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [30..30)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [30..31)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [31..31)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/DoesNotTerminateXMLProcInstrAtCloseAngleUnlessPreceededByQuestionMark.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/DoesNotTerminateXMLProcInstrAtCloseAngleUnlessPreceededByQuestionMark.cspans.txt new file mode 100644 index 0000000000..4cb009f651 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/DoesNotTerminateXMLProcInstrAtCloseAngleUnlessPreceededByQuestionMark.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [20] ) (Accepts:None) - Parent: Markup block at (2:0,2 [31] ) +Markup span at (27:0,27 [6] ) (Accepts:None) - Parent: Tag block at (27:0,27 [6] ) +Code span at (33:0,33 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (33:0,33 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (34:0,34 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/DoesNotTerminateXMLProcInstrAtCloseAngleUnlessPreceededByQuestionMark.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/DoesNotTerminateXMLProcInstrAtCloseAngleUnlessPreceededByQuestionMark.stree.txt new file mode 100644 index 0000000000..2f2e4f4725 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/DoesNotTerminateXMLProcInstrAtCloseAngleUnlessPreceededByQuestionMark.stree.txt @@ -0,0 +1,42 @@ +RazorDocument - [0..34)::34 - [@{ baz?>}] + MarkupBlock - [0..34)::34 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..34)::34 + CSharpStatement - [0..34)::34 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..34)::33 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..33)::31 + MarkupBlock - [2..33)::31 + MarkupElement - [2..33)::31 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [7..27)::20 - [ baz?>] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + QuestionMark;[?]; + Text;[xml]; + Whitespace;[ ]; + Text;[foo]; + Whitespace;[ ]; + Text;[bar]; + CloseAngle;[>]; + Whitespace;[ ]; + Text;[baz]; + QuestionMark;[?]; + CloseAngle;[>]; + MarkupEndTag - [27..33)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [33..34)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [34..34)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesForwardSlashInAttributeContent.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesForwardSlashInAttributeContent.cspans.txt new file mode 100644 index 0000000000..5f1b93ed73 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesForwardSlashInAttributeContent.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +Markup span at (2:0,2 [4] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [17] ) +Markup span at (6:0,6 [7] ) (Accepts:Any) - Parent: Markup block at (6:0,6 [10] ) +Markup span at (13:0,13 [3] ) (Accepts:Any) - Parent: Markup block at (6:0,6 [10] ) +Markup span at (16:0,16 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [17] ) +Code span at (19:0,19 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [20] ) +MetaCode span at (19:0,19 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +Markup span at (20:0,20 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesForwardSlashInAttributeContent.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesForwardSlashInAttributeContent.stree.txt new file mode 100644 index 0000000000..4083296791 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesForwardSlashInAttributeContent.stree.txt @@ -0,0 +1,44 @@ +RazorDocument - [0..20)::20 - [@{

                    }] + MarkupBlock - [0..20)::20 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..20)::20 + CSharpStatement - [0..20)::20 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..20)::19 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..19)::17 + MarkupBlock - [2..19)::17 + MarkupElement - [2..19)::17 + MarkupStartTag - [2..19)::17 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + MarkupMiscAttributeContent - [4..5)::1 + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupMiscAttributeContent - [5..6)::1 + MarkupTextLiteral - [5..6)::1 - [/] - Gen - SpanEditHandler;Accepts:Any + ForwardSlash;[/]; + MarkupAttributeBlock - [6..16)::10 - [ class=foo] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..12)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + GenericBlock - [13..16)::3 + MarkupLiteralAttributeValue - [13..16)::3 - [foo] + MarkupTextLiteral - [13..16)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupMiscAttributeContent - [16..17)::1 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [19..19)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [19..20)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [20..20)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleAtEof.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleAtEof.cspans.txt new file mode 100644 index 0000000000..b0e0c19ca5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleAtEof.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [5] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +Code span at (2:0,2 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [5] ) +Markup span at (4:1,0 [1] ) (Accepts:Any) - Parent: Tag block at (4:1,0 [1] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleAtEof.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleAtEof.diag.txt new file mode 100644 index 0000000000..5183cd029a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleAtEof.diag.txt @@ -0,0 +1,2 @@ +(2,1): Error RZ1024: End of file or an unexpected character was reached before the "" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                    ") or have matching end tags ("

                    Hello

                    "). If you intended to display a "<" character, use the "<" HTML entity. +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleAtEof.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleAtEof.stree.txt new file mode 100644 index 0000000000..93a2e245cd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleAtEof.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..5)::5 - [@{LF<] + MarkupBlock - [0..5)::5 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..5)::5 + CSharpStatement - [0..5)::5 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..5)::4 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..5)::3 + CSharpStatementLiteral - [2..4)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[}];AtEOL + NewLine;[LF]; + MarkupBlock - [4..5)::1 + MarkupElement - [4..5)::1 + MarkupStartTag - [4..5)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + RazorMetaCode - [5..5)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleWithProperTagFollowingIt.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleWithProperTagFollowingIt.cspans.txt new file mode 100644 index 0000000000..2a8d626589 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleWithProperTagFollowingIt.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [14] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [14] ) +Code span at (2:0,2 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [14] ) +Markup span at (4:1,0 [3] ) (Accepts:Any) - Parent: Tag block at (4:1,0 [3] ) +Markup span at (7:2,0 [7] ) (Accepts:None) - Parent: Tag block at (7:2,0 [7] ) +Code span at (14:2,7 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [14] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleWithProperTagFollowingIt.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleWithProperTagFollowingIt.diag.txt new file mode 100644 index 0000000000..d1be8ea52d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleWithProperTagFollowingIt.diag.txt @@ -0,0 +1,3 @@ +(2,1): Error RZ1024: End of file or an unexpected character was reached before the "" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                    ") or have matching end tags ("

                    Hello

                    "). If you intended to display a "<" character, use the "<" HTML entity. +(3,3): Error RZ1026: Encountered end tag "html" with no matching start tag. Are your start/end tags properly balanced? +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleWithProperTagFollowingIt.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleWithProperTagFollowingIt.stree.txt new file mode 100644 index 0000000000..b539423630 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesOpenAngleWithProperTagFollowingIt.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..14)::14 - [@{LF] + MarkupBlock - [0..14)::14 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..14)::14 + CSharpStatement - [0..14)::14 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..14)::13 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..14)::12 + CSharpStatementLiteral - [2..4)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[}];AtEOL + NewLine;[LF]; + MarkupBlock - [4..7)::3 + MarkupElement - [4..7)::3 + MarkupStartTag - [4..7)::3 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + MarkupMiscAttributeContent - [5..7)::2 + MarkupTextLiteral - [5..7)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CloseAngle;[]; + MarkupBlock - [7..14)::7 + MarkupElement - [7..14)::7 + MarkupEndTag - [7..14)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[html]; + CloseAngle;[>]; + CSharpStatementLiteral - [14..14)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [14..14)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesUnbalancedTripleDashHTMLComments.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesUnbalancedTripleDashHTMLComments.cspans.txt new file mode 100644 index 0000000000..aaf4fd258d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesUnbalancedTripleDashHTMLComments.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [68] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [68] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [68] ) +Code span at (2:0,2 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [68] ) +Markup span at (4:1,0 [4] ) (Accepts:Any) - Parent: Markup block at (4:1,0 [63] ) +Markup span at (8:1,4 [4] ) (Accepts:None) - Parent: HtmlComment block at (8:1,4 [57] ) +Markup span at (12:1,8 [50] ) (Accepts:Whitespace) - Parent: HtmlComment block at (8:1,4 [57] ) +Markup span at (62:1,58 [3] ) (Accepts:None) - Parent: HtmlComment block at (8:1,4 [57] ) +Markup span at (65:1,61 [2] ) (Accepts:None) - Parent: Markup block at (4:1,0 [63] ) +Code span at (67:2,0 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [68] ) +MetaCode span at (67:2,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [68] ) +Markup span at (68:2,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [68] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesUnbalancedTripleDashHTMLComments.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesUnbalancedTripleDashHTMLComments.stree.txt new file mode 100644 index 0000000000..d6c3b6a1b3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HandlesUnbalancedTripleDashHTMLComments.stree.txt @@ -0,0 +1,56 @@ +RazorDocument - [0..68)::68 - [@{LF LF}] + MarkupBlock - [0..68)::68 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..68)::68 + CSharpStatement - [0..68)::68 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..68)::67 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..67)::65 + CSharpStatementLiteral - [2..4)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [4..67)::63 + MarkupTextLiteral - [4..8)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupCommentBlock - [8..65)::57 + MarkupTextLiteral - [8..12)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupTextLiteral - [65..67)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [67..67)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [67..68)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [68..68)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HtmlCommentSupportsMultipleDashes.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HtmlCommentSupportsMultipleDashes.cspans.txt new file mode 100644 index 0000000000..e1fed0e5a6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HtmlCommentSupportsMultipleDashes.cspans.txt @@ -0,0 +1,24 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (5:0,5 [4] ) (Accepts:None) - Parent: HtmlComment block at (5:0,5 [22] ) +Markup span at (9:0,9 [15] ) (Accepts:Whitespace) - Parent: HtmlComment block at (5:0,5 [22] ) +Markup span at (24:0,24 [3] ) (Accepts:None) - Parent: HtmlComment block at (5:0,5 [22] ) +Markup span at (27:0,27 [6] ) (Accepts:Any) - Parent: Tag block at (27:0,27 [6] ) +Markup span at (33:0,33 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [165] ) +Markup span at (35:1,0 [5] ) (Accepts:Any) - Parent: Tag block at (35:1,0 [5] ) +Markup span at (40:1,5 [4] ) (Accepts:None) - Parent: HtmlComment block at (40:1,5 [24] ) +Markup span at (44:1,9 [17] ) (Accepts:Whitespace) - Parent: HtmlComment block at (40:1,5 [24] ) +Markup span at (61:1,26 [3] ) (Accepts:None) - Parent: HtmlComment block at (40:1,5 [24] ) +Markup span at (64:1,29 [6] ) (Accepts:Any) - Parent: Tag block at (64:1,29 [6] ) +Markup span at (70:1,35 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [165] ) +Markup span at (72:2,0 [5] ) (Accepts:Any) - Parent: Tag block at (72:2,0 [5] ) +Markup span at (77:2,5 [4] ) (Accepts:None) - Parent: HtmlComment block at (77:2,5 [26] ) +Markup span at (81:2,9 [19] ) (Accepts:Whitespace) - Parent: HtmlComment block at (77:2,5 [26] ) +Markup span at (100:2,28 [3] ) (Accepts:None) - Parent: HtmlComment block at (77:2,5 [26] ) +Markup span at (103:2,31 [6] ) (Accepts:Any) - Parent: Tag block at (103:2,31 [6] ) +Markup span at (109:2,37 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [165] ) +Markup span at (111:3,0 [5] ) (Accepts:Any) - Parent: Tag block at (111:3,0 [5] ) +Markup span at (116:3,5 [4] ) (Accepts:None) - Parent: HtmlComment block at (116:3,5 [41] ) +Markup span at (120:3,9 [34] ) (Accepts:Whitespace) - Parent: HtmlComment block at (116:3,5 [41] ) +Markup span at (154:3,43 [3] ) (Accepts:None) - Parent: HtmlComment block at (116:3,5 [41] ) +Markup span at (157:3,46 [6] ) (Accepts:Any) - Parent: Tag block at (157:3,46 [6] ) +Markup span at (163:3,52 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [165] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HtmlCommentSupportsMultipleDashes.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HtmlCommentSupportsMultipleDashes.stree.txt new file mode 100644 index 0000000000..84453954c4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/HtmlCommentSupportsMultipleDashes.stree.txt @@ -0,0 +1,130 @@ +RazorDocument - [0..165)::165 - [
                    LF
                    LF
                    LF
                    LF] + MarkupBlock - [0..165)::165 + MarkupElement - [0..33)::33 + MarkupStartTag - [0..5)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupCommentBlock - [5..27)::22 + MarkupTextLiteral - [5..9)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupEndTag - [27..33)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [33..35)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [35..70)::35 + MarkupStartTag - [35..40)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupCommentBlock - [40..64)::24 + MarkupTextLiteral - [40..44)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupEndTag - [64..70)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [70..72)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [72..109)::37 + MarkupStartTag - [72..77)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupCommentBlock - [77..103)::26 + MarkupTextLiteral - [77..81)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupEndTag - [103..109)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [109..111)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [111..163)::52 + MarkupStartTag - [111..116)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupCommentBlock - [116..157)::41 + MarkupTextLiteral - [116..120)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupEndTag - [157..163)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [163..165)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/IgnoresTagsInContentsOfScriptTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/IgnoresTagsInContentsOfScriptTag.cspans.txt new file mode 100644 index 0000000000..10075460db --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/IgnoresTagsInContentsOfScriptTag.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [39] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [39] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [39] ) +Markup span at (2:0,2 [8] ) (Accepts:None) - Parent: Tag block at (2:0,2 [8] ) +Markup span at (10:0,10 [13] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [36] ) +Transition span at (23:0,23 [1] ) (Accepts:None) - Parent: Expression block at (23:0,23 [4] ) +Code span at (24:0,24 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (23:0,23 [4] ) +Markup span at (27:0,27 [2] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [36] ) +Markup span at (29:0,29 [9] ) (Accepts:None) - Parent: Tag block at (29:0,29 [9] ) +Code span at (38:0,38 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [39] ) +MetaCode span at (38:0,38 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [39] ) +Markup span at (39:0,39 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [39] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/IgnoresTagsInContentsOfScriptTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/IgnoresTagsInContentsOfScriptTag.stree.txt new file mode 100644 index 0000000000..d90490cb93 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/IgnoresTagsInContentsOfScriptTag.stree.txt @@ -0,0 +1,48 @@ +RazorDocument - [0..39)::39 - [@{}] + MarkupBlock - [0..39)::39 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..39)::39 + CSharpStatement - [0..39)::39 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..39)::38 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..38)::36 + MarkupBlock - [2..38)::36 + MarkupElement - [2..38)::36 + MarkupStartTag - [2..10)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; + CSharpStatementLiteral - [38..38)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [38..39)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [39..39)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/OnlyTerminatesCommentOnFullEndSequence.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/OnlyTerminatesCommentOnFullEndSequence.cspans.txt new file mode 100644 index 0000000000..4ca3454d27 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/OnlyTerminatesCommentOnFullEndSequence.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (2:0,2 [4] ) (Accepts:None) - Parent: HtmlComment block at (2:0,2 [20] ) +Markup span at (6:0,6 [13] ) (Accepts:Whitespace) - Parent: HtmlComment block at (2:0,2 [20] ) +Markup span at (19:0,19 [3] ) (Accepts:None) - Parent: HtmlComment block at (2:0,2 [20] ) +Code span at (22:0,22 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [23] ) +MetaCode span at (22:0,22 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (23:0,23 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/OnlyTerminatesCommentOnFullEndSequence.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/OnlyTerminatesCommentOnFullEndSequence.stree.txt new file mode 100644 index 0000000000..b1bfd1c1aa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/OnlyTerminatesCommentOnFullEndSequence.stree.txt @@ -0,0 +1,36 @@ +RazorDocument - [0..23)::23 - [@{}] + MarkupBlock - [0..23)::23 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..23)::23 + CSharpStatement - [0..23)::23 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..23)::22 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..22)::20 + MarkupBlock - [2..22)::20 + MarkupCommentBlock - [2..22)::20 + MarkupTextLiteral - [2..6)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + CSharpStatementLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [22..23)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [23..23)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesSGMLDeclarationAsEmptyTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesSGMLDeclarationAsEmptyTag.cspans.txt new file mode 100644 index 0000000000..b4f323eb1a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesSGMLDeclarationAsEmptyTag.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [36] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [36] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [22] ) (Accepts:None) - Parent: Markup block at (2:0,2 [33] ) +Markup span at (29:0,29 [6] ) (Accepts:None) - Parent: Tag block at (29:0,29 [6] ) +Code span at (35:0,35 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [36] ) +MetaCode span at (35:0,35 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [36] ) +Markup span at (36:0,36 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesSGMLDeclarationAsEmptyTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesSGMLDeclarationAsEmptyTag.stree.txt new file mode 100644 index 0000000000..23ebc364be --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesSGMLDeclarationAsEmptyTag.stree.txt @@ -0,0 +1,40 @@ +RazorDocument - [0..36)::36 - [@{}] + MarkupBlock - [0..36)::36 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..36)::36 + CSharpStatement - [0..36)::36 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..36)::35 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..35)::33 + MarkupBlock - [2..35)::33 + MarkupElement - [2..35)::33 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [7..29)::22 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[DOCTYPE]; + Whitespace;[ ]; + Text;[foo]; + Whitespace;[ ]; + Text;[bar]; + Whitespace;[ ]; + Text;[baz]; + CloseAngle;[>]; + MarkupEndTag - [29..35)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [35..35)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [35..36)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [36..36)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesUntilMatchingEndTagIfFirstNonWhitespaceCharacterIsStartTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesUntilMatchingEndTagIfFirstNonWhitespaceCharacterIsStartTag.cspans.txt new file mode 100644 index 0000000000..de508231ca --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesUntilMatchingEndTagIfFirstNonWhitespaceCharacterIsStartTag.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [36] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [36] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [5] ) (Accepts:None) - Parent: Tag block at (7:0,7 [5] ) +Markup span at (12:0,12 [5] ) (Accepts:None) - Parent: Tag block at (12:0,12 [5] ) +Markup span at (17:0,17 [6] ) (Accepts:None) - Parent: Tag block at (17:0,17 [6] ) +Markup span at (23:0,23 [6] ) (Accepts:None) - Parent: Tag block at (23:0,23 [6] ) +Markup span at (29:0,29 [6] ) (Accepts:None) - Parent: Tag block at (29:0,29 [6] ) +Code span at (35:0,35 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [36] ) +MetaCode span at (35:0,35 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [36] ) +Markup span at (36:0,36 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesUntilMatchingEndTagIfFirstNonWhitespaceCharacterIsStartTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesUntilMatchingEndTagIfFirstNonWhitespaceCharacterIsStartTag.stree.txt new file mode 100644 index 0000000000..a95f5309e8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesUntilMatchingEndTagIfFirstNonWhitespaceCharacterIsStartTag.stree.txt @@ -0,0 +1,49 @@ +RazorDocument - [0..36)::36 - [@{}] + MarkupBlock - [0..36)::36 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..36)::36 + CSharpStatement - [0..36)::36 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..36)::35 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..35)::33 + MarkupBlock - [2..35)::33 + MarkupElement - [2..35)::33 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[baz]; + CloseAngle;[>]; + MarkupElement - [7..29)::22 + MarkupStartTag - [7..12)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[boz]; + CloseAngle;[>]; + MarkupElement - [12..23)::11 + MarkupStartTag - [12..17)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[biz]; + CloseAngle;[>]; + MarkupEndTag - [17..23)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[biz]; + CloseAngle;[>]; + MarkupEndTag - [23..29)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[boz]; + CloseAngle;[>]; + MarkupEndTag - [29..35)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[baz]; + CloseAngle;[>]; + CSharpStatementLiteral - [35..35)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [35..36)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [36..36)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesXMLProcessingInstructionAsEmptyTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesXMLProcessingInstructionAsEmptyTag.cspans.txt new file mode 100644 index 0000000000..852b239155 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesXMLProcessingInstructionAsEmptyTag.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [19] ) (Accepts:None) - Parent: Markup block at (2:0,2 [30] ) +Markup span at (26:0,26 [6] ) (Accepts:None) - Parent: Tag block at (26:0,26 [6] ) +Code span at (32:0,32 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [33] ) +MetaCode span at (32:0,32 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +Markup span at (33:0,33 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesXMLProcessingInstructionAsEmptyTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesXMLProcessingInstructionAsEmptyTag.stree.txt new file mode 100644 index 0000000000..e9f7c9e1a8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ParsesXMLProcessingInstructionAsEmptyTag.stree.txt @@ -0,0 +1,41 @@ +RazorDocument - [0..33)::33 - [@{}] + MarkupBlock - [0..33)::33 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..33)::33 + CSharpStatement - [0..33)::33 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..33)::32 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..32)::30 + MarkupBlock - [2..32)::30 + MarkupElement - [2..32)::30 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [7..26)::19 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + QuestionMark;[?]; + Text;[xml]; + Whitespace;[ ]; + Text;[foo]; + Whitespace;[ ]; + Text;[bar]; + Whitespace;[ ]; + Text;[baz]; + QuestionMark;[?]; + CloseAngle;[>]; + MarkupEndTag - [26..32)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [32..33)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ProperlyBalancesCommentStartAndEndTags.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ProperlyBalancesCommentStartAndEndTags.cspans.txt new file mode 100644 index 0000000000..5c14032f92 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ProperlyBalancesCommentStartAndEndTags.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Markup span at (2:0,2 [4] ) (Accepts:None) - Parent: HtmlComment block at (2:0,2 [18] ) +Markup span at (6:0,6 [11] ) (Accepts:Whitespace) - Parent: HtmlComment block at (2:0,2 [18] ) +Markup span at (17:0,17 [3] ) (Accepts:None) - Parent: HtmlComment block at (2:0,2 [18] ) +Code span at (20:0,20 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [21] ) +MetaCode span at (20:0,20 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Markup span at (21:0,21 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ProperlyBalancesCommentStartAndEndTags.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ProperlyBalancesCommentStartAndEndTags.stree.txt new file mode 100644 index 0000000000..dfc7e9d631 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ProperlyBalancesCommentStartAndEndTags.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..21)::21 - [@{}] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..21)::21 + CSharpStatement - [0..21)::21 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..21)::20 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..20)::18 + MarkupBlock - [2..20)::18 + MarkupCommentBlock - [2..20)::18 + MarkupTextLiteral - [2..6)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + CSharpStatementLiteral - [20..20)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [20..21)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ReadsToEndOfLineIfFirstCharacterAfterTransitionIsColon.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ReadsToEndOfLineIfFirstCharacterAfterTransitionIsColon.cspans.txt new file mode 100644 index 0000000000..3c96f3b336 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ReadsToEndOfLineIfFirstCharacterAfterTransitionIsColon.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Transition span at (2:0,2 [1] ) (Accepts:None) - Parent: Markup block at (2:0,2 [19] ) +MetaCode span at (3:0,3 [1] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [19] ) +Markup span at (4:0,4 [17] ) (Accepts:None) - Parent: Markup block at (2:0,2 [19] ) +Code span at (21:1,0 [4] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) +MetaCode span at (25:1,4 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Markup span at (26:1,5 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ReadsToEndOfLineIfFirstCharacterAfterTransitionIsColon.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ReadsToEndOfLineIfFirstCharacterAfterTransitionIsColon.stree.txt new file mode 100644 index 0000000000..bf557127e8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/ReadsToEndOfLineIfFirstCharacterAfterTransitionIsColon.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..26)::26 - [@{@:
                  • Foo Bar BazLFbork}] + MarkupBlock - [0..26)::26 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..26)::26 + CSharpStatement - [0..26)::26 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..26)::25 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..25)::23 + MarkupBlock - [2..21)::19 + MarkupTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [3..4)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [4..21)::17 - [
                  • Foo Bar BazLF] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[li]; + CloseAngle;[>]; + Text;[Foo]; + Whitespace;[ ]; + Text;[Bar]; + Whitespace;[ ]; + Text;[Baz]; + NewLine;[LF]; + CSharpStatementLiteral - [21..25)::4 - [bork] - Gen - SpanEditHandler;Accepts:Any + Identifier;[bork]; + RazorMetaCode - [25..26)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [26..26)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/RendersLiteralTextTagIfDoubled.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/RendersLiteralTextTagIfDoubled.cspans.txt new file mode 100644 index 0000000000..eec6718ce6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/RendersLiteralTextTagIfDoubled.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [51] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [51] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [51] ) +Transition span at (2:0,2 [6] ) (Accepts:None) - Parent: Tag block at (2:0,2 [6] ) +Markup span at (8:0,8 [6] ) (Accepts:None) - Parent: Tag block at (8:0,8 [6] ) +Markup span at (14:0,14 [8] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [43] ) +Markup span at (22:0,22 [5] ) (Accepts:None) - Parent: Tag block at (22:0,22 [5] ) +Markup span at (27:0,27 [4] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [43] ) +Markup span at (31:0,31 [7] ) (Accepts:None) - Parent: Tag block at (31:0,31 [7] ) +Transition span at (38:0,38 [7] ) (Accepts:None) - Parent: Tag block at (38:0,38 [7] ) +Code span at (45:0,45 [5] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [51] ) +MetaCode span at (50:0,50 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [51] ) +Markup span at (51:0,51 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [51] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/RendersLiteralTextTagIfDoubled.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/RendersLiteralTextTagIfDoubled.stree.txt new file mode 100644 index 0000000000..1c91b94c21 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/RendersLiteralTextTagIfDoubled.stree.txt @@ -0,0 +1,53 @@ +RazorDocument - [0..51)::51 - [@{Foo Bar Baz zoop}] + MarkupBlock - [0..51)::51 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..51)::51 + CSharpStatement - [0..51)::51 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..51)::50 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..50)::48 + MarkupBlock - [2..45)::43 + MarkupElement - [2..45)::43 + MarkupStartTag - [2..8)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupElement - [8..38)::30 + MarkupStartTag - [8..14)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [14..22)::8 - [Foo Bar ] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + Text;[Bar]; + Whitespace;[ ]; + MarkupElement - [22..31)::9 + MarkupStartTag - [22..27)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [27..31)::4 - [ Baz] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[Baz]; + MarkupEndTag - [31..38)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + MarkupEndTag - [38..45)::7 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [45..50)::5 - [ zoop] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Identifier;[zoop]; + RazorMetaCode - [50..51)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [51..51)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsAtMatchingCloseTagToStartTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsAtMatchingCloseTagToStartTag.cspans.txt new file mode 100644 index 0000000000..232818d1f8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsAtMatchingCloseTagToStartTag.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +Markup span at (2:0,2 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [3] ) +Markup span at (5:0,5 [3] ) (Accepts:None) - Parent: Tag block at (5:0,5 [3] ) +Markup span at (8:0,8 [4] ) (Accepts:None) - Parent: Tag block at (8:0,8 [4] ) +Markup span at (12:0,12 [4] ) (Accepts:None) - Parent: Tag block at (12:0,12 [4] ) +Markup span at (16:0,16 [3] ) (Accepts:None) - Parent: Tag block at (16:0,16 [3] ) +Markup span at (19:0,19 [4] ) (Accepts:None) - Parent: Tag block at (19:0,19 [4] ) +Code span at (23:0,23 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [24] ) +MetaCode span at (23:0,23 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +Markup span at (24:0,24 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsAtMatchingCloseTagToStartTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsAtMatchingCloseTagToStartTag.stree.txt new file mode 100644 index 0000000000..8e19b5c2ac --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsAtMatchingCloseTagToStartTag.stree.txt @@ -0,0 +1,50 @@ +RazorDocument - [0..24)::24 - [@{}] + MarkupBlock - [0..24)::24 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..24)::24 + CSharpStatement - [0..24)::24 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..24)::23 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..23)::21 + MarkupBlock - [2..16)::14 + MarkupElement - [2..16)::14 + MarkupStartTag - [2..5)::3 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + CloseAngle;[>]; + MarkupElement - [5..12)::7 + MarkupStartTag - [5..8)::3 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[b]; + CloseAngle;[>]; + MarkupEndTag - [8..12)::4 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[b]; + CloseAngle;[>]; + MarkupEndTag - [12..16)::4 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[a]; + CloseAngle;[>]; + MarkupBlock - [16..23)::7 + MarkupElement - [16..23)::7 + MarkupStartTag - [16..19)::3 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[c]; + CloseAngle;[>]; + MarkupEndTag - [19..23)::4 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[c]; + CloseAngle;[>]; + CSharpStatementLiteral - [23..23)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [23..24)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [24..24)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingMidEmptyTagIfEOFReached.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingMidEmptyTagIfEOFReached.cspans.txt new file mode 100644 index 0000000000..d91425cc17 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingMidEmptyTagIfEOFReached.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [7] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [7] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [7] ) +Markup span at (2:0,2 [4] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [4] ) +MetaCode span at (6:0,6 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [7] ) +Markup span at (7:0,7 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingMidEmptyTagIfEOFReached.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingMidEmptyTagIfEOFReached.diag.txt new file mode 100644 index 0000000000..cca79a1182 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingMidEmptyTagIfEOFReached.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ1024: End of file or an unexpected character was reached before the "br" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                    ") or have matching end tags ("

                    Hello

                    "). If you intended to display a "<" character, use the "<" HTML entity. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingMidEmptyTagIfEOFReached.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingMidEmptyTagIfEOFReached.stree.txt new file mode 100644 index 0000000000..d1385dbe43 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingMidEmptyTagIfEOFReached.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..7)::7 - [@{
                    - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..7)::7 + CSharpStatement - [0..7)::7 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..7)::6 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..6)::4 + MarkupBlock - [2..6)::4 + MarkupElement - [2..6)::4 + MarkupStartTag - [2..6)::4 - [
                    - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + ForwardSlash;[/]; + CloseAngle;[]; + RazorMetaCode - [6..7)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [7..7)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingSingleLineBlockAtEOFIfNoEOLReached.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingSingleLineBlockAtEOFIfNoEOLReached.cspans.txt new file mode 100644 index 0000000000..513e5e1227 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingSingleLineBlockAtEOFIfNoEOLReached.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [11] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +Transition span at (2:0,2 [1] ) (Accepts:None) - Parent: Markup block at (2:0,2 [9] ) +MetaCode span at (3:0,3 [1] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [9] ) +Markup span at (4:0,4 [7] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingSingleLineBlockAtEOFIfNoEOLReached.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingSingleLineBlockAtEOFIfNoEOLReached.diag.txt new file mode 100644 index 0000000000..1ced8c1b88 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingSingleLineBlockAtEOFIfNoEOLReached.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingSingleLineBlockAtEOFIfNoEOLReached.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingSingleLineBlockAtEOFIfNoEOLReached.stree.txt new file mode 100644 index 0000000000..0dcd4b3227 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/StopsParsingSingleLineBlockAtEOFIfNoEOLReached.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..11)::11 - [@{@:foo bar] + MarkupBlock - [0..11)::11 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..11)::11 + CSharpStatement - [0..11)::11 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..11)::10 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..11)::9 + MarkupBlock - [2..11)::9 + MarkupTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [3..4)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [4..11)::7 - [foo bar] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + Whitespace;[ ]; + Text;[bar]; + RazorMetaCode - [11..11)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentAsBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentAsBlock.cspans.txt new file mode 100644 index 0000000000..66f5786183 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentAsBlock.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [15] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [15] ) +Markup span at (2:0,2 [4] ) (Accepts:None) - Parent: HtmlComment block at (2:0,2 [12] ) +Markup span at (6:0,6 [5] ) (Accepts:Whitespace) - Parent: HtmlComment block at (2:0,2 [12] ) +Markup span at (11:0,11 [3] ) (Accepts:None) - Parent: HtmlComment block at (2:0,2 [12] ) +Code span at (14:0,14 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [15] ) +MetaCode span at (14:0,14 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [15] ) +Markup span at (15:0,15 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentAsBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentAsBlock.stree.txt new file mode 100644 index 0000000000..c857f00bc7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentAsBlock.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..15)::15 - [@{}] + MarkupBlock - [0..15)::15 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..15)::15 + CSharpStatement - [0..15)::15 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..15)::14 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..14)::12 + MarkupBlock - [2..14)::12 + MarkupCommentBlock - [2..14)::12 + MarkupTextLiteral - [2..6)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + CSharpStatementLiteral - [14..14)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [14..15)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [15..15)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentWithExtraDashAsBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentWithExtraDashAsBlock.cspans.txt new file mode 100644 index 0000000000..960fc76d40 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentWithExtraDashAsBlock.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [16] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [16] ) +Markup span at (2:0,2 [4] ) (Accepts:None) - Parent: HtmlComment block at (2:0,2 [13] ) +Markup span at (6:0,6 [6] ) (Accepts:Whitespace) - Parent: HtmlComment block at (2:0,2 [13] ) +Markup span at (12:0,12 [3] ) (Accepts:None) - Parent: HtmlComment block at (2:0,2 [13] ) +Code span at (15:0,15 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [16] ) +MetaCode span at (15:0,15 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [16] ) +Markup span at (16:0,16 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentWithExtraDashAsBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentWithExtraDashAsBlock.stree.txt new file mode 100644 index 0000000000..a9736e44df --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentWithExtraDashAsBlock.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..16)::16 - [@{}] + MarkupBlock - [0..16)::16 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..16)::16 + CSharpStatement - [0..16)::16 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..16)::15 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..15)::13 + MarkupBlock - [2..15)::13 + MarkupCommentBlock - [2..15)::13 + MarkupTextLiteral - [2..6)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + CSharpStatementLiteral - [15..15)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [15..16)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [16..16)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentWithinBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentWithinBlock.cspans.txt new file mode 100644 index 0000000000..76cea803fe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentWithinBlock.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [3] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [30] ) +Markup span at (10:0,10 [4] ) (Accepts:None) - Parent: HtmlComment block at (10:0,10 [13] ) +Markup span at (14:0,14 [6] ) (Accepts:Whitespace) - Parent: HtmlComment block at (10:0,10 [13] ) +Markup span at (20:0,20 [3] ) (Accepts:None) - Parent: HtmlComment block at (10:0,10 [13] ) +Markup span at (23:0,23 [3] ) (Accepts:None) - Parent: Markup block at (2:0,2 [30] ) +Markup span at (26:0,26 [6] ) (Accepts:None) - Parent: Tag block at (26:0,26 [6] ) +Code span at (32:0,32 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [33] ) +MetaCode span at (32:0,32 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +Markup span at (33:0,33 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentWithinBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentWithinBlock.stree.txt new file mode 100644 index 0000000000..6bb5a51f00 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsCommentWithinBlock.stree.txt @@ -0,0 +1,45 @@ +RazorDocument - [0..33)::33 - [@{barbaz}] + MarkupBlock - [0..33)::33 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..33)::33 + CSharpStatement - [0..33)::33 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..33)::32 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..32)::30 + MarkupBlock - [2..32)::30 + MarkupElement - [2..32)::30 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [7..10)::3 - [bar] - Gen - SpanEditHandler;Accepts:Any + Text;[bar]; + MarkupCommentBlock - [10..23)::13 + MarkupTextLiteral - [10..14)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupTextLiteral - [23..26)::3 - [baz] - Gen - SpanEditHandler;Accepts:None + Text;[baz]; + MarkupEndTag - [26..32)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [32..33)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsScriptTagsWithLessThanSignsInThem.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsScriptTagsWithLessThanSignsInThem.cspans.txt new file mode 100644 index 0000000000..308cb7122f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsScriptTagsWithLessThanSignsInThem.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [48] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [48] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [48] ) +Markup span at (2:0,2 [8] ) (Accepts:None) - Parent: Tag block at (2:0,2 [8] ) +Markup span at (10:0,10 [28] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [45] ) +Markup span at (38:0,38 [9] ) (Accepts:None) - Parent: Tag block at (38:0,38 [9] ) +Code span at (47:0,47 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [48] ) +MetaCode span at (47:0,47 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [48] ) +Markup span at (48:0,48 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [48] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsScriptTagsWithLessThanSignsInThem.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsScriptTagsWithLessThanSignsInThem.stree.txt new file mode 100644 index 0000000000..76e144c7ae --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsScriptTagsWithLessThanSignsInThem.stree.txt @@ -0,0 +1,41 @@ +RazorDocument - [0..48)::48 - [@{}] + MarkupBlock - [0..48)::48 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..48)::48 + CSharpStatement - [0..48)::48 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..48)::47 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..47)::45 + MarkupBlock - [2..47)::45 + MarkupElement - [2..47)::45 + MarkupStartTag - [2..10)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; + CSharpStatementLiteral - [47..47)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [47..48)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [48..48)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsScriptTagsWithSpacedLessThanSignsInThem.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsScriptTagsWithSpacedLessThanSignsInThem.cspans.txt new file mode 100644 index 0000000000..111203fb08 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsScriptTagsWithSpacedLessThanSignsInThem.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [50] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [50] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [50] ) +Markup span at (2:0,2 [8] ) (Accepts:None) - Parent: Tag block at (2:0,2 [8] ) +Markup span at (10:0,10 [30] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [47] ) +Markup span at (40:0,40 [9] ) (Accepts:None) - Parent: Tag block at (40:0,40 [9] ) +Code span at (49:0,49 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [50] ) +MetaCode span at (49:0,49 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [50] ) +Markup span at (50:0,50 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [50] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsScriptTagsWithSpacedLessThanSignsInThem.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsScriptTagsWithSpacedLessThanSignsInThem.stree.txt new file mode 100644 index 0000000000..bac6484d91 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsScriptTagsWithSpacedLessThanSignsInThem.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..50)::50 - [@{}] + MarkupBlock - [0..50)::50 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..50)::50 + CSharpStatement - [0..50)::50 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..50)::49 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..49)::47 + MarkupBlock - [2..49)::47 + MarkupElement - [2..49)::47 + MarkupStartTag - [2..10)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; + CSharpStatementLiteral - [49..49)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [49..50)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [50..50)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsTagsWithAttributes.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsTagsWithAttributes.cspans.txt new file mode 100644 index 0000000000..04325a68b0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsTagsWithAttributes.cspans.txt @@ -0,0 +1,18 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [51] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [51] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [51] ) +Markup span at (2:0,2 [4] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [15] ) +Markup span at (6:0,6 [6] ) (Accepts:Any) - Parent: Markup block at (6:0,6 [10] ) +Markup span at (12:0,12 [3] ) (Accepts:Any) - Parent: Markup block at (6:0,6 [10] ) +Markup span at (15:0,15 [1] ) (Accepts:Any) - Parent: Markup block at (6:0,6 [10] ) +Markup span at (16:0,16 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [15] ) +Markup span at (17:0,17 [5] ) (Accepts:None) - Parent: Tag block at (17:0,17 [5] ) +Markup span at (22:0,22 [4] ) (Accepts:Any) - Parent: Tag block at (22:0,22 [16] ) +Markup span at (26:0,26 [6] ) (Accepts:Any) - Parent: Markup block at (26:0,26 [10] ) +Markup span at (32:0,32 [4] ) (Accepts:Any) - Parent: Markup block at (26:0,26 [10] ) +Markup span at (36:0,36 [2] ) (Accepts:None) - Parent: Tag block at (22:0,22 [16] ) +Markup span at (38:0,38 [6] ) (Accepts:None) - Parent: Tag block at (38:0,38 [6] ) +Markup span at (44:0,44 [6] ) (Accepts:None) - Parent: Tag block at (44:0,44 [6] ) +Code span at (50:0,50 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [51] ) +MetaCode span at (50:0,50 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [51] ) +Markup span at (51:0,51 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [51] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsTagsWithAttributes.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsTagsWithAttributes.stree.txt new file mode 100644 index 0000000000..21916ea67e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/SupportsTagsWithAttributes.stree.txt @@ -0,0 +1,69 @@ +RazorDocument - [0..51)::51 - [@{}] + MarkupBlock - [0..51)::51 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..51)::51 + CSharpStatement - [0..51)::51 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..51)::50 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..50)::48 + MarkupBlock - [2..50)::48 + MarkupElement - [2..50)::48 + MarkupStartTag - [2..17)::15 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + MarkupAttributeBlock - [6..16)::10 - [ bar="baz"] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..10)::3 - [bar] - Gen - SpanEditHandler;Accepts:Any + Text;[bar]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [12..15)::3 + MarkupLiteralAttributeValue - [12..15)::3 - [baz] + MarkupTextLiteral - [12..15)::3 - [baz] - Gen - SpanEditHandler;Accepts:Any + Text;[baz]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupElement - [17..44)::27 + MarkupStartTag - [17..22)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[biz]; + CloseAngle;[>]; + MarkupElement - [22..38)::16 + MarkupStartTag - [22..38)::16 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[boz]; + MarkupAttributeBlock - [26..36)::10 - [ zoop=zork] + MarkupTextLiteral - [26..27)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [27..31)::4 - [zoop] - Gen - SpanEditHandler;Accepts:Any + Text;[zoop]; + Equals;[=]; + GenericBlock - [32..36)::4 + MarkupLiteralAttributeValue - [32..36)::4 - [zork] + MarkupTextLiteral - [32..36)::4 - [zork] - Gen - SpanEditHandler;Accepts:Any + Text;[zork]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupEndTag - [38..44)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[biz]; + CloseAngle;[>]; + MarkupEndTag - [44..50)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [50..50)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [50..51)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [51..51)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TagWithoutCloseAngleDoesNotTerminateBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TagWithoutCloseAngleDoesNotTerminateBlock.cspans.txt new file mode 100644 index 0000000000..33bfa139cf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TagWithoutCloseAngleDoesNotTerminateBlock.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [30] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [30] ) +Markup span at (2:0,2 [28] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [28] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TagWithoutCloseAngleDoesNotTerminateBlock.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TagWithoutCloseAngleDoesNotTerminateBlock.diag.txt new file mode 100644 index 0000000000..c2dcafc10d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TagWithoutCloseAngleDoesNotTerminateBlock.diag.txt @@ -0,0 +1,2 @@ +(1,3): Error RZ1024: End of file or an unexpected character was reached before the "" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                    ") or have matching end tags ("

                    Hello

                    "). If you intended to display a "<" character, use the "<" HTML entity. +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TagWithoutCloseAngleDoesNotTerminateBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TagWithoutCloseAngleDoesNotTerminateBlock.stree.txt new file mode 100644 index 0000000000..9d0b8c5e64 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TagWithoutCloseAngleDoesNotTerminateBlock.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..30)::30 - [@{< LF ] + MarkupBlock - [0..30)::30 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..30)::30 + CSharpStatement - [0..30)::30 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..30)::29 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..30)::28 + MarkupBlock - [2..30)::28 + MarkupElement - [2..30)::28 + MarkupStartTag - [2..30)::28 - [< LF ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + MarkupMiscAttributeContent - [3..30)::27 + MarkupTextLiteral - [3..30)::27 - [ LF ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + Whitespace;[ ]; + CloseAngle;[]; + RazorMetaCode - [30..30)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOF.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOF.cspans.txt new file mode 100644 index 0000000000..4f1792ca17 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOF.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [7] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [7] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [7] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Code span at (7:0,7 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOF.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOF.diag.txt new file mode 100644 index 0000000000..5ea3dc7ca1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOF.diag.txt @@ -0,0 +1,2 @@ +(1,4): Error RZ1025: The "foo" element was not closed. All elements must be either self-closing or have a matching end tag. +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOF.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOF.stree.txt new file mode 100644 index 0000000000..2bce5971f7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOF.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..7)::7 - [@{] + MarkupBlock - [0..7)::7 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..7)::7 + CSharpStatement - [0..7)::7 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..7)::6 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..7)::5 + MarkupBlock - [2..7)::5 + MarkupElement - [2..7)::5 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [7..7)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [7..7)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOFWhenParsingComment.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOFWhenParsingComment.cspans.txt new file mode 100644 index 0000000000..1886686774 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOFWhenParsingComment.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [11] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +Markup span at (2:0,2 [9] ) (Accepts:None) - Parent: Markup block at (2:0,2 [9] ) +Code span at (11:0,11 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [11] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOFWhenParsingComment.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOFWhenParsingComment.diag.txt new file mode 100644 index 0000000000..1ced8c1b88 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOFWhenParsingComment.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOFWhenParsingComment.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOFWhenParsingComment.stree.txt new file mode 100644 index 0000000000..41cb0f1c0a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesAtEOFWhenParsingComment.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..11)::11 - [@{-->}] + MarkupBlock - [0..34)::34 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..34)::34 + CSharpStatement - [0..34)::34 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..34)::33 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..33)::31 + MarkupBlock - [2..33)::31 + MarkupElement - [2..33)::31 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupCommentBlock - [7..24)::17 + MarkupTextLiteral - [7..11)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupTextLiteral - [24..27)::3 - [-->] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupEndTag - [27..33)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [33..34)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [34..34)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesSGMLDeclarationAtFirstCloseAngle.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesSGMLDeclarationAtFirstCloseAngle.cspans.txt new file mode 100644 index 0000000000..88839eca6a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesSGMLDeclarationAtFirstCloseAngle.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [37] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [37] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [37] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [18] ) (Accepts:None) - Parent: Markup block at (2:0,2 [34] ) +Markup span at (25:0,25 [5] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [34] ) +Markup span at (30:0,30 [6] ) (Accepts:None) - Parent: Tag block at (30:0,30 [6] ) +Code span at (36:0,36 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [37] ) +MetaCode span at (36:0,36 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [37] ) +Markup span at (37:0,37 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [37] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesSGMLDeclarationAtFirstCloseAngle.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesSGMLDeclarationAtFirstCloseAngle.stree.txt new file mode 100644 index 0000000000..628b15a7af --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesSGMLDeclarationAtFirstCloseAngle.stree.txt @@ -0,0 +1,42 @@ +RazorDocument - [0..37)::37 - [@{ baz>}] + MarkupBlock - [0..37)::37 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..37)::37 + CSharpStatement - [0..37)::37 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..37)::36 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..36)::34 + MarkupBlock - [2..36)::34 + MarkupElement - [2..36)::34 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [7..25)::18 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[DOCTYPE]; + Whitespace;[ ]; + Text;[foo]; + Whitespace;[ ]; + Text;[bar]; + CloseAngle;[>]; + MarkupTextLiteral - [25..30)::5 - [ baz>] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[baz]; + CloseAngle;[>]; + MarkupEndTag - [30..36)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [36..36)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [36..37)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [37..37)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesXMLProcessingInstructionAtQuestionMarkCloseAnglePair.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesXMLProcessingInstructionAtQuestionMarkCloseAnglePair.cspans.txt new file mode 100644 index 0000000000..5d7825701c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesXMLProcessingInstructionAtQuestionMarkCloseAnglePair.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [37] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [37] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [37] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [19] ) (Accepts:None) - Parent: Markup block at (2:0,2 [34] ) +Markup span at (26:0,26 [4] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [34] ) +Markup span at (30:0,30 [6] ) (Accepts:None) - Parent: Tag block at (30:0,30 [6] ) +Code span at (36:0,36 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [37] ) +MetaCode span at (36:0,36 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [37] ) +Markup span at (37:0,37 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [37] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesXMLProcessingInstructionAtQuestionMarkCloseAnglePair.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesXMLProcessingInstructionAtQuestionMarkCloseAnglePair.stree.txt new file mode 100644 index 0000000000..3b00cf06f2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TerminatesXMLProcessingInstructionAtQuestionMarkCloseAnglePair.stree.txt @@ -0,0 +1,44 @@ +RazorDocument - [0..37)::37 - [@{ baz}] + MarkupBlock - [0..37)::37 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..37)::37 + CSharpStatement - [0..37)::37 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..37)::36 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..36)::34 + MarkupBlock - [2..36)::34 + MarkupElement - [2..36)::34 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [7..26)::19 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + QuestionMark;[?]; + Text;[xml]; + Whitespace;[ ]; + Text;[foo]; + Whitespace;[ ]; + Text;[bar]; + Whitespace;[ ]; + Text;[baz]; + QuestionMark;[?]; + CloseAngle;[>]; + MarkupTextLiteral - [26..30)::4 - [ baz] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[baz]; + MarkupEndTag - [30..36)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [36..36)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [36..37)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [37..37)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TreatsMalformedTagsAsContent.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TreatsMalformedTagsAsContent.cspans.txt new file mode 100644 index 0000000000..2a4e59b07d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TreatsMalformedTagsAsContent.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [13] ) (Accepts:None) - Parent: Tag block at (7:0,7 [13] ) +Markup span at (20:0,20 [6] ) (Accepts:None) - Parent: Tag block at (20:0,20 [6] ) +Code span at (26:0,26 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (26:0,26 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Markup span at (27:0,27 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TreatsMalformedTagsAsContent.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TreatsMalformedTagsAsContent.diag.txt new file mode 100644 index 0000000000..628d44579e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TreatsMalformedTagsAsContent.diag.txt @@ -0,0 +1,2 @@ +(1,4): Error RZ1025: The "foo" element was not closed. All elements must be either self-closing or have a matching end tag. +(1,23): Error RZ1026: Encountered end tag "foo" with no matching start tag. Are your start/end tags properly balanced? diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TreatsMalformedTagsAsContent.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TreatsMalformedTagsAsContent.stree.txt new file mode 100644 index 0000000000..4d2b3bc02d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/TreatsMalformedTagsAsContent.stree.txt @@ -0,0 +1,45 @@ +RazorDocument - [0..27)::27 - [@{}] + MarkupBlock - [0..27)::27 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..27)::27 + CSharpStatement - [0..27)::27 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..27)::26 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..26)::24 + MarkupBlock - [2..20)::18 + MarkupElement - [2..20)::18 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupElement - [7..20)::13 + MarkupEndTag - [7..20)::13 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[]; + MarkupMiscAttributeContent - [9..19)::10 + MarkupTextLiteral - [9..19)::10 - [!-- bar --] - Gen - SpanEditHandler;Accepts:Any + Bang;[!]; + DoubleHyphen;[--]; + Whitespace;[ ]; + Text;[bar]; + Whitespace;[ ]; + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupBlock - [20..26)::6 + MarkupElement - [20..26)::6 + MarkupEndTag - [20..26)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [26..26)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [26..27)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [27..27)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/WithSelfClosingTagJustEmitsTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/WithSelfClosingTagJustEmitsTag.cspans.txt new file mode 100644 index 0000000000..a94530c9bc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/WithSelfClosingTagJustEmitsTag.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +Markup span at (2:0,2 [7] ) (Accepts:None) - Parent: Tag block at (2:0,2 [7] ) +Code span at (9:0,9 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [10] ) +MetaCode span at (9:0,9 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +Markup span at (10:0,10 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/WithSelfClosingTagJustEmitsTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/WithSelfClosingTagJustEmitsTag.stree.txt new file mode 100644 index 0000000000..948a2dc1f5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlBlockTest/WithSelfClosingTagJustEmitsTag.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..10)::10 - [@{}] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..10)::10 + CSharpStatement - [0..10)::10 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..10)::9 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..9)::7 + MarkupBlock - [2..9)::7 + MarkupElement - [2..9)::7 + MarkupStartTag - [2..9)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + MarkupMiscAttributeContent - [6..7)::1 + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [9..9)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [9..10)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [10..10)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsEndTagWithNoMatchingStartTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsEndTagWithNoMatchingStartTag.cspans.txt new file mode 100644 index 0000000000..aa2e0c80e1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsEndTagWithNoMatchingStartTag.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) +Markup span at (4:0,4 [6] ) (Accepts:Any) - Parent: Tag block at (4:0,4 [6] ) +Markup span at (10:0,10 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsEndTagWithNoMatchingStartTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsEndTagWithNoMatchingStartTag.stree.txt new file mode 100644 index 0000000000..da9b272fd0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsEndTagWithNoMatchingStartTag.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..14)::14 - [Foo Bar] + MarkupBlock - [0..14)::14 + MarkupTextLiteral - [0..4)::4 - [Foo ] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + MarkupElement - [4..10)::6 + MarkupEndTag - [4..10)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [10..14)::4 - [ Bar] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[Bar]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsSwapTokenAtEndOfFileAndOutputsZeroLengthCodeSpan.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsSwapTokenAtEndOfFileAndOutputsZeroLengthCodeSpan.cspans.txt new file mode 100644 index 0000000000..cd03a1193c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsSwapTokenAtEndOfFileAndOutputsZeroLengthCodeSpan.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [1] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [1] ) +Code span at (1:0,1 [0] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [1] ) +Markup span at (1:0,1 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [1] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsSwapTokenAtEndOfFileAndOutputsZeroLengthCodeSpan.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsSwapTokenAtEndOfFileAndOutputsZeroLengthCodeSpan.diag.txt new file mode 100644 index 0000000000..c6d6925451 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsSwapTokenAtEndOfFileAndOutputsZeroLengthCodeSpan.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1004: End-of-file was found after the "@" character. "@" must be followed by a valid code block. If you want to output an "@", escape it using the sequence: "@@" diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsSwapTokenAtEndOfFileAndOutputsZeroLengthCodeSpan.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsSwapTokenAtEndOfFileAndOutputsZeroLengthCodeSpan.stree.txt new file mode 100644 index 0000000000..1b3a186cb6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/AcceptsSwapTokenAtEndOfFileAndOutputsZeroLengthCodeSpan.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..1)::1 - [@] + MarkupBlock - [0..1)::1 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..1)::1 + CSharpImplicitExpression - [0..1)::1 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..1)::0 + CSharpCodeBlock - [1..1)::0 + CSharpExpressionLiteral - [1..1)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Marker;[]; + MarkupTextLiteral - [1..1)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/CorrectlyHandlesOddlySpacedHTMLElements.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/CorrectlyHandlesOddlySpacedHTMLElements.cspans.txt new file mode 100644 index 0000000000..d0a7399fbb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/CorrectlyHandlesOddlySpacedHTMLElements.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [6] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [6] ) +Markup span at (6:0,6 [2] ) (Accepts:Any) - Parent: Tag block at (6:0,6 [17] ) +Markup span at (8:0,8 [10] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [14] ) +Markup span at (18:0,18 [3] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [14] ) +Markup span at (21:0,21 [1] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [14] ) +Markup span at (22:0,22 [1] ) (Accepts:Any) - Parent: Tag block at (6:0,6 [17] ) +Markup span at (23:0,23 [5] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [39] ) +Markup span at (28:0,28 [4] ) (Accepts:Any) - Parent: Tag block at (28:0,28 [4] ) +Markup span at (32:0,32 [7] ) (Accepts:Any) - Parent: Tag block at (32:0,32 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/CorrectlyHandlesOddlySpacedHTMLElements.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/CorrectlyHandlesOddlySpacedHTMLElements.stree.txt new file mode 100644 index 0000000000..d407c11ec6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/CorrectlyHandlesOddlySpacedHTMLElements.stree.txt @@ -0,0 +1,49 @@ +RazorDocument - [0..39)::39 - [

                    Foo

                    ] + MarkupBlock - [0..39)::39 + MarkupElement - [0..39)::39 + MarkupStartTag - [0..6)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + MarkupMiscAttributeContent - [4..5)::1 + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[>]; + MarkupElement - [6..32)::26 + MarkupStartTag - [6..23)::17 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupAttributeBlock - [8..22)::14 - [ class = 'bar'] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..14)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Equals;[=]; + MarkupTextLiteral - [16..18)::2 - [ '] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + SingleQuote;[']; + GenericBlock - [18..21)::3 + MarkupLiteralAttributeValue - [18..21)::3 - [bar] + MarkupTextLiteral - [18..21)::3 - [bar] - Gen - SpanEditHandler;Accepts:Any + Text;[bar]; + MarkupTextLiteral - [21..22)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTextLiteral - [23..28)::5 - [ Foo ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[Foo]; + Whitespace;[ ]; + MarkupEndTag - [28..32)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [32..39)::7 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + MarkupMiscAttributeContent - [37..38)::1 + MarkupTextLiteral - [37..38)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/CorrectlyHandlesSingleLineOfMarkupWithEmbeddedStatement.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/CorrectlyHandlesSingleLineOfMarkupWithEmbeddedStatement.cspans.txt new file mode 100644 index 0000000000..5d0ddc2940 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/CorrectlyHandlesSingleLineOfMarkupWithEmbeddedStatement.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (5:0,5 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) +Transition span at (9:0,9 [1] ) (Accepts:None) - Parent: Statement block at (9:0,9 [12] ) +Code span at (10:0,10 [11] ) (Accepts:Any) - Parent: Statement block at (9:0,9 [12] ) +Markup span at (21:0,21 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) +Markup span at (25:0,25 [6] ) (Accepts:Any) - Parent: Tag block at (25:0,25 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/CorrectlyHandlesSingleLineOfMarkupWithEmbeddedStatement.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/CorrectlyHandlesSingleLineOfMarkupWithEmbeddedStatement.stree.txt new file mode 100644 index 0000000000..259ac75bfb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/CorrectlyHandlesSingleLineOfMarkupWithEmbeddedStatement.stree.txt @@ -0,0 +1,29 @@ +RazorDocument - [0..31)::31 - [
                    Foo @if(true) {} Bar
                    ] + MarkupBlock - [0..31)::31 + MarkupElement - [0..31)::31 + MarkupStartTag - [0..5)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [5..9)::4 - [Foo ] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + CSharpCodeBlock - [9..21)::12 + CSharpTransition - [9..10)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [10..21)::11 - [if(true) {}] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + RightBrace;[}]; + MarkupTextLiteral - [21..25)::4 - [ Bar] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[Bar]; + MarkupEndTag - [25..31)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotIgnoreNewLineAtTheEndOfMarkupBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotIgnoreNewLineAtTheEndOfMarkupBlock.cspans.txt new file mode 100644 index 0000000000..bc666a56c0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotIgnoreNewLineAtTheEndOfMarkupBlock.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +Code span at (2:0,2 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [5] ) +MetaCode span at (4:1,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +Markup span at (5:1,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Markup span at (7:2,0 [6] ) (Accepts:Any) - Parent: Tag block at (7:2,0 [6] ) +Markup span at (13:2,6 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotIgnoreNewLineAtTheEndOfMarkupBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotIgnoreNewLineAtTheEndOfMarkupBlock.stree.txt new file mode 100644 index 0000000000..fabfa3c78f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotIgnoreNewLineAtTheEndOfMarkupBlock.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..15)::15 - [@{LF}LFLF] + MarkupBlock - [0..15)::15 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..5)::5 + CSharpStatement - [0..5)::5 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..5)::4 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..4)::2 + CSharpStatementLiteral - [2..4)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + RazorMetaCode - [4..5)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [5..7)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [7..15)::8 + MarkupStartTag - [7..13)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[html]; + CloseAngle;[>]; + MarkupTextLiteral - [13..15)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotIgnoreWhitespaceAtTheEndOfVerbatimBlockIfNoNewlinePresent.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotIgnoreWhitespaceAtTheEndOfVerbatimBlockIfNoNewlinePresent.cspans.txt new file mode 100644 index 0000000000..dc0d803cca --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotIgnoreWhitespaceAtTheEndOfVerbatimBlockIfNoNewlinePresent.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +Code span at (2:0,2 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [5] ) +MetaCode span at (4:1,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +Markup span at (5:1,1 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Markup span at (9:1,5 [6] ) (Accepts:Any) - Parent: Tag block at (9:1,5 [6] ) +Markup span at (15:1,11 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotIgnoreWhitespaceAtTheEndOfVerbatimBlockIfNoNewlinePresent.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotIgnoreWhitespaceAtTheEndOfVerbatimBlockIfNoNewlinePresent.stree.txt new file mode 100644 index 0000000000..2e72f13a9f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotIgnoreWhitespaceAtTheEndOfVerbatimBlockIfNoNewlinePresent.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..17)::17 - [@{LF} LF] + MarkupBlock - [0..17)::17 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..5)::5 + CSharpStatement - [0..5)::5 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..5)::4 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..4)::2 + CSharpStatementLiteral - [2..4)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + RazorMetaCode - [4..5)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [5..9)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [9..17)::8 + MarkupStartTag - [9..15)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[html]; + CloseAngle;[>]; + MarkupTextLiteral - [15..17)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderExtraNewLineAtTheEndOfVerbatimBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderExtraNewLineAtTheEndOfVerbatimBlock.cspans.txt new file mode 100644 index 0000000000..3377e6030e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderExtraNewLineAtTheEndOfVerbatimBlock.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +Code span at (2:0,2 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [5] ) +MetaCode span at (4:1,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +Markup span at (5:1,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) +Markup span at (7:2,0 [6] ) (Accepts:Any) - Parent: Tag block at (7:2,0 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderExtraNewLineAtTheEndOfVerbatimBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderExtraNewLineAtTheEndOfVerbatimBlock.stree.txt new file mode 100644 index 0000000000..851d431f02 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderExtraNewLineAtTheEndOfVerbatimBlock.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..13)::13 - [@{LF}LF] + MarkupBlock - [0..13)::13 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..5)::5 + CSharpStatement - [0..5)::5 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..5)::4 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..4)::2 + CSharpStatementLiteral - [2..4)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + RazorMetaCode - [4..5)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [5..7)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [7..13)::6 + MarkupStartTag - [7..13)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[html]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderExtraWhitespaceAndNewLineAtTheEndOfVerbatimBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderExtraWhitespaceAndNewLineAtTheEndOfVerbatimBlock.cspans.txt new file mode 100644 index 0000000000..f0a0bcd1d0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderExtraWhitespaceAndNewLineAtTheEndOfVerbatimBlock.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +Code span at (2:0,2 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [5] ) +MetaCode span at (4:1,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +Markup span at (5:1,1 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Markup span at (9:2,0 [6] ) (Accepts:Any) - Parent: Tag block at (9:2,0 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderExtraWhitespaceAndNewLineAtTheEndOfVerbatimBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderExtraWhitespaceAndNewLineAtTheEndOfVerbatimBlock.stree.txt new file mode 100644 index 0000000000..33396e0ba8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderExtraWhitespaceAndNewLineAtTheEndOfVerbatimBlock.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..15)::15 - [@{LF} LF] + MarkupBlock - [0..15)::15 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..5)::5 + CSharpStatement - [0..5)::5 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..5)::4 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..4)::2 + CSharpStatementLiteral - [2..4)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + RazorMetaCode - [4..5)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [5..9)::4 - [ LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + MarkupElement - [9..15)::6 + MarkupStartTag - [9..15)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[html]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderNewlineAfterTextTagInVerbatimBlockIfFollowedByCSharp.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderNewlineAfterTextTagInVerbatimBlockIfFollowedByCSharp.cspans.txt new file mode 100644 index 0000000000..64066d4763 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderNewlineAfterTextTagInVerbatimBlockIfFollowedByCSharp.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +Transition span at (2:0,2 [6] ) (Accepts:None) - Parent: Tag block at (2:0,2 [6] ) +Markup span at (8:0,8 [4] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [17] ) +Transition span at (12:0,12 [7] ) (Accepts:None) - Parent: Tag block at (12:0,12 [7] ) +Code span at (19:0,19 [4] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [24] ) +MetaCode span at (23:2,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +Markup span at (24:2,1 [6] ) (Accepts:Any) - Parent: Tag block at (24:2,1 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderNewlineAfterTextTagInVerbatimBlockIfFollowedByCSharp.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderNewlineAfterTextTagInVerbatimBlockIfFollowedByCSharp.stree.txt new file mode 100644 index 0000000000..b1b8a4a26f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotRenderNewlineAfterTextTagInVerbatimBlockIfFollowedByCSharp.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..30)::30 - [@{BlahLFLF}] + MarkupBlock - [0..30)::30 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..24)::24 + CSharpStatement - [0..24)::24 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..24)::23 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..23)::21 + MarkupBlock - [2..19)::17 + MarkupElement - [2..19)::17 + MarkupStartTag - [2..8)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [8..12)::4 - [Blah] - Gen - SpanEditHandler;Accepts:Any + Text;[Blah]; + MarkupEndTag - [12..19)::7 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [19..23)::4 - [LFLF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + NewLine;[LF]; + RazorMetaCode - [23..24)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupElement - [24..30)::6 + MarkupStartTag - [24..30)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[html]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotReturnErrorOnMismatchedTags.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotReturnErrorOnMismatchedTags.cspans.txt new file mode 100644 index 0000000000..171db96fab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotReturnErrorOnMismatchedTags.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) +Markup span at (4:0,4 [5] ) (Accepts:Any) - Parent: Tag block at (4:0,4 [5] ) +Markup span at (9:0,9 [3] ) (Accepts:Any) - Parent: Tag block at (9:0,9 [3] ) +Markup span at (12:0,12 [4] ) (Accepts:Any) - Parent: Tag block at (12:0,12 [4] ) +Markup span at (16:0,16 [4] ) (Accepts:Any) - Parent: Tag block at (16:0,16 [4] ) +Markup span at (20:0,20 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotReturnErrorOnMismatchedTags.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotReturnErrorOnMismatchedTags.stree.txt new file mode 100644 index 0000000000..8943facbf6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotReturnErrorOnMismatchedTags.stree.txt @@ -0,0 +1,29 @@ +RazorDocument - [0..24)::24 - [Foo

                    Baz] + MarkupBlock - [0..24)::24 + MarkupTextLiteral - [0..4)::4 - [Foo ] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + MarkupElement - [4..24)::20 + MarkupStartTag - [4..9)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupElement - [9..16)::7 + MarkupStartTag - [9..12)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [12..16)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [16..20)::4 + MarkupEndTag - [16..20)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [20..24)::4 - [ Baz] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[Baz]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotSwitchToCodeOnEmailAddressInAttribute.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotSwitchToCodeOnEmailAddressInAttribute.cspans.txt new file mode 100644 index 0000000000..00a1a77d55 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotSwitchToCodeOnEmailAddressInAttribute.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [39] ) +Markup span at (2:0,2 [7] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [36] ) +Markup span at (9:0,9 [28] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [36] ) +Markup span at (37:0,37 [1] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [36] ) +Markup span at (38:0,38 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [39] ) +Markup span at (39:0,39 [8] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [51] ) +Markup span at (47:0,47 [4] ) (Accepts:Any) - Parent: Tag block at (47:0,47 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotSwitchToCodeOnEmailAddressInAttribute.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotSwitchToCodeOnEmailAddressInAttribute.stree.txt new file mode 100644 index 0000000000..77310407c8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/DoesNotSwitchToCodeOnEmailAddressInAttribute.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..51)::51 - [Email me] + MarkupBlock - [0..51)::51 + MarkupElement - [0..51)::51 + MarkupStartTag - [0..39)::39 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [2..38)::36 - [ href="mailto:example@microsoft.com"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..7)::4 - [href] - Gen - SpanEditHandler;Accepts:Any + Text;[href]; + Equals;[=]; + MarkupTextLiteral - [8..9)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [9..37)::28 + MarkupLiteralAttributeValue - [9..37)::28 - [mailto:example@microsoft.com] + MarkupTextLiteral - [9..37)::28 - [mailto:example@microsoft.com] - Gen - SpanEditHandler;Accepts:Any + Text;[mailto:example@microsoft.com]; + MarkupTextLiteral - [37..38)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [39..47)::8 - [Email me] - Gen - SpanEditHandler;Accepts:Any + Text;[Email]; + Whitespace;[ ]; + Text;[me]; + MarkupEndTag - [47..51)::4 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[a]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsAtSignAsMarkupIfAtEndOfFile.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsAtSignAsMarkupIfAtEndOfFile.cspans.txt new file mode 100644 index 0000000000..88ff154777 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsAtSignAsMarkupIfAtEndOfFile.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [5] ) +Transition span at (4:0,4 [1] ) (Accepts:None) - Parent: Expression block at (4:0,4 [1] ) +Code span at (5:0,5 [0] ) (Accepts:NonWhitespace) - Parent: Expression block at (4:0,4 [1] ) +Markup span at (5:0,5 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsAtSignAsMarkupIfAtEndOfFile.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsAtSignAsMarkupIfAtEndOfFile.diag.txt new file mode 100644 index 0000000000..bc2525ce53 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsAtSignAsMarkupIfAtEndOfFile.diag.txt @@ -0,0 +1 @@ +(1,6): Error RZ1004: End-of-file was found after the "@" character. "@" must be followed by a valid code block. If you want to output an "@", escape it using the sequence: "@@" diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsAtSignAsMarkupIfAtEndOfFile.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsAtSignAsMarkupIfAtEndOfFile.stree.txt new file mode 100644 index 0000000000..5f52cafeba --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsAtSignAsMarkupIfAtEndOfFile.stree.txt @@ -0,0 +1,15 @@ +RazorDocument - [0..5)::5 - [foo @] + MarkupBlock - [0..5)::5 + MarkupTextLiteral - [0..4)::4 - [foo ] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + Whitespace;[ ]; + CSharpCodeBlock - [4..5)::1 + CSharpImplicitExpression - [4..5)::1 + CSharpTransition - [4..5)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [5..5)::0 + CSharpCodeBlock - [5..5)::0 + CSharpExpressionLiteral - [5..5)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Marker;[]; + MarkupTextLiteral - [5..5)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsCodeBlockIfFirstCharacterIsSwapCharacter.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsCodeBlockIfFirstCharacterIsSwapCharacter.cspans.txt new file mode 100644 index 0000000000..490eb4a82f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsCodeBlockIfFirstCharacterIsSwapCharacter.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [4] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Expression block at (0:0,0 [4] ) +Code span at (1:0,1 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (0:0,0 [4] ) +Markup span at (4:0,4 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsCodeBlockIfFirstCharacterIsSwapCharacter.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsCodeBlockIfFirstCharacterIsSwapCharacter.stree.txt new file mode 100644 index 0000000000..14decc3757 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/EmitsCodeBlockIfFirstCharacterIsSwapCharacter.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..4)::4 - [@bar] + MarkupBlock - [0..4)::4 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..4)::4 + CSharpImplicitExpression - [0..4)::4 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [1..4)::3 + CSharpCodeBlock - [1..4)::3 + CSharpExpressionLiteral - [1..4)::3 - [bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[bar]; + MarkupTextLiteral - [4..4)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesExtraNewLineBeforeMarkupInNestedBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesExtraNewLineBeforeMarkupInNestedBlock.cspans.txt new file mode 100644 index 0000000000..7217cc651e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesExtraNewLineBeforeMarkupInNestedBlock.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [37] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +Code span at (2:0,2 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [31] ) +Transition span at (4:1,0 [1] ) (Accepts:None) - Parent: Statement block at (4:1,0 [13] ) +Code span at (5:1,1 [12] ) (Accepts:Any) - Parent: Statement block at (4:1,0 [13] ) +Code span at (17:2,1 [3] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [31] ) +Markup span at (20:3,0 [7] ) (Accepts:None) - Parent: Tag block at (20:3,0 [7] ) +Markup span at (27:3,7 [3] ) (Accepts:None) - Parent: Markup block at (20:3,0 [10] ) +Code span at (30:4,0 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [31] ) +MetaCode span at (30:4,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +Markup span at (31:4,1 [6] ) (Accepts:Any) - Parent: Tag block at (31:4,1 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesExtraNewLineBeforeMarkupInNestedBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesExtraNewLineBeforeMarkupInNestedBlock.stree.txt new file mode 100644 index 0000000000..99d6c80a8f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesExtraNewLineBeforeMarkupInNestedBlock.stree.txt @@ -0,0 +1,46 @@ +RazorDocument - [0..37)::37 - [@{LF@if(true){LF} LF LF}] + MarkupBlock - [0..37)::37 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..31)::31 + CSharpStatement - [0..31)::31 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..31)::30 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..30)::28 + CSharpStatementLiteral - [2..4)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + CSharpCodeBlock - [4..17)::13 + CSharpTransition - [4..5)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [5..17)::12 - [if(true){LF}] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + LeftBrace;[{]; + NewLine;[LF]; + RightBrace;[}]; + CSharpStatementLiteral - [17..20)::3 - [ LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + MarkupBlock - [20..30)::10 + MarkupElement - [20..27)::7 + MarkupStartTag - [20..27)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + MarkupTextLiteral - [27..30)::3 - [ LF] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + NewLine;[LF]; + CSharpStatementLiteral - [30..30)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [30..31)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupElement - [31..37)::6 + MarkupStartTag - [31..37)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[html]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesNewLineAndMarkupInNestedBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesNewLineAndMarkupInNestedBlock.cspans.txt new file mode 100644 index 0000000000..a77a720a46 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesNewLineAndMarkupInNestedBlock.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Code span at (2:0,2 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [27] ) +Transition span at (4:1,0 [1] ) (Accepts:None) - Parent: Statement block at (4:1,0 [13] ) +Code span at (5:1,1 [12] ) (Accepts:Any) - Parent: Statement block at (4:1,0 [13] ) +Markup span at (17:2,1 [1] ) (Accepts:Any) - Parent: Markup block at (17:2,1 [9] ) +Markup span at (18:2,2 [7] ) (Accepts:None) - Parent: Tag block at (18:2,2 [7] ) +Markup span at (25:2,9 [1] ) (Accepts:None) - Parent: Markup block at (17:2,1 [9] ) +Code span at (26:2,10 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (26:2,10 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Markup span at (27:2,11 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesNewLineAndMarkupInNestedBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesNewLineAndMarkupInNestedBlock.stree.txt new file mode 100644 index 0000000000..fe8f98cf28 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesNewLineAndMarkupInNestedBlock.stree.txt @@ -0,0 +1,41 @@ +RazorDocument - [0..27)::27 - [@{LF@if(true){LF} }] + MarkupBlock - [0..27)::27 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..27)::27 + CSharpStatement - [0..27)::27 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..27)::26 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..26)::24 + CSharpStatementLiteral - [2..4)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + CSharpCodeBlock - [4..17)::13 + CSharpTransition - [4..5)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [5..17)::12 - [if(true){LF}] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + LeftBrace;[{]; + NewLine;[LF]; + RightBrace;[}]; + MarkupBlock - [17..26)::9 + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [18..25)::7 + MarkupStartTag - [18..25)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [26..26)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [26..27)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [27..27)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesNewLineInNestedBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesNewLineInNestedBlock.cspans.txt new file mode 100644 index 0000000000..bcf75ec253 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesNewLineInNestedBlock.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Code span at (2:0,2 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [21] ) +Transition span at (4:1,0 [1] ) (Accepts:None) - Parent: Statement block at (4:1,0 [13] ) +Code span at (5:1,1 [12] ) (Accepts:Any) - Parent: Statement block at (4:1,0 [13] ) +Code span at (17:2,1 [3] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [21] ) +MetaCode span at (20:3,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Markup span at (21:3,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) +Markup span at (23:4,0 [6] ) (Accepts:Any) - Parent: Tag block at (23:4,0 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesNewLineInNestedBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesNewLineInNestedBlock.stree.txt new file mode 100644 index 0000000000..8e2d005143 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandlesNewLineInNestedBlock.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..29)::29 - [@{LF@if(true){LF} LF}LF] + MarkupBlock - [0..29)::29 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..21)::21 + CSharpStatement - [0..21)::21 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..21)::20 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..20)::18 + CSharpStatementLiteral - [2..4)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + CSharpCodeBlock - [4..17)::13 + CSharpTransition - [4..5)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [5..17)::12 - [if(true){LF}] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + LeftBrace;[{]; + NewLine;[LF]; + RightBrace;[}]; + CSharpStatementLiteral - [17..20)::3 - [ LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + NewLine;[LF]; + RazorMetaCode - [20..21)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [21..23)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [23..29)::6 + MarkupStartTag - [23..29)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[html]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandsParsingOverToCodeParserWhenAtSignEncounteredAndEmitsOutput.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandsParsingOverToCodeParserWhenAtSignEncounteredAndEmitsOutput.cspans.txt new file mode 100644 index 0000000000..55bb03e494 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandsParsingOverToCodeParserWhenAtSignEncounteredAndEmitsOutput.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [12] ) +Transition span at (4:0,4 [1] ) (Accepts:None) - Parent: Expression block at (4:0,4 [4] ) +Code span at (5:0,5 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (4:0,4 [4] ) +Markup span at (8:0,8 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [12] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandsParsingOverToCodeParserWhenAtSignEncounteredAndEmitsOutput.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandsParsingOverToCodeParserWhenAtSignEncounteredAndEmitsOutput.stree.txt new file mode 100644 index 0000000000..112b5dc463 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/HandsParsingOverToCodeParserWhenAtSignEncounteredAndEmitsOutput.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..12)::12 - [foo @bar baz] + MarkupBlock - [0..12)::12 + MarkupTextLiteral - [0..4)::4 - [foo ] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + Whitespace;[ ]; + CSharpCodeBlock - [4..8)::4 + CSharpImplicitExpression - [4..8)::4 + CSharpTransition - [4..5)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [5..8)::3 + CSharpCodeBlock - [5..8)::3 + CSharpExpressionLiteral - [5..8)::3 - [bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[bar]; + MarkupTextLiteral - [8..12)::4 - [ baz] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[baz]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/IgnoresTagsInContentsOfScriptTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/IgnoresTagsInContentsOfScriptTag.cspans.txt new file mode 100644 index 0000000000..5d433efd31 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/IgnoresTagsInContentsOfScriptTag.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [8] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [8] ) +Markup span at (8:0,8 [13] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) +Transition span at (21:0,21 [1] ) (Accepts:None) - Parent: Expression block at (21:0,21 [4] ) +Code span at (22:0,22 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (21:0,21 [4] ) +Markup span at (25:0,25 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) +Markup span at (27:0,27 [9] ) (Accepts:Any) - Parent: Tag block at (27:0,27 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/IgnoresTagsInContentsOfScriptTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/IgnoresTagsInContentsOfScriptTag.stree.txt new file mode 100644 index 0000000000..1bade1e988 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/IgnoresTagsInContentsOfScriptTag.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..36)::36 - [] + MarkupBlock - [0..36)::36 + MarkupElement - [0..36)::36 + MarkupStartTag - [0..8)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/NestedCodeBlockWithMarkupSetsDotAsMarkup.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/NestedCodeBlockWithMarkupSetsDotAsMarkup.cspans.txt new file mode 100644 index 0000000000..ae1f1aa184 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/NestedCodeBlockWithMarkupSetsDotAsMarkup.cspans.txt @@ -0,0 +1,15 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [52] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [52] ) +Code span at (1:0,1 [12] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [52] ) +Transition span at (13:0,13 [1] ) (Accepts:None) - Parent: Statement block at (13:0,13 [37] ) +Code span at (14:0,14 [11] ) (Accepts:Any) - Parent: Statement block at (13:0,13 [37] ) +Markup span at (25:0,25 [1] ) (Accepts:Any) - Parent: Markup block at (25:0,25 [24] ) +Markup span at (26:0,26 [5] ) (Accepts:None) - Parent: Tag block at (26:0,26 [5] ) +Markup span at (31:0,31 [0] ) (Accepts:Any) - Parent: Markup block at (25:0,25 [24] ) +Transition span at (31:0,31 [1] ) (Accepts:None) - Parent: Expression block at (31:0,31 [10] ) +Code span at (32:0,32 [9] ) (Accepts:NonWhitespace) - Parent: Expression block at (31:0,31 [10] ) +Markup span at (41:0,41 [1] ) (Accepts:Any) - Parent: Markup block at (25:0,25 [24] ) +Markup span at (42:0,42 [6] ) (Accepts:None) - Parent: Tag block at (42:0,42 [6] ) +Markup span at (48:0,48 [1] ) (Accepts:None) - Parent: Markup block at (25:0,25 [24] ) +Code span at (49:0,49 [1] ) (Accepts:Any) - Parent: Statement block at (13:0,13 [37] ) +Code span at (50:0,50 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [52] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/NestedCodeBlockWithMarkupSetsDotAsMarkup.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/NestedCodeBlockWithMarkupSetsDotAsMarkup.stree.txt new file mode 100644 index 0000000000..3ad32ce552 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/NestedCodeBlockWithMarkupSetsDotAsMarkup.stree.txt @@ -0,0 +1,58 @@ +RazorDocument - [0..52)::52 - [@if (true) { @if(false) {
                    @something.
                    } }] + MarkupBlock - [0..52)::52 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..52)::52 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [1..13)::12 - [if (true) { ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + CSharpCodeBlock - [13..50)::37 + CSharpTransition - [13..14)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [14..25)::11 - [if(false) {] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + LeftParenthesis;[(]; + Keyword;[false]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + MarkupBlock - [25..49)::24 + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [26..48)::22 + MarkupStartTag - [26..31)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [31..31)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [31..41)::10 + CSharpImplicitExpression - [31..41)::10 + CSharpTransition - [31..32)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [32..41)::9 + CSharpCodeBlock - [32..41)::9 + CSharpExpressionLiteral - [32..41)::9 - [something] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[something]; + MarkupTextLiteral - [41..42)::1 - [.] - Gen - SpanEditHandler;Accepts:Any + Text;[.]; + MarkupEndTag - [42..48)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [48..49)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [49..50)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + RightBrace;[}]; + CSharpStatementLiteral - [50..52)::2 - [ }] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RightBrace;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/NoLongerSupportsDollarOpenBraceCombination.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/NoLongerSupportsDollarOpenBraceCombination.cspans.txt new file mode 100644 index 0000000000..8a3272c5b7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/NoLongerSupportsDollarOpenBraceCombination.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (5:0,5 [6] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Markup span at (11:0,11 [6] ) (Accepts:Any) - Parent: Tag block at (11:0,11 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/NoLongerSupportsDollarOpenBraceCombination.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/NoLongerSupportsDollarOpenBraceCombination.stree.txt new file mode 100644 index 0000000000..b636dfcedc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/NoLongerSupportsDollarOpenBraceCombination.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..17)::17 - [${bar}] + MarkupBlock - [0..17)::17 + MarkupElement - [0..17)::17 + MarkupStartTag - [0..5)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [5..11)::6 - [${bar}] - Gen - SpanEditHandler;Accepts:Any + Text;[${bar}]; + MarkupEndTag - [11..17)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/OutputsEmptyBlockWithEmptyMarkupSpanIfContentIsEmptyString.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/OutputsEmptyBlockWithEmptyMarkupSpanIfContentIsEmptyString.cspans.txt new file mode 100644 index 0000000000..a7687acf26 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/OutputsEmptyBlockWithEmptyMarkupSpanIfContentIsEmptyString.cspans.txt @@ -0,0 +1 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [0] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/OutputsEmptyBlockWithEmptyMarkupSpanIfContentIsEmptyString.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/OutputsEmptyBlockWithEmptyMarkupSpanIfContentIsEmptyString.stree.txt new file mode 100644 index 0000000000..dcd6e30919 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/OutputsEmptyBlockWithEmptyMarkupSpanIfContentIsEmptyString.stree.txt @@ -0,0 +1,4 @@ +RazorDocument - [0..0)::0 - [] + MarkupBlock - [0..0)::0 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/OutputsWhitespaceOnlyContentAsSingleWhitespaceMarkupSpan.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/OutputsWhitespaceOnlyContentAsSingleWhitespaceMarkupSpan.cspans.txt new file mode 100644 index 0000000000..24b53ba184 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/OutputsWhitespaceOnlyContentAsSingleWhitespaceMarkupSpan.cspans.txt @@ -0,0 +1 @@ +Markup span at (0:0,0 [10] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/OutputsWhitespaceOnlyContentAsSingleWhitespaceMarkupSpan.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/OutputsWhitespaceOnlyContentAsSingleWhitespaceMarkupSpan.stree.txt new file mode 100644 index 0000000000..8ba87c13e5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/OutputsWhitespaceOnlyContentAsSingleWhitespaceMarkupSpan.stree.txt @@ -0,0 +1,4 @@ +RazorDocument - [0..10)::10 - [ ] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..10)::10 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParseDocumentDoesNotSwitchToCodeOnEmailAddressInText.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParseDocumentDoesNotSwitchToCodeOnEmailAddressInText.cspans.txt new file mode 100644 index 0000000000..fdb12c7ba5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParseDocumentDoesNotSwitchToCodeOnEmailAddressInText.cspans.txt @@ -0,0 +1 @@ +Markup span at (0:0,0 [21] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParseDocumentDoesNotSwitchToCodeOnEmailAddressInText.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParseDocumentDoesNotSwitchToCodeOnEmailAddressInText.stree.txt new file mode 100644 index 0000000000..d745d52162 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParseDocumentDoesNotSwitchToCodeOnEmailAddressInText.stree.txt @@ -0,0 +1,4 @@ +RazorDocument - [0..21)::21 - [example@microsoft.com] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..21)::21 - [example@microsoft.com] - Gen - SpanEditHandler;Accepts:Any + Text;[example@microsoft.com]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParseSectionIgnoresTagsInContentsOfScriptTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParseSectionIgnoresTagsInContentsOfScriptTag.cspans.txt new file mode 100644 index 0000000000..3b00db2835 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParseSectionIgnoresTagsInContentsOfScriptTag.cspans.txt @@ -0,0 +1,17 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [53] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [53] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [53] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [53] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [53] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [53] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [53] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [38] ) +Markup span at (15:0,15 [8] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [8] ) +Markup span at (23:0,23 [13] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [38] ) +Transition span at (36:0,36 [1] ) (Accepts:None) - Parent: Expression block at (36:0,36 [4] ) +Code span at (37:0,37 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (36:0,36 [4] ) +Markup span at (40:0,40 [2] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [38] ) +Markup span at (42:0,42 [9] ) (Accepts:Any) - Parent: Tag block at (42:0,42 [9] ) +Markup span at (51:0,51 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [38] ) +MetaCode span at (52:0,52 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [53] ) +Markup span at (53:0,53 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [53] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParseSectionIgnoresTagsInContentsOfScriptTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParseSectionIgnoresTagsInContentsOfScriptTag.stree.txt new file mode 100644 index 0000000000..6d1d25d388 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParseSectionIgnoresTagsInContentsOfScriptTag.stree.txt @@ -0,0 +1,58 @@ +RazorDocument - [0..53)::53 - [@section Foo { }] + MarkupBlock - [0..53)::53 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..53)::53 + RazorDirective - [0..53)::53 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..53)::52 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..53)::45 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [Foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[Foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..52)::38 + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [15..51)::36 + MarkupStartTag - [15..23)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; + MarkupTextLiteral - [51..52)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [52..53)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [53..53)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParsesWholeContentAsOneSpanIfNoSwapCharacterEncountered.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParsesWholeContentAsOneSpanIfNoSwapCharacterEncountered.cspans.txt new file mode 100644 index 0000000000..5b9dbcd8aa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParsesWholeContentAsOneSpanIfNoSwapCharacterEncountered.cspans.txt @@ -0,0 +1 @@ +Markup span at (0:0,0 [7] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParsesWholeContentAsOneSpanIfNoSwapCharacterEncountered.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParsesWholeContentAsOneSpanIfNoSwapCharacterEncountered.stree.txt new file mode 100644 index 0000000000..30659bb00b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ParsesWholeContentAsOneSpanIfNoSwapCharacterEncountered.stree.txt @@ -0,0 +1,6 @@ +RazorDocument - [0..7)::7 - [foo baz] + MarkupBlock - [0..7)::7 + MarkupTextLiteral - [0..7)::7 - [foo baz] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + Whitespace;[ ]; + Text;[baz]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersExtraNewlineAtTheEndTextTagInVerbatimBlockIfFollowedByHtml.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersExtraNewlineAtTheEndTextTagInVerbatimBlockIfFollowedByHtml.cspans.txt new file mode 100644 index 0000000000..f77279dbd9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersExtraNewlineAtTheEndTextTagInVerbatimBlockIfFollowedByHtml.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [38] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Transition span at (2:0,2 [6] ) (Accepts:None) - Parent: Tag block at (2:0,2 [6] ) +Markup span at (8:0,8 [4] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [19] ) +Transition span at (12:0,12 [7] ) (Accepts:None) - Parent: Tag block at (12:0,12 [7] ) +Markup span at (19:0,19 [2] ) (Accepts:None) - Parent: Markup block at (2:0,2 [19] ) +Markup span at (21:1,0 [8] ) (Accepts:None) - Parent: Tag block at (21:1,0 [8] ) +Markup span at (29:1,8 [2] ) (Accepts:None) - Parent: Markup block at (21:1,0 [10] ) +Code span at (31:2,0 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (31:2,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Markup span at (32:2,1 [6] ) (Accepts:Any) - Parent: Tag block at (32:2,1 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersExtraNewlineAtTheEndTextTagInVerbatimBlockIfFollowedByHtml.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersExtraNewlineAtTheEndTextTagInVerbatimBlockIfFollowedByHtml.stree.txt new file mode 100644 index 0000000000..c9a55ee938 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersExtraNewlineAtTheEndTextTagInVerbatimBlockIfFollowedByHtml.stree.txt @@ -0,0 +1,45 @@ +RazorDocument - [0..38)::38 - [@{BlahLFLF}] + MarkupBlock - [0..38)::38 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..32)::32 + CSharpStatement - [0..32)::32 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..32)::31 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..31)::29 + MarkupBlock - [2..21)::19 + MarkupElement - [2..19)::17 + MarkupStartTag - [2..8)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [8..12)::4 - [Blah] - Gen - SpanEditHandler;Accepts:Any + Text;[Blah]; + MarkupEndTag - [12..19)::7 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [19..21)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + MarkupBlock - [21..31)::10 + MarkupElement - [21..29)::8 + MarkupStartTag - [21..29)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTextLiteral - [29..31)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [31..31)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [31..32)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupElement - [32..38)::6 + MarkupStartTag - [32..38)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[html]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersNewlineAfterTextTagInVerbatimBlockIfFollowedByMarkupTransition.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersNewlineAfterTextTagInVerbatimBlockIfFollowedByMarkupTransition.cspans.txt new file mode 100644 index 0000000000..74b05993f0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersNewlineAfterTextTagInVerbatimBlockIfFollowedByMarkupTransition.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [37] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +Transition span at (2:0,2 [6] ) (Accepts:None) - Parent: Tag block at (2:0,2 [6] ) +Markup span at (8:0,8 [4] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [19] ) +Transition span at (12:0,12 [7] ) (Accepts:None) - Parent: Tag block at (12:0,12 [7] ) +Markup span at (19:0,19 [2] ) (Accepts:None) - Parent: Markup block at (2:0,2 [19] ) +Transition span at (21:1,0 [1] ) (Accepts:None) - Parent: Markup block at (21:1,0 [9] ) +MetaCode span at (22:1,1 [1] ) (Accepts:Any) - Parent: Markup block at (21:1,0 [9] ) +Markup span at (23:1,2 [7] ) (Accepts:None) - Parent: Markup block at (21:1,0 [9] ) +Code span at (30:2,0 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [31] ) +MetaCode span at (30:2,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +Markup span at (31:2,1 [6] ) (Accepts:Any) - Parent: Tag block at (31:2,1 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersNewlineAfterTextTagInVerbatimBlockIfFollowedByMarkupTransition.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersNewlineAfterTextTagInVerbatimBlockIfFollowedByMarkupTransition.stree.txt new file mode 100644 index 0000000000..66dd22c8ad --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersNewlineAfterTextTagInVerbatimBlockIfFollowedByMarkupTransition.stree.txt @@ -0,0 +1,45 @@ +RazorDocument - [0..37)::37 - [@{BlahLF@: BlehLF}] + MarkupBlock - [0..37)::37 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..31)::31 + CSharpStatement - [0..31)::31 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..31)::30 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..30)::28 + MarkupBlock - [2..21)::19 + MarkupElement - [2..19)::17 + MarkupStartTag - [2..8)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [8..12)::4 - [Blah] - Gen - SpanEditHandler;Accepts:Any + Text;[Blah]; + MarkupEndTag - [12..19)::7 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [19..21)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + MarkupBlock - [21..30)::9 + MarkupTransition - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [22..23)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [23..30)::7 - [ BlehLF] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Text;[Bleh]; + NewLine;[LF]; + CSharpStatementLiteral - [30..30)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [30..31)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupElement - [31..37)::6 + MarkupStartTag - [31..37)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[html]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersTextPseudoTagAsMarkup.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersTextPseudoTagAsMarkup.cspans.txt new file mode 100644 index 0000000000..4df286098a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersTextPseudoTagAsMarkup.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Markup span at (4:0,4 [6] ) (Accepts:Any) - Parent: Tag block at (4:0,4 [6] ) +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Markup span at (13:0,13 [7] ) (Accepts:Any) - Parent: Tag block at (13:0,13 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersTextPseudoTagAsMarkup.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersTextPseudoTagAsMarkup.stree.txt new file mode 100644 index 0000000000..668a7dba33 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/RendersTextPseudoTagAsMarkup.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..20)::20 - [Foo Foo] + MarkupBlock - [0..20)::20 + MarkupTextLiteral - [0..4)::4 - [Foo ] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + Whitespace;[ ]; + MarkupElement - [4..20)::16 + MarkupStartTag - [4..10)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [10..13)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [13..20)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ReturnsOneMarkupSegmentIfNoCodeBlocksEncountered.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ReturnsOneMarkupSegmentIfNoCodeBlocksEncountered.cspans.txt new file mode 100644 index 0000000000..056f638ae3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ReturnsOneMarkupSegmentIfNoCodeBlocksEncountered.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [7] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Markup span at (7:0,7 [4] ) (Accepts:None) - Parent: HtmlComment block at (7:0,7 [10] ) +Markup span at (11:0,11 [3] ) (Accepts:Whitespace) - Parent: HtmlComment block at (7:0,7 [10] ) +Markup span at (14:0,14 [3] ) (Accepts:None) - Parent: HtmlComment block at (7:0,7 [10] ) +Markup span at (17:0,17 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Markup span at (20:0,20 [10] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ReturnsOneMarkupSegmentIfNoCodeBlocksEncountered.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ReturnsOneMarkupSegmentIfNoCodeBlocksEncountered.stree.txt new file mode 100644 index 0000000000..e9fd31b945 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlDocumentTest/ReturnsOneMarkupSegmentIfNoCodeBlocksEncountered.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..30)::30 - [Foo BazBar] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupTextLiteral - [17..20)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupTextLiteral - [20..30)::10 - [ Bar}] + MarkupBlock - [0..17)::17 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..17)::17 + CSharpStatement - [0..17)::17 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..17)::16 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..16)::14 + MarkupBlock - [2..13)::11 + MarkupCommentBlock - [2..12)::10 + MarkupTextLiteral - [2..6)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [13..16)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Identifier;[Bar]; + RazorMetaCode - [16..17)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [17..17)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/DocTypeTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/DocTypeTag.cspans.txt new file mode 100644 index 0000000000..597866b0ef --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/DocTypeTag.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +Markup span at (2:0,2 [15] ) (Accepts:None) - Parent: Markup block at (2:0,2 [16] ) +Markup span at (17:0,17 [1] ) (Accepts:None) - Parent: Markup block at (2:0,2 [16] ) +Code span at (18:0,18 [3] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [22] ) +MetaCode span at (21:0,21 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +Markup span at (22:0,22 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/DocTypeTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/DocTypeTag.stree.txt new file mode 100644 index 0000000000..e5d4508525 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/DocTypeTag.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..22)::22 - [@{ foo}] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..22)::22 + CSharpStatement - [0..22)::22 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..22)::21 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..21)::19 + MarkupBlock - [2..18)::16 + MarkupTextLiteral - [2..17)::15 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[DOCTYPE]; + Whitespace;[ ]; + Text;[html]; + CloseAngle;[>]; + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [18..21)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Identifier;[foo]; + RazorMetaCode - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ElementTags.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ElementTags.cspans.txt new file mode 100644 index 0000000000..539ba5c383 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ElementTags.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [17] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [17] ) +Markup span at (2:0,2 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [3] ) +Markup span at (5:0,5 [3] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [11] ) +Markup span at (8:0,8 [4] ) (Accepts:None) - Parent: Tag block at (8:0,8 [4] ) +Markup span at (12:0,12 [1] ) (Accepts:None) - Parent: Markup block at (2:0,2 [11] ) +Code span at (13:0,13 [3] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [17] ) +MetaCode span at (16:0,16 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [17] ) +Markup span at (17:0,17 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ElementTags.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ElementTags.stree.txt new file mode 100644 index 0000000000..c864f0ee6f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ElementTags.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..17)::17 - [@{

                    Foo

                    Bar}] + MarkupBlock - [0..17)::17 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..17)::17 + CSharpStatement - [0..17)::17 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..17)::16 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..16)::14 + MarkupBlock - [2..13)::11 + MarkupElement - [2..12)::10 + MarkupStartTag - [2..5)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [5..8)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [8..12)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [13..16)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Identifier;[Bar]; + RazorMetaCode - [16..17)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [17..17)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTag.cspans.txt new file mode 100644 index 0000000000..134c16b6ee --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTag.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [12] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [12] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [12] ) +Markup span at (2:0,2 [2] ) (Accepts:None) - Parent: Tag block at (2:0,2 [2] ) +Markup span at (4:0,4 [3] ) (Accepts:None) - Parent: Tag block at (4:0,4 [3] ) +Markup span at (7:0,7 [1] ) (Accepts:None) - Parent: Markup block at (2:0,2 [6] ) +Code span at (8:0,8 [3] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [12] ) +MetaCode span at (11:0,11 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [12] ) +Markup span at (12:0,12 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [12] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTag.stree.txt new file mode 100644 index 0000000000..8f2dd2a56c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTag.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..12)::12 - [@{<> Bar}] + MarkupBlock - [0..12)::12 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..12)::12 + CSharpStatement - [0..12)::12 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..12)::11 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..11)::9 + MarkupBlock - [2..8)::6 + MarkupElement - [2..7)::5 + MarkupStartTag - [2..4)::2 - [<>] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[]; + CloseAngle;[>]; + MarkupEndTag - [4..7)::3 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[]; + CloseAngle;[>]; + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [8..11)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Identifier;[Bar]; + RazorMetaCode - [11..12)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [12..12)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTagNestsLikeNormalTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTagNestsLikeNormalTag.cspans.txt new file mode 100644 index 0000000000..dc05e218a9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTagNestsLikeNormalTag.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [13] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [13] ) +Markup span at (2:0,2 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [3] ) +Markup span at (5:0,5 [3] ) (Accepts:None) - Parent: Tag block at (5:0,5 [3] ) +Markup span at (8:0,8 [1] ) (Accepts:None) - Parent: Markup block at (2:0,2 [7] ) +Code span at (9:0,9 [3] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [13] ) +MetaCode span at (12:0,12 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [13] ) +Markup span at (13:0,13 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTagNestsLikeNormalTag.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTagNestsLikeNormalTag.diag.txt new file mode 100644 index 0000000000..6c6136553e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTagNestsLikeNormalTag.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ1025: The "p" element was not closed. All elements must be either self-closing or have a matching end tag. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTagNestsLikeNormalTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTagNestsLikeNormalTag.stree.txt new file mode 100644 index 0000000000..52be2f619c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/EmptyTagNestsLikeNormalTag.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..13)::13 - [@{

                    Bar}] + MarkupBlock - [0..13)::13 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..13)::13 + CSharpStatement - [0..13)::13 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..13)::12 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..12)::10 + MarkupBlock - [2..9)::7 + MarkupElement - [2..8)::6 + MarkupStartTag - [2..5)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [5..8)::3 + MarkupEndTag - [5..8)::3 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[]; + CloseAngle;[>]; + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Identifier;[Bar]; + RazorMetaCode - [12..13)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [13..13)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/IncompleteVoidElementEndTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/IncompleteVoidElementEndTag.cspans.txt new file mode 100644 index 0000000000..12cae5de6f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/IncompleteVoidElementEndTag.cspans.txt @@ -0,0 +1,36 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [344] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [344] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [344] ) +Code span at (2:0,2 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [344] ) +Markup span at (4:1,0 [6] ) (Accepts:None) - Parent: Tag block at (4:1,0 [6] ) +Markup span at (10:1,6 [15] ) (Accepts:Any) - Parent: Tag block at (10:1,6 [15] ) +Markup span at (25:4,0 [6] ) (Accepts:None) - Parent: Tag block at (25:4,0 [6] ) +Markup span at (31:4,6 [15] ) (Accepts:Any) - Parent: Tag block at (31:4,6 [15] ) +Markup span at (46:7,0 [4] ) (Accepts:None) - Parent: Tag block at (46:7,0 [4] ) +Markup span at (50:7,4 [13] ) (Accepts:Any) - Parent: Tag block at (50:7,4 [13] ) +Markup span at (63:10,0 [5] ) (Accepts:None) - Parent: Tag block at (63:10,0 [5] ) +Markup span at (68:10,5 [14] ) (Accepts:Any) - Parent: Tag block at (68:10,5 [14] ) +Markup span at (82:13,0 [9] ) (Accepts:None) - Parent: Tag block at (82:13,0 [9] ) +Markup span at (91:13,9 [18] ) (Accepts:Any) - Parent: Tag block at (91:13,9 [18] ) +Markup span at (109:16,0 [7] ) (Accepts:None) - Parent: Tag block at (109:16,0 [7] ) +Markup span at (116:16,7 [16] ) (Accepts:Any) - Parent: Tag block at (116:16,7 [16] ) +Markup span at (132:19,0 [4] ) (Accepts:None) - Parent: Tag block at (132:19,0 [4] ) +Markup span at (136:19,4 [13] ) (Accepts:Any) - Parent: Tag block at (136:19,4 [13] ) +Markup span at (149:22,0 [5] ) (Accepts:None) - Parent: Tag block at (149:22,0 [5] ) +Markup span at (154:22,5 [14] ) (Accepts:Any) - Parent: Tag block at (154:22,5 [14] ) +Markup span at (168:25,0 [7] ) (Accepts:None) - Parent: Tag block at (168:25,0 [7] ) +Markup span at (175:25,7 [16] ) (Accepts:Any) - Parent: Tag block at (175:25,7 [16] ) +Markup span at (191:28,0 [8] ) (Accepts:None) - Parent: Tag block at (191:28,0 [8] ) +Markup span at (199:28,8 [17] ) (Accepts:Any) - Parent: Tag block at (199:28,8 [17] ) +Markup span at (216:31,0 [6] ) (Accepts:None) - Parent: Tag block at (216:31,0 [6] ) +Markup span at (222:31,6 [15] ) (Accepts:Any) - Parent: Tag block at (222:31,6 [15] ) +Markup span at (237:34,0 [6] ) (Accepts:None) - Parent: Tag block at (237:34,0 [6] ) +Markup span at (243:34,6 [15] ) (Accepts:Any) - Parent: Tag block at (243:34,6 [15] ) +Markup span at (258:37,0 [7] ) (Accepts:None) - Parent: Tag block at (258:37,0 [7] ) +Markup span at (265:37,7 [16] ) (Accepts:Any) - Parent: Tag block at (265:37,7 [16] ) +Markup span at (281:40,0 [8] ) (Accepts:None) - Parent: Tag block at (281:40,0 [8] ) +Markup span at (289:40,8 [17] ) (Accepts:Any) - Parent: Tag block at (289:40,8 [17] ) +Markup span at (306:43,0 [7] ) (Accepts:None) - Parent: Tag block at (306:43,0 [7] ) +Markup span at (313:43,7 [16] ) (Accepts:Any) - Parent: Tag block at (313:43,7 [16] ) +Markup span at (329:46,0 [5] ) (Accepts:None) - Parent: Tag block at (329:46,0 [5] ) +Markup span at (334:46,5 [10] ) (Accepts:Any) - Parent: Tag block at (334:46,5 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/IncompleteVoidElementEndTag.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/IncompleteVoidElementEndTag.diag.txt new file mode 100644 index 0000000000..1ced8c1b88 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/IncompleteVoidElementEndTag.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/IncompleteVoidElementEndTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/IncompleteVoidElementEndTag.stree.txt new file mode 100644 index 0000000000..c130d59e5d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/IncompleteVoidElementEndTag.stree.txt @@ -0,0 +1,317 @@ +RazorDocument - [0..344)::344 - [@{LF - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..344)::344 + CSharpStatement - [0..344)::344 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..344)::343 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..344)::342 + CSharpStatementLiteral - [2..4)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[}];AtEOL + NewLine;[LF]; + MarkupBlock - [4..25)::21 + MarkupElement - [4..25)::21 + MarkupStartTag - [4..10)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[area]; + CloseAngle;[>]; + MarkupEndTag - [10..25)::15 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[area]; + MarkupMiscAttributeContent - [16..25)::9 + MarkupTextLiteral - [16..25)::9 - [LF}LF@{LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Transition;[@]; + Text;[{]; + NewLine;[LF]; + CloseAngle;[]; + MarkupBlock - [25..46)::21 + MarkupElement - [25..46)::21 + MarkupStartTag - [25..31)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[base]; + CloseAngle;[>]; + MarkupEndTag - [31..46)::15 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[base]; + MarkupMiscAttributeContent - [37..46)::9 + MarkupTextLiteral - [37..46)::9 - [LF}LF@{LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Transition;[@]; + Text;[{]; + NewLine;[LF]; + CloseAngle;[]; + MarkupBlock - [46..63)::17 + MarkupElement - [46..63)::17 + MarkupStartTag - [46..50)::4 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[br]; + CloseAngle;[>]; + MarkupEndTag - [50..63)::13 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[br]; + MarkupMiscAttributeContent - [54..63)::9 + MarkupTextLiteral - [54..63)::9 - [LF}LF@{LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Transition;[@]; + Text;[{]; + NewLine;[LF]; + CloseAngle;[]; + MarkupBlock - [63..82)::19 + MarkupElement - [63..82)::19 + MarkupStartTag - [63..68)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[col]; + CloseAngle;[>]; + MarkupEndTag - [68..82)::14 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[col]; + MarkupMiscAttributeContent - [73..82)::9 + MarkupTextLiteral - [73..82)::9 - [LF}LF@{LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Transition;[@]; + Text;[{]; + NewLine;[LF]; + CloseAngle;[]; + MarkupBlock - [82..109)::27 + MarkupElement - [82..109)::27 + MarkupStartTag - [82..91)::9 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[command]; + CloseAngle;[>]; + MarkupEndTag - [91..109)::18 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[command]; + MarkupMiscAttributeContent - [100..109)::9 + MarkupTextLiteral - [100..109)::9 - [LF}LF@{LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Transition;[@]; + Text;[{]; + NewLine;[LF]; + CloseAngle;[]; + MarkupBlock - [109..132)::23 + MarkupElement - [109..132)::23 + MarkupStartTag - [109..116)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[embed]; + CloseAngle;[>]; + MarkupEndTag - [116..132)::16 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[embed]; + MarkupMiscAttributeContent - [123..132)::9 + MarkupTextLiteral - [123..132)::9 - [LF}LF@{LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Transition;[@]; + Text;[{]; + NewLine;[LF]; + CloseAngle;[]; + MarkupBlock - [132..149)::17 + MarkupElement - [132..149)::17 + MarkupStartTag - [132..136)::4 - [


                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[hr]; + CloseAngle;[>]; + MarkupEndTag - [136..149)::13 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[hr]; + MarkupMiscAttributeContent - [140..149)::9 + MarkupTextLiteral - [140..149)::9 - [LF}LF@{LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Transition;[@]; + Text;[{]; + NewLine;[LF]; + CloseAngle;[]; + MarkupBlock - [149..168)::19 + MarkupElement - [149..168)::19 + MarkupStartTag - [149..154)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[img]; + CloseAngle;[>]; + MarkupEndTag - [154..168)::14 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[img]; + MarkupMiscAttributeContent - [159..168)::9 + MarkupTextLiteral - [159..168)::9 - [LF}LF@{LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Transition;[@]; + Text;[{]; + NewLine;[LF]; + CloseAngle;[]; + MarkupBlock - [168..191)::23 + MarkupElement - [168..191)::23 + MarkupStartTag - [168..175)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + MarkupEndTag - [175..191)::16 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[input]; + MarkupMiscAttributeContent - [182..191)::9 + MarkupTextLiteral - [182..191)::9 - [LF}LF@{LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Transition;[@]; + Text;[{]; + NewLine;[LF]; + CloseAngle;[]; + MarkupBlock - [191..216)::25 + MarkupElement - [191..216)::25 + MarkupStartTag - [191..199)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[keygen]; + CloseAngle;[>]; + MarkupEndTag - [199..216)::17 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[keygen]; + MarkupMiscAttributeContent - [207..216)::9 + MarkupTextLiteral - [207..216)::9 - [LF}LF@{LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Transition;[@]; + Text;[{]; + NewLine;[LF]; + CloseAngle;[]; + MarkupBlock - [216..237)::21 + MarkupElement - [216..237)::21 + MarkupStartTag - [216..222)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[link]; + CloseAngle;[>]; + MarkupEndTag - [222..237)::15 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[link]; + MarkupMiscAttributeContent - [228..237)::9 + MarkupTextLiteral - [228..237)::9 - [LF}LF@{LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Transition;[@]; + Text;[{]; + NewLine;[LF]; + CloseAngle;[]; + MarkupBlock - [237..258)::21 + MarkupElement - [237..258)::21 + MarkupStartTag - [237..243)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[meta]; + CloseAngle;[>]; + MarkupEndTag - [243..258)::15 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[meta]; + MarkupMiscAttributeContent - [249..258)::9 + MarkupTextLiteral - [249..258)::9 - [LF}LF@{LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Transition;[@]; + Text;[{]; + NewLine;[LF]; + CloseAngle;[]; + MarkupBlock - [258..281)::23 + MarkupElement - [258..281)::23 + MarkupStartTag - [258..265)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[param]; + CloseAngle;[>]; + MarkupEndTag - [265..281)::16 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[param]; + MarkupMiscAttributeContent - [272..281)::9 + MarkupTextLiteral - [272..281)::9 - [LF}LF@{LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Transition;[@]; + Text;[{]; + NewLine;[LF]; + CloseAngle;[]; + MarkupBlock - [281..306)::25 + MarkupElement - [281..306)::25 + MarkupStartTag - [281..289)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[source]; + CloseAngle;[>]; + MarkupEndTag - [289..306)::17 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[source]; + MarkupMiscAttributeContent - [297..306)::9 + MarkupTextLiteral - [297..306)::9 - [LF}LF@{LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Transition;[@]; + Text;[{]; + NewLine;[LF]; + CloseAngle;[]; + MarkupBlock - [306..329)::23 + MarkupElement - [306..329)::23 + MarkupStartTag - [306..313)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[track]; + CloseAngle;[>]; + MarkupEndTag - [313..329)::16 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[track]; + MarkupMiscAttributeContent - [320..329)::9 + MarkupTextLiteral - [320..329)::9 - [LF}LF@{LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Transition;[@]; + Text;[{]; + NewLine;[LF]; + CloseAngle;[]; + MarkupBlock - [329..344)::15 + MarkupElement - [329..344)::15 + MarkupStartTag - [329..334)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[wbr]; + CloseAngle;[>]; + MarkupEndTag - [334..344)::10 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[wbr]; + MarkupMiscAttributeContent - [339..344)::5 + MarkupTextLiteral - [339..344)::5 - [LF}LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + CloseAngle;[]; + RazorMetaCode - [344..344)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ProcessingInstructionTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ProcessingInstructionTag.cspans.txt new file mode 100644 index 0000000000..88fd9b67b6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ProcessingInstructionTag.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +Markup span at (2:0,2 [22] ) (Accepts:None) - Parent: Markup block at (2:0,2 [23] ) +Markup span at (24:0,24 [1] ) (Accepts:None) - Parent: Markup block at (2:0,2 [23] ) +Code span at (25:0,25 [3] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [29] ) +MetaCode span at (28:0,28 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +Markup span at (29:0,29 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ProcessingInstructionTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ProcessingInstructionTag.stree.txt new file mode 100644 index 0000000000..e4bedcf75e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ProcessingInstructionTag.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..29)::29 - [@{ foo}] + MarkupBlock - [0..29)::29 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..29)::29 + CSharpStatement - [0..29)::29 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..29)::28 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..28)::26 + MarkupBlock - [2..25)::23 + MarkupTextLiteral - [2..24)::22 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + QuestionMark;[?]; + Text;[xml]; + Whitespace;[ ]; + Text;[version]; + Equals;[=]; + DoubleQuote;["]; + Text;[1.0]; + DoubleQuote;["]; + Whitespace;[ ]; + QuestionMark;[?]; + CloseAngle;[>]; + MarkupTextLiteral - [24..25)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [25..28)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Identifier;[foo]; + RazorMetaCode - [28..29)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [29..29)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag.cspans.txt new file mode 100644 index 0000000000..aa831f9744 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [8] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [8] ) +Markup span at (8:0,8 [51] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [68] ) +Markup span at (59:0,59 [9] ) (Accepts:Any) - Parent: Tag block at (59:0,59 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag.stree.txt new file mode 100644 index 0000000000..4db3b75673 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..68)::68 - [] + MarkupBlock - [0..68)::68 + MarkupElement - [0..68)::68 + MarkupStartTag - [0..8)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_Incomplete.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_Incomplete.cspans.txt new file mode 100644 index 0000000000..e0d652c62f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_Incomplete.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (0:0,0 [7] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [13] ) +Markup span at (7:0,7 [6] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_Incomplete.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_Incomplete.stree.txt new file mode 100644 index 0000000000..91b0d16085 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_Incomplete.stree.txt @@ -0,0 +1,13 @@ +RazorDocument - [0..13)::13 - [ }] + MarkupBlock - [0..25)::25 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..25)::25 + CSharpStatement - [0..25)::25 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..25)::24 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..24)::22 + MarkupBlock - [2..24)::22 + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [3..23)::20 + MarkupStartTag - [3..11)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + MarkupMiscAttributeContent - [19..22)::3 + MarkupTextLiteral - [19..22)::3 - [ @ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Transition;[@]; + Whitespace;[ ]; + CloseAngle;[>]; + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [24..24)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [24..25)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [25..25)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedBeginTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedBeginTag.cspans.txt new file mode 100644 index 0000000000..1ef22bf26d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedBeginTag.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [8] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [8] ) +Markup span at (8:0,8 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Markup span at (11:0,11 [9] ) (Accepts:Any) - Parent: Tag block at (11:0,11 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedBeginTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedBeginTag.stree.txt new file mode 100644 index 0000000000..f083678670 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedBeginTag.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..20)::20 - [] + MarkupBlock - [0..20)::20 + MarkupElement - [0..20)::20 + MarkupStartTag - [0..8)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedEndTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedEndTag.cspans.txt new file mode 100644 index 0000000000..57d975f8cd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedEndTag.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [8] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [8] ) +Markup span at (8:0,8 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Markup span at (12:0,12 [9] ) (Accepts:Any) - Parent: Tag block at (12:0,12 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedEndTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedEndTag.stree.txt new file mode 100644 index 0000000000..1c46bd12be --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedEndTag.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..21)::21 - [] + MarkupBlock - [0..21)::21 + MarkupElement - [0..21)::21 + MarkupStartTag - [0..8)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedMalformedTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedMalformedTag.cspans.txt new file mode 100644 index 0000000000..b041429d2d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedMalformedTag.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [8] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [8] ) +Markup span at (8:0,8 [22] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [39] ) +Markup span at (30:0,30 [9] ) (Accepts:Any) - Parent: Tag block at (30:0,30 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedMalformedTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedMalformedTag.stree.txt new file mode 100644 index 0000000000..28f8e4f59a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedMalformedTag.stree.txt @@ -0,0 +1,29 @@ +RazorDocument - [0..39)::39 - [] + MarkupBlock - [0..39)::39 + MarkupElement - [0..39)::39 + MarkupStartTag - [0..8)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedTag.cspans.txt new file mode 100644 index 0000000000..be319647e0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedTag.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [8] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [8] ) +Markup span at (8:0,8 [7] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) +Markup span at (15:0,15 [9] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedTag.stree.txt new file mode 100644 index 0000000000..b9e7bb8625 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/ScriptTag_WithNestedTag.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..24)::24 - [] + MarkupBlock - [0..24)::24 + MarkupElement - [0..24)::24 + MarkupStartTag - [0..8)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/TextTags.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/TextTags.cspans.txt new file mode 100644 index 0000000000..b1018a5336 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/TextTags.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +Transition span at (2:0,2 [6] ) (Accepts:None) - Parent: Tag block at (2:0,2 [6] ) +Markup span at (8:0,8 [3] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [16] ) +Transition span at (11:0,11 [7] ) (Accepts:None) - Parent: Tag block at (11:0,11 [7] ) +Code span at (18:0,18 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [19] ) +MetaCode span at (18:0,18 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +Markup span at (19:0,19 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/TextTags.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/TextTags.stree.txt new file mode 100644 index 0000000000..1cad8510ca --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/TextTags.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..19)::19 - [@{Foo}] + MarkupBlock - [0..19)::19 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..19)::19 + CSharpStatement - [0..19)::19 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..19)::18 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..18)::16 + MarkupBlock - [2..18)::16 + MarkupElement - [2..18)::16 + MarkupStartTag - [2..8)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [8..11)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [11..18)::7 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [18..18)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [18..19)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [19..19)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByCloseTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByCloseTag.cspans.txt new file mode 100644 index 0000000000..20e96c9595 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByCloseTag.cspans.txt @@ -0,0 +1,145 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [584] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Code span at (2:0,2 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (4:1,0 [6] ) (Accepts:None) - Parent: Tag block at (4:1,0 [6] ) +Markup span at (10:1,6 [1] ) (Accepts:Any) - Parent: Markup block at (4:1,0 [14] ) +Markup span at (11:1,7 [7] ) (Accepts:None) - Parent: Tag block at (11:1,7 [7] ) +Code span at (18:1,14 [15] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (33:2,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (34:2,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [584] ) +Transition span at (36:3,0 [1] ) (Accepts:None) - Parent: Statement block at (36:3,0 [34] ) +MetaCode span at (37:3,1 [1] ) (Accepts:None) - Parent: Statement block at (36:3,0 [34] ) +Code span at (38:3,2 [2] ) (Accepts:Any) - Parent: Statement block at (36:3,0 [34] ) +Markup span at (40:4,0 [6] ) (Accepts:None) - Parent: Tag block at (40:4,0 [6] ) +Markup span at (46:4,6 [1] ) (Accepts:Any) - Parent: Markup block at (40:4,0 [14] ) +Markup span at (47:4,7 [7] ) (Accepts:None) - Parent: Tag block at (47:4,7 [7] ) +Code span at (54:4,14 [15] ) (Accepts:Any) - Parent: Statement block at (36:3,0 [34] ) +MetaCode span at (69:5,0 [1] ) (Accepts:None) - Parent: Statement block at (36:3,0 [34] ) +Markup span at (70:5,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [584] ) +Transition span at (72:6,0 [1] ) (Accepts:None) - Parent: Statement block at (72:6,0 [30] ) +MetaCode span at (73:6,1 [1] ) (Accepts:None) - Parent: Statement block at (72:6,0 [30] ) +Code span at (74:6,2 [2] ) (Accepts:Any) - Parent: Statement block at (72:6,0 [30] ) +Markup span at (76:7,0 [4] ) (Accepts:None) - Parent: Tag block at (76:7,0 [4] ) +Markup span at (80:7,4 [1] ) (Accepts:Any) - Parent: Markup block at (76:7,0 [10] ) +Markup span at (81:7,5 [5] ) (Accepts:None) - Parent: Tag block at (81:7,5 [5] ) +Code span at (86:7,10 [15] ) (Accepts:Any) - Parent: Statement block at (72:6,0 [30] ) +MetaCode span at (101:8,0 [1] ) (Accepts:None) - Parent: Statement block at (72:6,0 [30] ) +Markup span at (102:8,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [584] ) +Transition span at (104:9,0 [1] ) (Accepts:None) - Parent: Statement block at (104:9,0 [32] ) +MetaCode span at (105:9,1 [1] ) (Accepts:None) - Parent: Statement block at (104:9,0 [32] ) +Code span at (106:9,2 [2] ) (Accepts:Any) - Parent: Statement block at (104:9,0 [32] ) +Markup span at (108:10,0 [5] ) (Accepts:None) - Parent: Tag block at (108:10,0 [5] ) +Markup span at (113:10,5 [1] ) (Accepts:Any) - Parent: Markup block at (108:10,0 [12] ) +Markup span at (114:10,6 [6] ) (Accepts:None) - Parent: Tag block at (114:10,6 [6] ) +Code span at (120:10,12 [15] ) (Accepts:Any) - Parent: Statement block at (104:9,0 [32] ) +MetaCode span at (135:11,0 [1] ) (Accepts:None) - Parent: Statement block at (104:9,0 [32] ) +Markup span at (136:11,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [584] ) +Transition span at (138:12,0 [1] ) (Accepts:None) - Parent: Statement block at (138:12,0 [40] ) +MetaCode span at (139:12,1 [1] ) (Accepts:None) - Parent: Statement block at (138:12,0 [40] ) +Code span at (140:12,2 [2] ) (Accepts:Any) - Parent: Statement block at (138:12,0 [40] ) +Markup span at (142:13,0 [9] ) (Accepts:None) - Parent: Tag block at (142:13,0 [9] ) +Markup span at (151:13,9 [1] ) (Accepts:Any) - Parent: Markup block at (142:13,0 [20] ) +Markup span at (152:13,10 [10] ) (Accepts:None) - Parent: Tag block at (152:13,10 [10] ) +Code span at (162:13,20 [15] ) (Accepts:Any) - Parent: Statement block at (138:12,0 [40] ) +MetaCode span at (177:14,0 [1] ) (Accepts:None) - Parent: Statement block at (138:12,0 [40] ) +Markup span at (178:14,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [584] ) +Transition span at (180:15,0 [1] ) (Accepts:None) - Parent: Statement block at (180:15,0 [36] ) +MetaCode span at (181:15,1 [1] ) (Accepts:None) - Parent: Statement block at (180:15,0 [36] ) +Code span at (182:15,2 [2] ) (Accepts:Any) - Parent: Statement block at (180:15,0 [36] ) +Markup span at (184:16,0 [7] ) (Accepts:None) - Parent: Tag block at (184:16,0 [7] ) +Markup span at (191:16,7 [1] ) (Accepts:Any) - Parent: Markup block at (184:16,0 [16] ) +Markup span at (192:16,8 [8] ) (Accepts:None) - Parent: Tag block at (192:16,8 [8] ) +Code span at (200:16,16 [15] ) (Accepts:Any) - Parent: Statement block at (180:15,0 [36] ) +MetaCode span at (215:17,0 [1] ) (Accepts:None) - Parent: Statement block at (180:15,0 [36] ) +Markup span at (216:17,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [584] ) +Transition span at (218:18,0 [1] ) (Accepts:None) - Parent: Statement block at (218:18,0 [30] ) +MetaCode span at (219:18,1 [1] ) (Accepts:None) - Parent: Statement block at (218:18,0 [30] ) +Code span at (220:18,2 [2] ) (Accepts:Any) - Parent: Statement block at (218:18,0 [30] ) +Markup span at (222:19,0 [4] ) (Accepts:None) - Parent: Tag block at (222:19,0 [4] ) +Markup span at (226:19,4 [1] ) (Accepts:Any) - Parent: Markup block at (222:19,0 [10] ) +Markup span at (227:19,5 [5] ) (Accepts:None) - Parent: Tag block at (227:19,5 [5] ) +Code span at (232:19,10 [15] ) (Accepts:Any) - Parent: Statement block at (218:18,0 [30] ) +MetaCode span at (247:20,0 [1] ) (Accepts:None) - Parent: Statement block at (218:18,0 [30] ) +Markup span at (248:20,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [584] ) +Transition span at (250:21,0 [1] ) (Accepts:None) - Parent: Statement block at (250:21,0 [32] ) +MetaCode span at (251:21,1 [1] ) (Accepts:None) - Parent: Statement block at (250:21,0 [32] ) +Code span at (252:21,2 [2] ) (Accepts:Any) - Parent: Statement block at (250:21,0 [32] ) +Markup span at (254:22,0 [5] ) (Accepts:None) - Parent: Tag block at (254:22,0 [5] ) +Markup span at (259:22,5 [1] ) (Accepts:Any) - Parent: Markup block at (254:22,0 [12] ) +Markup span at (260:22,6 [6] ) (Accepts:None) - Parent: Tag block at (260:22,6 [6] ) +Code span at (266:22,12 [15] ) (Accepts:Any) - Parent: Statement block at (250:21,0 [32] ) +MetaCode span at (281:23,0 [1] ) (Accepts:None) - Parent: Statement block at (250:21,0 [32] ) +Markup span at (282:23,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [584] ) +Transition span at (284:24,0 [1] ) (Accepts:None) - Parent: Statement block at (284:24,0 [36] ) +MetaCode span at (285:24,1 [1] ) (Accepts:None) - Parent: Statement block at (284:24,0 [36] ) +Code span at (286:24,2 [2] ) (Accepts:Any) - Parent: Statement block at (284:24,0 [36] ) +Markup span at (288:25,0 [7] ) (Accepts:None) - Parent: Tag block at (288:25,0 [7] ) +Markup span at (295:25,7 [1] ) (Accepts:Any) - Parent: Markup block at (288:25,0 [16] ) +Markup span at (296:25,8 [8] ) (Accepts:None) - Parent: Tag block at (296:25,8 [8] ) +Code span at (304:25,16 [15] ) (Accepts:Any) - Parent: Statement block at (284:24,0 [36] ) +MetaCode span at (319:26,0 [1] ) (Accepts:None) - Parent: Statement block at (284:24,0 [36] ) +Markup span at (320:26,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [584] ) +Transition span at (322:27,0 [1] ) (Accepts:None) - Parent: Statement block at (322:27,0 [38] ) +MetaCode span at (323:27,1 [1] ) (Accepts:None) - Parent: Statement block at (322:27,0 [38] ) +Code span at (324:27,2 [2] ) (Accepts:Any) - Parent: Statement block at (322:27,0 [38] ) +Markup span at (326:28,0 [8] ) (Accepts:None) - Parent: Tag block at (326:28,0 [8] ) +Markup span at (334:28,8 [1] ) (Accepts:Any) - Parent: Markup block at (326:28,0 [18] ) +Markup span at (335:28,9 [9] ) (Accepts:None) - Parent: Tag block at (335:28,9 [9] ) +Code span at (344:28,18 [15] ) (Accepts:Any) - Parent: Statement block at (322:27,0 [38] ) +MetaCode span at (359:29,0 [1] ) (Accepts:None) - Parent: Statement block at (322:27,0 [38] ) +Markup span at (360:29,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [584] ) +Transition span at (362:30,0 [1] ) (Accepts:None) - Parent: Statement block at (362:30,0 [34] ) +MetaCode span at (363:30,1 [1] ) (Accepts:None) - Parent: Statement block at (362:30,0 [34] ) +Code span at (364:30,2 [2] ) (Accepts:Any) - Parent: Statement block at (362:30,0 [34] ) +Markup span at (366:31,0 [6] ) (Accepts:None) - Parent: Tag block at (366:31,0 [6] ) +Markup span at (372:31,6 [1] ) (Accepts:Any) - Parent: Markup block at (366:31,0 [14] ) +Markup span at (373:31,7 [7] ) (Accepts:None) - Parent: Tag block at (373:31,7 [7] ) +Code span at (380:31,14 [15] ) (Accepts:Any) - Parent: Statement block at (362:30,0 [34] ) +MetaCode span at (395:32,0 [1] ) (Accepts:None) - Parent: Statement block at (362:30,0 [34] ) +Markup span at (396:32,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [584] ) +Transition span at (398:33,0 [1] ) (Accepts:None) - Parent: Statement block at (398:33,0 [34] ) +MetaCode span at (399:33,1 [1] ) (Accepts:None) - Parent: Statement block at (398:33,0 [34] ) +Code span at (400:33,2 [2] ) (Accepts:Any) - Parent: Statement block at (398:33,0 [34] ) +Markup span at (402:34,0 [6] ) (Accepts:None) - Parent: Tag block at (402:34,0 [6] ) +Markup span at (408:34,6 [1] ) (Accepts:Any) - Parent: Markup block at (402:34,0 [14] ) +Markup span at (409:34,7 [7] ) (Accepts:None) - Parent: Tag block at (409:34,7 [7] ) +Code span at (416:34,14 [15] ) (Accepts:Any) - Parent: Statement block at (398:33,0 [34] ) +MetaCode span at (431:35,0 [1] ) (Accepts:None) - Parent: Statement block at (398:33,0 [34] ) +Markup span at (432:35,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [584] ) +Transition span at (434:36,0 [1] ) (Accepts:None) - Parent: Statement block at (434:36,0 [36] ) +MetaCode span at (435:36,1 [1] ) (Accepts:None) - Parent: Statement block at (434:36,0 [36] ) +Code span at (436:36,2 [2] ) (Accepts:Any) - Parent: Statement block at (434:36,0 [36] ) +Markup span at (438:37,0 [7] ) (Accepts:None) - Parent: Tag block at (438:37,0 [7] ) +Markup span at (445:37,7 [1] ) (Accepts:Any) - Parent: Markup block at (438:37,0 [16] ) +Markup span at (446:37,8 [8] ) (Accepts:None) - Parent: Tag block at (446:37,8 [8] ) +Code span at (454:37,16 [15] ) (Accepts:Any) - Parent: Statement block at (434:36,0 [36] ) +MetaCode span at (469:38,0 [1] ) (Accepts:None) - Parent: Statement block at (434:36,0 [36] ) +Markup span at (470:38,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [584] ) +Transition span at (472:39,0 [1] ) (Accepts:None) - Parent: Statement block at (472:39,0 [38] ) +MetaCode span at (473:39,1 [1] ) (Accepts:None) - Parent: Statement block at (472:39,0 [38] ) +Code span at (474:39,2 [2] ) (Accepts:Any) - Parent: Statement block at (472:39,0 [38] ) +Markup span at (476:40,0 [8] ) (Accepts:None) - Parent: Tag block at (476:40,0 [8] ) +Markup span at (484:40,8 [1] ) (Accepts:Any) - Parent: Markup block at (476:40,0 [18] ) +Markup span at (485:40,9 [9] ) (Accepts:None) - Parent: Tag block at (485:40,9 [9] ) +Code span at (494:40,18 [15] ) (Accepts:Any) - Parent: Statement block at (472:39,0 [38] ) +MetaCode span at (509:41,0 [1] ) (Accepts:None) - Parent: Statement block at (472:39,0 [38] ) +Markup span at (510:41,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [584] ) +Transition span at (512:42,0 [1] ) (Accepts:None) - Parent: Statement block at (512:42,0 [36] ) +MetaCode span at (513:42,1 [1] ) (Accepts:None) - Parent: Statement block at (512:42,0 [36] ) +Code span at (514:42,2 [2] ) (Accepts:Any) - Parent: Statement block at (512:42,0 [36] ) +Markup span at (516:43,0 [7] ) (Accepts:None) - Parent: Tag block at (516:43,0 [7] ) +Markup span at (523:43,7 [1] ) (Accepts:Any) - Parent: Markup block at (516:43,0 [16] ) +Markup span at (524:43,8 [8] ) (Accepts:None) - Parent: Tag block at (524:43,8 [8] ) +Code span at (532:43,16 [15] ) (Accepts:Any) - Parent: Statement block at (512:42,0 [36] ) +MetaCode span at (547:44,0 [1] ) (Accepts:None) - Parent: Statement block at (512:42,0 [36] ) +Markup span at (548:44,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [584] ) +Transition span at (550:45,0 [1] ) (Accepts:None) - Parent: Statement block at (550:45,0 [32] ) +MetaCode span at (551:45,1 [1] ) (Accepts:None) - Parent: Statement block at (550:45,0 [32] ) +Code span at (552:45,2 [2] ) (Accepts:Any) - Parent: Statement block at (550:45,0 [32] ) +Markup span at (554:46,0 [5] ) (Accepts:None) - Parent: Tag block at (554:46,0 [5] ) +Markup span at (559:46,5 [1] ) (Accepts:Any) - Parent: Markup block at (554:46,0 [12] ) +Markup span at (560:46,6 [6] ) (Accepts:None) - Parent: Tag block at (560:46,6 [6] ) +Code span at (566:46,12 [15] ) (Accepts:Any) - Parent: Statement block at (550:45,0 [32] ) +MetaCode span at (581:47,0 [1] ) (Accepts:None) - Parent: Statement block at (550:45,0 [32] ) +Markup span at (582:47,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [584] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByCloseTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByCloseTag.stree.txt new file mode 100644 index 0000000000..35aacfaf7b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByCloseTag.stree.txt @@ -0,0 +1,596 @@ +RazorDocument - [0..584)::584 - [@{LF var x = true;LF}LF@{LF var x = true;LF}LF@{LF

                    var x = true;LF}LF@{LF var x = true;LF}LF@{LF var x = true;LF}LF@{LF var x = true;LF}LF@{LF
                    var x = true;LF}LF@{LF var x = true;LF}LF@{LF var x = true;LF}LF@{LF var x = true;LF}LF@{LF var x = true;LF}LF@{LF var x = true;LF}LF@{LF var x = true;LF}LF@{LF var x = true;LF}LF@{LF var x = true;LF}LF@{LF var x = true;LF}LF] + MarkupBlock - [0..584)::584 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..34)::34 + CSharpStatement - [0..34)::34 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..34)::33 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..33)::31 + CSharpStatementLiteral - [2..4)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [4..18)::14 + MarkupElement - [4..18)::14 + MarkupStartTag - [4..10)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[area]; + CloseAngle;[>]; + MarkupTextLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [11..18)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[area]; + CloseAngle;[>]; + CSharpStatementLiteral - [18..33)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [33..34)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [34..36)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [36..70)::34 + CSharpStatement - [36..70)::34 + CSharpTransition - [36..37)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [37..70)::33 + RazorMetaCode - [37..38)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [38..69)::31 + CSharpStatementLiteral - [38..40)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [40..54)::14 + MarkupElement - [40..54)::14 + MarkupStartTag - [40..46)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[base]; + CloseAngle;[>]; + MarkupTextLiteral - [46..47)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [47..54)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[base]; + CloseAngle;[>]; + CSharpStatementLiteral - [54..69)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [69..70)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [70..72)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [72..102)::30 + CSharpStatement - [72..102)::30 + CSharpTransition - [72..73)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [73..102)::29 + RazorMetaCode - [73..74)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [74..101)::27 + CSharpStatementLiteral - [74..76)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [76..86)::10 + MarkupElement - [76..86)::10 + MarkupStartTag - [76..80)::4 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[br]; + CloseAngle;[>]; + MarkupTextLiteral - [80..81)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [81..86)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[br]; + CloseAngle;[>]; + CSharpStatementLiteral - [86..101)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [101..102)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [102..104)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [104..136)::32 + CSharpStatement - [104..136)::32 + CSharpTransition - [104..105)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [105..136)::31 + RazorMetaCode - [105..106)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [106..135)::29 + CSharpStatementLiteral - [106..108)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [108..120)::12 + MarkupElement - [108..120)::12 + MarkupStartTag - [108..113)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[col]; + CloseAngle;[>]; + MarkupTextLiteral - [113..114)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [114..120)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[col]; + CloseAngle;[>]; + CSharpStatementLiteral - [120..135)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [135..136)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [136..138)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [138..178)::40 + CSharpStatement - [138..178)::40 + CSharpTransition - [138..139)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [139..178)::39 + RazorMetaCode - [139..140)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [140..177)::37 + CSharpStatementLiteral - [140..142)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [142..162)::20 + MarkupElement - [142..162)::20 + MarkupStartTag - [142..151)::9 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[command]; + CloseAngle;[>]; + MarkupTextLiteral - [151..152)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [152..162)::10 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[command]; + CloseAngle;[>]; + CSharpStatementLiteral - [162..177)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [177..178)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [178..180)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [180..216)::36 + CSharpStatement - [180..216)::36 + CSharpTransition - [180..181)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [181..216)::35 + RazorMetaCode - [181..182)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [182..215)::33 + CSharpStatementLiteral - [182..184)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [184..200)::16 + MarkupElement - [184..200)::16 + MarkupStartTag - [184..191)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[embed]; + CloseAngle;[>]; + MarkupTextLiteral - [191..192)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [192..200)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[embed]; + CloseAngle;[>]; + CSharpStatementLiteral - [200..215)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [215..216)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [216..218)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [218..248)::30 + CSharpStatement - [218..248)::30 + CSharpTransition - [218..219)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [219..248)::29 + RazorMetaCode - [219..220)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [220..247)::27 + CSharpStatementLiteral - [220..222)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [222..232)::10 + MarkupElement - [222..232)::10 + MarkupStartTag - [222..226)::4 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[hr]; + CloseAngle;[>]; + MarkupTextLiteral - [226..227)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [227..232)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[hr]; + CloseAngle;[>]; + CSharpStatementLiteral - [232..247)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [247..248)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [248..250)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [250..282)::32 + CSharpStatement - [250..282)::32 + CSharpTransition - [250..251)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [251..282)::31 + RazorMetaCode - [251..252)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [252..281)::29 + CSharpStatementLiteral - [252..254)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [254..266)::12 + MarkupElement - [254..266)::12 + MarkupStartTag - [254..259)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[img]; + CloseAngle;[>]; + MarkupTextLiteral - [259..260)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [260..266)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[img]; + CloseAngle;[>]; + CSharpStatementLiteral - [266..281)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [281..282)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [282..284)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [284..320)::36 + CSharpStatement - [284..320)::36 + CSharpTransition - [284..285)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [285..320)::35 + RazorMetaCode - [285..286)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [286..319)::33 + CSharpStatementLiteral - [286..288)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [288..304)::16 + MarkupElement - [288..304)::16 + MarkupStartTag - [288..295)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + MarkupTextLiteral - [295..296)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [296..304)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[input]; + CloseAngle;[>]; + CSharpStatementLiteral - [304..319)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [319..320)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [320..322)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [322..360)::38 + CSharpStatement - [322..360)::38 + CSharpTransition - [322..323)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [323..360)::37 + RazorMetaCode - [323..324)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [324..359)::35 + CSharpStatementLiteral - [324..326)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [326..344)::18 + MarkupElement - [326..344)::18 + MarkupStartTag - [326..334)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[keygen]; + CloseAngle;[>]; + MarkupTextLiteral - [334..335)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [335..344)::9 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[keygen]; + CloseAngle;[>]; + CSharpStatementLiteral - [344..359)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [359..360)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [360..362)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [362..396)::34 + CSharpStatement - [362..396)::34 + CSharpTransition - [362..363)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [363..396)::33 + RazorMetaCode - [363..364)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [364..395)::31 + CSharpStatementLiteral - [364..366)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [366..380)::14 + MarkupElement - [366..380)::14 + MarkupStartTag - [366..372)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[link]; + CloseAngle;[>]; + MarkupTextLiteral - [372..373)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [373..380)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[link]; + CloseAngle;[>]; + CSharpStatementLiteral - [380..395)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [395..396)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [396..398)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [398..432)::34 + CSharpStatement - [398..432)::34 + CSharpTransition - [398..399)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [399..432)::33 + RazorMetaCode - [399..400)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [400..431)::31 + CSharpStatementLiteral - [400..402)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [402..416)::14 + MarkupElement - [402..416)::14 + MarkupStartTag - [402..408)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[meta]; + CloseAngle;[>]; + MarkupTextLiteral - [408..409)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [409..416)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[meta]; + CloseAngle;[>]; + CSharpStatementLiteral - [416..431)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [431..432)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [432..434)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [434..470)::36 + CSharpStatement - [434..470)::36 + CSharpTransition - [434..435)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [435..470)::35 + RazorMetaCode - [435..436)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [436..469)::33 + CSharpStatementLiteral - [436..438)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [438..454)::16 + MarkupElement - [438..454)::16 + MarkupStartTag - [438..445)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[param]; + CloseAngle;[>]; + MarkupTextLiteral - [445..446)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [446..454)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[param]; + CloseAngle;[>]; + CSharpStatementLiteral - [454..469)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [469..470)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [470..472)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [472..510)::38 + CSharpStatement - [472..510)::38 + CSharpTransition - [472..473)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [473..510)::37 + RazorMetaCode - [473..474)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [474..509)::35 + CSharpStatementLiteral - [474..476)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [476..494)::18 + MarkupElement - [476..494)::18 + MarkupStartTag - [476..484)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[source]; + CloseAngle;[>]; + MarkupTextLiteral - [484..485)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [485..494)::9 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[source]; + CloseAngle;[>]; + CSharpStatementLiteral - [494..509)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [509..510)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [510..512)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [512..548)::36 + CSharpStatement - [512..548)::36 + CSharpTransition - [512..513)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [513..548)::35 + RazorMetaCode - [513..514)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [514..547)::33 + CSharpStatementLiteral - [514..516)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [516..532)::16 + MarkupElement - [516..532)::16 + MarkupStartTag - [516..523)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[track]; + CloseAngle;[>]; + MarkupTextLiteral - [523..524)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [524..532)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[track]; + CloseAngle;[>]; + CSharpStatementLiteral - [532..547)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [547..548)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [548..550)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [550..582)::32 + CSharpStatement - [550..582)::32 + CSharpTransition - [550..551)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [551..582)::31 + RazorMetaCode - [551..552)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [552..581)::29 + CSharpStatementLiteral - [552..554)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [554..566)::12 + MarkupElement - [554..566)::12 + MarkupStartTag - [554..559)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[wbr]; + CloseAngle;[>]; + MarkupTextLiteral - [559..560)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [560..566)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[wbr]; + CloseAngle;[>]; + CSharpStatementLiteral - [566..581)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [581..582)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [582..584)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByContent.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByContent.cspans.txt new file mode 100644 index 0000000000..162d793f47 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByContent.cspans.txt @@ -0,0 +1,113 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [452] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Code span at (2:0,2 [2] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) +Markup span at (4:1,0 [6] ) (Accepts:None) - Parent: Tag block at (4:1,0 [6] ) +Code span at (10:1,6 [15] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) +MetaCode span at (25:2,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Markup span at (26:2,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [452] ) +Transition span at (28:3,0 [1] ) (Accepts:None) - Parent: Statement block at (28:3,0 [26] ) +MetaCode span at (29:3,1 [1] ) (Accepts:None) - Parent: Statement block at (28:3,0 [26] ) +Code span at (30:3,2 [2] ) (Accepts:Any) - Parent: Statement block at (28:3,0 [26] ) +Markup span at (32:4,0 [6] ) (Accepts:None) - Parent: Tag block at (32:4,0 [6] ) +Code span at (38:4,6 [15] ) (Accepts:Any) - Parent: Statement block at (28:3,0 [26] ) +MetaCode span at (53:5,0 [1] ) (Accepts:None) - Parent: Statement block at (28:3,0 [26] ) +Markup span at (54:5,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [452] ) +Transition span at (56:6,0 [1] ) (Accepts:None) - Parent: Statement block at (56:6,0 [24] ) +MetaCode span at (57:6,1 [1] ) (Accepts:None) - Parent: Statement block at (56:6,0 [24] ) +Code span at (58:6,2 [2] ) (Accepts:Any) - Parent: Statement block at (56:6,0 [24] ) +Markup span at (60:7,0 [4] ) (Accepts:None) - Parent: Tag block at (60:7,0 [4] ) +Code span at (64:7,4 [15] ) (Accepts:Any) - Parent: Statement block at (56:6,0 [24] ) +MetaCode span at (79:8,0 [1] ) (Accepts:None) - Parent: Statement block at (56:6,0 [24] ) +Markup span at (80:8,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [452] ) +Transition span at (82:9,0 [1] ) (Accepts:None) - Parent: Statement block at (82:9,0 [25] ) +MetaCode span at (83:9,1 [1] ) (Accepts:None) - Parent: Statement block at (82:9,0 [25] ) +Code span at (84:9,2 [2] ) (Accepts:Any) - Parent: Statement block at (82:9,0 [25] ) +Markup span at (86:10,0 [5] ) (Accepts:None) - Parent: Tag block at (86:10,0 [5] ) +Code span at (91:10,5 [15] ) (Accepts:Any) - Parent: Statement block at (82:9,0 [25] ) +MetaCode span at (106:11,0 [1] ) (Accepts:None) - Parent: Statement block at (82:9,0 [25] ) +Markup span at (107:11,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [452] ) +Transition span at (109:12,0 [1] ) (Accepts:None) - Parent: Statement block at (109:12,0 [29] ) +MetaCode span at (110:12,1 [1] ) (Accepts:None) - Parent: Statement block at (109:12,0 [29] ) +Code span at (111:12,2 [2] ) (Accepts:Any) - Parent: Statement block at (109:12,0 [29] ) +Markup span at (113:13,0 [9] ) (Accepts:None) - Parent: Tag block at (113:13,0 [9] ) +Code span at (122:13,9 [15] ) (Accepts:Any) - Parent: Statement block at (109:12,0 [29] ) +MetaCode span at (137:14,0 [1] ) (Accepts:None) - Parent: Statement block at (109:12,0 [29] ) +Markup span at (138:14,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [452] ) +Transition span at (140:15,0 [1] ) (Accepts:None) - Parent: Statement block at (140:15,0 [27] ) +MetaCode span at (141:15,1 [1] ) (Accepts:None) - Parent: Statement block at (140:15,0 [27] ) +Code span at (142:15,2 [2] ) (Accepts:Any) - Parent: Statement block at (140:15,0 [27] ) +Markup span at (144:16,0 [7] ) (Accepts:None) - Parent: Tag block at (144:16,0 [7] ) +Code span at (151:16,7 [15] ) (Accepts:Any) - Parent: Statement block at (140:15,0 [27] ) +MetaCode span at (166:17,0 [1] ) (Accepts:None) - Parent: Statement block at (140:15,0 [27] ) +Markup span at (167:17,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [452] ) +Transition span at (169:18,0 [1] ) (Accepts:None) - Parent: Statement block at (169:18,0 [24] ) +MetaCode span at (170:18,1 [1] ) (Accepts:None) - Parent: Statement block at (169:18,0 [24] ) +Code span at (171:18,2 [2] ) (Accepts:Any) - Parent: Statement block at (169:18,0 [24] ) +Markup span at (173:19,0 [4] ) (Accepts:None) - Parent: Tag block at (173:19,0 [4] ) +Code span at (177:19,4 [15] ) (Accepts:Any) - Parent: Statement block at (169:18,0 [24] ) +MetaCode span at (192:20,0 [1] ) (Accepts:None) - Parent: Statement block at (169:18,0 [24] ) +Markup span at (193:20,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [452] ) +Transition span at (195:21,0 [1] ) (Accepts:None) - Parent: Statement block at (195:21,0 [25] ) +MetaCode span at (196:21,1 [1] ) (Accepts:None) - Parent: Statement block at (195:21,0 [25] ) +Code span at (197:21,2 [2] ) (Accepts:Any) - Parent: Statement block at (195:21,0 [25] ) +Markup span at (199:22,0 [5] ) (Accepts:None) - Parent: Tag block at (199:22,0 [5] ) +Code span at (204:22,5 [15] ) (Accepts:Any) - Parent: Statement block at (195:21,0 [25] ) +MetaCode span at (219:23,0 [1] ) (Accepts:None) - Parent: Statement block at (195:21,0 [25] ) +Markup span at (220:23,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [452] ) +Transition span at (222:24,0 [1] ) (Accepts:None) - Parent: Statement block at (222:24,0 [27] ) +MetaCode span at (223:24,1 [1] ) (Accepts:None) - Parent: Statement block at (222:24,0 [27] ) +Code span at (224:24,2 [2] ) (Accepts:Any) - Parent: Statement block at (222:24,0 [27] ) +Markup span at (226:25,0 [7] ) (Accepts:None) - Parent: Tag block at (226:25,0 [7] ) +Code span at (233:25,7 [15] ) (Accepts:Any) - Parent: Statement block at (222:24,0 [27] ) +MetaCode span at (248:26,0 [1] ) (Accepts:None) - Parent: Statement block at (222:24,0 [27] ) +Markup span at (249:26,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [452] ) +Transition span at (251:27,0 [1] ) (Accepts:None) - Parent: Statement block at (251:27,0 [28] ) +MetaCode span at (252:27,1 [1] ) (Accepts:None) - Parent: Statement block at (251:27,0 [28] ) +Code span at (253:27,2 [2] ) (Accepts:Any) - Parent: Statement block at (251:27,0 [28] ) +Markup span at (255:28,0 [8] ) (Accepts:None) - Parent: Tag block at (255:28,0 [8] ) +Code span at (263:28,8 [15] ) (Accepts:Any) - Parent: Statement block at (251:27,0 [28] ) +MetaCode span at (278:29,0 [1] ) (Accepts:None) - Parent: Statement block at (251:27,0 [28] ) +Markup span at (279:29,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [452] ) +Transition span at (281:30,0 [1] ) (Accepts:None) - Parent: Statement block at (281:30,0 [26] ) +MetaCode span at (282:30,1 [1] ) (Accepts:None) - Parent: Statement block at (281:30,0 [26] ) +Code span at (283:30,2 [2] ) (Accepts:Any) - Parent: Statement block at (281:30,0 [26] ) +Markup span at (285:31,0 [6] ) (Accepts:None) - Parent: Tag block at (285:31,0 [6] ) +Code span at (291:31,6 [15] ) (Accepts:Any) - Parent: Statement block at (281:30,0 [26] ) +MetaCode span at (306:32,0 [1] ) (Accepts:None) - Parent: Statement block at (281:30,0 [26] ) +Markup span at (307:32,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [452] ) +Transition span at (309:33,0 [1] ) (Accepts:None) - Parent: Statement block at (309:33,0 [26] ) +MetaCode span at (310:33,1 [1] ) (Accepts:None) - Parent: Statement block at (309:33,0 [26] ) +Code span at (311:33,2 [2] ) (Accepts:Any) - Parent: Statement block at (309:33,0 [26] ) +Markup span at (313:34,0 [6] ) (Accepts:None) - Parent: Tag block at (313:34,0 [6] ) +Code span at (319:34,6 [15] ) (Accepts:Any) - Parent: Statement block at (309:33,0 [26] ) +MetaCode span at (334:35,0 [1] ) (Accepts:None) - Parent: Statement block at (309:33,0 [26] ) +Markup span at (335:35,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [452] ) +Transition span at (337:36,0 [1] ) (Accepts:None) - Parent: Statement block at (337:36,0 [27] ) +MetaCode span at (338:36,1 [1] ) (Accepts:None) - Parent: Statement block at (337:36,0 [27] ) +Code span at (339:36,2 [2] ) (Accepts:Any) - Parent: Statement block at (337:36,0 [27] ) +Markup span at (341:37,0 [7] ) (Accepts:None) - Parent: Tag block at (341:37,0 [7] ) +Code span at (348:37,7 [15] ) (Accepts:Any) - Parent: Statement block at (337:36,0 [27] ) +MetaCode span at (363:38,0 [1] ) (Accepts:None) - Parent: Statement block at (337:36,0 [27] ) +Markup span at (364:38,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [452] ) +Transition span at (366:39,0 [1] ) (Accepts:None) - Parent: Statement block at (366:39,0 [28] ) +MetaCode span at (367:39,1 [1] ) (Accepts:None) - Parent: Statement block at (366:39,0 [28] ) +Code span at (368:39,2 [2] ) (Accepts:Any) - Parent: Statement block at (366:39,0 [28] ) +Markup span at (370:40,0 [8] ) (Accepts:None) - Parent: Tag block at (370:40,0 [8] ) +Code span at (378:40,8 [15] ) (Accepts:Any) - Parent: Statement block at (366:39,0 [28] ) +MetaCode span at (393:41,0 [1] ) (Accepts:None) - Parent: Statement block at (366:39,0 [28] ) +Markup span at (394:41,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [452] ) +Transition span at (396:42,0 [1] ) (Accepts:None) - Parent: Statement block at (396:42,0 [27] ) +MetaCode span at (397:42,1 [1] ) (Accepts:None) - Parent: Statement block at (396:42,0 [27] ) +Code span at (398:42,2 [2] ) (Accepts:Any) - Parent: Statement block at (396:42,0 [27] ) +Markup span at (400:43,0 [7] ) (Accepts:None) - Parent: Tag block at (400:43,0 [7] ) +Code span at (407:43,7 [15] ) (Accepts:Any) - Parent: Statement block at (396:42,0 [27] ) +MetaCode span at (422:44,0 [1] ) (Accepts:None) - Parent: Statement block at (396:42,0 [27] ) +Markup span at (423:44,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [452] ) +Transition span at (425:45,0 [1] ) (Accepts:None) - Parent: Statement block at (425:45,0 [25] ) +MetaCode span at (426:45,1 [1] ) (Accepts:None) - Parent: Statement block at (425:45,0 [25] ) +Code span at (427:45,2 [2] ) (Accepts:Any) - Parent: Statement block at (425:45,0 [25] ) +Markup span at (429:46,0 [5] ) (Accepts:None) - Parent: Tag block at (429:46,0 [5] ) +Code span at (434:46,5 [15] ) (Accepts:Any) - Parent: Statement block at (425:45,0 [25] ) +MetaCode span at (449:47,0 [1] ) (Accepts:None) - Parent: Statement block at (425:45,0 [25] ) +Markup span at (450:47,1 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [452] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByContent.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByContent.stree.txt new file mode 100644 index 0000000000..3f081bc072 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByContent.stree.txt @@ -0,0 +1,484 @@ +RazorDocument - [0..452)::452 - [@{LFvar x = true;LF}LF@{LFvar x = true;LF}LF@{LF
                    var x = true;LF}LF@{LFvar x = true;LF}LF@{LFvar x = true;LF}LF@{LFvar x = true;LF}LF@{LF
                    var x = true;LF}LF@{LFvar x = true;LF}LF@{LFvar x = true;LF}LF@{LFvar x = true;LF}LF@{LFvar x = true;LF}LF@{LFvar x = true;LF}LF@{LFvar x = true;LF}LF@{LFvar x = true;LF}LF@{LFvar x = true;LF}LF@{LFvar x = true;LF}LF] + MarkupBlock - [0..452)::452 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..26)::26 + CSharpStatement - [0..26)::26 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..26)::25 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..25)::23 + CSharpStatementLiteral - [2..4)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [4..10)::6 + MarkupElement - [4..10)::6 + MarkupStartTag - [4..10)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[area]; + CloseAngle;[>]; + CSharpStatementLiteral - [10..25)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [25..26)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [26..28)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [28..54)::26 + CSharpStatement - [28..54)::26 + CSharpTransition - [28..29)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [29..54)::25 + RazorMetaCode - [29..30)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [30..53)::23 + CSharpStatementLiteral - [30..32)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [32..38)::6 + MarkupElement - [32..38)::6 + MarkupStartTag - [32..38)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[base]; + CloseAngle;[>]; + CSharpStatementLiteral - [38..53)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [53..54)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [54..56)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [56..80)::24 + CSharpStatement - [56..80)::24 + CSharpTransition - [56..57)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [57..80)::23 + RazorMetaCode - [57..58)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [58..79)::21 + CSharpStatementLiteral - [58..60)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [60..64)::4 + MarkupElement - [60..64)::4 + MarkupStartTag - [60..64)::4 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[br]; + CloseAngle;[>]; + CSharpStatementLiteral - [64..79)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [79..80)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [80..82)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [82..107)::25 + CSharpStatement - [82..107)::25 + CSharpTransition - [82..83)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [83..107)::24 + RazorMetaCode - [83..84)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [84..106)::22 + CSharpStatementLiteral - [84..86)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [86..91)::5 + MarkupElement - [86..91)::5 + MarkupStartTag - [86..91)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[col]; + CloseAngle;[>]; + CSharpStatementLiteral - [91..106)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [106..107)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [107..109)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [109..138)::29 + CSharpStatement - [109..138)::29 + CSharpTransition - [109..110)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [110..138)::28 + RazorMetaCode - [110..111)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [111..137)::26 + CSharpStatementLiteral - [111..113)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [113..122)::9 + MarkupElement - [113..122)::9 + MarkupStartTag - [113..122)::9 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[command]; + CloseAngle;[>]; + CSharpStatementLiteral - [122..137)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [137..138)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [138..140)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [140..167)::27 + CSharpStatement - [140..167)::27 + CSharpTransition - [140..141)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [141..167)::26 + RazorMetaCode - [141..142)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [142..166)::24 + CSharpStatementLiteral - [142..144)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [144..151)::7 + MarkupElement - [144..151)::7 + MarkupStartTag - [144..151)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[embed]; + CloseAngle;[>]; + CSharpStatementLiteral - [151..166)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [166..167)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [167..169)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [169..193)::24 + CSharpStatement - [169..193)::24 + CSharpTransition - [169..170)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [170..193)::23 + RazorMetaCode - [170..171)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [171..192)::21 + CSharpStatementLiteral - [171..173)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [173..177)::4 + MarkupElement - [173..177)::4 + MarkupStartTag - [173..177)::4 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[hr]; + CloseAngle;[>]; + CSharpStatementLiteral - [177..192)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [192..193)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [193..195)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [195..220)::25 + CSharpStatement - [195..220)::25 + CSharpTransition - [195..196)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [196..220)::24 + RazorMetaCode - [196..197)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [197..219)::22 + CSharpStatementLiteral - [197..199)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [199..204)::5 + MarkupElement - [199..204)::5 + MarkupStartTag - [199..204)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[img]; + CloseAngle;[>]; + CSharpStatementLiteral - [204..219)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [219..220)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [220..222)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [222..249)::27 + CSharpStatement - [222..249)::27 + CSharpTransition - [222..223)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [223..249)::26 + RazorMetaCode - [223..224)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [224..248)::24 + CSharpStatementLiteral - [224..226)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [226..233)::7 + MarkupElement - [226..233)::7 + MarkupStartTag - [226..233)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + CSharpStatementLiteral - [233..248)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [248..249)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [249..251)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [251..279)::28 + CSharpStatement - [251..279)::28 + CSharpTransition - [251..252)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [252..279)::27 + RazorMetaCode - [252..253)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [253..278)::25 + CSharpStatementLiteral - [253..255)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [255..263)::8 + MarkupElement - [255..263)::8 + MarkupStartTag - [255..263)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[keygen]; + CloseAngle;[>]; + CSharpStatementLiteral - [263..278)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [278..279)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [279..281)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [281..307)::26 + CSharpStatement - [281..307)::26 + CSharpTransition - [281..282)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [282..307)::25 + RazorMetaCode - [282..283)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [283..306)::23 + CSharpStatementLiteral - [283..285)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [285..291)::6 + MarkupElement - [285..291)::6 + MarkupStartTag - [285..291)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[link]; + CloseAngle;[>]; + CSharpStatementLiteral - [291..306)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [306..307)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [307..309)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [309..335)::26 + CSharpStatement - [309..335)::26 + CSharpTransition - [309..310)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [310..335)::25 + RazorMetaCode - [310..311)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [311..334)::23 + CSharpStatementLiteral - [311..313)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [313..319)::6 + MarkupElement - [313..319)::6 + MarkupStartTag - [313..319)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[meta]; + CloseAngle;[>]; + CSharpStatementLiteral - [319..334)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [334..335)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [335..337)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [337..364)::27 + CSharpStatement - [337..364)::27 + CSharpTransition - [337..338)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [338..364)::26 + RazorMetaCode - [338..339)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [339..363)::24 + CSharpStatementLiteral - [339..341)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [341..348)::7 + MarkupElement - [341..348)::7 + MarkupStartTag - [341..348)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[param]; + CloseAngle;[>]; + CSharpStatementLiteral - [348..363)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [363..364)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [364..366)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [366..394)::28 + CSharpStatement - [366..394)::28 + CSharpTransition - [366..367)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [367..394)::27 + RazorMetaCode - [367..368)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [368..393)::25 + CSharpStatementLiteral - [368..370)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [370..378)::8 + MarkupElement - [370..378)::8 + MarkupStartTag - [370..378)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[source]; + CloseAngle;[>]; + CSharpStatementLiteral - [378..393)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [393..394)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [394..396)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [396..423)::27 + CSharpStatement - [396..423)::27 + CSharpTransition - [396..397)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [397..423)::26 + RazorMetaCode - [397..398)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [398..422)::24 + CSharpStatementLiteral - [398..400)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [400..407)::7 + MarkupElement - [400..407)::7 + MarkupStartTag - [400..407)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[track]; + CloseAngle;[>]; + CSharpStatementLiteral - [407..422)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [422..423)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [423..425)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [425..450)::25 + CSharpStatement - [425..450)::25 + CSharpTransition - [425..426)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [426..450)::24 + RazorMetaCode - [426..427)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [427..449)::22 + CSharpStatementLiteral - [427..429)::2 - [LF] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + NewLine;[LF]; + MarkupBlock - [429..434)::5 + MarkupElement - [429..434)::5 + MarkupStartTag - [429..434)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[wbr]; + CloseAngle;[>]; + CSharpStatementLiteral - [434..449)::15 - [var x = true;LF] - Gen - SpanEditHandler;Accepts:Any + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Keyword;[true]; + Semicolon;[;]; + NewLine;[LF]; + RazorMetaCode - [449..450)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [450..452)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByOtherTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByOtherTag.cspans.txt new file mode 100644 index 0000000000..22605d5bf1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByOtherTag.cspans.txt @@ -0,0 +1,49 @@ +Markup span at (0:0,0 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [564] ) +Markup span at (3:1,0 [6] ) (Accepts:Any) - Parent: Tag block at (3:1,0 [6] ) +Markup span at (9:1,6 [7] ) (Accepts:Any) - Parent: Tag block at (9:1,6 [7] ) +Markup span at (16:1,13 [22] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [564] ) +Markup span at (38:4,0 [6] ) (Accepts:Any) - Parent: Tag block at (38:4,0 [6] ) +Markup span at (44:4,6 [7] ) (Accepts:Any) - Parent: Tag block at (44:4,6 [7] ) +Markup span at (51:4,13 [22] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [564] ) +Markup span at (73:7,0 [4] ) (Accepts:Any) - Parent: Tag block at (73:7,0 [4] ) +Markup span at (77:7,4 [7] ) (Accepts:Any) - Parent: Tag block at (77:7,4 [7] ) +Markup span at (84:7,11 [22] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [564] ) +Markup span at (106:10,0 [5] ) (Accepts:Any) - Parent: Tag block at (106:10,0 [5] ) +Markup span at (111:10,5 [7] ) (Accepts:Any) - Parent: Tag block at (111:10,5 [7] ) +Markup span at (118:10,12 [22] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [564] ) +Markup span at (140:13,0 [9] ) (Accepts:Any) - Parent: Tag block at (140:13,0 [9] ) +Markup span at (149:13,9 [7] ) (Accepts:Any) - Parent: Tag block at (149:13,9 [7] ) +Markup span at (156:13,16 [22] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [564] ) +Markup span at (178:16,0 [7] ) (Accepts:Any) - Parent: Tag block at (178:16,0 [7] ) +Markup span at (185:16,7 [7] ) (Accepts:Any) - Parent: Tag block at (185:16,7 [7] ) +Markup span at (192:16,14 [22] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [564] ) +Markup span at (214:19,0 [4] ) (Accepts:Any) - Parent: Tag block at (214:19,0 [4] ) +Markup span at (218:19,4 [7] ) (Accepts:Any) - Parent: Tag block at (218:19,4 [7] ) +Markup span at (225:19,11 [22] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [564] ) +Markup span at (247:22,0 [5] ) (Accepts:Any) - Parent: Tag block at (247:22,0 [5] ) +Markup span at (252:22,5 [7] ) (Accepts:Any) - Parent: Tag block at (252:22,5 [7] ) +Markup span at (259:22,12 [22] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [564] ) +Markup span at (281:25,0 [7] ) (Accepts:Any) - Parent: Tag block at (281:25,0 [7] ) +Markup span at (288:25,7 [7] ) (Accepts:Any) - Parent: Tag block at (288:25,7 [7] ) +Markup span at (295:25,14 [22] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [564] ) +Markup span at (317:28,0 [8] ) (Accepts:Any) - Parent: Tag block at (317:28,0 [8] ) +Markup span at (325:28,8 [7] ) (Accepts:Any) - Parent: Tag block at (325:28,8 [7] ) +Markup span at (332:28,15 [22] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [564] ) +Markup span at (354:31,0 [6] ) (Accepts:Any) - Parent: Tag block at (354:31,0 [6] ) +Markup span at (360:31,6 [7] ) (Accepts:Any) - Parent: Tag block at (360:31,6 [7] ) +Markup span at (367:31,13 [22] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [564] ) +Markup span at (389:34,0 [6] ) (Accepts:Any) - Parent: Tag block at (389:34,0 [6] ) +Markup span at (395:34,6 [7] ) (Accepts:Any) - Parent: Tag block at (395:34,6 [7] ) +Markup span at (402:34,13 [22] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [564] ) +Markup span at (424:37,0 [7] ) (Accepts:Any) - Parent: Tag block at (424:37,0 [7] ) +Markup span at (431:37,7 [7] ) (Accepts:Any) - Parent: Tag block at (431:37,7 [7] ) +Markup span at (438:37,14 [22] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [564] ) +Markup span at (460:40,0 [8] ) (Accepts:Any) - Parent: Tag block at (460:40,0 [8] ) +Markup span at (468:40,8 [7] ) (Accepts:Any) - Parent: Tag block at (468:40,8 [7] ) +Markup span at (475:40,15 [22] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [564] ) +Markup span at (497:43,0 [7] ) (Accepts:Any) - Parent: Tag block at (497:43,0 [7] ) +Markup span at (504:43,7 [7] ) (Accepts:Any) - Parent: Tag block at (504:43,7 [7] ) +Markup span at (511:43,14 [22] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [564] ) +Markup span at (533:46,0 [5] ) (Accepts:Any) - Parent: Tag block at (533:46,0 [5] ) +Markup span at (538:46,5 [7] ) (Accepts:Any) - Parent: Tag block at (538:46,5 [7] ) +Markup span at (545:46,12 [19] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [564] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByOtherTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByOtherTag.stree.txt new file mode 100644 index 0000000000..d323273f6b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlTagsTest/VoidElementFollowedByOtherTag.stree.txt @@ -0,0 +1,387 @@ +RazorDocument - [0..564)::564 - [{LF var x = true;LF}LF{LF var x = true;LF}LF{LF
                    var x = true;LF}LF{LF var x = true;LF}LF{LF var x = true;LF}LF{LF var x = true;LF}LF{LF
                    var x = true;LF}LF{LF var x = true;LF}LF{LF var x = true;LF}LF{LF var x = true;LF}LF{LF var x = true;LF}LF{LF var x = true;LF}LF{LF var x = true;LF}LF{LF var x = true;LF}LF{LF var x = true;LF}LF{LF var x = true;LF}LF] + MarkupBlock - [0..564)::564 + MarkupTextLiteral - [0..3)::3 - [{LF] - Gen - SpanEditHandler;Accepts:Any + Text;[{]; + NewLine;[LF]; + MarkupElement - [3..9)::6 + MarkupStartTag - [3..9)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[area]; + CloseAngle;[>]; + MarkupElement - [9..564)::555 + MarkupStartTag - [9..16)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[other]; + CloseAngle;[>]; + MarkupTextLiteral - [16..38)::22 - [ var x = true;LF}LF{LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[var]; + Whitespace;[ ]; + Text;[x]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[true;]; + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Text;[{]; + NewLine;[LF]; + MarkupElement - [38..44)::6 + MarkupStartTag - [38..44)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[base]; + CloseAngle;[>]; + MarkupElement - [44..564)::520 + MarkupStartTag - [44..51)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[other]; + CloseAngle;[>]; + MarkupTextLiteral - [51..73)::22 - [ var x = true;LF}LF{LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[var]; + Whitespace;[ ]; + Text;[x]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[true;]; + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Text;[{]; + NewLine;[LF]; + MarkupElement - [73..77)::4 + MarkupStartTag - [73..77)::4 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + CloseAngle;[>]; + MarkupElement - [77..564)::487 + MarkupStartTag - [77..84)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[other]; + CloseAngle;[>]; + MarkupTextLiteral - [84..106)::22 - [ var x = true;LF}LF{LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[var]; + Whitespace;[ ]; + Text;[x]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[true;]; + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Text;[{]; + NewLine;[LF]; + MarkupElement - [106..111)::5 + MarkupStartTag - [106..111)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[col]; + CloseAngle;[>]; + MarkupElement - [111..564)::453 + MarkupStartTag - [111..118)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[other]; + CloseAngle;[>]; + MarkupTextLiteral - [118..140)::22 - [ var x = true;LF}LF{LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[var]; + Whitespace;[ ]; + Text;[x]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[true;]; + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Text;[{]; + NewLine;[LF]; + MarkupElement - [140..149)::9 + MarkupStartTag - [140..149)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[command]; + CloseAngle;[>]; + MarkupElement - [149..564)::415 + MarkupStartTag - [149..156)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[other]; + CloseAngle;[>]; + MarkupTextLiteral - [156..178)::22 - [ var x = true;LF}LF{LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[var]; + Whitespace;[ ]; + Text;[x]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[true;]; + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Text;[{]; + NewLine;[LF]; + MarkupElement - [178..185)::7 + MarkupStartTag - [178..185)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[embed]; + CloseAngle;[>]; + MarkupElement - [185..564)::379 + MarkupStartTag - [185..192)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[other]; + CloseAngle;[>]; + MarkupTextLiteral - [192..214)::22 - [ var x = true;LF}LF{LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[var]; + Whitespace;[ ]; + Text;[x]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[true;]; + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Text;[{]; + NewLine;[LF]; + MarkupElement - [214..218)::4 + MarkupStartTag - [214..218)::4 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[hr]; + CloseAngle;[>]; + MarkupElement - [218..564)::346 + MarkupStartTag - [218..225)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[other]; + CloseAngle;[>]; + MarkupTextLiteral - [225..247)::22 - [ var x = true;LF}LF{LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[var]; + Whitespace;[ ]; + Text;[x]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[true;]; + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Text;[{]; + NewLine;[LF]; + MarkupElement - [247..252)::5 + MarkupStartTag - [247..252)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[img]; + CloseAngle;[>]; + MarkupElement - [252..564)::312 + MarkupStartTag - [252..259)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[other]; + CloseAngle;[>]; + MarkupTextLiteral - [259..281)::22 - [ var x = true;LF}LF{LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[var]; + Whitespace;[ ]; + Text;[x]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[true;]; + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Text;[{]; + NewLine;[LF]; + MarkupElement - [281..288)::7 + MarkupStartTag - [281..288)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + MarkupElement - [288..564)::276 + MarkupStartTag - [288..295)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[other]; + CloseAngle;[>]; + MarkupTextLiteral - [295..317)::22 - [ var x = true;LF}LF{LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[var]; + Whitespace;[ ]; + Text;[x]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[true;]; + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Text;[{]; + NewLine;[LF]; + MarkupElement - [317..325)::8 + MarkupStartTag - [317..325)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[keygen]; + CloseAngle;[>]; + MarkupElement - [325..564)::239 + MarkupStartTag - [325..332)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[other]; + CloseAngle;[>]; + MarkupTextLiteral - [332..354)::22 - [ var x = true;LF}LF{LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[var]; + Whitespace;[ ]; + Text;[x]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[true;]; + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Text;[{]; + NewLine;[LF]; + MarkupElement - [354..360)::6 + MarkupStartTag - [354..360)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[link]; + CloseAngle;[>]; + MarkupElement - [360..564)::204 + MarkupStartTag - [360..367)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[other]; + CloseAngle;[>]; + MarkupTextLiteral - [367..389)::22 - [ var x = true;LF}LF{LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[var]; + Whitespace;[ ]; + Text;[x]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[true;]; + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Text;[{]; + NewLine;[LF]; + MarkupElement - [389..395)::6 + MarkupStartTag - [389..395)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[meta]; + CloseAngle;[>]; + MarkupElement - [395..564)::169 + MarkupStartTag - [395..402)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[other]; + CloseAngle;[>]; + MarkupTextLiteral - [402..424)::22 - [ var x = true;LF}LF{LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[var]; + Whitespace;[ ]; + Text;[x]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[true;]; + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Text;[{]; + NewLine;[LF]; + MarkupElement - [424..431)::7 + MarkupStartTag - [424..431)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[param]; + CloseAngle;[>]; + MarkupElement - [431..564)::133 + MarkupStartTag - [431..438)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[other]; + CloseAngle;[>]; + MarkupTextLiteral - [438..460)::22 - [ var x = true;LF}LF{LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[var]; + Whitespace;[ ]; + Text;[x]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[true;]; + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Text;[{]; + NewLine;[LF]; + MarkupElement - [460..468)::8 + MarkupStartTag - [460..468)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[source]; + CloseAngle;[>]; + MarkupElement - [468..564)::96 + MarkupStartTag - [468..475)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[other]; + CloseAngle;[>]; + MarkupTextLiteral - [475..497)::22 - [ var x = true;LF}LF{LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[var]; + Whitespace;[ ]; + Text;[x]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[true;]; + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Text;[{]; + NewLine;[LF]; + MarkupElement - [497..504)::7 + MarkupStartTag - [497..504)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[track]; + CloseAngle;[>]; + MarkupElement - [504..564)::60 + MarkupStartTag - [504..511)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[other]; + CloseAngle;[>]; + MarkupTextLiteral - [511..533)::22 - [ var x = true;LF}LF{LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[var]; + Whitespace;[ ]; + Text;[x]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[true;]; + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; + Text;[{]; + NewLine;[LF]; + MarkupElement - [533..538)::5 + MarkupStartTag - [533..538)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[wbr]; + CloseAngle;[>]; + MarkupElement - [538..564)::26 + MarkupStartTag - [538..545)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[other]; + CloseAngle;[>]; + MarkupTextLiteral - [545..564)::19 - [ var x = true;LF}LF] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[var]; + Whitespace;[ ]; + Text;[x]; + Whitespace;[ ]; + Equals;[=]; + Whitespace;[ ]; + Text;[true;]; + NewLine;[LF]; + Text;[}]; + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/CSharpCodeParserDoesNotAcceptLeadingOrTrailingWhitespaceInDesignMode.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/CSharpCodeParserDoesNotAcceptLeadingOrTrailingWhitespaceInDesignMode.cspans.txt new file mode 100644 index 0000000000..8e11fb5c0b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/CSharpCodeParserDoesNotAcceptLeadingOrTrailingWhitespaceInDesignMode.cspans.txt @@ -0,0 +1,19 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [98] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [98] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [98] ) +Code span at (2:0,2 [3] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [98] ) +Markup span at (5:0,5 [4] ) (Accepts:None) - Parent: Tag block at (5:0,5 [4] ) +Markup span at (9:0,9 [6] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [92] ) +Transition span at (15:1,4 [1] ) (Accepts:None) - Parent: Statement block at (15:1,4 [71] ) +Code span at (16:1,5 [38] ) (Accepts:Any) - Parent: Statement block at (15:1,4 [71] ) +Markup span at (54:2,8 [4] ) (Accepts:None) - Parent: Tag block at (54:2,8 [4] ) +Markup span at (58:2,12 [9] ) (Accepts:Any) - Parent: Markup block at (54:2,8 [25] ) +Transition span at (67:2,21 [1] ) (Accepts:None) - Parent: Expression block at (67:2,21 [7] ) +Code span at (68:2,22 [6] ) (Accepts:NonWhitespace) - Parent: Expression block at (67:2,21 [7] ) +Markup span at (74:2,28 [5] ) (Accepts:None) - Parent: Tag block at (74:2,28 [5] ) +Code span at (79:2,33 [7] ) (Accepts:None) - Parent: Statement block at (15:1,4 [71] ) +Markup span at (86:3,5 [6] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [92] ) +Markup span at (92:4,4 [5] ) (Accepts:None) - Parent: Tag block at (92:4,4 [5] ) +Code span at (97:4,9 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [98] ) +MetaCode span at (97:4,9 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [98] ) +Markup span at (98:4,10 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [98] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/CSharpCodeParserDoesNotAcceptLeadingOrTrailingWhitespaceInDesignMode.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/CSharpCodeParserDoesNotAcceptLeadingOrTrailingWhitespaceInDesignMode.stree.txt new file mode 100644 index 0000000000..a29f4be9a5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/CSharpCodeParserDoesNotAcceptLeadingOrTrailingWhitespaceInDesignMode.stree.txt @@ -0,0 +1,83 @@ +RazorDocument - [0..98)::98 - [@{
                      LF @foreach(var p in Products) {LF
                    • Product: @p.Name
                    • LF }LF
                    }] + MarkupBlock - [0..98)::98 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..98)::98 + CSharpStatement - [0..98)::98 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..98)::97 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..97)::95 + CSharpStatementLiteral - [2..5)::3 - [ ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + MarkupBlock - [5..97)::92 + MarkupElement - [5..97)::92 + MarkupStartTag - [5..9)::4 - [
                      ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[ul]; + CloseAngle;[>]; + MarkupTextLiteral - [9..15)::6 - [LF ] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + CSharpCodeBlock - [15..86)::71 + CSharpTransition - [15..16)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [16..54)::38 - [foreach(var p in Products) {LF ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[foreach]; + LeftParenthesis;[(]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[p]; + Whitespace;[ ]; + Keyword;[in]; + Whitespace;[ ]; + Identifier;[Products]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + Whitespace;[ ]; + MarkupBlock - [54..79)::25 + MarkupElement - [54..79)::25 + MarkupStartTag - [54..58)::4 - [
                    • ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[li]; + CloseAngle;[>]; + MarkupTextLiteral - [58..67)::9 - [Product: ] - Gen - SpanEditHandler;Accepts:Any + Text;[Product:]; + Whitespace;[ ]; + CSharpCodeBlock - [67..74)::7 + CSharpImplicitExpression - [67..74)::7 + CSharpTransition - [67..68)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [68..74)::6 + CSharpCodeBlock - [68..74)::6 + CSharpExpressionLiteral - [68..74)::6 - [p.Name] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[p]; + Dot;[.]; + Identifier;[Name]; + MarkupEndTag - [74..79)::5 - [
                    • ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[li]; + CloseAngle;[>]; + CSharpStatementLiteral - [79..86)::7 - [LF }] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + Whitespace;[ ]; + RightBrace;[}]; + MarkupTextLiteral - [86..92)::6 - [LF ] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + MarkupEndTag - [92..97)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[ul]; + CloseAngle;[>]; + CSharpStatementLiteral - [97..97)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [97..98)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [98..98)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/DoesNotSwitchToCodeOnEmailAddressInAttribute.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/DoesNotSwitchToCodeOnEmailAddressInAttribute.cspans.txt new file mode 100644 index 0000000000..cba8fd92de --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/DoesNotSwitchToCodeOnEmailAddressInAttribute.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [53] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [53] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [53] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [38] ) +Markup span at (4:0,4 [7] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [35] ) +Markup span at (11:0,11 [27] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [35] ) +Markup span at (38:0,38 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [35] ) +Markup span at (39:0,39 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [38] ) +Markup span at (40:0,40 [8] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [50] ) +Markup span at (48:0,48 [4] ) (Accepts:None) - Parent: Tag block at (48:0,48 [4] ) +Code span at (52:0,52 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [53] ) +MetaCode span at (52:0,52 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [53] ) +Markup span at (53:0,53 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [53] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/DoesNotSwitchToCodeOnEmailAddressInAttribute.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/DoesNotSwitchToCodeOnEmailAddressInAttribute.stree.txt new file mode 100644 index 0000000000..8761033bc1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/DoesNotSwitchToCodeOnEmailAddressInAttribute.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..53)::53 - [@{Email me}] + MarkupBlock - [0..53)::53 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..53)::53 + CSharpStatement - [0..53)::53 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..53)::52 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..52)::50 + MarkupBlock - [2..52)::50 + MarkupElement - [2..52)::50 + MarkupStartTag - [2..40)::38 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[a]; + MarkupAttributeBlock - [4..39)::35 - [ href="mailto:anurse@microsoft.com"] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..9)::4 - [href] - Gen - SpanEditHandler;Accepts:Any + Text;[href]; + Equals;[=]; + MarkupTextLiteral - [10..11)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [11..38)::27 + MarkupLiteralAttributeValue - [11..38)::27 - [mailto:anurse@microsoft.com] + MarkupTextLiteral - [11..38)::27 - [mailto:anurse@microsoft.com] - Gen - SpanEditHandler;Accepts:Any + Text;[mailto:anurse@microsoft.com]; + MarkupTextLiteral - [38..39)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [40..48)::8 - [Email me] - Gen - SpanEditHandler;Accepts:Any + Text;[Email]; + Whitespace;[ ]; + Text;[me]; + MarkupEndTag - [48..52)::4 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[a]; + CloseAngle;[>]; + CSharpStatementLiteral - [52..52)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [52..53)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [53..53)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/DoesNotSwitchToCodeOnEmailAddressInText.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/DoesNotSwitchToCodeOnEmailAddressInText.cspans.txt new file mode 100644 index 0000000000..c0bfd264c0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/DoesNotSwitchToCodeOnEmailAddressInText.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [20] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [31] ) +Markup span at (27:0,27 [6] ) (Accepts:None) - Parent: Tag block at (27:0,27 [6] ) +Code span at (33:0,33 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (33:0,33 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (34:0,34 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/DoesNotSwitchToCodeOnEmailAddressInText.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/DoesNotSwitchToCodeOnEmailAddressInText.stree.txt new file mode 100644 index 0000000000..41310fb85e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/DoesNotSwitchToCodeOnEmailAddressInText.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..34)::34 - [@{anurse@microsoft.com}] + MarkupBlock - [0..34)::34 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..34)::34 + CSharpStatement - [0..34)::34 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..34)::33 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..33)::31 + MarkupBlock - [2..33)::31 + MarkupElement - [2..33)::31 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [7..27)::20 - [anurse@microsoft.com] - Gen - SpanEditHandler;Accepts:Any + Text;[anurse@microsoft.com]; + MarkupEndTag - [27..33)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [33..34)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [34..34)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/GivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/GivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.cspans.txt new file mode 100644 index 0000000000..769e4eeb3e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/GivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.cspans.txt @@ -0,0 +1,22 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [98] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [98] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [98] ) +Markup span at (2:0,2 [3] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [95] ) +Markup span at (5:0,5 [4] ) (Accepts:None) - Parent: Tag block at (5:0,5 [4] ) +Markup span at (9:0,9 [2] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [95] ) +Code span at (11:1,0 [4] ) (Accepts:Any) - Parent: Statement block at (11:1,0 [77] ) +Transition span at (15:1,4 [1] ) (Accepts:None) - Parent: Statement block at (11:1,0 [77] ) +Code span at (16:1,5 [30] ) (Accepts:Any) - Parent: Statement block at (11:1,0 [77] ) +Markup span at (46:2,0 [8] ) (Accepts:Any) - Parent: Markup block at (46:2,0 [35] ) +Markup span at (54:2,8 [4] ) (Accepts:None) - Parent: Tag block at (54:2,8 [4] ) +Markup span at (58:2,12 [9] ) (Accepts:Any) - Parent: Markup block at (46:2,0 [35] ) +Transition span at (67:2,21 [1] ) (Accepts:None) - Parent: Expression block at (67:2,21 [7] ) +Code span at (68:2,22 [6] ) (Accepts:NonWhitespace) - Parent: Expression block at (67:2,21 [7] ) +Markup span at (74:2,28 [5] ) (Accepts:None) - Parent: Tag block at (74:2,28 [5] ) +Markup span at (79:2,33 [2] ) (Accepts:None) - Parent: Markup block at (46:2,0 [35] ) +Code span at (81:3,0 [7] ) (Accepts:None) - Parent: Statement block at (11:1,0 [77] ) +Markup span at (88:4,0 [4] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [95] ) +Markup span at (92:4,4 [5] ) (Accepts:None) - Parent: Tag block at (92:4,4 [5] ) +Code span at (97:4,9 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [98] ) +MetaCode span at (97:4,9 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [98] ) +Markup span at (98:4,10 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [98] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/GivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/GivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.stree.txt new file mode 100644 index 0000000000..1025586c6d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/GivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.stree.txt @@ -0,0 +1,86 @@ +RazorDocument - [0..98)::98 - [@{
                      LF @foreach(var p in Products) {LF
                    • Product: @p.Name
                    • LF }LF
                    }] + MarkupBlock - [0..98)::98 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..98)::98 + CSharpStatement - [0..98)::98 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..98)::97 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..97)::95 + MarkupBlock - [2..97)::95 + MarkupTextLiteral - [2..5)::3 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [5..97)::92 + MarkupStartTag - [5..9)::4 - [
                      ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[ul]; + CloseAngle;[>]; + MarkupTextLiteral - [9..11)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [11..88)::77 + CSharpStatementLiteral - [11..15)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpTransition - [15..16)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [16..46)::30 - [foreach(var p in Products) {LF] - Gen - SpanEditHandler;Accepts:Any + Keyword;[foreach]; + LeftParenthesis;[(]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[p]; + Whitespace;[ ]; + Keyword;[in]; + Whitespace;[ ]; + Identifier;[Products]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + MarkupBlock - [46..81)::35 + MarkupTextLiteral - [46..54)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [54..79)::25 + MarkupStartTag - [54..58)::4 - [
                    • ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[li]; + CloseAngle;[>]; + MarkupTextLiteral - [58..67)::9 - [Product: ] - Gen - SpanEditHandler;Accepts:Any + Text;[Product:]; + Whitespace;[ ]; + CSharpCodeBlock - [67..74)::7 + CSharpImplicitExpression - [67..74)::7 + CSharpTransition - [67..68)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [68..74)::6 + CSharpCodeBlock - [68..74)::6 + CSharpExpressionLiteral - [68..74)::6 - [p.Name] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[p]; + Dot;[.]; + Identifier;[Name]; + MarkupEndTag - [74..79)::5 - [
                    • ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[li]; + CloseAngle;[>]; + MarkupTextLiteral - [79..81)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [81..88)::7 - [ }LF] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + MarkupTextLiteral - [88..92)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [92..97)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[ul]; + CloseAngle;[>]; + CSharpStatementLiteral - [97..97)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [97..98)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [98..98)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.cspans.txt new file mode 100644 index 0000000000..5b382487b7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [95] ) +Markup span at (3:0,3 [4] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [4] ) +Markup span at (7:0,7 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [95] ) +Code span at (9:1,0 [4] ) (Accepts:Any) - Parent: Statement block at (9:1,0 [77] ) +Transition span at (13:1,4 [1] ) (Accepts:None) - Parent: Statement block at (9:1,0 [77] ) +Code span at (14:1,5 [30] ) (Accepts:Any) - Parent: Statement block at (9:1,0 [77] ) +Markup span at (44:2,0 [8] ) (Accepts:Any) - Parent: Markup block at (44:2,0 [35] ) +Markup span at (52:2,8 [4] ) (Accepts:None) - Parent: Tag block at (52:2,8 [4] ) +Markup span at (56:2,12 [9] ) (Accepts:Any) - Parent: Markup block at (44:2,0 [35] ) +Transition span at (65:2,21 [1] ) (Accepts:None) - Parent: Expression block at (65:2,21 [7] ) +Code span at (66:2,22 [6] ) (Accepts:NonWhitespace) - Parent: Expression block at (65:2,21 [7] ) +Markup span at (72:2,28 [5] ) (Accepts:None) - Parent: Tag block at (72:2,28 [5] ) +Markup span at (77:2,33 [2] ) (Accepts:None) - Parent: Markup block at (44:2,0 [35] ) +Code span at (79:3,0 [7] ) (Accepts:None) - Parent: Statement block at (9:1,0 [77] ) +Markup span at (86:4,0 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [95] ) +Markup span at (90:4,4 [5] ) (Accepts:Any) - Parent: Tag block at (90:4,4 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.stree.txt new file mode 100644 index 0000000000..bdb122a309 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.stree.txt @@ -0,0 +1,69 @@ +RazorDocument - [0..95)::95 - [
                      LF @foreach(var p in Products) {LF
                    • Product: @p.Name
                    • LF }LF
                    ] + MarkupBlock - [0..95)::95 + MarkupTextLiteral - [0..3)::3 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [3..95)::92 + MarkupStartTag - [3..7)::4 - [
                      ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[ul]; + CloseAngle;[>]; + MarkupTextLiteral - [7..9)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [9..86)::77 + CSharpStatementLiteral - [9..13)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpTransition - [13..14)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [14..44)::30 - [foreach(var p in Products) {LF] - Gen - SpanEditHandler;Accepts:Any + Keyword;[foreach]; + LeftParenthesis;[(]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[p]; + Whitespace;[ ]; + Keyword;[in]; + Whitespace;[ ]; + Identifier;[Products]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + MarkupBlock - [44..79)::35 + MarkupTextLiteral - [44..52)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [52..77)::25 + MarkupStartTag - [52..56)::4 - [
                    • ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[li]; + CloseAngle;[>]; + MarkupTextLiteral - [56..65)::9 - [Product: ] - Gen - SpanEditHandler;Accepts:Any + Text;[Product:]; + Whitespace;[ ]; + CSharpCodeBlock - [65..72)::7 + CSharpImplicitExpression - [65..72)::7 + CSharpTransition - [65..66)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [66..72)::6 + CSharpCodeBlock - [66..72)::6 + CSharpExpressionLiteral - [66..72)::6 - [p.Name] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[p]; + Dot;[.]; + Identifier;[Name]; + MarkupEndTag - [72..77)::5 - [
                    • ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[li]; + CloseAngle;[>]; + MarkupTextLiteral - [77..79)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [79..86)::7 - [ }LF] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + MarkupTextLiteral - [86..90)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [90..95)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[ul]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentTreatsPairsOfAtSignsAsEscapeSequence.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentTreatsPairsOfAtSignsAsEscapeSequence.cspans.txt new file mode 100644 index 0000000000..f524279da0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentTreatsPairsOfAtSignsAsEscapeSequence.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (5:0,5 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Markup span at (6:0,6 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Markup span at (7:0,7 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Markup span at (8:0,8 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Transition span at (9:0,9 [1] ) (Accepts:None) - Parent: Expression block at (9:0,9 [4] ) +Code span at (10:0,10 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (9:0,9 [4] ) +Markup span at (13:0,13 [6] ) (Accepts:Any) - Parent: Tag block at (13:0,13 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentTreatsPairsOfAtSignsAsEscapeSequence.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentTreatsPairsOfAtSignsAsEscapeSequence.stree.txt new file mode 100644 index 0000000000..66e1ca4faa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentTreatsPairsOfAtSignsAsEscapeSequence.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..19)::19 - [@@@@@bar] + MarkupBlock - [0..19)::19 + MarkupElement - [0..19)::19 + MarkupStartTag - [0..5)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupEphemeralTextLiteral - [5..6)::1 - [@] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + MarkupTextLiteral - [6..7)::1 - [@] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + MarkupEphemeralTextLiteral - [7..8)::1 - [@] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + MarkupTextLiteral - [8..9)::1 - [@] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + CSharpCodeBlock - [9..13)::4 + CSharpImplicitExpression - [9..13)::4 + CSharpTransition - [9..10)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [10..13)::3 + CSharpCodeBlock - [10..13)::3 + CSharpExpressionLiteral - [10..13)::3 - [bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[bar]; + MarkupEndTag - [13..19)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentTreatsTwoAtSignsAsEscapeSequence.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentTreatsTwoAtSignsAsEscapeSequence.cspans.txt new file mode 100644 index 0000000000..beb66d05e5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentTreatsTwoAtSignsAsEscapeSequence.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (5:0,5 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) +Markup span at (6:0,6 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) +Markup span at (10:0,10 [6] ) (Accepts:Any) - Parent: Tag block at (10:0,10 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentTreatsTwoAtSignsAsEscapeSequence.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentTreatsTwoAtSignsAsEscapeSequence.stree.txt new file mode 100644 index 0000000000..9408db763d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParseDocumentTreatsTwoAtSignsAsEscapeSequence.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..16)::16 - [@@bar] + MarkupBlock - [0..16)::16 + MarkupElement - [0..16)::16 + MarkupStartTag - [0..5)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupEphemeralTextLiteral - [5..6)::1 - [@] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + MarkupTextLiteral - [6..10)::4 - [@bar] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + Text;[bar]; + MarkupEndTag - [10..16)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParsesCodeWithinSingleLineMarkup.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParsesCodeWithinSingleLineMarkup.cspans.txt new file mode 100644 index 0000000000..a25c9be457 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParsesCodeWithinSingleLineMarkup.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Transition span at (2:0,2 [1] ) (Accepts:None) - Parent: Markup block at (2:0,2 [20] ) +MetaCode span at (3:0,3 [1] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [20] ) +Markup span at (4:0,4 [8] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [20] ) +Transition span at (12:0,12 [1] ) (Accepts:None) - Parent: Expression block at (12:0,12 [4] ) +Code span at (13:0,13 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (12:0,12 [4] ) +Markup span at (16:0,16 [6] ) (Accepts:None) - Parent: Markup block at (2:0,2 [20] ) +Code span at (22:1,0 [4] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (26:1,4 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Markup span at (27:1,5 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParsesCodeWithinSingleLineMarkup.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParsesCodeWithinSingleLineMarkup.stree.txt new file mode 100644 index 0000000000..20c3e121d3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/ParsesCodeWithinSingleLineMarkup.stree.txt @@ -0,0 +1,41 @@ +RazorDocument - [0..27)::27 - [@{@:
                  • Foo @Bar BazLFbork}] + MarkupBlock - [0..27)::27 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..27)::27 + CSharpStatement - [0..27)::27 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..27)::26 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..26)::24 + MarkupBlock - [2..22)::20 + MarkupTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorMetaCode - [3..4)::1 - Gen - SpanEditHandler;Accepts:Any + Colon;[:]; + MarkupTextLiteral - [4..12)::8 - [
                  • Foo ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[li]; + CloseAngle;[>]; + Text;[Foo]; + Whitespace;[ ]; + CSharpCodeBlock - [12..16)::4 + CSharpImplicitExpression - [12..16)::4 + CSharpTransition - [12..13)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [13..16)::3 + CSharpCodeBlock - [13..16)::3 + CSharpExpressionLiteral - [13..16)::3 - [Bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[Bar]; + MarkupTextLiteral - [16..22)::6 - [ BazLF] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Text;[Baz]; + NewLine;[LF]; + CSharpStatementLiteral - [22..26)::4 - [bork] - Gen - SpanEditHandler;Accepts:Any + Identifier;[bork]; + RazorMetaCode - [26..27)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [27..27)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionBodyTreatsPairsOfAtSignsAsEscapeSequence.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionBodyTreatsPairsOfAtSignsAsEscapeSequence.cspans.txt new file mode 100644 index 0000000000..27a97571b5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionBodyTreatsPairsOfAtSignsAsEscapeSequence.cspans.txt @@ -0,0 +1,19 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [36] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [36] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [36] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [36] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [36] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [36] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [21] ) +Markup span at (15:0,15 [5] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [5] ) +Markup span at (20:0,20 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [21] ) +Markup span at (21:0,21 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [21] ) +Markup span at (22:0,22 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [21] ) +Markup span at (23:0,23 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [21] ) +Transition span at (24:0,24 [1] ) (Accepts:None) - Parent: Expression block at (24:0,24 [4] ) +Code span at (25:0,25 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (24:0,24 [4] ) +Markup span at (28:0,28 [6] ) (Accepts:Any) - Parent: Tag block at (28:0,28 [6] ) +Markup span at (34:0,34 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [21] ) +MetaCode span at (35:0,35 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [36] ) +Markup span at (36:0,36 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionBodyTreatsPairsOfAtSignsAsEscapeSequence.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionBodyTreatsPairsOfAtSignsAsEscapeSequence.stree.txt new file mode 100644 index 0000000000..e490f7e131 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionBodyTreatsPairsOfAtSignsAsEscapeSequence.stree.txt @@ -0,0 +1,55 @@ +RazorDocument - [0..36)::36 - [@section Foo { @@@@@bar }] + MarkupBlock - [0..36)::36 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..36)::36 + RazorDirective - [0..36)::36 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..36)::35 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..36)::28 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [Foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[Foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..35)::21 + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [15..34)::19 + MarkupStartTag - [15..20)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupEphemeralTextLiteral - [20..21)::1 - [@] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + MarkupTextLiteral - [21..22)::1 - [@] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + MarkupEphemeralTextLiteral - [22..23)::1 - [@] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + MarkupTextLiteral - [23..24)::1 - [@] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + CSharpCodeBlock - [24..28)::4 + CSharpImplicitExpression - [24..28)::4 + CSharpTransition - [24..25)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [25..28)::3 + CSharpCodeBlock - [25..28)::3 + CSharpExpressionLiteral - [25..28)::3 - [bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K15 + Identifier;[bar]; + MarkupEndTag - [28..34)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [34..35)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [35..36)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [36..36)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionBodyTreatsTwoAtSignsAsEscapeSequence.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionBodyTreatsTwoAtSignsAsEscapeSequence.cspans.txt new file mode 100644 index 0000000000..f966801338 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionBodyTreatsTwoAtSignsAsEscapeSequence.cspans.txt @@ -0,0 +1,15 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [33] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [33] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [33] ) +Code span at (9:0,9 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [33] ) +None span at (12:0,12 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [33] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [33] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [18] ) +Markup span at (15:0,15 [5] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [5] ) +Markup span at (20:0,20 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [18] ) +Markup span at (21:0,21 [4] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [18] ) +Markup span at (25:0,25 [6] ) (Accepts:Any) - Parent: Tag block at (25:0,25 [6] ) +Markup span at (31:0,31 [1] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [18] ) +MetaCode span at (32:0,32 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [33] ) +Markup span at (33:0,33 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionBodyTreatsTwoAtSignsAsEscapeSequence.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionBodyTreatsTwoAtSignsAsEscapeSequence.stree.txt new file mode 100644 index 0000000000..eb51d6aa1f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionBodyTreatsTwoAtSignsAsEscapeSequence.stree.txt @@ -0,0 +1,44 @@ +RazorDocument - [0..33)::33 - [@section Foo { @@bar }] + MarkupBlock - [0..33)::33 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..33)::33 + RazorDirective - [0..33)::33 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..33)::32 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..33)::25 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..12)::3 - [Foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[Foo]; + UnclassifiedTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [14..32)::18 + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [15..31)::16 + MarkupStartTag - [15..20)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupEphemeralTextLiteral - [20..21)::1 - [@] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + MarkupTextLiteral - [21..25)::4 - [@bar] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + Text;[bar]; + MarkupEndTag - [25..31)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [31..32)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [32..33)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionContextGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionContextGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.cspans.txt new file mode 100644 index 0000000000..3529ce293f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionContextGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.cspans.txt @@ -0,0 +1,31 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [130] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [130] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [130] ) +Code span at (2:0,2 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [130] ) +Transition span at (2:0,2 [1] ) (Accepts:None) - Parent: Directive block at (2:0,2 [127] ) +MetaCode span at (3:0,3 [7] ) (Accepts:None) - Parent: Directive block at (2:0,2 [127] ) +Code span at (10:0,10 [1] ) (Accepts:Whitespace) - Parent: Directive block at (2:0,2 [127] ) +Code span at (11:0,11 [3] ) (Accepts:NonWhitespace) - Parent: Directive block at (2:0,2 [127] ) +None span at (14:0,14 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (2:0,2 [127] ) +MetaCode span at (15:0,15 [1] ) (Accepts:None) - Parent: Directive block at (2:0,2 [127] ) +Markup span at (16:0,16 [6] ) (Accepts:Any) - Parent: Markup block at (16:0,16 [112] ) +Markup span at (22:1,4 [4] ) (Accepts:Any) - Parent: Tag block at (22:1,4 [4] ) +Markup span at (26:1,8 [2] ) (Accepts:Any) - Parent: Markup block at (16:0,16 [112] ) +Code span at (28:2,0 [8] ) (Accepts:Any) - Parent: Statement block at (28:2,0 [89] ) +Transition span at (36:2,8 [1] ) (Accepts:None) - Parent: Statement block at (28:2,0 [89] ) +Code span at (37:2,9 [30] ) (Accepts:Any) - Parent: Statement block at (28:2,0 [89] ) +Markup span at (67:3,0 [12] ) (Accepts:Any) - Parent: Markup block at (67:3,0 [39] ) +Markup span at (79:3,12 [4] ) (Accepts:None) - Parent: Tag block at (79:3,12 [4] ) +Markup span at (83:3,16 [9] ) (Accepts:Any) - Parent: Markup block at (67:3,0 [39] ) +Transition span at (92:3,25 [1] ) (Accepts:None) - Parent: Expression block at (92:3,25 [7] ) +Code span at (93:3,26 [6] ) (Accepts:NonWhitespace) - Parent: Expression block at (92:3,25 [7] ) +Markup span at (99:3,32 [5] ) (Accepts:None) - Parent: Tag block at (99:3,32 [5] ) +Markup span at (104:3,37 [2] ) (Accepts:None) - Parent: Markup block at (67:3,0 [39] ) +Code span at (106:4,0 [11] ) (Accepts:None) - Parent: Statement block at (28:2,0 [89] ) +Markup span at (117:5,0 [4] ) (Accepts:Any) - Parent: Markup block at (16:0,16 [112] ) +Markup span at (121:5,4 [5] ) (Accepts:Any) - Parent: Tag block at (121:5,4 [5] ) +Markup span at (126:5,9 [2] ) (Accepts:Any) - Parent: Markup block at (16:0,16 [112] ) +MetaCode span at (128:6,0 [1] ) (Accepts:None) - Parent: Directive block at (2:0,2 [127] ) +Code span at (129:6,1 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [130] ) +MetaCode span at (129:6,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [130] ) +Markup span at (130:6,2 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [130] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionContextGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionContextGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.stree.txt new file mode 100644 index 0000000000..3f3c933778 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionContextGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.stree.txt @@ -0,0 +1,109 @@ +RazorDocument - [0..130)::130 - [@{@section foo {LF
                      LF @foreach(var p in Products) {LF
                    • Product: @p.Name
                    • LF }LF
                    LF}}] + MarkupBlock - [0..130)::130 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..130)::130 + CSharpStatement - [0..130)::130 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..130)::129 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..129)::127 + CSharpStatementLiteral - [2..2)::0 - [] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Marker;[]; + CSharpCodeBlock - [2..129)::127 + RazorDirective - [2..129)::127 - Directive:{section;RazorBlock;Unrestricted} [RZ2005(3:0,3 [7] )] + CSharpTransition - [2..3)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [3..129)::126 + RazorMetaCode - [3..10)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [10..129)::119 + CSharpStatementLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [11..14)::3 - [foo] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[foo]; + UnclassifiedTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [15..16)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [16..128)::112 + MarkupTextLiteral - [16..22)::6 - [LF ] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + MarkupElement - [22..126)::104 + MarkupStartTag - [22..26)::4 - [
                      ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[ul]; + CloseAngle;[>]; + MarkupTextLiteral - [26..28)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [28..117)::89 + CSharpStatementLiteral - [28..36)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpTransition - [36..37)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [37..67)::30 - [foreach(var p in Products) {LF] - Gen - SpanEditHandler;Accepts:Any + Keyword;[foreach]; + LeftParenthesis;[(]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[p]; + Whitespace;[ ]; + Keyword;[in]; + Whitespace;[ ]; + Identifier;[Products]; + RightParenthesis;[)]; + Whitespace;[ ]; + LeftBrace;[{]; + NewLine;[LF]; + MarkupBlock - [67..106)::39 + MarkupTextLiteral - [67..79)::12 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [79..104)::25 + MarkupStartTag - [79..83)::4 - [
                    • ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[li]; + CloseAngle;[>]; + MarkupTextLiteral - [83..92)::9 - [Product: ] - Gen - SpanEditHandler;Accepts:Any + Text;[Product:]; + Whitespace;[ ]; + CSharpCodeBlock - [92..99)::7 + CSharpImplicitExpression - [92..99)::7 + CSharpTransition - [92..93)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [93..99)::6 + CSharpCodeBlock - [93..99)::6 + CSharpExpressionLiteral - [93..99)::6 - [p.Name] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K15 + Identifier;[p]; + Dot;[.]; + Identifier;[Name]; + MarkupEndTag - [99..104)::5 - [
                    • ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[li]; + CloseAngle;[>]; + MarkupTextLiteral - [104..106)::2 - [LF] - Gen - SpanEditHandler;Accepts:None + NewLine;[LF]; + CSharpStatementLiteral - [106..117)::11 - [ }LF] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + RightBrace;[}]; + NewLine;[LF]; + MarkupTextLiteral - [117..121)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupEndTag - [121..126)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[ul]; + CloseAngle;[>]; + MarkupTextLiteral - [126..128)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + RazorMetaCode - [128..129)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + CSharpStatementLiteral - [129..129)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [129..130)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [130..130)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinCDataDeclaration.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinCDataDeclaration.cspans.txt new file mode 100644 index 0000000000..371d673f22 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinCDataDeclaration.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [39] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [39] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [39] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [14] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [36] ) +Transition span at (21:0,21 [1] ) (Accepts:None) - Parent: Expression block at (21:0,21 [4] ) +Code span at (22:0,22 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (21:0,21 [4] ) +Markup span at (25:0,25 [7] ) (Accepts:None) - Parent: Markup block at (2:0,2 [36] ) +Markup span at (32:0,32 [6] ) (Accepts:None) - Parent: Tag block at (32:0,32 [6] ) +Code span at (38:0,38 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [39] ) +MetaCode span at (38:0,38 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [39] ) +Markup span at (39:0,39 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [39] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinCDataDeclaration.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinCDataDeclaration.stree.txt new file mode 100644 index 0000000000..4a63f88741 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinCDataDeclaration.stree.txt @@ -0,0 +1,52 @@ +RazorDocument - [0..39)::39 - [@{}] + MarkupBlock - [0..39)::39 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..39)::39 + CSharpStatement - [0..39)::39 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..39)::38 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..38)::36 + MarkupBlock - [2..38)::36 + MarkupElement - [2..38)::36 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [7..21)::14 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + LeftBracket;[[]; + Text;[CDATA]; + LeftBracket;[[]; + Whitespace;[ ]; + Text;[foo]; + Whitespace;[ ]; + CSharpCodeBlock - [21..25)::4 + CSharpImplicitExpression - [21..25)::4 + CSharpTransition - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [22..25)::3 + CSharpCodeBlock - [22..25)::3 + CSharpExpressionLiteral - [22..25)::3 - [bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[bar]; + MarkupTextLiteral - [25..32)::7 - [ baz]]>] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Text;[baz]; + RightBracket;[]]; + RightBracket;[]]; + CloseAngle;[>]; + MarkupEndTag - [32..38)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [38..38)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [38..39)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [39..39)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinComment.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinComment.cspans.txt new file mode 100644 index 0000000000..d8bbd6e465 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinComment.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [4] ) (Accepts:None) - Parent: HtmlComment block at (7:0,7 [13] ) +Markup span at (11:0,11 [1] ) (Accepts:Whitespace) - Parent: HtmlComment block at (7:0,7 [13] ) +Transition span at (12:0,12 [1] ) (Accepts:None) - Parent: Expression block at (12:0,12 [4] ) +Code span at (13:0,13 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (12:0,12 [4] ) +Markup span at (16:0,16 [1] ) (Accepts:Whitespace) - Parent: HtmlComment block at (7:0,7 [13] ) +Markup span at (17:0,17 [3] ) (Accepts:None) - Parent: HtmlComment block at (7:0,7 [13] ) +Markup span at (20:0,20 [6] ) (Accepts:None) - Parent: Tag block at (20:0,20 [6] ) +Code span at (26:0,26 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (26:0,26 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Markup span at (27:0,27 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinComment.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinComment.stree.txt new file mode 100644 index 0000000000..ae10fe3b1b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinComment.stree.txt @@ -0,0 +1,49 @@ +RazorDocument - [0..27)::27 - [@{}] + MarkupBlock - [0..27)::27 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..27)::27 + CSharpStatement - [0..27)::27 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..27)::26 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..26)::24 + MarkupBlock - [2..26)::24 + MarkupElement - [2..26)::24 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupCommentBlock - [7..20)::13 + MarkupTextLiteral - [7..11)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupEndTag - [20..26)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [26..26)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [26..27)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [27..27)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinSGMLDeclaration.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinSGMLDeclaration.cspans.txt new file mode 100644 index 0000000000..154020ea7c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinSGMLDeclaration.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [37] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [37] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [37] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [14] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [34] ) +Transition span at (21:0,21 [1] ) (Accepts:None) - Parent: Expression block at (21:0,21 [4] ) +Code span at (22:0,22 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (21:0,21 [4] ) +Markup span at (25:0,25 [5] ) (Accepts:None) - Parent: Markup block at (2:0,2 [34] ) +Markup span at (30:0,30 [6] ) (Accepts:None) - Parent: Tag block at (30:0,30 [6] ) +Code span at (36:0,36 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [37] ) +MetaCode span at (36:0,36 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [37] ) +Markup span at (37:0,37 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [37] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinSGMLDeclaration.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinSGMLDeclaration.stree.txt new file mode 100644 index 0000000000..72803b9925 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinSGMLDeclaration.stree.txt @@ -0,0 +1,48 @@ +RazorDocument - [0..37)::37 - [@{}] + MarkupBlock - [0..37)::37 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..37)::37 + CSharpStatement - [0..37)::37 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..37)::36 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..36)::34 + MarkupBlock - [2..36)::34 + MarkupElement - [2..36)::34 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [7..21)::14 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[DOCTYPE]; + Whitespace;[ ]; + Text;[foo]; + Whitespace;[ ]; + CSharpCodeBlock - [21..25)::4 + CSharpImplicitExpression - [21..25)::4 + CSharpTransition - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [22..25)::3 + CSharpCodeBlock - [22..25)::3 + CSharpExpressionLiteral - [22..25)::3 - [bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[bar]; + MarkupTextLiteral - [25..30)::5 - [ baz>] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Text;[baz]; + CloseAngle;[>]; + MarkupEndTag - [30..36)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [36..36)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [36..37)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [37..37)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinXMLProcessingInstruction.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinXMLProcessingInstruction.cspans.txt new file mode 100644 index 0000000000..a1e6d33dba --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinXMLProcessingInstruction.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [10] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [31] ) +Transition span at (17:0,17 [1] ) (Accepts:None) - Parent: Expression block at (17:0,17 [4] ) +Code span at (18:0,18 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (17:0,17 [4] ) +Markup span at (21:0,21 [6] ) (Accepts:None) - Parent: Markup block at (2:0,2 [31] ) +Markup span at (27:0,27 [6] ) (Accepts:None) - Parent: Tag block at (27:0,27 [6] ) +Code span at (33:0,33 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (33:0,33 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (34:0,34 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinXMLProcessingInstruction.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinXMLProcessingInstruction.stree.txt new file mode 100644 index 0000000000..9a734b0002 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SupportsCodeWithinXMLProcessingInstruction.stree.txt @@ -0,0 +1,49 @@ +RazorDocument - [0..34)::34 - [@{}] + MarkupBlock - [0..34)::34 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..34)::34 + CSharpStatement - [0..34)::34 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..34)::33 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..33)::31 + MarkupBlock - [2..33)::31 + MarkupElement - [2..33)::31 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [7..17)::10 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + QuestionMark;[?]; + Text;[xml]; + Whitespace;[ ]; + Text;[foo]; + Whitespace;[ ]; + CSharpCodeBlock - [17..21)::4 + CSharpImplicitExpression - [17..21)::4 + CSharpTransition - [17..18)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [18..21)::3 + CSharpCodeBlock - [18..21)::3 + CSharpExpressionLiteral - [18..21)::3 - [bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[bar]; + MarkupTextLiteral - [21..27)::6 - [ baz?>] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Text;[baz]; + QuestionMark;[?]; + CloseAngle;[>]; + MarkupEndTag - [27..33)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [33..34)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [34..34)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredInAttributeValue.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredInAttributeValue.cspans.txt new file mode 100644 index 0000000000..90f540af15 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredInAttributeValue.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Markup span at (2:0,2 [4] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [18] ) +Markup span at (6:0,6 [6] ) (Accepts:Any) - Parent: Markup block at (6:0,6 [11] ) +Transition span at (12:0,12 [1] ) (Accepts:None) - Parent: Expression block at (12:0,12 [4] ) +Code span at (13:0,13 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (12:0,12 [4] ) +Markup span at (16:0,16 [1] ) (Accepts:Any) - Parent: Markup block at (6:0,6 [11] ) +Markup span at (17:0,17 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [18] ) +Code span at (20:0,20 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [21] ) +MetaCode span at (20:0,20 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Markup span at (21:0,21 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredInAttributeValue.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredInAttributeValue.stree.txt new file mode 100644 index 0000000000..13dac52374 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredInAttributeValue.stree.txt @@ -0,0 +1,49 @@ +RazorDocument - [0..21)::21 - [@{}] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..21)::21 + CSharpStatement - [0..21)::21 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..21)::20 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..20)::18 + MarkupBlock - [2..20)::18 + MarkupElement - [2..20)::18 + MarkupStartTag - [2..20)::18 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + MarkupAttributeBlock - [6..17)::11 - [ bar="@baz"] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..10)::3 - [bar] - Gen - SpanEditHandler;Accepts:Any + Text;[bar]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [12..16)::4 + MarkupDynamicAttributeValue - [12..16)::4 - [@baz] + GenericBlock - [12..16)::4 + CSharpCodeBlock - [12..16)::4 + CSharpImplicitExpression - [12..16)::4 + CSharpTransition - [12..13)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [13..16)::3 + CSharpCodeBlock - [13..16)::3 + CSharpExpressionLiteral - [13..16)::3 - [baz] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[baz]; + MarkupTextLiteral - [16..17)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [17..18)::1 + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [20..20)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [20..21)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredInTagContent.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredInTagContent.cspans.txt new file mode 100644 index 0000000000..5cd3fa4a4e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredInTagContent.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [0] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [30] ) +Transition span at (7:0,7 [1] ) (Accepts:None) - Parent: Expression block at (7:0,7 [4] ) +Code span at (8:0,8 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (7:0,7 [4] ) +Markup span at (11:0,11 [5] ) (Accepts:None) - Parent: Tag block at (11:0,11 [5] ) +Markup span at (16:0,16 [0] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [30] ) +Transition span at (16:0,16 [1] ) (Accepts:None) - Parent: Expression block at (16:0,16 [4] ) +Code span at (17:0,17 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (16:0,16 [4] ) +Markup span at (20:0,20 [6] ) (Accepts:None) - Parent: Tag block at (20:0,20 [6] ) +Markup span at (26:0,26 [6] ) (Accepts:None) - Parent: Tag block at (26:0,26 [6] ) +Code span at (32:0,32 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [33] ) +MetaCode span at (32:0,32 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +Markup span at (33:0,33 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredInTagContent.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredInTagContent.stree.txt new file mode 100644 index 0000000000..2b06ed1e3a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredInTagContent.stree.txt @@ -0,0 +1,59 @@ +RazorDocument - [0..33)::33 - [@{@bar@boz}] + MarkupBlock - [0..33)::33 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..33)::33 + CSharpStatement - [0..33)::33 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..33)::32 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..32)::30 + MarkupBlock - [2..32)::30 + MarkupElement - [2..32)::30 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [7..7)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [7..11)::4 + CSharpImplicitExpression - [7..11)::4 + CSharpTransition - [7..8)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [8..11)::3 + CSharpCodeBlock - [8..11)::3 + CSharpExpressionLiteral - [8..11)::3 - [bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[bar]; + MarkupElement - [11..26)::15 + MarkupStartTag - [11..16)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[baz]; + CloseAngle;[>]; + MarkupTextLiteral - [16..16)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [16..20)::4 + CSharpImplicitExpression - [16..20)::4 + CSharpTransition - [16..17)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [17..20)::3 + CSharpCodeBlock - [17..20)::3 + CSharpExpressionLiteral - [17..20)::3 - [boz] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[boz]; + MarkupEndTag - [20..26)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[baz]; + CloseAngle;[>]; + MarkupEndTag - [26..32)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [32..33)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredMidTag.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredMidTag.cspans.txt new file mode 100644 index 0000000000..d760958c1a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredMidTag.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [15] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [15] ) +Markup span at (2:0,2 [5] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [12] ) +Transition span at (7:0,7 [1] ) (Accepts:None) - Parent: Expression block at (7:0,7 [4] ) +Code span at (8:0,8 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (7:0,7 [4] ) +Markup span at (11:0,11 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [12] ) +Code span at (14:0,14 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [15] ) +MetaCode span at (14:0,14 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [15] ) +Markup span at (15:0,15 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredMidTag.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredMidTag.stree.txt new file mode 100644 index 0000000000..96573d5697 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesToCodeWhenSwapCharacterEncounteredMidTag.stree.txt @@ -0,0 +1,38 @@ +RazorDocument - [0..15)::15 - [@{}] + MarkupBlock - [0..15)::15 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..15)::15 + CSharpStatement - [0..15)::15 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..15)::14 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..14)::12 + MarkupBlock - [2..14)::12 + MarkupElement - [2..14)::12 + MarkupStartTag - [2..14)::12 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + MarkupMiscAttributeContent - [6..12)::6 + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpCodeBlock - [7..11)::4 + CSharpImplicitExpression - [7..11)::4 + CSharpTransition - [7..8)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [8..11)::3 + CSharpCodeBlock - [8..11)::3 + CSharpExpressionLiteral - [8..11)::3 - [bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[bar]; + MarkupTextLiteral - [11..12)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [14..14)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [14..15)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [15..15)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesWhenCharacterBeforeSwapIsNonAlphanumeric.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesWhenCharacterBeforeSwapIsNonAlphanumeric.cspans.txt new file mode 100644 index 0000000000..3286136c58 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesWhenCharacterBeforeSwapIsNonAlphanumeric.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [16] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [16] ) +Markup span at (2:0,2 [3] ) (Accepts:None) - Parent: Tag block at (2:0,2 [3] ) +Markup span at (5:0,5 [4] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [13] ) +Transition span at (9:0,9 [1] ) (Accepts:None) - Parent: Expression block at (9:0,9 [2] ) +Code span at (10:0,10 [1] ) (Accepts:NonWhitespace) - Parent: Expression block at (9:0,9 [2] ) +Markup span at (11:0,11 [4] ) (Accepts:None) - Parent: Tag block at (11:0,11 [4] ) +Code span at (15:0,15 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [16] ) +MetaCode span at (15:0,15 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [16] ) +Markup span at (16:0,16 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesWhenCharacterBeforeSwapIsNonAlphanumeric.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesWhenCharacterBeforeSwapIsNonAlphanumeric.stree.txt new file mode 100644 index 0000000000..6f286f4bb4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SwitchesWhenCharacterBeforeSwapIsNonAlphanumeric.stree.txt @@ -0,0 +1,39 @@ +RazorDocument - [0..16)::16 - [@{

                    foo#@i

                    }] + MarkupBlock - [0..16)::16 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..16)::16 + CSharpStatement - [0..16)::16 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..16)::15 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..15)::13 + MarkupBlock - [2..15)::13 + MarkupElement - [2..15)::13 + MarkupStartTag - [2..5)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [5..9)::4 - [foo#] - Gen - SpanEditHandler;Accepts:Any + Text;[foo#]; + CSharpCodeBlock - [9..11)::2 + CSharpImplicitExpression - [9..11)::2 + CSharpTransition - [9..10)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [10..11)::1 + CSharpCodeBlock - [10..11)::1 + CSharpExpressionLiteral - [10..11)::1 - [i] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[i]; + MarkupEndTag - [11..15)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [15..15)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [15..16)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [16..16)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/TreatsPairsOfAtSignsAsEscapeSequence.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/TreatsPairsOfAtSignsAsEscapeSequence.cspans.txt new file mode 100644 index 0000000000..5a030d3cd8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/TreatsPairsOfAtSignsAsEscapeSequence.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [1] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [19] ) +Markup span at (8:0,8 [1] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [19] ) +Markup span at (9:0,9 [1] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [19] ) +Markup span at (10:0,10 [1] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [19] ) +Transition span at (11:0,11 [1] ) (Accepts:None) - Parent: Expression block at (11:0,11 [4] ) +Code span at (12:0,12 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (11:0,11 [4] ) +Markup span at (15:0,15 [6] ) (Accepts:None) - Parent: Tag block at (15:0,15 [6] ) +Code span at (21:0,21 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [22] ) +MetaCode span at (21:0,21 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +Markup span at (22:0,22 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/TreatsPairsOfAtSignsAsEscapeSequence.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/TreatsPairsOfAtSignsAsEscapeSequence.stree.txt new file mode 100644 index 0000000000..e90372344a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/TreatsPairsOfAtSignsAsEscapeSequence.stree.txt @@ -0,0 +1,45 @@ +RazorDocument - [0..22)::22 - [@{@@@@@bar}] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..22)::22 + CSharpStatement - [0..22)::22 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..22)::21 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..21)::19 + MarkupBlock - [2..21)::19 + MarkupElement - [2..21)::19 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupEphemeralTextLiteral - [7..8)::1 - [@] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + MarkupTextLiteral - [8..9)::1 - [@] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + MarkupEphemeralTextLiteral - [9..10)::1 - [@] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + MarkupTextLiteral - [10..11)::1 - [@] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + CSharpCodeBlock - [11..15)::4 + CSharpImplicitExpression - [11..15)::4 + CSharpTransition - [11..12)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [12..15)::3 + CSharpCodeBlock - [12..15)::3 + CSharpExpressionLiteral - [12..15)::3 - [bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[bar]; + MarkupEndTag - [15..21)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/TreatsTwoAtSignsAsEscapeSequence.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/TreatsTwoAtSignsAsEscapeSequence.cspans.txt new file mode 100644 index 0000000000..5f80e5cc3e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/TreatsTwoAtSignsAsEscapeSequence.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +Markup span at (2:0,2 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (7:0,7 [1] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [16] ) +Markup span at (8:0,8 [4] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [16] ) +Markup span at (12:0,12 [6] ) (Accepts:None) - Parent: Tag block at (12:0,12 [6] ) +Code span at (18:0,18 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [19] ) +MetaCode span at (18:0,18 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +Markup span at (19:0,19 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/TreatsTwoAtSignsAsEscapeSequence.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/TreatsTwoAtSignsAsEscapeSequence.stree.txt new file mode 100644 index 0000000000..a71a04cfef --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/TreatsTwoAtSignsAsEscapeSequence.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..19)::19 - [@{@@bar}] + MarkupBlock - [0..19)::19 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..19)::19 + CSharpStatement - [0..19)::19 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..19)::18 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..18)::16 + MarkupBlock - [2..18)::16 + MarkupElement - [2..18)::16 + MarkupStartTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupEphemeralTextLiteral - [7..8)::1 - [@] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + MarkupTextLiteral - [8..12)::4 - [@bar] - Gen - SpanEditHandler;Accepts:Any + Transition;[@]; + Text;[bar]; + MarkupEndTag - [12..18)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; + CSharpStatementLiteral - [18..18)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [18..19)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [19..19)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_DoesNotSpecialCase_VoidTags.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_DoesNotSpecialCase_VoidTags.cspans.txt new file mode 100644 index 0000000000..d9ab213c73 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_DoesNotSpecialCase_VoidTags.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Markup span at (2:1,0 [7] ) (Accepts:Any) - Parent: Tag block at (2:1,0 [7] ) +Markup span at (9:1,7 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Markup span at (12:1,10 [8] ) (Accepts:Any) - Parent: Tag block at (12:1,10 [8] ) +Markup span at (20:1,18 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_DoesNotSpecialCase_VoidTags.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_DoesNotSpecialCase_VoidTags.stree.txt new file mode 100644 index 0000000000..62169fa2ea --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_DoesNotSpecialCase_VoidTags.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..22)::22 - [LFFooLF] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [2..20)::18 + MarkupStartTag - [2..9)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + MarkupTextLiteral - [9..12)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [12..20)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[input]; + CloseAngle;[>]; + MarkupTextLiteral - [20..22)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_EndTagsWithMissingStartTags.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_EndTagsWithMissingStartTags.cspans.txt new file mode 100644 index 0000000000..017a6ad437 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_EndTagsWithMissingStartTags.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) +Markup span at (5:1,3 [6] ) (Accepts:Any) - Parent: Tag block at (5:1,3 [6] ) +Markup span at (11:1,9 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_EndTagsWithMissingStartTags.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_EndTagsWithMissingStartTags.stree.txt new file mode 100644 index 0000000000..1f16c2f83b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_EndTagsWithMissingStartTags.stree.txt @@ -0,0 +1,13 @@ +RazorDocument - [0..13)::13 - [LFFooLF] + MarkupBlock - [0..13)::13 + MarkupTextLiteral - [0..5)::5 - [LFFoo] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Text;[Foo]; + MarkupElement - [5..11)::6 + MarkupEndTag - [5..11)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [11..13)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_IncompleteTags.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_IncompleteTags.cspans.txt new file mode 100644 index 0000000000..245badb59b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_IncompleteTags.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Markup span at (2:1,0 [1] ) (Accepts:Any) - Parent: Tag block at (2:1,0 [1] ) +Markup span at (3:1,1 [5] ) (Accepts:Any) - Parent: Tag block at (3:1,1 [5] ) +Markup span at (8:1,6 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Markup span at (12:1,10 [2] ) (Accepts:Any) - Parent: Tag block at (12:1,10 [2] ) +Markup span at (14:1,12 [6] ) (Accepts:Any) - Parent: Tag block at (14:1,12 [6] ) +Markup span at (20:1,18 [5] ) (Accepts:Any) - Parent: Tag block at (20:1,18 [5] ) +Markup span at (25:1,23 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_IncompleteTags.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_IncompleteTags.stree.txt new file mode 100644 index 0000000000..3d6e74006f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_IncompleteTags.stree.txt @@ -0,0 +1,38 @@ +RazorDocument - [0..27)::27 - [LF<
                    >Foo< >LF] + MarkupBlock - [0..27)::27 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [2..3)::1 + MarkupStartTag - [2..3)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupElement - [3..20)::17 + MarkupStartTag - [3..8)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [8..12)::4 - [>Foo] - Gen - SpanEditHandler;Accepts:Any + CloseAngle;[>]; + Text;[Foo]; + MarkupElement - [12..14)::2 + MarkupEndTag - [12..14)::2 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[]; + CloseAngle;[]; + MarkupEndTag - [14..20)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupElement - [20..27)::7 + MarkupStartTag - [20..25)::5 - [< >] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + MarkupMiscAttributeContent - [21..24)::3 + MarkupTextLiteral - [21..24)::3 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[>]; + MarkupTextLiteral - [25..27)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_MalformedTags_RecoversSuccessfully.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_MalformedTags_RecoversSuccessfully.cspans.txt new file mode 100644 index 0000000000..616773a7c7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_MalformedTags_RecoversSuccessfully.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [35] ) +Markup span at (2:1,0 [5] ) (Accepts:Any) - Parent: Tag block at (2:1,0 [5] ) +Markup span at (7:1,5 [7] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [35] ) +Markup span at (14:1,12 [7] ) (Accepts:Any) - Parent: Tag block at (14:1,12 [7] ) +Markup span at (21:1,19 [6] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [35] ) +Markup span at (27:1,25 [6] ) (Accepts:Any) - Parent: Tag block at (27:1,25 [6] ) +Markup span at (33:1,31 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [35] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_MalformedTags_RecoversSuccessfully.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_MalformedTags_RecoversSuccessfully.stree.txt new file mode 100644 index 0000000000..156d6a1813 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_MalformedTags_RecoversSuccessfully.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..35)::35 - [LF
                    contentfooter
                    LF] + MarkupBlock - [0..35)::35 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [2..33)::31 + MarkupStartTag - [2..7)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [7..14)::7 - [content] - Gen - SpanEditHandler;Accepts:Any + Text;[content]; + MarkupElement - [14..21)::7 + MarkupEndTag - [14..21)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[span]; + CloseAngle;[>]; + MarkupTextLiteral - [21..27)::6 - [footer] - Gen - SpanEditHandler;Accepts:Any + Text;[footer]; + MarkupEndTag - [27..33)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [33..35)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_MisplacedEndTags_RecoversSuccessfully.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_MisplacedEndTags_RecoversSuccessfully.cspans.txt new file mode 100644 index 0000000000..d19254baf9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_MisplacedEndTags_RecoversSuccessfully.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [41] ) +Markup span at (2:1,0 [5] ) (Accepts:Any) - Parent: Tag block at (2:1,0 [5] ) +Markup span at (7:1,5 [7] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [41] ) +Markup span at (14:1,12 [6] ) (Accepts:Any) - Parent: Tag block at (14:1,12 [6] ) +Markup span at (20:1,18 [6] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [41] ) +Markup span at (26:1,24 [6] ) (Accepts:Any) - Parent: Tag block at (26:1,24 [6] ) +Markup span at (32:1,30 [7] ) (Accepts:Any) - Parent: Tag block at (32:1,30 [7] ) +Markup span at (39:1,37 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [41] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_MisplacedEndTags_RecoversSuccessfully.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_MisplacedEndTags_RecoversSuccessfully.stree.txt new file mode 100644 index 0000000000..b85048c9f3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_MisplacedEndTags_RecoversSuccessfully.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..41)::41 - [LF
                    contentfooter
                    LF] + MarkupBlock - [0..41)::41 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [2..32)::30 + MarkupStartTag - [2..7)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [7..14)::7 - [content] - Gen - SpanEditHandler;Accepts:Any + Text;[content]; + MarkupElement - [14..26)::12 + MarkupStartTag - [14..20)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[span]; + CloseAngle;[>]; + MarkupTextLiteral - [20..26)::6 - [footer] - Gen - SpanEditHandler;Accepts:Any + Text;[footer]; + MarkupEndTag - [26..32)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupElement - [32..39)::7 + MarkupEndTag - [32..39)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[span]; + CloseAngle;[>]; + MarkupTextLiteral - [39..41)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_SelfClosingTags.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_SelfClosingTags.cspans.txt new file mode 100644 index 0000000000..68917ae59c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_SelfClosingTags.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Markup span at (2:1,0 [5] ) (Accepts:Any) - Parent: Tag block at (2:1,0 [5] ) +Markup span at (7:1,5 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Markup span at (10:1,8 [10] ) (Accepts:Any) - Parent: Tag block at (10:1,8 [10] ) +Markup span at (20:1,18 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_SelfClosingTags.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_SelfClosingTags.stree.txt new file mode 100644 index 0000000000..06c963307c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_SelfClosingTags.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..22)::22 - [LF
                    FooLF] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [2..7)::5 + MarkupStartTag - [2..7)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTextLiteral - [7..10)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupElement - [10..20)::10 + MarkupStartTag - [10..20)::10 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[custom]; + MarkupMiscAttributeContent - [17..18)::1 + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTextLiteral - [20..22)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_SpecialCasesVoidTags_WithNoEndTags.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_SpecialCasesVoidTags_WithNoEndTags.cspans.txt new file mode 100644 index 0000000000..621dae62c6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_SpecialCasesVoidTags_WithNoEndTags.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Markup span at (2:1,0 [6] ) (Accepts:Any) - Parent: Tag block at (2:1,0 [6] ) +Markup span at (8:1,6 [6] ) (Accepts:Any) - Parent: Tag block at (8:1,6 [6] ) +Markup span at (14:1,12 [1] ) (Accepts:Any) - Parent: Tag block at (14:1,12 [7] ) +MetaCode span at (15:1,13 [1] ) (Accepts:None) - Parent: Tag block at (14:1,12 [7] ) +Markup span at (16:1,14 [5] ) (Accepts:Any) - Parent: Tag block at (14:1,12 [7] ) +Markup span at (21:1,19 [7] ) (Accepts:Any) - Parent: Tag block at (21:1,19 [7] ) +Markup span at (28:1,26 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_SpecialCasesVoidTags_WithNoEndTags.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_SpecialCasesVoidTags_WithNoEndTags.stree.txt new file mode 100644 index 0000000000..2aa331e165 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_SpecialCasesVoidTags_WithNoEndTags.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..30)::30 - [LFLF] + MarkupBlock - [0..30)::30 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [2..28)::26 + MarkupStartTag - [2..8)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[head]; + CloseAngle;[>]; + MarkupElement - [8..14)::6 + MarkupStartTag - [8..14)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[meta]; + CloseAngle;[>]; + MarkupElement - [14..21)::7 + MarkupStartTag - [14..21)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[meta]; + CloseAngle;[>]; + MarkupEndTag - [21..28)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[head]; + CloseAngle;[>]; + MarkupTextLiteral - [28..30)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_StartTagsWithMissingEndTags.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_StartTagsWithMissingEndTags.cspans.txt new file mode 100644 index 0000000000..23600f15fe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_StartTagsWithMissingEndTags.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [59] ) +Markup span at (2:1,0 [5] ) (Accepts:Any) - Parent: Tag block at (2:1,0 [5] ) +Markup span at (7:1,5 [15] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [59] ) +Markup span at (22:3,4 [3] ) (Accepts:Any) - Parent: Tag block at (22:3,4 [3] ) +Markup span at (25:3,7 [23] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [59] ) +Markup span at (48:5,8 [9] ) (Accepts:Any) - Parent: Tag block at (48:5,8 [9] ) +Markup span at (57:5,17 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [59] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_StartTagsWithMissingEndTags.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_StartTagsWithMissingEndTags.stree.txt new file mode 100644 index 0000000000..e71d6cf18d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_StartTagsWithMissingEndTags.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..59)::59 - [LF
                    LF FooLF

                    LF BarLF LF] + MarkupBlock - [0..59)::59 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [2..59)::57 + MarkupStartTag - [2..7)::5 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [7..22)::15 - [LF FooLF ] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + Text;[Foo]; + NewLine;[LF]; + Whitespace;[ ]; + MarkupElement - [22..59)::37 + MarkupStartTag - [22..25)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [25..48)::23 - [LF BarLF ] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + Text;[Bar]; + NewLine;[LF]; + Whitespace;[ ]; + MarkupElement - [48..57)::9 + MarkupEndTag - [48..57)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [57..59)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidNestedTags.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidNestedTags.cspans.txt new file mode 100644 index 0000000000..63be5f5b10 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidNestedTags.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [49] ) +Markup span at (2:1,0 [5] ) (Accepts:Any) - Parent: Tag block at (2:1,0 [5] ) +Markup span at (7:1,5 [15] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [49] ) +Markup span at (22:3,4 [3] ) (Accepts:Any) - Parent: Tag block at (22:3,4 [3] ) +Markup span at (25:3,7 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [49] ) +Markup span at (28:3,10 [4] ) (Accepts:Any) - Parent: Tag block at (28:3,10 [4] ) +Markup span at (32:3,14 [11] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [49] ) +Markup span at (43:5,0 [6] ) (Accepts:Any) - Parent: Tag block at (43:5,0 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidNestedTags.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidNestedTags.stree.txt new file mode 100644 index 0000000000..f25fd6b548 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidNestedTags.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..49)::49 - [LF

                    LF FooLF

                    Bar

                    LF BazLF
                    ] + MarkupBlock - [0..49)::49 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [2..49)::47 + MarkupStartTag - [2..7)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [7..22)::15 - [LF FooLF ] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + Text;[Foo]; + NewLine;[LF]; + Whitespace;[ ]; + MarkupElement - [22..32)::10 + MarkupStartTag - [22..25)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [25..28)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupEndTag - [28..32)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [32..43)::11 - [LF BazLF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + Text;[Baz]; + NewLine;[LF]; + MarkupEndTag - [43..49)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidNestedTagsMixedWithCode.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidNestedTagsMixedWithCode.cspans.txt new file mode 100644 index 0000000000..27e228bccf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidNestedTagsMixedWithCode.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [66] ) +Markup span at (2:1,0 [5] ) (Accepts:Any) - Parent: Tag block at (2:1,0 [5] ) +Markup span at (7:1,5 [15] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [66] ) +Markup span at (22:3,4 [3] ) (Accepts:Any) - Parent: Tag block at (22:3,4 [3] ) +Transition span at (25:3,7 [1] ) (Accepts:None) - Parent: Expression block at (25:3,7 [4] ) +Code span at (26:3,8 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (25:3,7 [4] ) +Markup span at (29:3,11 [4] ) (Accepts:Any) - Parent: Tag block at (29:3,11 [4] ) +Markup span at (33:3,15 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [66] ) +Code span at (35:4,0 [4] ) (Accepts:Any) - Parent: Statement block at (35:4,0 [21] ) +Transition span at (39:4,4 [1] ) (Accepts:None) - Parent: Statement block at (39:4,4 [17] ) +MetaCode span at (40:4,5 [1] ) (Accepts:None) - Parent: Statement block at (39:4,4 [17] ) +Code span at (41:4,6 [14] ) (Accepts:Any) - Parent: Statement block at (39:4,4 [17] ) +MetaCode span at (55:4,20 [1] ) (Accepts:None) - Parent: Statement block at (39:4,4 [17] ) +Markup span at (56:4,21 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [66] ) +Markup span at (58:5,0 [6] ) (Accepts:Any) - Parent: Tag block at (58:5,0 [6] ) +Markup span at (64:5,6 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [66] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidNestedTagsMixedWithCode.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidNestedTagsMixedWithCode.stree.txt new file mode 100644 index 0000000000..94de02b7b1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidNestedTagsMixedWithCode.stree.txt @@ -0,0 +1,67 @@ +RazorDocument - [0..66)::66 - [LF
                    LF FooLF

                    @Bar

                    LF @{ var x = Bar; }LF
                    LF] + MarkupBlock - [0..66)::66 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [2..64)::62 + MarkupStartTag - [2..7)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [7..22)::15 - [LF FooLF ] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + Text;[Foo]; + NewLine;[LF]; + Whitespace;[ ]; + MarkupElement - [22..33)::11 + MarkupStartTag - [22..25)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + CSharpCodeBlock - [25..29)::4 + CSharpImplicitExpression - [25..29)::4 + CSharpTransition - [25..26)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [26..29)::3 + CSharpCodeBlock - [26..29)::3 + CSharpExpressionLiteral - [26..29)::3 - [Bar] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[Bar]; + MarkupEndTag - [29..33)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [33..35)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [35..56)::21 + CSharpStatementLiteral - [35..39)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpStatement - [39..56)::17 + CSharpTransition - [39..40)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [40..56)::16 + RazorMetaCode - [40..41)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [41..55)::14 + CSharpStatementLiteral - [41..55)::14 - [ var x = Bar; ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[x]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[Bar]; + Semicolon;[;]; + Whitespace;[ ]; + RazorMetaCode - [55..56)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupEphemeralTextLiteral - [56..58)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupEndTag - [58..64)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [64..66)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidTags.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidTags.cspans.txt new file mode 100644 index 0000000000..cbaaaf3772 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidTags.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Markup span at (2:1,0 [5] ) (Accepts:Any) - Parent: Tag block at (2:1,0 [5] ) +Markup span at (7:1,5 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Markup span at (10:1,8 [6] ) (Accepts:Any) - Parent: Tag block at (10:1,8 [6] ) +Markup span at (16:1,14 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Markup span at (18:2,0 [3] ) (Accepts:Any) - Parent: Tag block at (18:2,0 [3] ) +Markup span at (21:2,3 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Markup span at (24:2,6 [4] ) (Accepts:Any) - Parent: Tag block at (24:2,6 [4] ) +Markup span at (28:2,10 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidTags.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidTags.stree.txt new file mode 100644 index 0000000000..c38db1f3cf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/MarkupElementGroupingTest/Handles_ValidTags.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..30)::30 - [LF
                    Foo
                    LF

                    Bar

                    LF] + MarkupBlock - [0..30)::30 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [2..16)::14 + MarkupStartTag - [2..7)::5 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [7..10)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [10..16)::6 - [
                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [16..18)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [18..28)::10 + MarkupStartTag - [18..21)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [21..24)::3 - [Bar] - Gen - SpanEditHandler;Accepts:Any + Text;[Bar]; + MarkupEndTag - [24..28)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [28..30)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.cspans.txt new file mode 100644 index 0000000000..90b83a758f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [18] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [18] ) +MetaCode span at (1:0,1 [12] ) (Accepts:None) - Parent: Directive block at (0:0,0 [18] ) +Markup span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [18] ) +Code span at (14:0,14 [4] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [18] ) +Markup span at (18:0,18 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [18] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt new file mode 100644 index 0000000000..415af2bb31 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt @@ -0,0 +1,19 @@ +RazorDocument - [0..18)::18 - [@addTagHelper Foo"] + MarkupBlock - [0..18)::18 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..18)::18 + RazorDirective - [0..18)::18 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..18)::17 + RazorMetaCode - [1..13)::12 - Gen - SpanEditHandler;Accepts:None + Identifier;[addTagHelper]; + CSharpCodeBlock - [13..18)::5 + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [14..18)::4 - [Foo"] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Identifier;[Foo]; + StringLiteral;["];RZ1000(17:0,17 [1] ) + MarkupTextLiteral - [18..18)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_InvalidLookupText_AddsError.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_InvalidLookupText_AddsError.cspans.txt new file mode 100644 index 0000000000..bb83fe7c4c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_InvalidLookupText_AddsError.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +MetaCode span at (1:0,1 [12] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +Markup span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +Code span at (14:0,14 [3] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [17] ) +Markup span at (17:0,17 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_InvalidLookupText_AddsError.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_InvalidLookupText_AddsError.stree.txt new file mode 100644 index 0000000000..32eaa73ae7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_InvalidLookupText_AddsError.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..17)::17 - [@addTagHelper Foo] + MarkupBlock - [0..17)::17 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..17)::17 + RazorDirective - [0..17)::17 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..17)::16 + RazorMetaCode - [1..13)::12 - Gen - SpanEditHandler;Accepts:None + Identifier;[addTagHelper]; + CSharpCodeBlock - [13..17)::4 + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [14..17)::3 - [Foo] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Identifier;[Foo]; + MarkupTextLiteral - [17..17)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_NoValue_Invalid.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_NoValue_Invalid.cspans.txt new file mode 100644 index 0000000000..25806343ae --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_NoValue_Invalid.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [16] ) +MetaCode span at (1:0,1 [12] ) (Accepts:None) - Parent: Directive block at (0:0,0 [16] ) +Markup span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [16] ) +Code span at (14:0,14 [2] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [16] ) +Markup span at (16:0,16 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_NoValue_Invalid.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_NoValue_Invalid.stree.txt new file mode 100644 index 0000000000..95e2ab911c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_NoValue_Invalid.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..16)::16 - [@addTagHelper ""] + MarkupBlock - [0..16)::16 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..16)::16 + RazorDirective - [0..16)::16 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..16)::15 + RazorMetaCode - [1..13)::12 - Gen - SpanEditHandler;Accepts:None + Identifier;[addTagHelper]; + CSharpCodeBlock - [13..16)::3 + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [14..16)::2 - [""] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + StringLiteral;[""]; + MarkupTextLiteral - [16..16)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_RequiresValue.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_RequiresValue.cspans.txt new file mode 100644 index 0000000000..61be581b1c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_RequiresValue.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [14] ) +MetaCode span at (1:0,1 [12] ) (Accepts:None) - Parent: Directive block at (0:0,0 [14] ) +Markup span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [14] ) +Code span at (14:0,14 [0] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [14] ) +Markup span at (14:0,14 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_RequiresValue.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_RequiresValue.stree.txt new file mode 100644 index 0000000000..660b83b424 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_RequiresValue.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..14)::14 - [@addTagHelper ] + MarkupBlock - [0..14)::14 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..14)::14 + RazorDirective - [0..14)::14 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..14)::13 + RazorMetaCode - [1..13)::12 - Gen - SpanEditHandler;Accepts:None + Identifier;[addTagHelper]; + CSharpCodeBlock - [13..14)::1 + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [14..14)::0 - [] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Marker;[]; + MarkupTextLiteral - [14..14)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_SingleQuotes_AddsError.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_SingleQuotes_AddsError.cspans.txt new file mode 100644 index 0000000000..4810545912 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_SingleQuotes_AddsError.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [22] ) +MetaCode span at (1:0,1 [12] ) (Accepts:None) - Parent: Directive block at (0:0,0 [22] ) +Markup span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [22] ) +Code span at (14:0,14 [8] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [22] ) +Markup span at (22:0,22 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_SingleQuotes_AddsError.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_SingleQuotes_AddsError.stree.txt new file mode 100644 index 0000000000..e5a43eb13a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_SingleQuotes_AddsError.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..22)::22 - [@addTagHelper '*, Foo'] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..22)::22 + RazorDirective - [0..22)::22 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..22)::21 + RazorMetaCode - [1..13)::12 - Gen - SpanEditHandler;Accepts:None + Identifier;[addTagHelper]; + CSharpCodeBlock - [13..22)::9 + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [14..22)::8 - ['*, Foo'] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + CharacterLiteral;['*, Foo']; + MarkupTextLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.cspans.txt new file mode 100644 index 0000000000..90b83a758f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [18] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [18] ) +MetaCode span at (1:0,1 [12] ) (Accepts:None) - Parent: Directive block at (0:0,0 [18] ) +Markup span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [18] ) +Code span at (14:0,14 [4] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [18] ) +Markup span at (18:0,18 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [18] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt new file mode 100644 index 0000000000..92b11e3ec3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..18)::18 - [@addTagHelper "Foo] + MarkupBlock - [0..18)::18 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..18)::18 + RazorDirective - [0..18)::18 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..18)::17 + RazorMetaCode - [1..13)::12 - Gen - SpanEditHandler;Accepts:None + Identifier;[addTagHelper]; + CSharpCodeBlock - [13..18)::5 + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [14..18)::4 - ["Foo] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + StringLiteral;["Foo];RZ1000(14:0,14 [1] ) + MarkupTextLiteral - [18..18)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_SupportsSpaces.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_SupportsSpaces.cspans.txt new file mode 100644 index 0000000000..1a383325f7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_SupportsSpaces.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [32] ) +MetaCode span at (1:0,1 [12] ) (Accepts:None) - Parent: Directive block at (0:0,0 [32] ) +Markup span at (13:0,13 [5] ) (Accepts:None) - Parent: Directive block at (0:0,0 [32] ) +Code span at (18:0,18 [14] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [32] ) +Markup span at (32:0,32 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_SupportsSpaces.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_SupportsSpaces.stree.txt new file mode 100644 index 0000000000..a1d2a4c464 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_SupportsSpaces.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..32)::32 - [@addTagHelper Foo, Bar ] + MarkupBlock - [0..32)::32 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..32)::32 + RazorDirective - [0..32)::32 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..32)::31 + RazorMetaCode - [1..13)::12 - Gen - SpanEditHandler;Accepts:None + Identifier;[addTagHelper]; + CSharpCodeBlock - [13..32)::19 + MarkupTextLiteral - [13..18)::5 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [18..32)::14 - [Foo, Bar ] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Identifier;[Foo]; + Comma;[,]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + MarkupTextLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.cspans.txt new file mode 100644 index 0000000000..3b7dd42093 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [19] ) +MetaCode span at (1:0,1 [12] ) (Accepts:None) - Parent: Directive block at (0:0,0 [19] ) +Markup span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [19] ) +Code span at (14:0,14 [5] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [19] ) +Markup span at (19:0,19 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.stree.txt new file mode 100644 index 0000000000..45498ce535 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/AddTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..19)::19 - [@addTagHelper "Foo"] + MarkupBlock - [0..19)::19 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..19)::19 + RazorDirective - [0..19)::19 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..19)::18 + RazorMetaCode - [1..13)::12 - Gen - SpanEditHandler;Accepts:None + Identifier;[addTagHelper]; + CSharpCodeBlock - [13..19)::6 + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [14..19)::5 - ["Foo"] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + StringLiteral;["Foo"]; + MarkupTextLiteral - [19..19)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/BuiltInDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/BuiltInDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace.cspans.txt new file mode 100644 index 0000000000..c6fee76354 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/BuiltInDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) +Code span at (2:1,0 [2] ) (Accepts:Any) - Parent: Statement block at (2:1,0 [24] ) +Transition span at (4:1,2 [1] ) (Accepts:None) - Parent: Directive block at (4:1,2 [22] ) +MetaCode span at (5:1,3 [12] ) (Accepts:None) - Parent: Directive block at (4:1,2 [22] ) +Markup span at (17:1,15 [1] ) (Accepts:None) - Parent: Directive block at (4:1,2 [22] ) +Code span at (18:1,16 [8] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (4:1,2 [22] ) +Markup span at (26:1,24 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/BuiltInDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/BuiltInDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace.stree.txt new file mode 100644 index 0000000000..8123d8117f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/BuiltInDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..26)::26 - [LF @addTagHelper "*, Foo"] + MarkupBlock - [0..26)::26 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [2..26)::24 + CSharpEphemeralTextLiteral - [2..4)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorDirective - [4..26)::22 + CSharpTransition - [4..5)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [5..26)::21 + RazorMetaCode - [5..17)::12 - Gen - SpanEditHandler;Accepts:None + Identifier;[addTagHelper]; + CSharpCodeBlock - [17..26)::9 + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [18..26)::8 - ["*, Foo"] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + StringLiteral;["*, Foo"]; + MarkupTextLiteral - [26..26)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/BuiltInDirectiveErrorsIfNotAtStartOfLine.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/BuiltInDirectiveErrorsIfNotAtStartOfLine.cspans.txt new file mode 100644 index 0000000000..8caeeee11d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/BuiltInDirectiveErrorsIfNotAtStartOfLine.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) +Transition span at (3:0,3 [1] ) (Accepts:None) - Parent: Directive block at (3:0,3 [24] ) +MetaCode span at (4:0,4 [12] ) (Accepts:None) - Parent: Directive block at (3:0,3 [24] ) +Markup span at (16:0,16 [1] ) (Accepts:None) - Parent: Directive block at (3:0,3 [24] ) +Code span at (17:0,17 [10] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (3:0,3 [24] ) +Markup span at (27:1,0 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/BuiltInDirectiveErrorsIfNotAtStartOfLine.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/BuiltInDirectiveErrorsIfNotAtStartOfLine.stree.txt new file mode 100644 index 0000000000..1e622480ba --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/BuiltInDirectiveErrorsIfNotAtStartOfLine.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..28)::28 - [{ @addTagHelper "*, Foo"LF}] + MarkupBlock - [0..28)::28 + MarkupTextLiteral - [0..3)::3 - [{ ] - Gen - SpanEditHandler;Accepts:Any + Text;[{]; + Whitespace;[ ]; + CSharpCodeBlock - [3..27)::24 + RazorDirective - [3..27)::24 + CSharpTransition - [3..4)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [4..27)::23 + RazorMetaCode - [4..16)::12 - Gen - SpanEditHandler;Accepts:None + Identifier;[addTagHelper]; + CSharpCodeBlock - [16..27)::11 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [17..27)::10 - ["*, Foo"LF] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + StringLiteral;["*, Foo"]; + NewLine;[LF]; + MarkupTextLiteral - [27..28)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsNullableTypes.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsNullableTypes.cspans.txt new file mode 100644 index 0000000000..c23d9ce5f6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsNullableTypes.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [176] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [176] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [176] ) +Code span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [176] ) +Code span at (8:0,8 [7] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [176] ) +Code span at (15:0,15 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [176] ) +Code span at (16:0,16 [9] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [176] ) +Code span at (25:0,25 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [176] ) +Code span at (26:0,26 [21] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [176] ) +Code span at (47:0,47 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [176] ) +Code span at (48:0,48 [29] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [176] ) +Code span at (77:0,77 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [176] ) +Code span at (78:0,78 [31] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [176] ) +Code span at (109:0,109 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [176] ) +Code span at (110:0,110 [66] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [176] ) +Markup span at (176:0,176 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [176] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsNullableTypes.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsNullableTypes.stree.txt new file mode 100644 index 0000000000..cfa73cde1e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsNullableTypes.stree.txt @@ -0,0 +1,80 @@ +RazorDocument - [0..176)::176 - [@custom string? string?[] global::System.Int32? KeyValuePair? KeyValuePair?[] global::System.Collections.Generic.KeyValuePair?[]] + MarkupBlock - [0..176)::176 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..176)::176 + RazorDirective - [0..176)::176 - Directive:{custom;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..176)::175 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..176)::169 + CSharpStatementLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..15)::7 - [string?] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Keyword;[string]; + QuestionMark;[?]; + CSharpStatementLiteral - [15..16)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [16..25)::9 - [string?[]] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Keyword;[string]; + QuestionMark;[?]; + LeftBracket;[[]; + RightBracket;[]]; + CSharpStatementLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [26..47)::21 - [global::System.Int32?] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[global]; + DoubleColon;[::]; + Identifier;[System]; + Dot;[.]; + Identifier;[Int32]; + QuestionMark;[?]; + CSharpStatementLiteral - [47..48)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [48..77)::29 - [KeyValuePair?] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[KeyValuePair]; + LessThan;[<]; + Keyword;[string]; + Comma;[,]; + Whitespace;[ ]; + Keyword;[string]; + GreaterThan;[>]; + QuestionMark;[?]; + CSharpStatementLiteral - [77..78)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [78..109)::31 - [KeyValuePair?[]] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[KeyValuePair]; + LessThan;[<]; + Keyword;[string]; + Comma;[,]; + Whitespace;[ ]; + Keyword;[string]; + GreaterThan;[>]; + QuestionMark;[?]; + LeftBracket;[[]; + RightBracket;[]]; + CSharpStatementLiteral - [109..110)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [110..176)::66 - [global::System.Collections.Generic.KeyValuePair?[]] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[global]; + DoubleColon;[::]; + Identifier;[System]; + Dot;[.]; + Identifier;[Collections]; + Dot;[.]; + Identifier;[Generic]; + Dot;[.]; + Identifier;[KeyValuePair]; + LessThan;[<]; + Keyword;[string]; + Comma;[,]; + Whitespace;[ ]; + Keyword;[string]; + GreaterThan;[>]; + QuestionMark;[?]; + LeftBracket;[[]; + RightBracket;[]]; + MarkupTextLiteral - [176..176)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsTupleTypes.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsTupleTypes.cspans.txt new file mode 100644 index 0000000000..f0a1ad489a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsTupleTypes.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [246] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [246] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [246] ) +Code span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [246] ) +Code span at (8:0,8 [11] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [246] ) +Code span at (19:0,19 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [246] ) +Code span at (20:0,20 [20] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [246] ) +Code span at (40:0,40 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [246] ) +Code span at (41:0,41 [29] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [246] ) +Code span at (70:0,70 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [246] ) +Code span at (71:0,71 [37] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [246] ) +Code span at (108:0,108 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [246] ) +Code span at (109:0,109 [36] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [246] ) +Code span at (145:0,145 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [246] ) +Code span at (146:0,146 [100] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [246] ) +Markup span at (246:0,246 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [246] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsTupleTypes.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsTupleTypes.stree.txt new file mode 100644 index 0000000000..bd5ce0d7fb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsTupleTypes.stree.txt @@ -0,0 +1,164 @@ +RazorDocument - [0..246)::246 - [@custom (bool, int) (int aa, string bb)? ( int? q , bool w ) ( int ? q, bool ?w ,(long ? [])) ? (List<(int, string)?> aa, string bb) (string ss, (int u, List<(string, int)> k, (Char c, bool b, List l)), global::System.Int32[] a)] + MarkupBlock - [0..246)::246 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..246)::246 + RazorDirective - [0..246)::246 - Directive:{custom;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..246)::245 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..246)::239 + CSharpStatementLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..19)::11 - [(bool, int)] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + LeftParenthesis;[(]; + Keyword;[bool]; + Comma;[,]; + Whitespace;[ ]; + Keyword;[int]; + RightParenthesis;[)]; + CSharpStatementLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [20..40)::20 - [(int aa, string bb)?] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[aa]; + Comma;[,]; + Whitespace;[ ]; + Keyword;[string]; + Whitespace;[ ]; + Identifier;[bb]; + RightParenthesis;[)]; + QuestionMark;[?]; + CSharpStatementLiteral - [40..41)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [41..70)::29 - [( int? q , bool w )] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + LeftParenthesis;[(]; + Whitespace;[ ]; + Keyword;[int]; + QuestionMark;[?]; + Whitespace;[ ]; + Identifier;[q]; + Whitespace;[ ]; + Comma;[,]; + Whitespace;[ ]; + Keyword;[bool]; + Whitespace;[ ]; + Identifier;[w]; + Whitespace;[ ]; + RightParenthesis;[)]; + CSharpStatementLiteral - [70..71)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [71..108)::37 - [( int ? q, bool ?w ,(long ? [])) ?] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + LeftParenthesis;[(]; + Whitespace;[ ]; + Keyword;[int]; + Whitespace;[ ]; + QuestionMark;[?]; + Whitespace;[ ]; + Identifier;[q]; + Comma;[,]; + Whitespace;[ ]; + Keyword;[bool]; + Whitespace;[ ]; + QuestionMark;[?]; + Identifier;[w]; + Whitespace;[ ]; + Comma;[,]; + LeftParenthesis;[(]; + Keyword;[long]; + Whitespace;[ ]; + QuestionMark;[?]; + Whitespace;[ ]; + LeftBracket;[[]; + RightBracket;[]]; + RightParenthesis;[)]; + RightParenthesis;[)]; + Whitespace;[ ]; + QuestionMark;[?]; + CSharpStatementLiteral - [108..109)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [109..145)::36 - [(List<(int, string)?> aa, string bb)] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + LeftParenthesis;[(]; + Identifier;[List]; + LessThan;[<]; + LeftParenthesis;[(]; + Keyword;[int]; + Comma;[,]; + Whitespace;[ ]; + Keyword;[string]; + RightParenthesis;[)]; + QuestionMark;[?]; + GreaterThan;[>]; + Whitespace;[ ]; + Identifier;[aa]; + Comma;[,]; + Whitespace;[ ]; + Keyword;[string]; + Whitespace;[ ]; + Identifier;[bb]; + RightParenthesis;[)]; + CSharpStatementLiteral - [145..146)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [146..246)::100 - [(string ss, (int u, List<(string, int)> k, (Char c, bool b, List l)), global::System.Int32[] a)] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + LeftParenthesis;[(]; + Keyword;[string]; + Whitespace;[ ]; + Identifier;[ss]; + Comma;[,]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Keyword;[int]; + Whitespace;[ ]; + Identifier;[u]; + Comma;[,]; + Whitespace;[ ]; + Identifier;[List]; + LessThan;[<]; + LeftParenthesis;[(]; + Keyword;[string]; + Comma;[,]; + Whitespace;[ ]; + Keyword;[int]; + RightParenthesis;[)]; + GreaterThan;[>]; + Whitespace;[ ]; + Identifier;[k]; + Comma;[,]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[Char]; + Whitespace;[ ]; + Identifier;[c]; + Comma;[,]; + Whitespace;[ ]; + Keyword;[bool]; + Whitespace;[ ]; + Identifier;[b]; + Comma;[,]; + Whitespace;[ ]; + Identifier;[List]; + LessThan;[<]; + Keyword;[int]; + GreaterThan;[>]; + Whitespace;[ ]; + Identifier;[l]; + RightParenthesis;[)]; + RightParenthesis;[)]; + Comma;[,]; + Whitespace;[ ]; + Identifier;[global]; + DoubleColon;[::]; + Identifier;[System]; + Dot;[.]; + Identifier;[Int32]; + LeftBracket;[[]; + RightBracket;[]]; + Whitespace;[ ]; + Identifier;[a]; + RightParenthesis;[)]; + MarkupTextLiteral - [246..246)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsTupleTypes_IgnoresTrailingWhitespace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsTupleTypes_IgnoresTrailingWhitespace.cspans.txt new file mode 100644 index 0000000000..52a117679c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsTupleTypes_IgnoresTrailingWhitespace.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [23] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [23] ) +Code span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [23] ) +Code span at (8:0,8 [12] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [23] ) +None span at (20:0,20 [3] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [23] ) +Markup span at (23:0,23 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsTupleTypes_IgnoresTrailingWhitespace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsTupleTypes_IgnoresTrailingWhitespace.stree.txt new file mode 100644 index 0000000000..10efce7060 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsTupleTypes_IgnoresTrailingWhitespace.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..23)::23 - [@custom (bool, int?) ] + MarkupBlock - [0..23)::23 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..23)::23 + RazorDirective - [0..23)::23 - Directive:{custom;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..23)::22 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..23)::16 + CSharpStatementLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..20)::12 - [(bool, int?)] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + LeftParenthesis;[(]; + Keyword;[bool]; + Comma;[,]; + Whitespace;[ ]; + Keyword;[int]; + QuestionMark;[?]; + RightParenthesis;[)]; + UnclassifiedTextLiteral - [20..23)::3 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + MarkupTextLiteral - [23..23)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsWhiteSpaceAroundTokens.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsWhiteSpaceAroundTokens.cspans.txt new file mode 100644 index 0000000000..68dfa71c77 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsWhiteSpaceAroundTokens.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [67] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [67] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [67] ) +Code span at (7:0,7 [4] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [67] ) +Code span at (11:0,11 [34] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [67] ) +Code span at (45:0,45 [7] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [67] ) +Code span at (52:0,52 [11] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [67] ) +None span at (63:0,63 [4] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [67] ) +Markup span at (67:0,67 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [67] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsWhiteSpaceAroundTokens.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsWhiteSpaceAroundTokens.stree.txt new file mode 100644 index 0000000000..1008dcab02 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_AllowsWhiteSpaceAroundTokens.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..67)::67 - [@custom System.Text.Encoding.ASCIIEncoding Some_Member ] + MarkupBlock - [0..67)::67 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..67)::67 + RazorDirective - [0..67)::67 - Directive:{custom;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..67)::66 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..67)::60 + CSharpStatementLiteral - [7..11)::4 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [11..45)::34 - [System.Text.Encoding.ASCIIEncoding] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[System]; + Dot;[.]; + Identifier;[Text]; + Dot;[.]; + Identifier;[Encoding]; + Dot;[.]; + Identifier;[ASCIIEncoding]; + CSharpStatementLiteral - [45..52)::7 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [52..63)::11 - [Some_Member] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[Some_Member]; + UnclassifiedTextLiteral - [63..67)::4 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + MarkupTextLiteral - [67..67)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleEOFIncompleteNamespaceTokens.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleEOFIncompleteNamespaceTokens.cspans.txt new file mode 100644 index 0000000000..a2ac1bb1a7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleEOFIncompleteNamespaceTokens.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +Code span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [8] ) +Markup span at (8:0,8 [7] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleEOFIncompleteNamespaceTokens.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleEOFIncompleteNamespaceTokens.stree.txt new file mode 100644 index 0000000000..2e41bb2bbd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleEOFIncompleteNamespaceTokens.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..15)::15 - [@custom System.] + MarkupBlock - [0..15)::15 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + RazorDirective - [0..8)::8 - Directive:{custom;SingleLine;Unrestricted} [RZ1014(8:0,8 [7] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..8)::7 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..8)::1 + CSharpStatementLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + MarkupTextLiteral - [8..15)::7 - [System.] - Gen - SpanEditHandler;Accepts:Any + Text;[System.]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleEOFInvalidNamespaceTokens.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleEOFInvalidNamespaceTokens.cspans.txt new file mode 100644 index 0000000000..0d19696aec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleEOFInvalidNamespaceTokens.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +Code span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [8] ) +Markup span at (8:0,8 [6] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Tag block at (14:0,14 [1] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleEOFInvalidNamespaceTokens.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleEOFInvalidNamespaceTokens.stree.txt new file mode 100644 index 0000000000..246d5fc4e2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleEOFInvalidNamespaceTokens.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..15)::15 - [@custom System<] + MarkupBlock - [0..15)::15 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + RazorDirective - [0..8)::8 - Directive:{custom;SingleLine;Unrestricted} [RZ1014(8:0,8 [7] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..8)::7 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..8)::1 + CSharpStatementLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + MarkupTextLiteral - [8..14)::6 - [System] - Gen - SpanEditHandler;Accepts:Any + Text;[System]; + MarkupElement - [14..15)::1 + MarkupStartTag - [14..15)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleIncompleteNamespaceTokens.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleIncompleteNamespaceTokens.cspans.txt new file mode 100644 index 0000000000..1b4c670d6a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleIncompleteNamespaceTokens.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +Code span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [8] ) +Markup span at (8:0,8 [9] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleIncompleteNamespaceTokens.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleIncompleteNamespaceTokens.stree.txt new file mode 100644 index 0000000000..9d6f4a44f4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleIncompleteNamespaceTokens.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..17)::17 - [@custom System.LF] + MarkupBlock - [0..17)::17 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + RazorDirective - [0..8)::8 - Directive:{custom;SingleLine;Unrestricted} [RZ1014(8:0,8 [7] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..8)::7 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..8)::1 + CSharpStatementLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + MarkupTextLiteral - [8..17)::9 - [System.LF] - Gen - SpanEditHandler;Accepts:Any + Text;[System.]; + NewLine;[LF]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleInvalidNamespaceTokens.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleInvalidNamespaceTokens.cspans.txt new file mode 100644 index 0000000000..7232de595e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleInvalidNamespaceTokens.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +Code span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [8] ) +Markup span at (8:0,8 [6] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Markup span at (14:0,14 [3] ) (Accepts:Any) - Parent: Tag block at (14:0,14 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleInvalidNamespaceTokens.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleInvalidNamespaceTokens.stree.txt new file mode 100644 index 0000000000..9b3894020f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_CanHandleInvalidNamespaceTokens.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..17)::17 - [@custom System - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + RazorDirective - [0..8)::8 - Directive:{custom;SingleLine;Unrestricted} [RZ1014(8:0,8 [7] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..8)::7 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..8)::1 + CSharpStatementLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + MarkupTextLiteral - [8..14)::6 - [System] - Gen - SpanEditHandler;Accepts:Any + Text;[System]; + MarkupElement - [14..17)::3 + MarkupStartTag - [14..17)::3 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + MarkupMiscAttributeContent - [15..17)::2 + MarkupTextLiteral - [15..17)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsExtraContentAfterDirective.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsExtraContentAfterDirective.cspans.txt new file mode 100644 index 0000000000..4d02aa2a12 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsExtraContentAfterDirective.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [16] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [16] ) +Markup span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [16] ) +Code span at (8:0,8 [7] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [16] ) +None span at (15:0,15 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [16] ) +Markup span at (16:0,16 [7] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsExtraContentAfterDirective.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsExtraContentAfterDirective.stree.txt new file mode 100644 index 0000000000..b06c7343c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsExtraContentAfterDirective.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..23)::23 - [@custom "hello" "world"] + MarkupBlock - [0..23)::23 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..16)::16 + RazorDirective - [0..16)::16 - Directive:{custom;SingleLine;Unrestricted} [RZ1017(16:0,16 [7] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..16)::15 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..16)::9 + MarkupEphemeralTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..15)::7 - ["hello"] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + StringLiteral;["hello"]; + UnclassifiedTextLiteral - [15..16)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + MarkupTextLiteral - [16..23)::7 - ["world"] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + Text;[world]; + DoubleQuote;["]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsForInvalidMemberTokens.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsForInvalidMemberTokens.cspans.txt new file mode 100644 index 0000000000..59f2a44c20 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsForInvalidMemberTokens.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +Code span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [8] ) +Markup span at (8:0,8 [12] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsForInvalidMemberTokens.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsForInvalidMemberTokens.stree.txt new file mode 100644 index 0000000000..ab35f9a32d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsForInvalidMemberTokens.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..20)::20 - [@custom -Some_Member] + MarkupBlock - [0..20)::20 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + RazorDirective - [0..8)::8 - Directive:{custom;SingleLine;Unrestricted} [RZ1015(8:0,8 [1] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..8)::7 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..8)::1 + CSharpStatementLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + MarkupTextLiteral - [8..20)::12 - [-Some_Member] - Gen - SpanEditHandler;Accepts:Any + Text;[-Some_Member]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenEOFBeforeDirectiveBlockStart.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenEOFBeforeDirectiveBlockStart.cspans.txt new file mode 100644 index 0000000000..66d394bc52 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenEOFBeforeDirectiveBlockStart.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [15] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [15] ) +Markup span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [15] ) +Code span at (8:0,8 [7] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [15] ) +Markup span at (15:0,15 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenEOFBeforeDirectiveBlockStart.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenEOFBeforeDirectiveBlockStart.stree.txt new file mode 100644 index 0000000000..5a51465112 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenEOFBeforeDirectiveBlockStart.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..15)::15 - [@custom "Hello"] + MarkupBlock - [0..15)::15 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..15)::15 + RazorDirective - [0..15)::15 - Directive:{custom;CodeBlock;Unrestricted} [RZ1012(15:0,15 [1] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..15)::14 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..15)::8 + MarkupEphemeralTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..15)::7 - ["Hello"] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + StringLiteral;["Hello"]; + MarkupTextLiteral - [15..15)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenExtraContentBeforeBlockStart.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenExtraContentBeforeBlockStart.cspans.txt new file mode 100644 index 0000000000..9e0b76b5d1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenExtraContentBeforeBlockStart.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [39] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [16] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [16] ) +Markup span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [16] ) +Code span at (8:0,8 [7] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [16] ) +None span at (15:0,15 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [16] ) +Markup span at (16:0,16 [23] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [39] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenExtraContentBeforeBlockStart.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenExtraContentBeforeBlockStart.stree.txt new file mode 100644 index 0000000000..344dee531b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenExtraContentBeforeBlockStart.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..39)::39 - [@custom "Hello" World { foo(); bar(); }] + MarkupBlock - [0..39)::39 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..16)::16 + RazorDirective - [0..16)::16 - Directive:{custom;CodeBlock;Unrestricted} [RZ1017(16:0,16 [5] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..16)::15 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..16)::9 + MarkupEphemeralTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..15)::7 - ["Hello"] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + StringLiteral;["Hello"]; + UnclassifiedTextLiteral - [15..16)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + MarkupTextLiteral - [16..39)::23 - [World { foo(); bar(); }] - Gen - SpanEditHandler;Accepts:Any + Text;[World]; + Whitespace;[ ]; + Text;[{]; + Whitespace;[ ]; + Text;[foo();]; + Whitespace;[ ]; + Text;[bar();]; + Whitespace;[ ]; + Text;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenMissingEndBrace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenMissingEndBrace.cspans.txt new file mode 100644 index 0000000000..cf1f2e36d5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenMissingEndBrace.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +Markup span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [17] ) +Code span at (8:0,8 [7] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [17] ) +None span at (15:0,15 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [17] ) +MetaCode span at (16:0,16 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +Code span at (17:0,17 [0] ) (Accepts:Any) - Parent: Directive block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenMissingEndBrace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenMissingEndBrace.stree.txt new file mode 100644 index 0000000000..4938afb99f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_ErrorsWhenMissingEndBrace.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..17)::17 - [@custom "Hello" {] + MarkupBlock - [0..17)::17 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..17)::17 + RazorDirective - [0..17)::17 - Directive:{custom;CodeBlock;Unrestricted} [RZ1006(16:0,16 [1] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..17)::16 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..17)::10 + MarkupEphemeralTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..15)::7 - ["Hello"] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + StringLiteral;["Hello"]; + UnclassifiedTextLiteral - [15..16)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [16..17)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[}];AtEnd + LeftBrace;[{]; + CSharpCodeBlock - [17..17)::0 + CSharpStatementLiteral - [17..17)::0 - [] - Gen - CodeBlockEditHandler;Accepts:Any;CodeBlock + Marker;[]; + RazorMetaCode - [17..17)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScopedMultipleOccurring_CanHaveDuplicates.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScopedMultipleOccurring_CanHaveDuplicates.cspans.txt new file mode 100644 index 0000000000..5429ef434a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScopedMultipleOccurring_CanHaveDuplicates.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [85] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [44] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [44] ) +Code span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [44] ) +Code span at (8:0,8 [34] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [44] ) +Markup span at (42:0,42 [2] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [44] ) +Markup span at (44:1,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [85] ) +Transition span at (44:1,0 [1] ) (Accepts:None) - Parent: Directive block at (44:1,0 [41] ) +MetaCode span at (45:1,1 [6] ) (Accepts:None) - Parent: Directive block at (44:1,0 [41] ) +Code span at (51:1,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (44:1,0 [41] ) +Code span at (52:1,8 [33] ) (Accepts:NonWhitespace) - Parent: Directive block at (44:1,0 [41] ) +Markup span at (85:1,41 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [85] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScopedMultipleOccurring_CanHaveDuplicates.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScopedMultipleOccurring_CanHaveDuplicates.stree.txt new file mode 100644 index 0000000000..f9d3383434 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScopedMultipleOccurring_CanHaveDuplicates.stree.txt @@ -0,0 +1,46 @@ +RazorDocument - [0..85)::85 - [@custom System.Text.Encoding.ASCIIEncodingLF@custom System.Text.Encoding.UTF8Encoding] + MarkupBlock - [0..85)::85 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..44)::44 + RazorDirective - [0..44)::44 - Directive:{custom;SingleLine;FileScopedMultipleOccurring} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..44)::43 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..44)::37 + CSharpStatementLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..42)::34 - [System.Text.Encoding.ASCIIEncoding] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[System]; + Dot;[.]; + Identifier;[Text]; + Dot;[.]; + Identifier;[Encoding]; + Dot;[.]; + Identifier;[ASCIIEncoding]; + MarkupEphemeralTextLiteral - [42..44)::2 - [LF] - Gen - SpanEditHandler;Accepts:Whitespace + NewLine;[LF]; + MarkupTextLiteral - [44..44)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [44..85)::41 + RazorDirective - [44..85)::41 - Directive:{custom;SingleLine;FileScopedMultipleOccurring} + CSharpTransition - [44..45)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [45..85)::40 + RazorMetaCode - [45..51)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [51..85)::34 + CSharpStatementLiteral - [51..52)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [52..85)::33 - [System.Text.Encoding.UTF8Encoding] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[System]; + Dot;[.]; + Identifier;[Text]; + Dot;[.]; + Identifier;[Encoding]; + Dot;[.]; + Identifier;[UTF8Encoding]; + MarkupTextLiteral - [85..85)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScopedSinglyOccurring_ErrorsIfDuplicate.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScopedSinglyOccurring_ErrorsIfDuplicate.cspans.txt new file mode 100644 index 0000000000..5429ef434a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScopedSinglyOccurring_ErrorsIfDuplicate.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [85] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [44] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [44] ) +Code span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [44] ) +Code span at (8:0,8 [34] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [44] ) +Markup span at (42:0,42 [2] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [44] ) +Markup span at (44:1,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [85] ) +Transition span at (44:1,0 [1] ) (Accepts:None) - Parent: Directive block at (44:1,0 [41] ) +MetaCode span at (45:1,1 [6] ) (Accepts:None) - Parent: Directive block at (44:1,0 [41] ) +Code span at (51:1,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (44:1,0 [41] ) +Code span at (52:1,8 [33] ) (Accepts:NonWhitespace) - Parent: Directive block at (44:1,0 [41] ) +Markup span at (85:1,41 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [85] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScopedSinglyOccurring_ErrorsIfDuplicate.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScopedSinglyOccurring_ErrorsIfDuplicate.stree.txt new file mode 100644 index 0000000000..551e79b27c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScopedSinglyOccurring_ErrorsIfDuplicate.stree.txt @@ -0,0 +1,46 @@ +RazorDocument - [0..85)::85 - [@custom System.Text.Encoding.ASCIIEncodingLF@custom System.Text.Encoding.UTF8Encoding] + MarkupBlock - [0..85)::85 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..44)::44 + RazorDirective - [0..44)::44 - Directive:{custom;SingleLine;FileScopedSinglyOccurring} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..44)::43 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..44)::37 + CSharpStatementLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..42)::34 - [System.Text.Encoding.ASCIIEncoding] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[System]; + Dot;[.]; + Identifier;[Text]; + Dot;[.]; + Identifier;[Encoding]; + Dot;[.]; + Identifier;[ASCIIEncoding]; + MarkupEphemeralTextLiteral - [42..44)::2 - [LF] - Gen - SpanEditHandler;Accepts:Whitespace + NewLine;[LF]; + MarkupTextLiteral - [44..44)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [44..85)::41 + RazorDirective - [44..85)::41 - Directive:{custom;SingleLine;FileScopedSinglyOccurring} [RZ2001(44:1,0 [7] )] + CSharpTransition - [44..45)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [45..85)::40 + RazorMetaCode - [45..51)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [51..85)::34 + CSharpStatementLiteral - [51..52)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [52..85)::33 - [System.Text.Encoding.UTF8Encoding] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[System]; + Dot;[.]; + Identifier;[Text]; + Dot;[.]; + Identifier;[Encoding]; + Dot;[.]; + Identifier;[UTF8Encoding]; + MarkupTextLiteral - [85..85)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScoped_CanBeBeneathOtherDirectives.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScoped_CanBeBeneathOtherDirectives.cspans.txt new file mode 100644 index 0000000000..715c97f1c9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScoped_CanBeBeneathOtherDirectives.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [59] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [44] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [44] ) +Code span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [44] ) +Code span at (8:0,8 [34] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [44] ) +Markup span at (42:0,42 [2] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [44] ) +Markup span at (44:1,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [59] ) +Transition span at (44:1,0 [1] ) (Accepts:None) - Parent: Directive block at (44:1,0 [15] ) +MetaCode span at (45:1,1 [9] ) (Accepts:None) - Parent: Directive block at (44:1,0 [15] ) +Code span at (54:1,10 [1] ) (Accepts:Whitespace) - Parent: Directive block at (44:1,0 [15] ) +Code span at (55:1,11 [4] ) (Accepts:NonWhitespace) - Parent: Directive block at (44:1,0 [15] ) +Markup span at (59:1,15 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [59] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScoped_CanBeBeneathOtherDirectives.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScoped_CanBeBeneathOtherDirectives.stree.txt new file mode 100644 index 0000000000..e0591c053d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScoped_CanBeBeneathOtherDirectives.stree.txt @@ -0,0 +1,40 @@ +RazorDocument - [0..59)::59 - [@custom System.Text.Encoding.ASCIIEncodingLF@something Else] + MarkupBlock - [0..59)::59 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..44)::44 + RazorDirective - [0..44)::44 - Directive:{custom;SingleLine;FileScopedSinglyOccurring} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..44)::43 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..44)::37 + CSharpStatementLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..42)::34 - [System.Text.Encoding.ASCIIEncoding] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[System]; + Dot;[.]; + Identifier;[Text]; + Dot;[.]; + Identifier;[Encoding]; + Dot;[.]; + Identifier;[ASCIIEncoding]; + MarkupEphemeralTextLiteral - [42..44)::2 - [LF] - Gen - SpanEditHandler;Accepts:Whitespace + NewLine;[LF]; + MarkupTextLiteral - [44..44)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [44..59)::15 + RazorDirective - [44..59)::15 - Directive:{something;SingleLine;FileScopedMultipleOccurring} + CSharpTransition - [44..45)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [45..59)::14 + RazorMetaCode - [45..54)::9 - Gen - SpanEditHandler;Accepts:None + Identifier;[something]; + CSharpCodeBlock - [54..59)::5 + CSharpStatementLiteral - [54..55)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [55..59)::4 - [Else] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[Else]; + MarkupTextLiteral - [59..59)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScoped_CanBeBeneathOtherWhiteSpaceCommentsAndDirectives.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScoped_CanBeBeneathOtherWhiteSpaceCommentsAndDirectives.cspans.txt new file mode 100644 index 0000000000..b65e57e7d9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScoped_CanBeBeneathOtherWhiteSpaceCommentsAndDirectives.cspans.txt @@ -0,0 +1,22 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [130] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Comment block at (0:0,0 [43] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Comment block at (0:0,0 [43] ) +Comment span at (2:0,2 [39] ) (Accepts:Any) - Parent: Comment block at (0:0,0 [43] ) +MetaCode span at (41:0,41 [1] ) (Accepts:None) - Parent: Comment block at (0:0,0 [43] ) +Transition span at (42:0,42 [1] ) (Accepts:None) - Parent: Comment block at (0:0,0 [43] ) +Markup span at (43:0,43 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [130] ) +Transition span at (45:1,0 [1] ) (Accepts:None) - Parent: Directive block at (45:1,0 [44] ) +MetaCode span at (46:1,1 [6] ) (Accepts:None) - Parent: Directive block at (45:1,0 [44] ) +Code span at (52:1,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (45:1,0 [44] ) +Code span at (53:1,8 [34] ) (Accepts:NonWhitespace) - Parent: Directive block at (45:1,0 [44] ) +Markup span at (87:1,42 [2] ) (Accepts:Whitespace) - Parent: Directive block at (45:1,0 [44] ) +Markup span at (89:2,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [130] ) +Transition span at (91:3,0 [1] ) (Accepts:None) - Parent: Directive block at (91:3,0 [17] ) +MetaCode span at (92:3,1 [9] ) (Accepts:None) - Parent: Directive block at (91:3,0 [17] ) +Code span at (101:3,10 [1] ) (Accepts:Whitespace) - Parent: Directive block at (91:3,0 [17] ) +Code span at (102:3,11 [4] ) (Accepts:NonWhitespace) - Parent: Directive block at (91:3,0 [17] ) +Markup span at (106:3,15 [2] ) (Accepts:Whitespace) - Parent: Directive block at (91:3,0 [17] ) +Markup span at (108:4,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [130] ) +Markup span at (110:5,0 [3] ) (Accepts:Any) - Parent: Tag block at (110:5,0 [3] ) +Markup span at (113:5,3 [13] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [130] ) +Markup span at (126:5,16 [4] ) (Accepts:Any) - Parent: Tag block at (126:5,16 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScoped_CanBeBeneathOtherWhiteSpaceCommentsAndDirectives.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScoped_CanBeBeneathOtherWhiteSpaceCommentsAndDirectives.stree.txt new file mode 100644 index 0000000000..22f831367b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_FileScoped_CanBeBeneathOtherWhiteSpaceCommentsAndDirectives.stree.txt @@ -0,0 +1,66 @@ +RazorDocument - [0..130)::130 - [@* There are two directives beneath this *@LF@custom System.Text.Encoding.ASCIIEncodingLFLF@something ElseLFLF

                    This is extra

                    ] + MarkupBlock - [0..130)::130 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorComment - [0..43)::43 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[ There are two directives beneath this ]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + MarkupEphemeralTextLiteral - [43..45)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [45..89)::44 + RazorDirective - [45..89)::44 - Directive:{custom;SingleLine;FileScopedSinglyOccurring} + CSharpTransition - [45..46)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [46..89)::43 + RazorMetaCode - [46..52)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [52..89)::37 + CSharpStatementLiteral - [52..53)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [53..87)::34 - [System.Text.Encoding.ASCIIEncoding] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[System]; + Dot;[.]; + Identifier;[Text]; + Dot;[.]; + Identifier;[Encoding]; + Dot;[.]; + Identifier;[ASCIIEncoding]; + MarkupEphemeralTextLiteral - [87..89)::2 - [LF] - Gen - SpanEditHandler;Accepts:Whitespace + NewLine;[LF]; + MarkupTextLiteral - [89..91)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [91..108)::17 + RazorDirective - [91..108)::17 - Directive:{something;SingleLine;FileScopedMultipleOccurring} + CSharpTransition - [91..92)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [92..108)::16 + RazorMetaCode - [92..101)::9 - Gen - SpanEditHandler;Accepts:None + Identifier;[something]; + CSharpCodeBlock - [101..108)::7 + CSharpStatementLiteral - [101..102)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [102..106)::4 - [Else] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[Else]; + MarkupEphemeralTextLiteral - [106..108)::2 - [LF] - Gen - SpanEditHandler;Accepts:Whitespace + NewLine;[LF]; + MarkupTextLiteral - [108..110)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [110..130)::20 + MarkupStartTag - [110..113)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [113..126)::13 - [This is extra] - Gen - SpanEditHandler;Accepts:Any + Text;[This]; + Whitespace;[ ]; + Text;[is]; + Whitespace;[ ]; + Text;[extra]; + MarkupEndTag - [126..130)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_NoErrorsSemicolonAfterDirective.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_NoErrorsSemicolonAfterDirective.cspans.txt new file mode 100644 index 0000000000..f44c1c18b8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_NoErrorsSemicolonAfterDirective.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [19] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [19] ) +Markup span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [19] ) +Code span at (8:0,8 [7] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [19] ) +None span at (15:0,15 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [19] ) +MetaCode span at (16:0,16 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [19] ) +Markup span at (17:0,17 [2] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [19] ) +Markup span at (19:0,19 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_NoErrorsSemicolonAfterDirective.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_NoErrorsSemicolonAfterDirective.stree.txt new file mode 100644 index 0000000000..bd14b1f20c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_NoErrorsSemicolonAfterDirective.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..19)::19 - [@custom "hello" ; ] + MarkupBlock - [0..19)::19 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..19)::19 + RazorDirective - [0..19)::19 - Directive:{custom;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..19)::18 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..19)::12 + MarkupEphemeralTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..15)::7 - ["hello"] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + StringLiteral;["hello"]; + UnclassifiedTextLiteral - [15..16)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + RazorMetaCode - [16..17)::1 - Gen - SpanEditHandler;Accepts:Whitespace + Semicolon;[;]; + MarkupEphemeralTextLiteral - [17..19)::2 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + MarkupTextLiteral - [19..19)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForNonStringValue.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForNonStringValue.cspans.txt new file mode 100644 index 0000000000..82186c467a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForNonStringValue.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +Markup span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [8] ) +Markup span at (8:0,8 [6] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForNonStringValue.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForNonStringValue.stree.txt new file mode 100644 index 0000000000..ec8ed8b511 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForNonStringValue.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..14)::14 - [@custom {foo?}] + MarkupBlock - [0..14)::14 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + RazorDirective - [0..8)::8 - Directive:{custom;SingleLine;Unrestricted} [RZ1016(8:0,8 [1] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..8)::7 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..8)::1 + MarkupEphemeralTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + MarkupTextLiteral - [8..14)::6 - [{foo?}] - Gen - SpanEditHandler;Accepts:Any + Text;[{foo]; + QuestionMark;[?]; + Text;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForPartialQuotedValue.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForPartialQuotedValue.cspans.txt new file mode 100644 index 0000000000..9e73b54511 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForPartialQuotedValue.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +Markup span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [8] ) +Markup span at (8:0,8 [8] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForPartialQuotedValue.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForPartialQuotedValue.stree.txt new file mode 100644 index 0000000000..6ad2990a4e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForPartialQuotedValue.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..16)::16 - [@custom AString"] + MarkupBlock - [0..16)::16 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + RazorDirective - [0..8)::8 - Directive:{custom;SingleLine;Unrestricted} [RZ1016(8:0,8 [7] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..8)::7 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..8)::1 + MarkupEphemeralTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + MarkupTextLiteral - [8..16)::8 - [AString"] - Gen - SpanEditHandler;Accepts:Any + Text;[AString]; + DoubleQuote;["]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForSingleQuotedValue.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForSingleQuotedValue.cspans.txt new file mode 100644 index 0000000000..d5d9f27aef --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForSingleQuotedValue.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +Markup span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [8] ) +Markup span at (8:0,8 [9] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForSingleQuotedValue.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForSingleQuotedValue.stree.txt new file mode 100644 index 0000000000..eef7233302 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForSingleQuotedValue.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..17)::17 - [@custom 'AString'] + MarkupBlock - [0..17)::17 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + RazorDirective - [0..8)::8 - Directive:{custom;SingleLine;Unrestricted} [RZ1016(8:0,8 [9] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..8)::7 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..8)::1 + MarkupEphemeralTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + MarkupTextLiteral - [8..17)::9 - ['AString'] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + Text;[AString]; + SingleQuote;[']; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForUnquotedValue.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForUnquotedValue.cspans.txt new file mode 100644 index 0000000000..5d403c8984 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForUnquotedValue.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +Markup span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [8] ) +Markup span at (8:0,8 [7] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForUnquotedValue.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForUnquotedValue.stree.txt new file mode 100644 index 0000000000..651feb6e9e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_StringToken_ParserErrorForUnquotedValue.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..15)::15 - [@custom AString] + MarkupBlock - [0..15)::15 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + RazorDirective - [0..8)::8 - Directive:{custom;SingleLine;Unrestricted} [RZ1016(8:0,8 [7] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..8)::7 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..8)::1 + MarkupEphemeralTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + MarkupTextLiteral - [8..15)::7 - [AString] - Gen - SpanEditHandler;Accepts:Any + Text;[AString]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_TokensMustBeSeparatedBySpace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_TokensMustBeSeparatedBySpace.cspans.txt new file mode 100644 index 0000000000..263c7efaa3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_TokensMustBeSeparatedBySpace.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +Markup span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [17] ) +Code span at (8:0,8 [9] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [17] ) +Markup span at (17:0,17 [9] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_TokensMustBeSeparatedBySpace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_TokensMustBeSeparatedBySpace.stree.txt new file mode 100644 index 0000000000..f3d06f68b9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_TokensMustBeSeparatedBySpace.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..26)::26 - [@custom "string1""string2"] + MarkupBlock - [0..26)::26 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..17)::17 + RazorDirective - [0..17)::17 - Directive:{custom;SingleLine;Unrestricted} [RZ1011(17:0,17 [9] )] + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..17)::16 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..17)::10 + MarkupEphemeralTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..17)::9 - ["string1"] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + StringLiteral;["string1"]; + MarkupTextLiteral - [17..26)::9 - ["string2"] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + Text;[string2]; + DoubleQuote;["]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsCodeBlocks.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsCodeBlocks.cspans.txt new file mode 100644 index 0000000000..234653b152 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsCodeBlocks.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [32] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [32] ) +Markup span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [32] ) +Code span at (8:0,8 [6] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [32] ) +None span at (14:0,14 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [32] ) +MetaCode span at (15:0,15 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [32] ) +Code span at (16:0,16 [15] ) (Accepts:Any) - Parent: Directive block at (0:0,0 [32] ) +MetaCode span at (31:0,31 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [32] ) +Markup span at (32:0,32 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsCodeBlocks.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsCodeBlocks.stree.txt new file mode 100644 index 0000000000..c960c4e92d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsCodeBlocks.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..32)::32 - [@custom "Name" { foo(); bar(); }] + MarkupBlock - [0..32)::32 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..32)::32 + RazorDirective - [0..32)::32 - Directive:{custom;CodeBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..32)::31 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..32)::25 + MarkupEphemeralTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..14)::6 - ["Name"] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + StringLiteral;["Name"]; + UnclassifiedTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [15..16)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + CSharpCodeBlock - [16..31)::15 + CSharpStatementLiteral - [16..31)::15 - [ foo(); bar(); ] - Gen - CodeBlockEditHandler;Accepts:Any;CodeBlock + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RazorMetaCode - [31..32)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsMemberTokens.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsMemberTokens.cspans.txt new file mode 100644 index 0000000000..69febe9867 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsMemberTokens.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [19] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [19] ) +Code span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [19] ) +Code span at (8:0,8 [11] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [19] ) +Markup span at (19:0,19 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsMemberTokens.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsMemberTokens.stree.txt new file mode 100644 index 0000000000..d2d51198cb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsMemberTokens.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..19)::19 - [@custom Some_Member] + MarkupBlock - [0..19)::19 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..19)::19 + RazorDirective - [0..19)::19 - Directive:{custom;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..19)::18 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..19)::12 + CSharpStatementLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..19)::11 - [Some_Member] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[Some_Member]; + MarkupTextLiteral - [19..19)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsMultipleTokens.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsMultipleTokens.cspans.txt new file mode 100644 index 0000000000..9a307ed573 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsMultipleTokens.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [64] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [64] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [64] ) +Code span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [64] ) +Code span at (8:0,8 [34] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [64] ) +Code span at (42:0,42 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [64] ) +Code span at (43:0,43 [11] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [64] ) +Markup span at (54:0,54 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [64] ) +Code span at (55:0,55 [9] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [64] ) +Markup span at (64:0,64 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [64] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsMultipleTokens.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsMultipleTokens.stree.txt new file mode 100644 index 0000000000..d2f7b39c4d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsMultipleTokens.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..64)::64 - [@custom System.Text.Encoding.ASCIIEncoding Some_Member "AString"] + MarkupBlock - [0..64)::64 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..64)::64 + RazorDirective - [0..64)::64 - Directive:{custom;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..64)::63 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..64)::57 + CSharpStatementLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..42)::34 - [System.Text.Encoding.ASCIIEncoding] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[System]; + Dot;[.]; + Identifier;[Text]; + Dot;[.]; + Identifier;[Encoding]; + Dot;[.]; + Identifier;[ASCIIEncoding]; + CSharpStatementLiteral - [42..43)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [43..54)::11 - [Some_Member] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[Some_Member]; + MarkupEphemeralTextLiteral - [54..55)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [55..64)::9 - ["AString"] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + StringLiteral;["AString"]; + MarkupTextLiteral - [64..64)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsRazorBlocks.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsRazorBlocks.cspans.txt new file mode 100644 index 0000000000..ccb11164be --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsRazorBlocks.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [33] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [33] ) +Markup span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [33] ) +Code span at (8:0,8 [8] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [33] ) +None span at (16:0,16 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [33] ) +MetaCode span at (17:0,17 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [33] ) +Markup span at (18:0,18 [1] ) (Accepts:Any) - Parent: Markup block at (18:0,18 [14] ) +Markup span at (19:0,19 [3] ) (Accepts:Any) - Parent: Tag block at (19:0,19 [3] ) +Markup span at (22:0,22 [5] ) (Accepts:Any) - Parent: Markup block at (18:0,18 [14] ) +Markup span at (27:0,27 [4] ) (Accepts:Any) - Parent: Tag block at (27:0,27 [4] ) +Markup span at (31:0,31 [1] ) (Accepts:Any) - Parent: Markup block at (18:0,18 [14] ) +MetaCode span at (32:0,32 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [33] ) +Markup span at (33:0,33 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsRazorBlocks.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsRazorBlocks.stree.txt new file mode 100644 index 0000000000..b31e7e4325 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsRazorBlocks.stree.txt @@ -0,0 +1,45 @@ +RazorDocument - [0..33)::33 - [@custom "Header" {

                    F{o}o

                    }] + MarkupBlock - [0..33)::33 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..33)::33 + RazorDirective - [0..33)::33 - Directive:{custom;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..33)::32 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..33)::26 + MarkupEphemeralTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..16)::8 - ["Header"] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + StringLiteral;["Header"]; + UnclassifiedTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [17..18)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [18..32)::14 + MarkupTextLiteral - [18..19)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [19..31)::12 + MarkupStartTag - [19..22)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [22..27)::5 - [F{o}o] - Gen - SpanEditHandler;Accepts:Any + Text;[F]; + Text;[{]; + Text;[o]; + Text;[}]; + Text;[o]; + MarkupEndTag - [27..31)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [31..32)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [32..33)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsStringTokens.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsStringTokens.cspans.txt new file mode 100644 index 0000000000..e3413d97ee --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsStringTokens.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +Markup span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [17] ) +Code span at (8:0,8 [9] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [17] ) +Markup span at (17:0,17 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsStringTokens.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsStringTokens.stree.txt new file mode 100644 index 0000000000..77987a903f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsStringTokens.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..17)::17 - [@custom "AString"] + MarkupBlock - [0..17)::17 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..17)::17 + RazorDirective - [0..17)::17 - Directive:{custom;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..17)::16 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..17)::10 + MarkupEphemeralTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..17)::9 - ["AString"] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + StringLiteral;["AString"]; + MarkupTextLiteral - [17..17)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsTypeTokens.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsTypeTokens.cspans.txt new file mode 100644 index 0000000000..fd5256e31f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsTypeTokens.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [42] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [42] ) +Code span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [42] ) +Code span at (8:0,8 [34] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [42] ) +Markup span at (42:0,42 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsTypeTokens.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsTypeTokens.stree.txt new file mode 100644 index 0000000000..ba28ef0a75 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/DirectiveDescriptor_UnderstandsTypeTokens.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..42)::42 - [@custom System.Text.Encoding.ASCIIEncoding] + MarkupBlock - [0..42)::42 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..42)::42 + RazorDirective - [0..42)::42 - Directive:{custom;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..42)::41 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..42)::35 + CSharpStatementLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..42)::34 - [System.Text.Encoding.ASCIIEncoding] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[System]; + Dot;[.]; + Identifier;[Text]; + Dot;[.]; + Identifier;[Encoding]; + Dot;[.]; + Identifier;[ASCIIEncoding]; + MarkupTextLiteral - [42..42)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_CanUseReservedWord_Class.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_CanUseReservedWord_Class.cspans.txt new file mode 100644 index 0000000000..35eaf0bb6c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_CanUseReservedWord_Class.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [6] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [6] ) +MetaCode span at (1:0,1 [5] ) (Accepts:None) - Parent: Directive block at (0:0,0 [6] ) +Markup span at (6:0,6 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_CanUseReservedWord_Class.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_CanUseReservedWord_Class.stree.txt new file mode 100644 index 0000000000..006f105357 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_CanUseReservedWord_Class.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..6)::6 - [@class] + MarkupBlock - [0..6)::6 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..6)::6 + RazorDirective - [0..6)::6 - Directive:{class;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..6)::5 + RazorMetaCode - [1..6)::5 - Gen - SpanEditHandler;Accepts:None + Keyword;[class]; + CSharpCodeBlock - [6..6)::0 + MarkupTextLiteral - [6..6)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_CanUseReservedWord_Namespace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_CanUseReservedWord_Namespace.cspans.txt new file mode 100644 index 0000000000..65fa84c6ab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_CanUseReservedWord_Namespace.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [10] ) +MetaCode span at (1:0,1 [9] ) (Accepts:None) - Parent: Directive block at (0:0,0 [10] ) +Markup span at (10:0,10 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_CanUseReservedWord_Namespace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_CanUseReservedWord_Namespace.stree.txt new file mode 100644 index 0000000000..9b940ce6e5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_CanUseReservedWord_Namespace.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..10)::10 - [@namespace] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..10)::10 + RazorDirective - [0..10)::10 - Directive:{namespace;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..10)::9 + RazorMetaCode - [1..10)::9 - Gen - SpanEditHandler;Accepts:None + Keyword;[namespace]; + CSharpCodeBlock - [10..10)::0 + MarkupTextLiteral - [10..10)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_ReservedWordInsideCodeBlock.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_ReservedWordInsideCodeBlock.cspans.txt new file mode 100644 index 0000000000..71420aa95e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_ReservedWordInsideCodeBlock.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +Code span at (2:0,2 [7] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [10] ) +MetaCode span at (9:0,9 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +Markup span at (10:0,10 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_ReservedWordInsideCodeBlock.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_ReservedWordInsideCodeBlock.stree.txt new file mode 100644 index 0000000000..06c87e7534 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Directives_ReservedWordInsideCodeBlock.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..10)::10 - [@{ class }] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..10)::10 + CSharpStatement - [0..10)::10 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..10)::9 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..9)::7 + CSharpStatementLiteral - [2..9)::7 - [ class ] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Whitespace;[ ]; + Keyword;[class]; + Whitespace;[ ]; + RazorMetaCode - [9..10)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [10..10)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/EmptyFunctionsDirective.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/EmptyFunctionsDirective.cspans.txt new file mode 100644 index 0000000000..88828c3534 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/EmptyFunctionsDirective.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [14] ) +MetaCode span at (1:0,1 [9] ) (Accepts:None) - Parent: Directive block at (0:0,0 [14] ) +None span at (10:0,10 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [14] ) +MetaCode span at (11:0,11 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [14] ) +Code span at (12:0,12 [1] ) (Accepts:Any) - Parent: Directive block at (0:0,0 [14] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [14] ) +Markup span at (14:0,14 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/EmptyFunctionsDirective.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/EmptyFunctionsDirective.stree.txt new file mode 100644 index 0000000000..4a732dad09 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/EmptyFunctionsDirective.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..14)::14 - [@functions { }] + MarkupBlock - [0..14)::14 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..14)::14 + RazorDirective - [0..14)::14 - Directive:{functions;CodeBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..14)::13 + RazorMetaCode - [1..10)::9 - Gen - SpanEditHandler;Accepts:None + Identifier;[functions]; + CSharpCodeBlock - [10..14)::4 + UnclassifiedTextLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [11..12)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + CSharpCodeBlock - [12..13)::1 + CSharpStatementLiteral - [12..13)::1 - [ ] - Gen - CodeBlockEditHandler;Accepts:Any;CodeBlock + Whitespace;[ ]; + RazorMetaCode - [13..14)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [14..14)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace.cspans.txt new file mode 100644 index 0000000000..80b5cd9e14 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) +Code span at (2:1,0 [2] ) (Accepts:Any) - Parent: Statement block at (2:1,0 [44] ) +Transition span at (4:1,2 [1] ) (Accepts:None) - Parent: Directive block at (4:1,2 [42] ) +MetaCode span at (5:1,3 [6] ) (Accepts:None) - Parent: Directive block at (4:1,2 [42] ) +Code span at (11:1,9 [1] ) (Accepts:Whitespace) - Parent: Directive block at (4:1,2 [42] ) +Code span at (12:1,10 [34] ) (Accepts:NonWhitespace) - Parent: Directive block at (4:1,2 [42] ) +Markup span at (46:1,44 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace.stree.txt new file mode 100644 index 0000000000..163880ac97 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveDoesNotErorrIfNotAtStartOfLineBecauseOfWhitespace.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..46)::46 - [LF @custom System.Text.Encoding.ASCIIEncoding] + MarkupBlock - [0..46)::46 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + CSharpCodeBlock - [2..46)::44 + CSharpEphemeralTextLiteral - [2..4)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorDirective - [4..46)::42 - Directive:{custom;SingleLine;Unrestricted} + CSharpTransition - [4..5)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [5..46)::41 + RazorMetaCode - [5..11)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [11..46)::35 + CSharpStatementLiteral - [11..12)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [12..46)::34 - [System.Text.Encoding.ASCIIEncoding] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[System]; + Dot;[.]; + Identifier;[Text]; + Dot;[.]; + Identifier;[Encoding]; + Dot;[.]; + Identifier;[ASCIIEncoding]; + MarkupTextLiteral - [46..46)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveErrorsIfNotAtStartOfLine.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveErrorsIfNotAtStartOfLine.cspans.txt new file mode 100644 index 0000000000..2b00010889 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveErrorsIfNotAtStartOfLine.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [48] ) +Transition span at (3:0,3 [1] ) (Accepts:None) - Parent: Directive block at (3:0,3 [44] ) +MetaCode span at (4:0,4 [6] ) (Accepts:None) - Parent: Directive block at (3:0,3 [44] ) +Code span at (10:0,10 [1] ) (Accepts:Whitespace) - Parent: Directive block at (3:0,3 [44] ) +Code span at (11:0,11 [34] ) (Accepts:NonWhitespace) - Parent: Directive block at (3:0,3 [44] ) +Markup span at (45:0,45 [2] ) (Accepts:Whitespace) - Parent: Directive block at (3:0,3 [44] ) +Markup span at (47:1,0 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [48] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveErrorsIfNotAtStartOfLine.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveErrorsIfNotAtStartOfLine.stree.txt new file mode 100644 index 0000000000..de8aa13386 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveErrorsIfNotAtStartOfLine.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..48)::48 - [{ @custom System.Text.Encoding.ASCIIEncodingLF}] + MarkupBlock - [0..48)::48 + MarkupTextLiteral - [0..3)::3 - [{ ] - Gen - SpanEditHandler;Accepts:Any + Text;[{]; + Whitespace;[ ]; + CSharpCodeBlock - [3..47)::44 + RazorDirective - [3..47)::44 - Directive:{custom;SingleLine;Unrestricted} [RZ2005(4:0,4 [6] )] + CSharpTransition - [3..4)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [4..47)::43 + RazorMetaCode - [4..10)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [10..47)::37 + CSharpStatementLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [11..45)::34 - [System.Text.Encoding.ASCIIEncoding] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[System]; + Dot;[.]; + Identifier;[Text]; + Dot;[.]; + Identifier;[Encoding]; + Dot;[.]; + Identifier;[ASCIIEncoding]; + MarkupEphemeralTextLiteral - [45..47)::2 - [LF] - Gen - SpanEditHandler;Accepts:Whitespace + NewLine;[LF]; + MarkupTextLiteral - [47..48)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsArrays.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsArrays.cspans.txt new file mode 100644 index 0000000000..79d48099bf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsArrays.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [22] ) +MetaCode span at (1:0,1 [8] ) (Accepts:None) - Parent: Directive block at (0:0,0 [22] ) +Code span at (9:0,9 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [22] ) +Code span at (10:0,10 [12] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [22] ) +Markup span at (22:0,22 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsArrays.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsArrays.stree.txt new file mode 100644 index 0000000000..84882ce25e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsArrays.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..22)::22 - [@inherits string[[]][]] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..22)::22 + RazorDirective - [0..22)::22 - Directive:{inherits;SingleLine;FileScopedSinglyOccurring} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..22)::21 + RazorMetaCode - [1..9)::8 - Gen - SpanEditHandler;Accepts:None + Identifier;[inherits]; + CSharpCodeBlock - [9..22)::13 + CSharpStatementLiteral - [9..10)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [10..22)::12 - [string[[]][]] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Keyword;[string]; + LeftBracket;[[]; + LeftBracket;[[]; + RightBracket;[]]; + RightBracket;[]]; + LeftBracket;[[]; + RightBracket;[]]; + MarkupTextLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsNestedGenerics.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsNestedGenerics.cspans.txt new file mode 100644 index 0000000000..4a73c4c8ca --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsNestedGenerics.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [87] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [87] ) +MetaCode span at (1:0,1 [8] ) (Accepts:None) - Parent: Directive block at (0:0,0 [87] ) +Code span at (9:0,9 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [87] ) +Code span at (10:0,10 [77] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [87] ) +Markup span at (87:0,87 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [87] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsNestedGenerics.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsNestedGenerics.stree.txt new file mode 100644 index 0000000000..b8cf6049cb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsNestedGenerics.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..87)::87 - [@inherits System.Web.Mvc.WebViewPage>] + MarkupBlock - [0..87)::87 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..87)::87 + RazorDirective - [0..87)::87 - Directive:{inherits;SingleLine;FileScopedSinglyOccurring} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..87)::86 + RazorMetaCode - [1..9)::8 - Gen - SpanEditHandler;Accepts:None + Identifier;[inherits]; + CSharpCodeBlock - [9..87)::78 + CSharpStatementLiteral - [9..10)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [10..87)::77 - [System.Web.Mvc.WebViewPage>] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[System]; + Dot;[.]; + Identifier;[Web]; + Dot;[.]; + Identifier;[Mvc]; + Dot;[.]; + Identifier;[WebViewPage]; + LessThan;[<]; + Identifier;[IEnumerable]; + LessThan;[<]; + Identifier;[MvcApplication2]; + Dot;[.]; + Identifier;[Models]; + Dot;[.]; + Identifier;[RegisterModel]; + GreaterThan;[>]; + GreaterThan;[>]; + MarkupTextLiteral - [87..87)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsTypeKeywords.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsTypeKeywords.cspans.txt new file mode 100644 index 0000000000..0be18525ff --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsTypeKeywords.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [16] ) +MetaCode span at (1:0,1 [8] ) (Accepts:None) - Parent: Directive block at (0:0,0 [16] ) +Code span at (9:0,9 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [16] ) +Code span at (10:0,10 [6] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [16] ) +Markup span at (16:0,16 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsTypeKeywords.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsTypeKeywords.stree.txt new file mode 100644 index 0000000000..12fe4f3b8b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/InheritsDirectiveSupportsTypeKeywords.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..16)::16 - [@inherits string] + MarkupBlock - [0..16)::16 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..16)::16 + RazorDirective - [0..16)::16 - Directive:{inherits;SingleLine;FileScopedSinglyOccurring} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..16)::15 + RazorMetaCode - [1..9)::8 - Gen - SpanEditHandler;Accepts:None + Identifier;[inherits]; + CSharpCodeBlock - [9..16)::7 + CSharpStatementLiteral - [9..10)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [10..16)::6 - [string] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Keyword;[string]; + MarkupTextLiteral - [16..16)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_AreSkipped.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_AreSkipped.cspans.txt new file mode 100644 index 0000000000..2afc521ace --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_AreSkipped.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [8] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [8] ) +Markup span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [8] ) +Markup span at (8:0,8 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [8] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_AreSkipped.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_AreSkipped.stree.txt new file mode 100644 index 0000000000..592926662b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_AreSkipped.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..8)::8 - [@custom ] + MarkupBlock - [0..8)::8 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + RazorDirective - [0..8)::8 - Directive:{custom;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..8)::7 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..8)::1 + MarkupEphemeralTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + MarkupTextLiteral - [8..8)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithBraces_AreParsed.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithBraces_AreParsed.cspans.txt new file mode 100644 index 0000000000..1b7631b73f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithBraces_AreParsed.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [29] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [29] ) +Markup span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [29] ) +Code span at (8:0,8 [21] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [29] ) +Markup span at (29:0,29 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithBraces_AreParsed.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithBraces_AreParsed.stree.txt new file mode 100644 index 0000000000..455a063f9d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithBraces_AreParsed.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..29)::29 - [@custom "{formaction}?/{id}?"] + MarkupBlock - [0..29)::29 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..29)::29 + RazorDirective - [0..29)::29 - Directive:{custom;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..29)::28 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..29)::22 + MarkupEphemeralTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..29)::21 - ["{formaction}?/{id}?"] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + StringLiteral;["{formaction}?/{id}?"]; + MarkupTextLiteral - [29..29)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithMultipleOptionalTokens_AreParsed.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithMultipleOptionalTokens_AreParsed.cspans.txt new file mode 100644 index 0000000000..d4a6305e23 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithMultipleOptionalTokens_AreParsed.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [43] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [43] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [43] ) +Markup span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [43] ) +Code span at (8:0,8 [21] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [43] ) +Code span at (29:0,29 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [43] ) +Code span at (30:0,30 [13] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [43] ) +Markup span at (43:0,43 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [43] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithMultipleOptionalTokens_AreParsed.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithMultipleOptionalTokens_AreParsed.stree.txt new file mode 100644 index 0000000000..de4cde9da7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithMultipleOptionalTokens_AreParsed.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..43)::43 - [@custom "{formaction}?/{id}?" System.String] + MarkupBlock - [0..43)::43 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..43)::43 + RazorDirective - [0..43)::43 - Directive:{custom;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..43)::42 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..43)::36 + MarkupEphemeralTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..29)::21 - ["{formaction}?/{id}?"] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + StringLiteral;["{formaction}?/{id}?"]; + CSharpStatementLiteral - [29..30)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [30..43)::13 - [System.String] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[System]; + Dot;[.]; + Identifier;[String]; + MarkupTextLiteral - [43..43)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithSimpleTokens_AreParsed.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithSimpleTokens_AreParsed.cspans.txt new file mode 100644 index 0000000000..bd10c900ba --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithSimpleTokens_AreParsed.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [22] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [22] ) +Markup span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [22] ) +Code span at (8:0,8 [14] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [22] ) +Markup span at (22:0,22 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithSimpleTokens_AreParsed.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithSimpleTokens_AreParsed.stree.txt new file mode 100644 index 0000000000..ccd26b5cbe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalDirectiveTokens_WithSimpleTokens_AreParsed.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..22)::22 - [@custom "simple-value"] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..22)::22 + RazorDirective - [0..22)::22 - Directive:{custom;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..22)::21 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..22)::15 + MarkupEphemeralTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..22)::14 - ["simple-value"] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + StringLiteral;["simple-value"]; + MarkupTextLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalMemberTokens_WithMemberSpecified_IsParsed.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalMemberTokens_WithMemberSpecified_IsParsed.cspans.txt new file mode 100644 index 0000000000..0fe58ec33c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalMemberTokens_WithMemberSpecified_IsParsed.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [27] ) +MetaCode span at (1:0,1 [13] ) (Accepts:None) - Parent: Directive block at (0:0,0 [27] ) +Code span at (14:0,14 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [27] ) +Code span at (15:0,15 [12] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [27] ) +Markup span at (27:0,27 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalMemberTokens_WithMemberSpecified_IsParsed.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalMemberTokens_WithMemberSpecified_IsParsed.stree.txt new file mode 100644 index 0000000000..adf43bdc9d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalMemberTokens_WithMemberSpecified_IsParsed.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..27)::27 - [@TestDirective PropertyName] + MarkupBlock - [0..27)::27 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..27)::27 + RazorDirective - [0..27)::27 - Directive:{TestDirective;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..27)::26 + RazorMetaCode - [1..14)::13 - Gen - SpanEditHandler;Accepts:None + Identifier;[TestDirective]; + CSharpCodeBlock - [14..27)::13 + CSharpStatementLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [15..27)::12 - [PropertyName] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[PropertyName]; + MarkupTextLiteral - [27..27)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalMemberTokens_WithMissingMember_IsParsed.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalMemberTokens_WithMissingMember_IsParsed.cspans.txt new file mode 100644 index 0000000000..de71313701 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalMemberTokens_WithMissingMember_IsParsed.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [15] ) +MetaCode span at (1:0,1 [13] ) (Accepts:None) - Parent: Directive block at (0:0,0 [15] ) +Code span at (14:0,14 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [15] ) +Code span at (15:0,15 [0] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [15] ) +Markup span at (15:0,15 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalMemberTokens_WithMissingMember_IsParsed.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalMemberTokens_WithMissingMember_IsParsed.stree.txt new file mode 100644 index 0000000000..7a6be62a85 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/OptionalMemberTokens_WithMissingMember_IsParsed.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..15)::15 - [@TestDirective ] + MarkupBlock - [0..15)::15 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..15)::15 + RazorDirective - [0..15)::15 - Directive:{TestDirective;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..15)::14 + RazorMetaCode - [1..14)::13 - Gen - SpanEditHandler;Accepts:None + Identifier;[TestDirective]; + CSharpCodeBlock - [14..15)::1 + CSharpStatementLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [15..15)::0 - [] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Marker;[]; + MarkupTextLiteral - [15..15)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parse_FunctionsDirective.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parse_FunctionsDirective.cspans.txt new file mode 100644 index 0000000000..556affaba5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parse_FunctionsDirective.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [28] ) +MetaCode span at (1:0,1 [9] ) (Accepts:None) - Parent: Directive block at (0:0,0 [28] ) +None span at (10:0,10 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [28] ) +MetaCode span at (11:0,11 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [28] ) +Code span at (12:0,12 [15] ) (Accepts:Any) - Parent: Directive block at (0:0,0 [28] ) +MetaCode span at (27:0,27 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [28] ) +Markup span at (28:0,28 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parse_FunctionsDirective.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parse_FunctionsDirective.stree.txt new file mode 100644 index 0000000000..efc89067b2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parse_FunctionsDirective.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..28)::28 - [@functions { foo(); bar(); }] + MarkupBlock - [0..28)::28 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..28)::28 + RazorDirective - [0..28)::28 - Directive:{functions;CodeBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..28)::27 + RazorMetaCode - [1..10)::9 - Gen - SpanEditHandler;Accepts:None + Identifier;[functions]; + CSharpCodeBlock - [10..28)::18 + UnclassifiedTextLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [11..12)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + CSharpCodeBlock - [12..27)::15 + CSharpStatementLiteral - [12..27)::15 - [ foo(); bar(); ] - Gen - CodeBlockEditHandler;Accepts:Any;CodeBlock + Whitespace;[ ]; + Identifier;[foo]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + Identifier;[bar]; + LeftParenthesis;[(]; + RightParenthesis;[)]; + Semicolon;[;]; + Whitespace;[ ]; + RazorMetaCode - [27..28)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [28..28)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parse_SectionDirective.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parse_SectionDirective.cspans.txt new file mode 100644 index 0000000000..c3fbe4e475 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parse_SectionDirective.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [32] ) +MetaCode span at (1:0,1 [7] ) (Accepts:None) - Parent: Directive block at (0:0,0 [32] ) +Code span at (8:0,8 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [32] ) +Code span at (9:0,9 [6] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [32] ) +None span at (15:0,15 [1] ) (Accepts:AllWhitespace) - Parent: Directive block at (0:0,0 [32] ) +MetaCode span at (16:0,16 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [32] ) +Markup span at (17:0,17 [1] ) (Accepts:Any) - Parent: Markup block at (17:0,17 [14] ) +Markup span at (18:0,18 [3] ) (Accepts:Any) - Parent: Tag block at (18:0,18 [3] ) +Markup span at (21:0,21 [5] ) (Accepts:Any) - Parent: Markup block at (17:0,17 [14] ) +Markup span at (26:0,26 [4] ) (Accepts:Any) - Parent: Tag block at (26:0,26 [4] ) +Markup span at (30:0,30 [1] ) (Accepts:Any) - Parent: Markup block at (17:0,17 [14] ) +MetaCode span at (31:0,31 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [32] ) +Markup span at (32:0,32 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parse_SectionDirective.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parse_SectionDirective.stree.txt new file mode 100644 index 0000000000..4e1eeb325a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parse_SectionDirective.stree.txt @@ -0,0 +1,45 @@ +RazorDocument - [0..32)::32 - [@section Header {

                    F{o}o

                    }] + MarkupBlock - [0..32)::32 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..32)::32 + RazorDirective - [0..32)::32 - Directive:{section;RazorBlock;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..32)::31 + RazorMetaCode - [1..8)::7 - Gen - SpanEditHandler;Accepts:None + Identifier;[section]; + CSharpCodeBlock - [8..32)::24 + CSharpStatementLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [9..15)::6 - [Header] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[Header]; + UnclassifiedTextLiteral - [15..16)::1 - [ ] - Gen - SpanEditHandler;Accepts:AllWhitespace + Whitespace;[ ]; + RazorMetaCode - [16..17)::1 - Gen - AutoCompleteEditHandler;Accepts:None,AutoComplete:[];AtEnd + LeftBrace;[{]; + MarkupBlock - [17..31)::14 + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [18..30)::12 + MarkupStartTag - [18..21)::3 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [21..26)::5 - [F{o}o] - Gen - SpanEditHandler;Accepts:Any + Text;[F]; + Text;[{]; + Text;[o]; + Text;[}]; + Text;[o]; + MarkupEndTag - [26..30)::4 - [

                    ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [30..31)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RazorMetaCode - [31..32)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parser_ParsesNamespaceDirectiveToken_WithMultipleSegments.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parser_ParsesNamespaceDirectiveToken_WithMultipleSegments.cspans.txt new file mode 100644 index 0000000000..93ef395357 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parser_ParsesNamespaceDirectiveToken_WithMultipleSegments.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [29] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [29] ) +Code span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [29] ) +Code span at (8:0,8 [21] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [29] ) +Markup span at (29:0,29 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parser_ParsesNamespaceDirectiveToken_WithMultipleSegments.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parser_ParsesNamespaceDirectiveToken_WithMultipleSegments.stree.txt new file mode 100644 index 0000000000..4e03f5befe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parser_ParsesNamespaceDirectiveToken_WithMultipleSegments.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..29)::29 - [@custom BaseNamespace.Foo.Bar] + MarkupBlock - [0..29)::29 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..29)::29 + RazorDirective - [0..29)::29 - Directive:{custom;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..29)::28 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..29)::22 + CSharpStatementLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..29)::21 - [BaseNamespace.Foo.Bar] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[BaseNamespace]; + Dot;[.]; + Identifier;[Foo]; + Dot;[.]; + Identifier;[Bar]; + MarkupTextLiteral - [29..29)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parser_ParsesNamespaceDirectiveToken_WithSingleSegment.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parser_ParsesNamespaceDirectiveToken_WithSingleSegment.cspans.txt new file mode 100644 index 0000000000..e096a23423 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parser_ParsesNamespaceDirectiveToken_WithSingleSegment.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [21] ) +MetaCode span at (1:0,1 [6] ) (Accepts:None) - Parent: Directive block at (0:0,0 [21] ) +Code span at (7:0,7 [1] ) (Accepts:Whitespace) - Parent: Directive block at (0:0,0 [21] ) +Code span at (8:0,8 [13] ) (Accepts:NonWhitespace) - Parent: Directive block at (0:0,0 [21] ) +Markup span at (21:0,21 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parser_ParsesNamespaceDirectiveToken_WithSingleSegment.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parser_ParsesNamespaceDirectiveToken_WithSingleSegment.stree.txt new file mode 100644 index 0000000000..1d64e3ae92 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/Parser_ParsesNamespaceDirectiveToken_WithSingleSegment.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..21)::21 - [@custom BaseNamespace] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..21)::21 + RazorDirective - [0..21)::21 - Directive:{custom;SingleLine;Unrestricted} + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..21)::20 + RazorMetaCode - [1..7)::6 - Gen - SpanEditHandler;Accepts:None + Identifier;[custom]; + CSharpCodeBlock - [7..21)::14 + CSharpStatementLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Whitespace + Whitespace;[ ]; + CSharpStatementLiteral - [8..21)::13 - [BaseNamespace] - Gen - DirectiveTokenEditHandler;Accepts:NonWhitespace + Identifier;[BaseNamespace]; + MarkupTextLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.cspans.txt new file mode 100644 index 0000000000..b0884a958a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [21] ) +MetaCode span at (1:0,1 [15] ) (Accepts:None) - Parent: Directive block at (0:0,0 [21] ) +Markup span at (16:0,16 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [21] ) +Code span at (17:0,17 [4] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [21] ) +Markup span at (21:0,21 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt new file mode 100644 index 0000000000..9ea983ad50 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt @@ -0,0 +1,19 @@ +RazorDocument - [0..21)::21 - [@removeTagHelper Foo"] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..21)::21 + RazorDirective - [0..21)::21 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..21)::20 + RazorMetaCode - [1..16)::15 - Gen - SpanEditHandler;Accepts:None + Identifier;[removeTagHelper]; + CSharpCodeBlock - [16..21)::5 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [17..21)::4 - [Foo"] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Identifier;[Foo]; + StringLiteral;["];RZ1000(20:0,20 [1] ) + MarkupTextLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_InvalidLookupText_AddsError.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_InvalidLookupText_AddsError.cspans.txt new file mode 100644 index 0000000000..a3ad9a1394 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_InvalidLookupText_AddsError.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [20] ) +MetaCode span at (1:0,1 [15] ) (Accepts:None) - Parent: Directive block at (0:0,0 [20] ) +Markup span at (16:0,16 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [20] ) +Code span at (17:0,17 [3] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [20] ) +Markup span at (20:0,20 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_InvalidLookupText_AddsError.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_InvalidLookupText_AddsError.stree.txt new file mode 100644 index 0000000000..6ca3c0b460 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_InvalidLookupText_AddsError.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..20)::20 - [@removeTagHelper Foo] + MarkupBlock - [0..20)::20 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..20)::20 + RazorDirective - [0..20)::20 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..20)::19 + RazorMetaCode - [1..16)::15 - Gen - SpanEditHandler;Accepts:None + Identifier;[removeTagHelper]; + CSharpCodeBlock - [16..20)::4 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [17..20)::3 - [Foo] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Identifier;[Foo]; + MarkupTextLiteral - [20..20)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_NoValue_Invalid.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_NoValue_Invalid.cspans.txt new file mode 100644 index 0000000000..0dfe38be7c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_NoValue_Invalid.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [19] ) +MetaCode span at (1:0,1 [15] ) (Accepts:None) - Parent: Directive block at (0:0,0 [19] ) +Markup span at (16:0,16 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [19] ) +Code span at (17:0,17 [2] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [19] ) +Markup span at (19:0,19 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_NoValue_Invalid.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_NoValue_Invalid.stree.txt new file mode 100644 index 0000000000..1fcd5587a5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_NoValue_Invalid.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..19)::19 - [@removeTagHelper ""] + MarkupBlock - [0..19)::19 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..19)::19 + RazorDirective - [0..19)::19 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..19)::18 + RazorMetaCode - [1..16)::15 - Gen - SpanEditHandler;Accepts:None + Identifier;[removeTagHelper]; + CSharpCodeBlock - [16..19)::3 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [17..19)::2 - [""] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + StringLiteral;[""]; + MarkupTextLiteral - [19..19)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_RequiresValue.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_RequiresValue.cspans.txt new file mode 100644 index 0000000000..a8d324c3dc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_RequiresValue.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +MetaCode span at (1:0,1 [15] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +Markup span at (16:0,16 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +Code span at (17:0,17 [0] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [17] ) +Markup span at (17:0,17 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_RequiresValue.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_RequiresValue.stree.txt new file mode 100644 index 0000000000..20a0666a00 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_RequiresValue.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..17)::17 - [@removeTagHelper ] + MarkupBlock - [0..17)::17 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..17)::17 + RazorDirective - [0..17)::17 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..17)::16 + RazorMetaCode - [1..16)::15 - Gen - SpanEditHandler;Accepts:None + Identifier;[removeTagHelper]; + CSharpCodeBlock - [16..17)::1 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [17..17)::0 - [] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Marker;[]; + MarkupTextLiteral - [17..17)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_SingleQuotes_AddsError.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_SingleQuotes_AddsError.cspans.txt new file mode 100644 index 0000000000..d9553ee9ff --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_SingleQuotes_AddsError.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [25] ) +MetaCode span at (1:0,1 [15] ) (Accepts:None) - Parent: Directive block at (0:0,0 [25] ) +Markup span at (16:0,16 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [25] ) +Code span at (17:0,17 [8] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [25] ) +Markup span at (25:0,25 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_SingleQuotes_AddsError.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_SingleQuotes_AddsError.stree.txt new file mode 100644 index 0000000000..7584b6d08b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_SingleQuotes_AddsError.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..25)::25 - [@removeTagHelper '*, Foo'] + MarkupBlock - [0..25)::25 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..25)::25 + RazorDirective - [0..25)::25 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..25)::24 + RazorMetaCode - [1..16)::15 - Gen - SpanEditHandler;Accepts:None + Identifier;[removeTagHelper]; + CSharpCodeBlock - [16..25)::9 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [17..25)::8 - ['*, Foo'] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + CharacterLiteral;['*, Foo']; + MarkupTextLiteral - [25..25)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.cspans.txt new file mode 100644 index 0000000000..b0884a958a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [21] ) +MetaCode span at (1:0,1 [15] ) (Accepts:None) - Parent: Directive block at (0:0,0 [21] ) +Markup span at (16:0,16 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [21] ) +Code span at (17:0,17 [4] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [21] ) +Markup span at (21:0,21 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt new file mode 100644 index 0000000000..41c54a8e5b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..21)::21 - [@removeTagHelper "Foo] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..21)::21 + RazorDirective - [0..21)::21 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..21)::20 + RazorMetaCode - [1..16)::15 - Gen - SpanEditHandler;Accepts:None + Identifier;[removeTagHelper]; + CSharpCodeBlock - [16..21)::5 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [17..21)::4 - ["Foo] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + StringLiteral;["Foo];RZ1000(17:0,17 [1] ) + MarkupTextLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_SupportsSpaces.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_SupportsSpaces.cspans.txt new file mode 100644 index 0000000000..71bf30f73f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_SupportsSpaces.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [35] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [35] ) +MetaCode span at (1:0,1 [15] ) (Accepts:None) - Parent: Directive block at (0:0,0 [35] ) +Markup span at (16:0,16 [5] ) (Accepts:None) - Parent: Directive block at (0:0,0 [35] ) +Code span at (21:0,21 [14] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [35] ) +Markup span at (35:0,35 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [35] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_SupportsSpaces.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_SupportsSpaces.stree.txt new file mode 100644 index 0000000000..e3062d1894 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_SupportsSpaces.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..35)::35 - [@removeTagHelper Foo, Bar ] + MarkupBlock - [0..35)::35 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..35)::35 + RazorDirective - [0..35)::35 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..35)::34 + RazorMetaCode - [1..16)::15 - Gen - SpanEditHandler;Accepts:None + Identifier;[removeTagHelper]; + CSharpCodeBlock - [16..35)::19 + MarkupTextLiteral - [16..21)::5 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [21..35)::14 - [Foo, Bar ] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Identifier;[Foo]; + Comma;[,]; + Whitespace;[ ]; + Identifier;[Bar]; + Whitespace;[ ]; + MarkupTextLiteral - [35..35)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.cspans.txt new file mode 100644 index 0000000000..b919e2b98c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [22] ) +MetaCode span at (1:0,1 [15] ) (Accepts:None) - Parent: Directive block at (0:0,0 [22] ) +Markup span at (16:0,16 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [22] ) +Code span at (17:0,17 [5] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [22] ) +Markup span at (22:0,22 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.stree.txt new file mode 100644 index 0000000000..92659f0769 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/RemoveTagHelperDirective_WithQuotes_InvalidLookupText_AddsError.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..22)::22 - [@removeTagHelper "Foo"] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..22)::22 + RazorDirective - [0..22)::22 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..22)::21 + RazorMetaCode - [1..16)::15 - Gen - SpanEditHandler;Accepts:None + Identifier;[removeTagHelper]; + CSharpCodeBlock - [16..22)::6 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [17..22)::5 - ["Foo"] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + StringLiteral;["Foo"]; + MarkupTextLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_EndQuoteRequiresDoubleQuotesAroundValue.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_EndQuoteRequiresDoubleQuotesAroundValue.cspans.txt new file mode 100644 index 0000000000..06a4f306a1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_EndQuoteRequiresDoubleQuotesAroundValue.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [24] ) +MetaCode span at (1:0,1 [15] ) (Accepts:None) - Parent: Directive block at (0:0,0 [24] ) +Markup span at (16:0,16 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [24] ) +Code span at (17:0,17 [7] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [24] ) +Markup span at (24:0,24 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt new file mode 100644 index 0000000000..757c8c81f0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_EndQuoteRequiresDoubleQuotesAroundValue.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..24)::24 - [@tagHelperPrefix Foo "] + MarkupBlock - [0..24)::24 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..24)::24 + RazorDirective - [0..24)::24 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..24)::23 + RazorMetaCode - [1..16)::15 - Gen - SpanEditHandler;Accepts:None + Identifier;[tagHelperPrefix]; + CSharpCodeBlock - [16..24)::8 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [17..24)::7 - [Foo "] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Identifier;[Foo]; + Whitespace;[ ]; + StringLiteral;["];RZ1000(23:0,23 [1] ) + MarkupTextLiteral - [24..24)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_NoValueSucceeds.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_NoValueSucceeds.cspans.txt new file mode 100644 index 0000000000..0dfe38be7c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_NoValueSucceeds.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [19] ) +MetaCode span at (1:0,1 [15] ) (Accepts:None) - Parent: Directive block at (0:0,0 [19] ) +Markup span at (16:0,16 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [19] ) +Code span at (17:0,17 [2] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [19] ) +Markup span at (19:0,19 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_NoValueSucceeds.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_NoValueSucceeds.stree.txt new file mode 100644 index 0000000000..ee06179c7f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_NoValueSucceeds.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..19)::19 - [@tagHelperPrefix ""] + MarkupBlock - [0..19)::19 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..19)::19 + RazorDirective - [0..19)::19 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..19)::18 + RazorMetaCode - [1..16)::15 - Gen - SpanEditHandler;Accepts:None + Identifier;[tagHelperPrefix]; + CSharpCodeBlock - [16..19)::3 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [17..19)::2 - [""] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + StringLiteral;[""]; + MarkupTextLiteral - [19..19)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_RequiresValue.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_RequiresValue.cspans.txt new file mode 100644 index 0000000000..a8d324c3dc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_RequiresValue.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +MetaCode span at (1:0,1 [15] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +Markup span at (16:0,16 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [17] ) +Code span at (17:0,17 [0] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [17] ) +Markup span at (17:0,17 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_RequiresValue.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_RequiresValue.stree.txt new file mode 100644 index 0000000000..0e86bb2dc2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_RequiresValue.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..17)::17 - [@tagHelperPrefix ] + MarkupBlock - [0..17)::17 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..17)::17 + RazorDirective - [0..17)::17 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..17)::16 + RazorMetaCode - [1..16)::15 - Gen - SpanEditHandler;Accepts:None + Identifier;[tagHelperPrefix]; + CSharpCodeBlock - [16..17)::1 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [17..17)::0 - [] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Marker;[]; + MarkupTextLiteral - [17..17)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_StartQuoteRequiresDoubleQuotesAroundValue.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_StartQuoteRequiresDoubleQuotesAroundValue.cspans.txt new file mode 100644 index 0000000000..b0884a958a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_StartQuoteRequiresDoubleQuotesAroundValue.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [21] ) +MetaCode span at (1:0,1 [15] ) (Accepts:None) - Parent: Directive block at (0:0,0 [21] ) +Markup span at (16:0,16 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [21] ) +Code span at (17:0,17 [4] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [21] ) +Markup span at (21:0,21 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt new file mode 100644 index 0000000000..3e26d675c8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_StartQuoteRequiresDoubleQuotesAroundValue.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..21)::21 - [@tagHelperPrefix "Foo] + MarkupBlock - [0..21)::21 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..21)::21 + RazorDirective - [0..21)::21 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..21)::20 + RazorMetaCode - [1..16)::15 - Gen - SpanEditHandler;Accepts:None + Identifier;[tagHelperPrefix]; + CSharpCodeBlock - [16..21)::5 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [17..21)::4 - ["Foo] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + StringLiteral;["Foo];RZ1000(17:0,17 [1] ) + MarkupTextLiteral - [21..21)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_Succeeds.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_Succeeds.cspans.txt new file mode 100644 index 0000000000..a3ad9a1394 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_Succeeds.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [20] ) +MetaCode span at (1:0,1 [15] ) (Accepts:None) - Parent: Directive block at (0:0,0 [20] ) +Markup span at (16:0,16 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [20] ) +Code span at (17:0,17 [3] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [20] ) +Markup span at (20:0,20 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_Succeeds.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_Succeeds.stree.txt new file mode 100644 index 0000000000..8b875e2851 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_Succeeds.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..20)::20 - [@tagHelperPrefix Foo] + MarkupBlock - [0..20)::20 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..20)::20 + RazorDirective - [0..20)::20 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..20)::19 + RazorMetaCode - [1..16)::15 - Gen - SpanEditHandler;Accepts:None + Identifier;[tagHelperPrefix]; + CSharpCodeBlock - [16..20)::4 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [17..20)::3 - [Foo] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + Identifier;[Foo]; + MarkupTextLiteral - [20..20)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_WithQuotes_Succeeds.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_WithQuotes_Succeeds.cspans.txt new file mode 100644 index 0000000000..b919e2b98c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_WithQuotes_Succeeds.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [22] ) +MetaCode span at (1:0,1 [15] ) (Accepts:None) - Parent: Directive block at (0:0,0 [22] ) +Markup span at (16:0,16 [1] ) (Accepts:None) - Parent: Directive block at (0:0,0 [22] ) +Code span at (17:0,17 [5] ) (Accepts:AnyExceptNewline) - Parent: Directive block at (0:0,0 [22] ) +Markup span at (22:0,22 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_WithQuotes_Succeeds.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_WithQuotes_Succeeds.stree.txt new file mode 100644 index 0000000000..1bbaa5ea09 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/TagHelperPrefixDirective_WithQuotes_Succeeds.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..22)::22 - [@tagHelperPrefix "Foo"] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..22)::22 + RazorDirective - [0..22)::22 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + RazorDirectiveBody - [1..22)::21 + RazorMetaCode - [1..16)::15 - Gen - SpanEditHandler;Accepts:None + Identifier;[tagHelperPrefix]; + CSharpCodeBlock - [16..22)::6 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [17..22)::5 - ["Foo"] - Gen - SpanEditHandler;Accepts:AnyExceptNewline + StringLiteral;["Foo"]; + MarkupTextLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures1.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures1.stree.txt new file mode 100644 index 0000000000..519c877aeb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures1.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..15)::15 - [] + MarkupBlock - [0..15)::15 + MarkupTagHelperElement - [0..15)::15 - input[StartTagAndEndTag] - InputTagHelper1 - InputTagHelper2 + MarkupTagHelperStartTag - [0..7)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [7..15)::8 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[input]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures1.tspans.txt new file mode 100644 index 0000000000..16070edad3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [15] ) - InputTagHelper1 - InputTagHelper2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures2.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures2.stree.txt new file mode 100644 index 0000000000..7e6e3e333d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures2.stree.txt @@ -0,0 +1,11 @@ +RazorDocument - [0..9)::9 - [] + MarkupBlock - [0..9)::9 + MarkupTagHelperElement - [0..9)::9 - input[SelfClosing] - InputTagHelper1 - InputTagHelper2 + MarkupTagHelperStartTag - [0..9)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMiscAttributeContent - [6..7)::1 + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures2.tspans.txt new file mode 100644 index 0000000000..455dab9ef7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [9] ) - InputTagHelper1 - InputTagHelper2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures3.cspans.txt new file mode 100644 index 0000000000..b60f44ce86 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures3.cspans.txt @@ -0,0 +1 @@ +Markup span at (13:0,13 [4] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures3.stree.txt new file mode 100644 index 0000000000..7e8026c0f4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures3.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..19)::19 - [] + MarkupBlock - [0..19)::19 + MarkupTagHelperElement - [0..19)::19 - input[StartTagOnly] - InputTagHelper1 - InputTagHelper2 + MarkupTagHelperStartTag - [0..19)::19 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..18)::12 - type - SingleQuotes - Unbound - [ type='text'] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..11)::4 - [type] - Gen - SpanEditHandler;Accepts:Any + Text;[type]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [13..17)::4 + MarkupLiteralAttributeValue - [13..17)::4 - [text] + MarkupTextLiteral - [13..17)::4 - [text] - Gen - SpanEditHandler;Accepts:Any + Text;[text]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures3.tspans.txt new file mode 100644 index 0000000000..1ad745ab0a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [19] ) - InputTagHelper1 - InputTagHelper2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures4.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures4.stree.txt new file mode 100644 index 0000000000..8bb6ec3a6b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures4.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..14)::14 - [] + MarkupBlock - [0..14)::14 + MarkupTagHelperElement - [0..7)::7 - input[StartTagOnly] - InputTagHelper1 - InputTagHelper2 + MarkupTagHelperStartTag - [0..7)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + MarkupTagHelperElement - [7..14)::7 - input[StartTagOnly] - InputTagHelper1 - InputTagHelper2 + MarkupTagHelperStartTag - [7..14)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures4.tspans.txt new file mode 100644 index 0000000000..4668eab0f5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures4.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [7] ) - InputTagHelper1 - InputTagHelper2 +TagHelper span at (7:0,7 [7] ) - InputTagHelper1 - InputTagHelper2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures5.cspans.txt new file mode 100644 index 0000000000..a258c3ec2a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures5.cspans.txt @@ -0,0 +1 @@ +Markup span at (13:0,13 [4] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures5.stree.txt new file mode 100644 index 0000000000..13abef1f59 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures5.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..27)::27 - [] + MarkupBlock - [0..27)::27 + MarkupTagHelperElement - [0..27)::27 - input[StartTagAndEndTag] - InputTagHelper1 - InputTagHelper2 + MarkupTagHelperStartTag - [0..19)::19 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..18)::12 - type - SingleQuotes - Unbound - [ type='text'] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..11)::4 - [type] - Gen - SpanEditHandler;Accepts:Any + Text;[type]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [13..17)::4 + MarkupLiteralAttributeValue - [13..17)::4 - [text] + MarkupTextLiteral - [13..17)::4 - [text] - Gen - SpanEditHandler;Accepts:Any + Text;[text]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTagHelperEndTag - [19..27)::8 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[input]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures5.tspans.txt new file mode 100644 index 0000000000..91e8a12872 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [27] ) - InputTagHelper1 - InputTagHelper2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures6.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures6.stree.txt new file mode 100644 index 0000000000..7e6e3e333d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures6.stree.txt @@ -0,0 +1,11 @@ +RazorDocument - [0..9)::9 - [] + MarkupBlock - [0..9)::9 + MarkupTagHelperElement - [0..9)::9 - input[SelfClosing] - InputTagHelper1 - InputTagHelper2 + MarkupTagHelperStartTag - [0..9)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMiscAttributeContent - [6..7)::1 + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures6.tspans.txt new file mode 100644 index 0000000000..455dab9ef7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures6.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [9] ) - InputTagHelper1 - InputTagHelper2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures7.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures7.stree.txt new file mode 100644 index 0000000000..7e6e3e333d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures7.stree.txt @@ -0,0 +1,11 @@ +RazorDocument - [0..9)::9 - [] + MarkupBlock - [0..9)::9 + MarkupTagHelperElement - [0..9)::9 - input[SelfClosing] - InputTagHelper1 - InputTagHelper2 + MarkupTagHelperStartTag - [0..9)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMiscAttributeContent - [6..7)::1 + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures7.tspans.txt new file mode 100644 index 0000000000..455dab9ef7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [9] ) - InputTagHelper1 - InputTagHelper2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures8.cspans.txt new file mode 100644 index 0000000000..e554bcd255 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures8.cspans.txt @@ -0,0 +1 @@ +Markup span at (7:0,7 [8] ) (Accepts:Any) - Parent: Tag block at (7:0,7 [8] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures8.stree.txt new file mode 100644 index 0000000000..3d9d0fd71c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures8.stree.txt @@ -0,0 +1,13 @@ +RazorDocument - [0..15)::15 - [] + MarkupBlock - [0..15)::15 + MarkupElement - [0..15)::15 + MarkupTagHelperElement - [0..7)::7 - input[StartTagOnly] - InputTagHelper1 - InputTagHelper2 + MarkupTagHelperStartTag - [0..7)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + MarkupEndTag - [7..15)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[input]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures8.tspans.txt new file mode 100644 index 0000000000..aa95134310 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/AllowsCompatibleTagStructures8.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [7] ) - InputTagHelper1 - InputTagHelper2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes1.cspans.txt new file mode 100644 index 0000000000..9b14508ec9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes1.cspans.txt @@ -0,0 +1 @@ +Code span at (18:0,18 [5] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [30] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes1.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes1.diag.txt new file mode 100644 index 0000000000..7854af144b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes1.diag.txt @@ -0,0 +1,5 @@ +(0,0): Error RZ3003: Invalid tag helper bound property '[item]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[item]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[(item)]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[(item)]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property '*something' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '*something' because the name contains a '*' character. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes1.stree.txt new file mode 100644 index 0000000000..8c4fc58380 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes1.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..30)::30 - [
                      ] + MarkupBlock - [0..30)::30 + MarkupTagHelperElement - [0..30)::30 - ul[StartTagAndEndTag] - CatchAllTagHelper + MarkupTagHelperStartTag - [0..25)::25 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[ul]; + MarkupMinimizedTagHelperAttribute - [3..9)::6 - bound - Minimized - Unbound - [ bound] + MarkupTextLiteral - [3..4)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [4..9)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + MarkupTagHelperAttribute - [9..24)::15 - [item] - SingleQuotes - Bound - [ [item]='items'] + MarkupTextLiteral - [9..10)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [10..16)::6 - [[item]] - Gen - SpanEditHandler;Accepts:Any + LeftBracket;[[]; + Text;[item]; + RightBracket;[]]; + Equals;[=]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [18..23)::5 + CSharpExpressionLiteral - [18..23)::5 - [items] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[items]; + MarkupTextLiteral - [23..24)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTagHelperEndTag - [25..30)::5 - [
                      ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[ul]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes1.tspans.txt new file mode 100644 index 0000000000..c4ad978332 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [30] ) - CatchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes2.cspans.txt new file mode 100644 index 0000000000..66cc617a5e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes2.cspans.txt @@ -0,0 +1 @@ +Code span at (20:0,20 [5] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [32] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes2.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes2.diag.txt new file mode 100644 index 0000000000..7854af144b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes2.diag.txt @@ -0,0 +1,5 @@ +(0,0): Error RZ3003: Invalid tag helper bound property '[item]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[item]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[(item)]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[(item)]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property '*something' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '*something' because the name contains a '*' character. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes2.stree.txt new file mode 100644 index 0000000000..d42f0e947d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes2.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..32)::32 - [
                        ] + MarkupBlock - [0..32)::32 + MarkupTagHelperElement - [0..32)::32 - ul[StartTagAndEndTag] - CatchAllTagHelper + MarkupTagHelperStartTag - [0..27)::27 - [
                          ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[ul]; + MarkupMinimizedTagHelperAttribute - [3..9)::6 - bound - Minimized - Unbound - [ bound] + MarkupTextLiteral - [3..4)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [4..9)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + MarkupTagHelperAttribute - [9..26)::17 - [(item)] - SingleQuotes - Bound - [ [(item)]='items'] + MarkupTextLiteral - [9..10)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [10..18)::8 - [[(item)]] - Gen - SpanEditHandler;Accepts:Any + LeftBracket;[[]; + Text;[(item)]; + RightBracket;[]]; + Equals;[=]; + MarkupTextLiteral - [19..20)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [20..25)::5 + CSharpExpressionLiteral - [20..25)::5 - [items] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[items]; + MarkupTextLiteral - [25..26)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTagHelperEndTag - [27..32)::5 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[ul]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes2.tspans.txt new file mode 100644 index 0000000000..8dc73d4362 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [32] ) - CatchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes3.cspans.txt new file mode 100644 index 0000000000..2dfc773ede --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes3.cspans.txt @@ -0,0 +1,2 @@ +Code span at (23:0,23 [13] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [55] ) +Markup span at (38:0,38 [8] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [55] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes3.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes3.diag.txt new file mode 100644 index 0000000000..7854af144b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes3.diag.txt @@ -0,0 +1,5 @@ +(0,0): Error RZ3003: Invalid tag helper bound property '[item]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[item]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[(item)]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[(item)]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property '*something' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '*something' because the name contains a '*' character. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes3.stree.txt new file mode 100644 index 0000000000..417309a6a7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes3.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..55)::55 - [] + MarkupBlock - [0..55)::55 + MarkupTagHelperElement - [0..55)::55 - button[StartTagAndEndTag] - CatchAllTagHelper + MarkupTagHelperStartTag - [0..38)::38 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[button]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes3.tspans.txt new file mode 100644 index 0000000000..9d626a71d7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [55] ) - CatchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes4.cspans.txt new file mode 100644 index 0000000000..668451676c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes4.cspans.txt @@ -0,0 +1,2 @@ +Code span at (24:0,24 [13] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [56] ) +Markup span at (39:0,39 [8] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [56] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes4.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes4.diag.txt new file mode 100644 index 0000000000..7854af144b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes4.diag.txt @@ -0,0 +1,5 @@ +(0,0): Error RZ3003: Invalid tag helper bound property '[item]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[item]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[(item)]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[(item)]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property '*something' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '*something' because the name contains a '*' character. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes4.stree.txt new file mode 100644 index 0000000000..b8664c7daa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes4.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..56)::56 - [] + MarkupBlock - [0..56)::56 + MarkupTagHelperElement - [0..56)::56 - button[StartTagAndEndTag] - CatchAllTagHelper + MarkupTagHelperStartTag - [0..39)::39 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[button]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes4.tspans.txt new file mode 100644 index 0000000000..1e7d20eb36 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [56] ) - CatchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes5.cspans.txt new file mode 100644 index 0000000000..4cfe9f7c9d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes5.cspans.txt @@ -0,0 +1 @@ +Markup span at (28:0,28 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [46] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes5.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes5.diag.txt new file mode 100644 index 0000000000..7854af144b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes5.diag.txt @@ -0,0 +1,5 @@ +(0,0): Error RZ3003: Invalid tag helper bound property '[item]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[item]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[(item)]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[(item)]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property '*something' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '*something' because the name contains a '*' character. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes5.stree.txt new file mode 100644 index 0000000000..b2c2be51a6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes5.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..46)::46 - [] + MarkupBlock - [0..46)::46 + MarkupTagHelperElement - [0..46)::46 - template[StartTagAndEndTag] - CatchAllTagHelper + MarkupTagHelperStartTag - [0..35)::35 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[template]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes5.tspans.txt new file mode 100644 index 0000000000..9666dfd4cc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [46] ) - CatchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes6.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes6.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes6.diag.txt new file mode 100644 index 0000000000..7854af144b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes6.diag.txt @@ -0,0 +1,5 @@ +(0,0): Error RZ3003: Invalid tag helper bound property '[item]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[item]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[(item)]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[(item)]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property '*something' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '*something' because the name contains a '*' character. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes6.stree.txt new file mode 100644 index 0000000000..343ff5e896 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes6.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..33)::33 - [
                        ] + MarkupBlock - [0..33)::33 + MarkupTagHelperElement - [0..33)::33 - div[StartTagAndEndTag] - CatchAllTagHelper + MarkupTagHelperStartTag - [0..27)::27 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + MarkupMinimizedTagHelperAttribute - [4..10)::6 - bound - Minimized - Unbound - [ bound] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..10)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + MarkupMinimizedTagHelperAttribute - [10..26)::16 - #localminimized - Minimized - Unbound - [ #localminimized] + MarkupTextLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [11..26)::15 - [#localminimized] - Gen - SpanEditHandler;Accepts:Any + Text;[#localminimized]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [27..33)::6 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes6.tspans.txt new file mode 100644 index 0000000000..a6c7ee0196 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes6.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [33] ) - CatchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes7.cspans.txt new file mode 100644 index 0000000000..a75e5a0d69 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes7.cspans.txt @@ -0,0 +1 @@ +Markup span at (19:0,19 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [32] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes7.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes7.diag.txt new file mode 100644 index 0000000000..7854af144b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes7.diag.txt @@ -0,0 +1,5 @@ +(0,0): Error RZ3003: Invalid tag helper bound property '[item]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[item]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[item]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[(item)]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a '[' character. +(0,0): Error RZ3003: Invalid tag helper bound property '[(item)]' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '[(item)]' because the name contains a ']' character. +(0,0): Error RZ3003: Invalid tag helper bound property '*something' on tag helper 'CatchAllTagHelper'. Tag helpers cannot bind to HTML attributes with name '*something' because the name contains a '*' character. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes7.stree.txt new file mode 100644 index 0000000000..aa7e2fe686 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes7.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..32)::32 - [
                        ] + MarkupBlock - [0..32)::32 + MarkupTagHelperElement - [0..32)::32 - div[StartTagAndEndTag] - CatchAllTagHelper + MarkupTagHelperStartTag - [0..26)::26 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + MarkupMinimizedTagHelperAttribute - [4..10)::6 - bound - Minimized - Unbound - [ bound] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..10)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + MarkupTagHelperAttribute - [10..25)::15 - #local - SingleQuotes - Bound - [ #local='value'] + MarkupTextLiteral - [10..11)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [11..17)::6 - [#local] - Gen - SpanEditHandler;Accepts:Any + Text;[#local]; + Equals;[=]; + MarkupTextLiteral - [18..19)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [19..24)::5 + MarkupTextLiteral - [19..24)::5 - [value] - Gen - SpanEditHandler;Accepts:Any + Text;[value]; + MarkupTextLiteral - [24..25)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTagHelperEndTag - [26..32)::6 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes7.tspans.txt new file mode 100644 index 0000000000..8dc73d4362 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleSymbolBoundAttributes7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [32] ) - CatchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure1.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure1.stree.txt new file mode 100644 index 0000000000..5a61ddfab0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure1.stree.txt @@ -0,0 +1,7 @@ +RazorDocument - [0..7)::7 - [] + MarkupBlock - [0..7)::7 + MarkupTagHelperElement - [0..7)::7 - input[StartTagOnly] - InputTagHelper + MarkupTagHelperStartTag - [0..7)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure1.tspans.txt new file mode 100644 index 0000000000..507d5a1ed9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [7] ) - InputTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure2.cspans.txt new file mode 100644 index 0000000000..b60f44ce86 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure2.cspans.txt @@ -0,0 +1 @@ +Markup span at (13:0,13 [4] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure2.stree.txt new file mode 100644 index 0000000000..06ae9e6c0d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure2.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..19)::19 - [] + MarkupBlock - [0..19)::19 + MarkupTagHelperElement - [0..19)::19 - input[StartTagOnly] - InputTagHelper + MarkupTagHelperStartTag - [0..19)::19 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..18)::12 - type - SingleQuotes - Unbound - [ type='text'] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..11)::4 - [type] - Gen - SpanEditHandler;Accepts:Any + Text;[type]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [13..17)::4 + MarkupLiteralAttributeValue - [13..17)::4 - [text] + MarkupTextLiteral - [13..17)::4 - [text] - Gen - SpanEditHandler;Accepts:Any + Text;[text]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure2.tspans.txt new file mode 100644 index 0000000000..0ea7cf09ec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [19] ) - InputTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure3.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure3.stree.txt new file mode 100644 index 0000000000..17f6f04e9a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure3.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..14)::14 - [] + MarkupBlock - [0..14)::14 + MarkupTagHelperElement - [0..7)::7 - input[StartTagOnly] - InputTagHelper + MarkupTagHelperStartTag - [0..7)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + MarkupTagHelperElement - [7..14)::7 - input[StartTagOnly] - InputTagHelper + MarkupTagHelperStartTag - [7..14)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure3.tspans.txt new file mode 100644 index 0000000000..533ebe3e15 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure3.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [7] ) - InputTagHelper +TagHelper span at (7:0,7 [7] ) - InputTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure4.cspans.txt new file mode 100644 index 0000000000..b60f44ce86 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure4.cspans.txt @@ -0,0 +1 @@ +Markup span at (13:0,13 [4] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure4.stree.txt new file mode 100644 index 0000000000..14a832acc5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure4.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..26)::26 - [] + MarkupBlock - [0..26)::26 + MarkupTagHelperElement - [0..19)::19 - input[StartTagOnly] - InputTagHelper + MarkupTagHelperStartTag - [0..19)::19 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..18)::12 - type - SingleQuotes - Unbound - [ type='text'] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..11)::4 - [type] - Gen - SpanEditHandler;Accepts:Any + Text;[type]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [13..17)::4 + MarkupLiteralAttributeValue - [13..17)::4 - [text] + MarkupTextLiteral - [13..17)::4 - [text] - Gen - SpanEditHandler;Accepts:Any + Text;[text]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTagHelperElement - [19..26)::7 - input[StartTagOnly] - InputTagHelper + MarkupTagHelperStartTag - [19..26)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure4.tspans.txt new file mode 100644 index 0000000000..cf1d9627ee --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure4.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [19] ) - InputTagHelper +TagHelper span at (19:0,19 [7] ) - InputTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure5.cspans.txt new file mode 100644 index 0000000000..e757d8a3f7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure5.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (19:0,19 [6] ) (Accepts:Any) - Parent: Tag block at (19:0,19 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure5.stree.txt new file mode 100644 index 0000000000..b1c2556772 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure5.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..25)::25 - [
                        ] + MarkupBlock - [0..25)::25 + MarkupElement - [0..25)::25 + MarkupStartTag - [0..5)::5 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTagHelperElement - [5..12)::7 - input[StartTagOnly] - InputTagHelper + MarkupTagHelperStartTag - [5..12)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + MarkupTagHelperElement - [12..19)::7 - input[StartTagOnly] - InputTagHelper + MarkupTagHelperStartTag - [12..19)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + MarkupEndTag - [19..25)::6 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure5.tspans.txt new file mode 100644 index 0000000000..f380f7abd5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CanHandleWithoutEndTagTagStructure5.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (5:0,5 [7] ) - InputTagHelper +TagHelper span at (12:0,12 [7] ) - InputTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes1.cspans.txt new file mode 100644 index 0000000000..aa429ff6cb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes1.cspans.txt @@ -0,0 +1 @@ +Code span at (13:0,13 [0] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes1.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes1.diag.txt new file mode 100644 index 0000000000..c11ff99be0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes1.diag.txt @@ -0,0 +1 @@ +(1,7): Error RZ2008: Attribute 'bound' on tag helper element 'myth' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes1.stree.txt new file mode 100644 index 0000000000..569dcbeaf8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes1.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..17)::17 - [] + MarkupBlock - [0..17)::17 + MarkupTagHelperElement - [0..17)::17 - myth[SelfClosing] - mythTagHelper + MarkupTagHelperStartTag - [0..17)::17 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[myth]; + MarkupTagHelperAttribute - [5..14)::9 - bound - SingleQuotes - Bound - [ bound=''] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [13..13)::0 + CSharpExpressionLiteral - [13..13)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + MarkupTextLiteral - [13..14)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [14..15)::1 + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes1.tspans.txt new file mode 100644 index 0000000000..2835be7bef --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [17] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes10.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes10.cspans.txt new file mode 100644 index 0000000000..aa429ff6cb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes10.cspans.txt @@ -0,0 +1 @@ +Code span at (13:0,13 [0] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes10.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes10.diag.txt new file mode 100644 index 0000000000..d57ce479b5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes10.diag.txt @@ -0,0 +1 @@ +(1,7): Error RZ2008: Attribute 'BouND' on tag helper element 'myth' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes10.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes10.stree.txt new file mode 100644 index 0000000000..073c868ffa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes10.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..17)::17 - [] + MarkupBlock - [0..17)::17 + MarkupTagHelperElement - [0..17)::17 - myth[SelfClosing] - mythTagHelper + MarkupTagHelperStartTag - [0..17)::17 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[myth]; + MarkupTagHelperAttribute - [5..14)::9 - BouND - SingleQuotes - Bound - [ BouND=''] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [BouND] - Gen - SpanEditHandler;Accepts:Any + Text;[BouND]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [13..13)::0 + CSharpExpressionLiteral - [13..13)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + MarkupTextLiteral - [13..14)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [14..15)::1 + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes10.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes10.tspans.txt new file mode 100644 index 0000000000..2835be7bef --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes10.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [17] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes11.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes11.cspans.txt new file mode 100644 index 0000000000..92552dfb4e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes11.cspans.txt @@ -0,0 +1,2 @@ +Code span at (13:0,13 [0] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [29] ) +Code span at (25:0,25 [0] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [29] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes11.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes11.diag.txt new file mode 100644 index 0000000000..9739cf1558 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes11.diag.txt @@ -0,0 +1,2 @@ +(1,7): Error RZ2008: Attribute 'BOUND' on tag helper element 'myth' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. +(1,19): Error RZ2008: Attribute 'bOUnd' on tag helper element 'myth' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes11.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes11.stree.txt new file mode 100644 index 0000000000..4a3b4d140a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes11.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..29)::29 - [] + MarkupBlock - [0..29)::29 + MarkupTagHelperElement - [0..29)::29 - myth[SelfClosing] - mythTagHelper + MarkupTagHelperStartTag - [0..29)::29 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[myth]; + MarkupTagHelperAttribute - [5..14)::9 - BOUND - SingleQuotes - Bound - [ BOUND=''] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [BOUND] - Gen - SpanEditHandler;Accepts:Any + Text;[BOUND]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [13..13)::0 + CSharpExpressionLiteral - [13..13)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + MarkupTextLiteral - [13..14)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttribute - [14..26)::12 - bOUnd - DoubleQuotes - Bound - [ bOUnd=""] + MarkupTextLiteral - [14..18)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [18..23)::5 - [bOUnd] - Gen - SpanEditHandler;Accepts:Any + Text;[bOUnd]; + Equals;[=]; + MarkupTextLiteral - [24..25)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [25..25)::0 + CSharpExpressionLiteral - [25..25)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + MarkupTextLiteral - [25..26)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [26..27)::1 + MarkupTextLiteral - [26..27)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes11.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes11.tspans.txt new file mode 100644 index 0000000000..c8af5cb7b8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes11.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [29] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes12.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes12.cspans.txt new file mode 100644 index 0000000000..228e1bbc94 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes12.cspans.txt @@ -0,0 +1,2 @@ +Code span at (12:0,12 [0] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [32] ) +Markup span at (19:0,19 [4] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [32] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes12.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes12.diag.txt new file mode 100644 index 0000000000..52810ad2c0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes12.diag.txt @@ -0,0 +1 @@ +(1,7): Error RZ2008: Attribute 'BOUND' on tag helper element 'myth' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes12.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes12.stree.txt new file mode 100644 index 0000000000..b7e9a4d5db --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes12.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..32)::32 - [] + MarkupBlock - [0..32)::32 + MarkupTagHelperElement - [0..32)::32 - myth[StartTagAndEndTag] - mythTagHelper + MarkupTagHelperStartTag - [0..25)::25 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[myth]; + MarkupTagHelperAttribute - [5..12)::7 - BOUND - DoubleQuotes - Bound - [ BOUND=] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [BOUND] - Gen - SpanEditHandler;Accepts:Any + Text;[BOUND]; + Equals;[=]; + MarkupTagHelperAttributeValue - [12..12)::0 + CSharpExpressionLiteral - [12..12)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + MarkupTagHelperAttribute - [12..24)::12 - nAMe - SingleQuotes - Bound - [ nAMe='john'] + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [13..17)::4 - [nAMe] - Gen - SpanEditHandler;Accepts:Any + Text;[nAMe]; + Equals;[=]; + MarkupTextLiteral - [18..19)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [19..23)::4 + MarkupTextLiteral - [19..23)::4 - [john] - Gen - SpanEditHandler;Accepts:Any + Text;[john]; + MarkupTextLiteral - [23..24)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTagHelperEndTag - [25..32)::7 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[myth]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes12.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes12.tspans.txt new file mode 100644 index 0000000000..f6beb36090 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes12.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [32] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes13.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes13.cspans.txt new file mode 100644 index 0000000000..7fafd220d5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes13.cspans.txt @@ -0,0 +1,4 @@ +Code span at (13:0,13 [4] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [9] ) +Code span at (17:0,17 [1] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (17:0,17 [5] ) +Code span at (18:0,18 [4] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (17:0,17 [5] ) +Code span at (22:0,22 [2] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [11] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes13.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes13.stree.txt new file mode 100644 index 0000000000..8a1c10c10d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes13.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..28)::28 - [] + MarkupBlock - [0..28)::28 + MarkupTagHelperElement - [0..28)::28 - myth[SelfClosing] - mythTagHelper + MarkupTagHelperStartTag - [0..28)::28 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[myth]; + MarkupTagHelperAttribute - [5..25)::20 - bound - SingleQuotes - Bound - [ bound=' @true '] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [13..24)::11 + MarkupBlock - [13..22)::9 + CSharpExpressionLiteral - [13..17)::4 - [ ] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Whitespace;[ ]; + CSharpCodeBlock - [17..22)::5 + CSharpImplicitExpression - [17..22)::5 + CSharpTransition - [17..17)::0 + Transition;[]; + CSharpImplicitExpressionBody - [17..22)::5 + CSharpCodeBlock - [17..22)::5 + CSharpExpressionLiteral - [17..18)::1 - [@] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Transition;[@]; + CSharpExpressionLiteral - [18..22)::4 - [true] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Keyword;[true]; + CSharpExpressionLiteral - [22..24)::2 - [ ] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Whitespace;[ ]; + MarkupTextLiteral - [24..25)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [25..26)::1 + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes13.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes13.tspans.txt new file mode 100644 index 0000000000..303ab8debe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes13.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [28] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes14.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes14.cspans.txt new file mode 100644 index 0000000000..f70a554673 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes14.cspans.txt @@ -0,0 +1,6 @@ +Code span at (13:0,13 [4] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [11] ) +Code span at (17:0,17 [1] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (17:0,17 [7] ) +Code span at (18:0,18 [1] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (17:0,17 [7] ) +Code span at (19:0,19 [4] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (17:0,17 [7] ) +Code span at (23:0,23 [1] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (17:0,17 [7] ) +Code span at (24:0,24 [2] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes14.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes14.stree.txt new file mode 100644 index 0000000000..2a9079aef2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes14.stree.txt @@ -0,0 +1,41 @@ +RazorDocument - [0..30)::30 - [] + MarkupBlock - [0..30)::30 + MarkupTagHelperElement - [0..30)::30 - myth[SelfClosing] - mythTagHelper + MarkupTagHelperStartTag - [0..30)::30 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[myth]; + MarkupTagHelperAttribute - [5..27)::22 - bound - SingleQuotes - Bound - [ bound=' @(true) '] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [13..26)::13 + MarkupBlock - [13..24)::11 + CSharpExpressionLiteral - [13..17)::4 - [ ] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Whitespace;[ ]; + CSharpCodeBlock - [17..24)::7 + CSharpImplicitExpression - [17..24)::7 + CSharpTransition - [17..17)::0 + Transition;[]; + CSharpImplicitExpressionBody - [17..24)::7 + CSharpCodeBlock - [17..24)::7 + CSharpExpressionLiteral - [17..18)::1 - [@] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Transition;[@]; + CSharpExpressionLiteral - [18..19)::1 - [(] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + LeftParenthesis;[(]; + CSharpExpressionLiteral - [19..23)::4 - [true] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Keyword;[true]; + CSharpExpressionLiteral - [23..24)::1 - [)] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + RightParenthesis;[)]; + CSharpExpressionLiteral - [24..26)::2 - [ ] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Whitespace;[ ]; + MarkupTextLiteral - [26..27)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [27..28)::1 + MarkupTextLiteral - [27..28)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes14.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes14.tspans.txt new file mode 100644 index 0000000000..5e6577587f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes14.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [30] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes2.cspans.txt new file mode 100644 index 0000000000..f8351f76e8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes2.cspans.txt @@ -0,0 +1 @@ +Code span at (13:0,13 [8] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [25] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes2.stree.txt new file mode 100644 index 0000000000..2ee082dd17 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes2.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..25)::25 - [] + MarkupBlock - [0..25)::25 + MarkupTagHelperElement - [0..25)::25 - myth[SelfClosing] - mythTagHelper + MarkupTagHelperStartTag - [0..25)::25 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[myth]; + MarkupTagHelperAttribute - [5..22)::17 - bound - SingleQuotes - Bound - [ bound=' true'] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [13..21)::8 + CSharpExpressionLiteral - [13..21)::8 - [ true] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Whitespace;[ ]; + Text;[true]; + MarkupTextLiteral - [21..22)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [22..23)::1 + MarkupTextLiteral - [22..23)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes2.tspans.txt new file mode 100644 index 0000000000..002029ae1e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [25] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes3.cspans.txt new file mode 100644 index 0000000000..d5ea717f81 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes3.cspans.txt @@ -0,0 +1 @@ +Code span at (13:0,13 [4] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes3.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes3.diag.txt new file mode 100644 index 0000000000..c11ff99be0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes3.diag.txt @@ -0,0 +1 @@ +(1,7): Error RZ2008: Attribute 'bound' on tag helper element 'myth' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes3.stree.txt new file mode 100644 index 0000000000..43d705d118 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes3.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..21)::21 - [] + MarkupBlock - [0..21)::21 + MarkupTagHelperElement - [0..21)::21 - myth[SelfClosing] - mythTagHelper + MarkupTagHelperStartTag - [0..21)::21 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[myth]; + MarkupTagHelperAttribute - [5..18)::13 - bound - SingleQuotes - Bound - [ bound=' '] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [13..17)::4 + CSharpExpressionLiteral - [13..17)::4 - [ ] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Whitespace;[ ]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [18..19)::1 + MarkupTextLiteral - [18..19)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes3.tspans.txt new file mode 100644 index 0000000000..05e209c319 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [21] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes4.cspans.txt new file mode 100644 index 0000000000..dddc839de0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes4.cspans.txt @@ -0,0 +1,2 @@ +Code span at (13:0,13 [0] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [27] ) +Code span at (23:0,23 [0] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes4.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes4.diag.txt new file mode 100644 index 0000000000..9a927a8ecb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes4.diag.txt @@ -0,0 +1,2 @@ +(1,7): Error RZ2008: Attribute 'bound' on tag helper element 'myth' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. +(1,17): Error RZ2008: Attribute 'bound' on tag helper element 'myth' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes4.stree.txt new file mode 100644 index 0000000000..710ffe6a91 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes4.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..27)::27 - [] + MarkupBlock - [0..27)::27 + MarkupTagHelperElement - [0..27)::27 - myth[SelfClosing] - mythTagHelper + MarkupTagHelperStartTag - [0..27)::27 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[myth]; + MarkupTagHelperAttribute - [5..14)::9 - bound - SingleQuotes - Bound - [ bound=''] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [13..13)::0 + CSharpExpressionLiteral - [13..13)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + MarkupTextLiteral - [13..14)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttribute - [14..24)::10 - bound - DoubleQuotes - Bound - [ bound=""] + MarkupTextLiteral - [14..16)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [16..21)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + Equals;[=]; + MarkupTextLiteral - [22..23)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [23..23)::0 + CSharpExpressionLiteral - [23..23)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + MarkupTextLiteral - [23..24)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [24..25)::1 + MarkupTextLiteral - [24..25)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes4.tspans.txt new file mode 100644 index 0000000000..dc2eb23533 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [27] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes5.cspans.txt new file mode 100644 index 0000000000..bd305a47b6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes5.cspans.txt @@ -0,0 +1,2 @@ +Code span at (13:0,13 [1] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [30] ) +Code span at (24:0,24 [2] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [30] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes5.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes5.diag.txt new file mode 100644 index 0000000000..f16283e328 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes5.diag.txt @@ -0,0 +1,2 @@ +(1,7): Error RZ2008: Attribute 'bound' on tag helper element 'myth' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. +(1,18): Error RZ2008: Attribute 'bound' on tag helper element 'myth' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes5.stree.txt new file mode 100644 index 0000000000..f7c9bea081 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes5.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..30)::30 - [] + MarkupBlock - [0..30)::30 + MarkupTagHelperElement - [0..30)::30 - myth[SelfClosing] - mythTagHelper + MarkupTagHelperStartTag - [0..30)::30 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[myth]; + MarkupTagHelperAttribute - [5..15)::10 - bound - SingleQuotes - Bound - [ bound=' '] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [13..14)::1 + CSharpExpressionLiteral - [13..14)::1 - [ ] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Whitespace;[ ]; + MarkupTextLiteral - [14..15)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttribute - [15..27)::12 - bound - DoubleQuotes - Bound - [ bound=" "] + MarkupTextLiteral - [15..17)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [17..22)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + Equals;[=]; + MarkupTextLiteral - [23..24)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [24..26)::2 + CSharpExpressionLiteral - [24..26)::2 - [ ] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Whitespace;[ ]; + MarkupTextLiteral - [26..27)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [27..28)::1 + MarkupTextLiteral - [27..28)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes5.tspans.txt new file mode 100644 index 0000000000..5e6577587f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [30] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes6.cspans.txt new file mode 100644 index 0000000000..ee1acf6e62 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes6.cspans.txt @@ -0,0 +1,2 @@ +Code span at (13:0,13 [4] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [29] ) +Code span at (25:0,25 [0] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [29] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes6.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes6.diag.txt new file mode 100644 index 0000000000..7993f8fe1b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes6.diag.txt @@ -0,0 +1 @@ +(1,20): Error RZ2008: Attribute 'bound' on tag helper element 'myth' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes6.stree.txt new file mode 100644 index 0000000000..5443e52234 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes6.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..29)::29 - [] + MarkupBlock - [0..29)::29 + MarkupTagHelperElement - [0..29)::29 - myth[SelfClosing] - mythTagHelper + MarkupTagHelperStartTag - [0..29)::29 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[myth]; + MarkupTagHelperAttribute - [5..18)::13 - bound - SingleQuotes - Bound - [ bound='true'] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [13..17)::4 + CSharpExpressionLiteral - [13..17)::4 - [true] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[true]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttribute - [18..25)::7 - bound - DoubleQuotes - Bound - [ bound=] + MarkupTextLiteral - [18..19)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [19..24)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + Equals;[=]; + MarkupTagHelperAttributeValue - [25..25)::0 + CSharpExpressionLiteral - [25..25)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + MarkupMiscAttributeContent - [25..27)::2 + MarkupTextLiteral - [25..27)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes6.tspans.txt new file mode 100644 index 0000000000..c8af5cb7b8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes6.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [29] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes7.cspans.txt new file mode 100644 index 0000000000..ebd5438288 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes7.cspans.txt @@ -0,0 +1,2 @@ +Code span at (12:0,12 [0] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [23] ) +Markup span at (19:0,19 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes7.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes7.diag.txt new file mode 100644 index 0000000000..c11ff99be0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes7.diag.txt @@ -0,0 +1 @@ +(1,7): Error RZ2008: Attribute 'bound' on tag helper element 'myth' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes7.stree.txt new file mode 100644 index 0000000000..6ad9c9e82a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes7.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..23)::23 - [] + MarkupBlock - [0..23)::23 + MarkupTagHelperElement - [0..23)::23 - myth[SelfClosing] - mythTagHelper + MarkupTagHelperStartTag - [0..23)::23 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[myth]; + MarkupTagHelperAttribute - [5..12)::7 - bound - DoubleQuotes - Bound - [ bound=] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + Equals;[=]; + MarkupTagHelperAttributeValue - [12..12)::0 + CSharpExpressionLiteral - [12..12)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + MarkupTagHelperAttribute - [12..20)::8 - name - SingleQuotes - Bound - [ name=''] + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [13..17)::4 - [name] - Gen - SpanEditHandler;Accepts:Any + Text;[name]; + Equals;[=]; + MarkupTextLiteral - [18..19)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [19..19)::0 + MarkupTextLiteral - [19..19)::0 - [] + MarkupTextLiteral - [19..20)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [20..21)::1 + MarkupTextLiteral - [20..21)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes7.tspans.txt new file mode 100644 index 0000000000..17b38715bc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [23] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes8.cspans.txt new file mode 100644 index 0000000000..ecee8c7015 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes8.cspans.txt @@ -0,0 +1,2 @@ +Code span at (12:0,12 [0] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [25] ) +Markup span at (19:0,19 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [25] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes8.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes8.diag.txt new file mode 100644 index 0000000000..c11ff99be0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes8.diag.txt @@ -0,0 +1 @@ +(1,7): Error RZ2008: Attribute 'bound' on tag helper element 'myth' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes8.stree.txt new file mode 100644 index 0000000000..e62ea27a5e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes8.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..25)::25 - [] + MarkupBlock - [0..25)::25 + MarkupTagHelperElement - [0..25)::25 - myth[SelfClosing] - mythTagHelper + MarkupTagHelperStartTag - [0..25)::25 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[myth]; + MarkupTagHelperAttribute - [5..12)::7 - bound - DoubleQuotes - Bound - [ bound=] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + Equals;[=]; + MarkupTagHelperAttributeValue - [12..12)::0 + CSharpExpressionLiteral - [12..12)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + MarkupTagHelperAttribute - [12..22)::10 - name - SingleQuotes - Bound - [ name=' '] + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [13..17)::4 - [name] - Gen - SpanEditHandler;Accepts:Any + Text;[name]; + Equals;[=]; + MarkupTextLiteral - [18..19)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [19..21)::2 + MarkupTextLiteral - [19..21)::2 - [ ] + Whitespace;[ ]; + MarkupTextLiteral - [21..22)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [22..23)::1 + MarkupTextLiteral - [22..23)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes8.tspans.txt new file mode 100644 index 0000000000..002029ae1e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes8.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [25] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes9.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes9.cspans.txt new file mode 100644 index 0000000000..9e481866b7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes9.cspans.txt @@ -0,0 +1,4 @@ +Code span at (13:0,13 [4] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [46] ) +Markup span at (25:0,25 [4] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [46] ) +Code span at (37:0,37 [0] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [46] ) +Markup span at (43:0,43 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [46] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes9.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes9.diag.txt new file mode 100644 index 0000000000..356a13e234 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes9.diag.txt @@ -0,0 +1 @@ +(1,32): Error RZ2008: Attribute 'bound' on tag helper element 'myth' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes9.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes9.stree.txt new file mode 100644 index 0000000000..d326cc13d1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes9.stree.txt @@ -0,0 +1,53 @@ +RazorDocument - [0..46)::46 - [] + MarkupBlock - [0..46)::46 + MarkupTagHelperElement - [0..46)::46 - myth[SelfClosing] - mythTagHelper + MarkupTagHelperStartTag - [0..46)::46 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[myth]; + MarkupTagHelperAttribute - [5..18)::13 - bound - SingleQuotes - Bound - [ bound='true'] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [13..17)::4 + CSharpExpressionLiteral - [13..17)::4 - [true] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[true]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttribute - [18..30)::12 - name - SingleQuotes - Bound - [ name='john'] + MarkupTextLiteral - [18..19)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [19..23)::4 - [name] - Gen - SpanEditHandler;Accepts:Any + Text;[name]; + Equals;[=]; + MarkupTextLiteral - [24..25)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [25..29)::4 + MarkupTextLiteral - [25..29)::4 - [john] - Gen - SpanEditHandler;Accepts:Any + Text;[john]; + MarkupTextLiteral - [29..30)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttribute - [30..37)::7 - bound - DoubleQuotes - Bound - [ bound=] + MarkupTextLiteral - [30..31)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [31..36)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + Equals;[=]; + MarkupTagHelperAttributeValue - [37..37)::0 + CSharpExpressionLiteral - [37..37)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + MarkupTagHelperAttribute - [37..43)::6 - name - DoubleQuotes - Bound - [ name=] + MarkupTextLiteral - [37..38)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [38..42)::4 - [name] - Gen - SpanEditHandler;Accepts:Any + Text;[name]; + Equals;[=]; + MarkupTagHelperAttributeValue - [43..43)::0 + MarkupTextLiteral - [43..43)::0 - [] + MarkupMiscAttributeContent - [43..44)::1 + MarkupTextLiteral - [43..44)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes9.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes9.tspans.txt new file mode 100644 index 0000000000..f578bb25fe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes9.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [46] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper1.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper1.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper1.diag.txt new file mode 100644 index 0000000000..b0e5b255ec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper1.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper1.stree.txt new file mode 100644 index 0000000000..0f370fff09 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper1.stree.txt @@ -0,0 +1,7 @@ +RazorDocument - [0..2)::2 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper1.tspans.txt new file mode 100644 index 0000000000..d9746775d1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [2] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper2.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper2.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper2.diag.txt new file mode 100644 index 0000000000..256c57cb9c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper2.diag.txt @@ -0,0 +1 @@ +(1,6): Error RZ1035: Missing close angle for tag helper 'p'. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper2.stree.txt new file mode 100644 index 0000000000..950d7f704e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper2.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..6)::6 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [3..6)::3 - []; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper2.tspans.txt new file mode 100644 index 0000000000..aae2c81a5e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [6] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper3.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper3.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper3.diag.txt new file mode 100644 index 0000000000..581b6ea348 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper3.diag.txt @@ -0,0 +1,3 @@ +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,5): Error RZ1035: Missing close angle for tag helper 'strong'. +(1,5): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper3.stree.txt new file mode 100644 index 0000000000..f4aaf2a54f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper3.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..10)::10 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..10)::7 - strong[StartTagAndEndTag] - strongtaghelper + MarkupTagHelperStartTag - [3..10)::7 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper3.tspans.txt new file mode 100644 index 0000000000..07be06becb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper3.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [10] ) - ptaghelper +TagHelper span at (3:0,3 [7] ) - strongtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper4.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper4.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper4.diag.txt new file mode 100644 index 0000000000..e846c7e408 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper4.diag.txt @@ -0,0 +1,3 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'strong'. +(1,2): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,10): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper4.stree.txt new file mode 100644 index 0000000000..ac5ad19b0f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper4.stree.txt @@ -0,0 +1,15 @@ +RazorDocument - [0..11)::11 - [] + MarkupBlock - [0..11)::11 + MarkupTagHelperElement - [0..11)::11 - strong[StartTagAndEndTag] - strongtaghelper + MarkupTagHelperStartTag - [0..8)::8 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupMiscAttributeContent - [7..8)::1 + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[]; + MarkupTagHelperElement - [8..11)::3 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [8..11)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper4.tspans.txt new file mode 100644 index 0000000000..46d677fdef --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper4.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [11] ) - strongtaghelper +TagHelper span at (8:0,8 [3] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper5.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper5.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper5.diag.txt new file mode 100644 index 0000000000..83865622a4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper5.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'strong'. +(1,11): Error RZ1035: Missing close angle for tag helper 'strong'. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper5.stree.txt new file mode 100644 index 0000000000..cd7a0e4705 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper5.stree.txt @@ -0,0 +1,15 @@ +RazorDocument - [0..16)::16 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupMiscAttributeContent - [7..8)::1 + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[]; + MarkupTagHelperEndTag - [8..16)::8 - []; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper5.tspans.txt new file mode 100644 index 0000000000..fd2821234a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [16] ) - strongtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper6.cspans.txt new file mode 100644 index 0000000000..17f87ed7c0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper6.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [1] ) +Markup span at (1:0,1 [1] ) (Accepts:Any) - Parent: Tag block at (1:0,1 [1] ) +Markup span at (2:0,2 [9] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [9] ) +Markup span at (11:0,11 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) +Markup span at (12:0,12 [1] ) (Accepts:Any) - Parent: Tag block at (12:0,12 [1] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper6.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper6.diag.txt new file mode 100644 index 0000000000..7317861d0c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper6.diag.txt @@ -0,0 +1,2 @@ +(1,5): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,15): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper6.stree.txt new file mode 100644 index 0000000000..a62747a393 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper6.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..16)::16 - [<< <

                        ] + MarkupBlock - [0..16)::16 + MarkupElement - [0..1)::1 + MarkupStartTag - [0..1)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupElement - [1..2)::1 + MarkupStartTag - [1..2)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupElement - [2..11)::9 + MarkupEndTag - [2..11)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [11..12)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupElement - [12..13)::1 + MarkupStartTag - [12..13)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperElement - [13..16)::3 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [13..16)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper6.tspans.txt new file mode 100644 index 0000000000..ad070562db --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper6.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (13:0,13 [3] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper7.cspans.txt new file mode 100644 index 0000000000..abec4f6747 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper7.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [1] ) +Markup span at (1:0,1 [1] ) (Accepts:Any) - Parent: Tag block at (1:0,1 [1] ) +Markup span at (10:0,10 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [14] ) +Markup span at (12:0,12 [1] ) (Accepts:Any) - Parent: Tag block at (12:0,12 [1] ) +Markup span at (13:0,13 [2] ) (Accepts:Any) - Parent: Tag block at (13:0,13 [2] ) +Markup span at (15:0,15 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [14] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper7.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper7.diag.txt new file mode 100644 index 0000000000..299623f22a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper7.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper7.stree.txt new file mode 100644 index 0000000000..df48745607 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper7.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..16)::16 - [<<> <<>>] + MarkupBlock - [0..16)::16 + MarkupElement - [0..1)::1 + MarkupStartTag - [0..1)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupElement - [1..2)::1 + MarkupStartTag - [1..2)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperElement - [2..16)::14 - strong[StartTagAndEndTag] - strongtaghelper + MarkupTagHelperStartTag - [2..10)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [10..12)::2 - [> ] - Gen - SpanEditHandler;Accepts:Any + CloseAngle;[>]; + Whitespace;[ ]; + MarkupElement - [12..13)::1 + MarkupStartTag - [12..13)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupElement - [13..16)::3 + MarkupStartTag - [13..15)::2 - [<>] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[>]; + MarkupTextLiteral - [15..16)::1 - [>] - Gen - SpanEditHandler;Accepts:Any + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper7.tspans.txt new file mode 100644 index 0000000000..9bcd022232 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [14] ) - strongtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper8.cspans.txt new file mode 100644 index 0000000000..81f3b86186 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper8.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (0:0,0 [4] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [4] ) +Markup span at (12:0,12 [4] ) (Accepts:Any) - Parent: Tag block at (12:0,12 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper8.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper8.diag.txt new file mode 100644 index 0000000000..fbfae8923a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper8.diag.txt @@ -0,0 +1 @@ +(1,15): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper8.stree.txt new file mode 100644 index 0000000000..99965ff2a8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper8.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..25)::25 - [

                        ] + MarkupBlock - [0..25)::25 + MarkupElement - [0..25)::25 + MarkupStartTag - [0..4)::4 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[str]; + CloseAngle;[]; + MarkupTagHelperElement - [4..25)::21 - strong[StartTagAndEndTag] - strongtaghelper + MarkupTagHelperStartTag - [4..12)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupElement - [12..16)::4 + MarkupEndTag - [12..16)::4 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [16..25)::9 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper8.tspans.txt new file mode 100644 index 0000000000..e87eb3d4c5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelper8.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (4:0,4 [21] ) - strongtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes1.cspans.txt new file mode 100644 index 0000000000..480329cced --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes1.cspans.txt @@ -0,0 +1 @@ +Markup span at (10:0,10 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [10] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes1.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes1.diag.txt new file mode 100644 index 0000000000..b0e5b255ec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes1.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes1.stree.txt new file mode 100644 index 0000000000..e3339e0ff6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes1.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..10)::10 - [

                        - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..10)::8 - class - SingleQuotes - Unbound - [ class='] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [10..10)::0 + MarkupTextLiteral - [10..10)::0 - [] + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes1.tspans.txt new file mode 100644 index 0000000000..07a0d173f6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [10] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes10.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes10.cspans.txt new file mode 100644 index 0000000000..952bb29824 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes10.cspans.txt @@ -0,0 +1 @@ +Markup span at (9:0,9 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [31] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes10.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes10.diag.txt new file mode 100644 index 0000000000..00e5e03e70 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes10.diag.txt @@ -0,0 +1,3 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,13): Error RZ1030: TagHelper attributes must be well-formed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes10.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes10.stree.txt new file mode 100644 index 0000000000..a4e330100d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes10.stree.txt @@ -0,0 +1,29 @@ +RazorDocument - [0..31)::31 - [

                        ] + MarkupBlock - [0..31)::31 + MarkupTagHelperElement - [0..31)::31 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..31)::31 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..12)::10 - class - DoubleQuotes - Unbound - [ class=btn] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTagHelperAttributeValue - [9..12)::3 + MarkupLiteralAttributeValue - [9..12)::3 - [btn] + MarkupTextLiteral - [9..12)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupMiscAttributeContent - [12..31)::19 + MarkupTextLiteral - [12..31)::19 - [" bar="foo"] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + Whitespace;[ ]; + Text;[bar]; + Equals;[=]; + DoubleQuote;["]; + Text;[foo]; + DoubleQuote;["]; + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes10.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes10.tspans.txt new file mode 100644 index 0000000000..b3437d8dea --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes10.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [31] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes11.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes11.cspans.txt new file mode 100644 index 0000000000..b04797cd78 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes11.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Markup block at (10:0,10 [8] ) +Markup span at (13:0,13 [5] ) (Accepts:Any) - Parent: Markup block at (10:0,10 [8] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes11.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes11.diag.txt new file mode 100644 index 0000000000..c263af5dea --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes11.diag.txt @@ -0,0 +1,3 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,25): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes11.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes11.stree.txt new file mode 100644 index 0000000000..5f4c685132 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes11.stree.txt @@ -0,0 +1,36 @@ +RazorDocument - [0..31)::31 - [

                        ] + MarkupBlock - [0..31)::31 + MarkupTagHelperElement - [0..31)::31 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..23)::23 - [

                        - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..19)::17 - class - DoubleQuotes - Unbound - [ class="btn bar="] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..18)::8 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupLiteralAttributeValue - [13..18)::5 - [ bar=] + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [14..18)::4 - [bar=] - Gen - SpanEditHandler;Accepts:Any + Text;[bar]; + Equals;[=]; + MarkupTextLiteral - [18..19)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMinimizedTagHelperAttribute - [19..23)::4 - foo" - Minimized - Unbound - [foo"] + MarkupTextLiteral - [19..23)::4 - [foo"] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + DoubleQuote;["]; + CloseAngle;[]; + MarkupTagHelperElement - [23..31)::8 - strong[StartTagAndEndTag] - strongtaghelper + MarkupTagHelperStartTag - [23..31)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes11.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes11.tspans.txt new file mode 100644 index 0000000000..2eb4f3edd5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes11.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [31] ) - ptaghelper +TagHelper span at (23:0,23 [8] ) - strongtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes12.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes12.cspans.txt new file mode 100644 index 0000000000..b04797cd78 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes12.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Markup block at (10:0,10 [8] ) +Markup span at (13:0,13 [5] ) (Accepts:Any) - Parent: Markup block at (10:0,10 [8] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes12.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes12.stree.txt new file mode 100644 index 0000000000..5e5f1bf591 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes12.stree.txt @@ -0,0 +1,36 @@ +RazorDocument - [0..28)::28 - [

                        ] + MarkupBlock - [0..28)::28 + MarkupTagHelperElement - [0..28)::28 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..24)::24 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..19)::17 - class - DoubleQuotes - Unbound - [ class="btn bar="] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..18)::8 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupLiteralAttributeValue - [13..18)::5 - [ bar=] + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [14..18)::4 - [bar=] - Gen - SpanEditHandler;Accepts:Any + Text;[bar]; + Equals;[=]; + MarkupTextLiteral - [18..19)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMinimizedTagHelperAttribute - [19..23)::4 - foo" - Minimized - Unbound - [foo"] + MarkupTextLiteral - [19..23)::4 - [foo"] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [24..28)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes12.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes12.tspans.txt new file mode 100644 index 0000000000..1490ae8ef2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes12.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [28] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes13.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes13.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes13.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes13.diag.txt new file mode 100644 index 0000000000..3191132e51 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes13.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ1031: The tag helper 'p' must not have C# in the element's attribute declaration area. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes13.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes13.stree.txt new file mode 100644 index 0000000000..b370e9b162 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes13.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..33)::33 - [

                        ] + MarkupBlock - [0..33)::33 + MarkupTagHelperElement - [0..33)::33 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..29)::29 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMiscAttributeContent - [2..28)::26 + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpCodeBlock - [3..16)::13 + CSharpImplicitExpression - [3..16)::13 + CSharpTransition - [3..4)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [4..16)::12 + CSharpCodeBlock - [4..16)::12 + CSharpExpressionLiteral - [4..16)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [16..28)::12 - [ class="btn"] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[class]; + Equals;[=]; + DoubleQuote;["]; + Text;[btn]; + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [29..33)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes13.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes13.tspans.txt new file mode 100644 index 0000000000..d6131fed67 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes13.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [33] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes14.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes14.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes14.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes14.diag.txt new file mode 100644 index 0000000000..3191132e51 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes14.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ1031: The tag helper 'p' must not have C# in the element's attribute declaration area. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes14.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes14.stree.txt new file mode 100644 index 0000000000..b568d50ba3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes14.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..27)::27 - [

                        ] + MarkupBlock - [0..27)::27 + MarkupTagHelperElement - [0..27)::27 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..23)::23 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMiscAttributeContent - [2..22)::20 + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpCodeBlock - [3..16)::13 + CSharpImplicitExpression - [3..16)::13 + CSharpTransition - [3..4)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [4..16)::12 + CSharpCodeBlock - [4..16)::12 + CSharpExpressionLiteral - [4..16)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [16..22)::6 - [="btn"] - Gen - SpanEditHandler;Accepts:Any + Equals;[=]; + DoubleQuote;["]; + Text;[btn]; + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [23..27)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes14.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes14.tspans.txt new file mode 100644 index 0000000000..840d8db41a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes14.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [27] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes15.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes15.cspans.txt new file mode 100644 index 0000000000..e109b92089 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes15.cspans.txt @@ -0,0 +1,2 @@ +Transition span at (9:0,9 [1] ) (Accepts:None) - Parent: Expression block at (9:0,9 [13] ) +Code span at (10:0,10 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (9:0,9 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes15.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes15.diag.txt new file mode 100644 index 0000000000..4a81a68e60 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes15.diag.txt @@ -0,0 +1,3 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,23): Error RZ1030: TagHelper attributes must be well-formed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes15.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes15.stree.txt new file mode 100644 index 0000000000..74f35b2278 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes15.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..28)::28 - [

                        ] + MarkupBlock - [0..28)::28 + MarkupTagHelperElement - [0..28)::28 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..28)::28 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..22)::20 - class - DoubleQuotes - Unbound - [ class=@DateTime.Now] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTagHelperAttributeValue - [9..22)::13 + MarkupDynamicAttributeValue - [9..22)::13 - [@DateTime.Now] + GenericBlock - [9..22)::13 + CSharpCodeBlock - [9..22)::13 + CSharpImplicitExpression - [9..22)::13 + CSharpTransition - [9..10)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [10..22)::12 + CSharpCodeBlock - [10..22)::12 + CSharpExpressionLiteral - [10..22)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupMiscAttributeContent - [22..28)::6 + MarkupTextLiteral - [22..28)::6 - [">

                        ] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes15.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes15.tspans.txt new file mode 100644 index 0000000000..1490ae8ef2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes15.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [28] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes16.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes16.cspans.txt new file mode 100644 index 0000000000..30a40eab2d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes16.cspans.txt @@ -0,0 +1,2 @@ +Transition span at (10:0,10 [1] ) (Accepts:None) - Parent: Statement block at (10:0,10 [5] ) +Code span at (11:0,11 [4] ) (Accepts:Any) - Parent: Statement block at (10:0,10 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes16.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes16.diag.txt new file mode 100644 index 0000000000..719d1c8841 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes16.diag.txt @@ -0,0 +1,3 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,12): Error RZ1006: The do block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes16.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes16.stree.txt new file mode 100644 index 0000000000..28fa369031 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes16.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..15)::15 - [

                        - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..15)::13 - class - DoubleQuotes - Unbound - [ class="@do {] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..15)::5 + MarkupDynamicAttributeValue - [10..15)::5 - [@do {] + GenericBlock - [10..15)::5 + CSharpCodeBlock - [10..15)::5 + CSharpTransition - [10..11)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [11..15)::4 - [do {] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes16.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes16.tspans.txt new file mode 100644 index 0000000000..ad9585903c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes16.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [15] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes17.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes17.cspans.txt new file mode 100644 index 0000000000..cef5455740 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes17.cspans.txt @@ -0,0 +1,2 @@ +Transition span at (10:0,10 [1] ) (Accepts:None) - Parent: Statement block at (10:0,10 [11] ) +Code span at (11:0,11 [10] ) (Accepts:Any) - Parent: Statement block at (10:0,10 [11] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes17.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes17.diag.txt new file mode 100644 index 0000000000..c9cee88e75 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes17.diag.txt @@ -0,0 +1,4 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,12): Error RZ1006: The do block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,16): 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. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes17.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes17.stree.txt new file mode 100644 index 0000000000..eccf711a65 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes17.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..21)::21 - [

                        ] + MarkupBlock - [0..21)::21 + MarkupTagHelperElement - [0..21)::21 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..21)::21 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..21)::19 - class - DoubleQuotes - Unbound - [ class="@do {">

                        ] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..21)::11 + MarkupDynamicAttributeValue - [10..21)::11 - [@do {">

                        ] + GenericBlock - [10..21)::11 + CSharpCodeBlock - [10..21)::11 + CSharpTransition - [10..11)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [11..21)::10 - [do {">

                        ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + StringLiteral;[">

                        ];RZ1000(15:0,15 [1] ) + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes17.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes17.tspans.txt new file mode 100644 index 0000000000..452a7da46c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes17.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [21] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes18.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes18.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes18.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes18.diag.txt new file mode 100644 index 0000000000..6451ce6e4b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes18.diag.txt @@ -0,0 +1,5 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,4): Error RZ1031: The tag helper 'p' must not have C# in the element's attribute declaration area. +(1,5): Error RZ1006: The do block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,32): Error RZ1026: Encountered end tag "p" with no matching start tag. Are your start/end tags properly balanced? diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes18.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes18.stree.txt new file mode 100644 index 0000000000..7f6210c500 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes18.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..33)::33 - [

                        ] + MarkupBlock - [0..33)::33 + MarkupTagHelperElement - [0..33)::33 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..33)::33 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMiscAttributeContent - [2..33)::31 + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpCodeBlock - [3..33)::30 + CSharpTransition - [3..4)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [4..29)::25 - [do { someattribute="btn">] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[someattribute]; + Assign;[=]; + StringLiteral;["btn"]; + GreaterThan;[>]; + MarkupBlock - [29..33)::4 + MarkupElement - [29..33)::4 + MarkupEndTag - [29..33)::4 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes18.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes18.tspans.txt new file mode 100644 index 0000000000..d6131fed67 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes18.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [33] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes19.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes19.cspans.txt new file mode 100644 index 0000000000..b992258ac2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes19.cspans.txt @@ -0,0 +1 @@ +Markup span at (9:0,9 [4] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [38] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes19.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes19.diag.txt new file mode 100644 index 0000000000..f716761d50 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes19.diag.txt @@ -0,0 +1 @@ +(1,14): Error RZ1030: TagHelper attributes must be well-formed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes19.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes19.stree.txt new file mode 100644 index 0000000000..88b1479078 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes19.stree.txt @@ -0,0 +1,40 @@ +RazorDocument - [0..38)::38 - [

                        ] + MarkupBlock - [0..38)::38 + MarkupTagHelperElement - [0..38)::38 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..34)::34 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..13)::11 - class - DoubleQuotes - Unbound - [ class=some] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTagHelperAttributeValue - [9..13)::4 + MarkupLiteralAttributeValue - [9..13)::4 - [some] + MarkupTextLiteral - [9..13)::4 - [some] - Gen - SpanEditHandler;Accepts:Any + Text;[some]; + MarkupMiscAttributeContent - [13..33)::20 + MarkupTextLiteral - [13..26)::13 - [=thing attr="] - Gen - SpanEditHandler;Accepts:Any + Equals;[=]; + Text;[thing]; + Whitespace;[ ]; + Text;[attr]; + Equals;[=]; + DoubleQuote;["]; + CSharpCodeBlock - [26..32)::6 + CSharpImplicitExpression - [26..32)::6 + CSharpTransition - [26..27)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [27..32)::5 + CSharpCodeBlock - [27..32)::5 + CSharpExpressionLiteral - [27..32)::5 - [value] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[value]; + MarkupTextLiteral - [32..33)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [34..38)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes19.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes19.tspans.txt new file mode 100644 index 0000000000..3cc3264682 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes19.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [38] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes2.cspans.txt new file mode 100644 index 0000000000..14a88d65c9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes2.cspans.txt @@ -0,0 +1 @@ +Markup span at (8:0,8 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [24] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes2.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes2.diag.txt new file mode 100644 index 0000000000..8cd66cdd6c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes2.diag.txt @@ -0,0 +1,3 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,15): Error RZ1030: TagHelper attributes must be well-formed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes2.stree.txt new file mode 100644 index 0000000000..abf2c1ee61 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes2.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..24)::24 - [

                        ] + MarkupBlock - [0..24)::24 + MarkupTagHelperElement - [0..24)::24 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..24)::24 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - bar - DoubleQuotes - Unbound - [ bar="false"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..6)::3 - [bar] - Gen - SpanEditHandler;Accepts:Any + Text;[bar]; + Equals;[=]; + MarkupTextLiteral - [7..8)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [8..13)::5 + MarkupLiteralAttributeValue - [8..13)::5 - [false] + MarkupTextLiteral - [8..13)::5 - [false] - Gen - SpanEditHandler;Accepts:Any + Text;[false]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [14..24)::10 + MarkupTextLiteral - [14..24)::10 - [" ] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + Whitespace;[ ]; + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes2.tspans.txt new file mode 100644 index 0000000000..4292815e00 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [24] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes20.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes20.cspans.txt new file mode 100644 index 0000000000..4934c61fc0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes20.cspans.txt @@ -0,0 +1,11 @@ +Transition span at (9:0,9 [1] ) (Accepts:None) - Parent: Statement block at (9:0,9 [34] ) +Code span at (10:0,10 [10] ) (Accepts:Any) - Parent: Statement block at (9:0,9 [34] ) +Markup span at (20:0,20 [2] ) (Accepts:Any) - Parent: Tag block at (20:0,20 [15] ) +Markup span at (22:0,22 [7] ) (Accepts:Any) - Parent: Markup block at (22:0,22 [12] ) +Transition span at (29:0,29 [1] ) (Accepts:None) - Parent: Expression block at (29:0,29 [4] ) +Code span at (30:0,30 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (29:0,29 [4] ) +Markup span at (33:0,33 [1] ) (Accepts:Any) - Parent: Markup block at (22:0,22 [12] ) +Markup span at (34:0,34 [1] ) (Accepts:None) - Parent: Tag block at (20:0,20 [15] ) +Markup span at (35:0,35 [4] ) (Accepts:Any) - Parent: Markup block at (20:0,20 [23] ) +Markup span at (39:0,39 [4] ) (Accepts:None) - Parent: Tag block at (39:0,39 [4] ) +Code span at (43:0,43 [0] ) (Accepts:Any) - Parent: Statement block at (9:0,9 [34] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes20.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes20.diag.txt new file mode 100644 index 0000000000..9dba2e6078 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes20.diag.txt @@ -0,0 +1,12 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,21): Error RZ1008: Expected a "{" but found a "<". Block statements must be enclosed in "{" and "}". You cannot use single-statement control-flow statements in CSHTML pages. For example, the following is not allowed: + +@if(isLoggedIn) +

                        Hello, @user

                        + +Instead, wrap the contents of the block in "{}": + +@if(isLoggedIn) { +

                        Hello, @user

                        +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes20.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes20.stree.txt new file mode 100644 index 0000000000..c7ec7c7f17 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes20.stree.txt @@ -0,0 +1,67 @@ +RazorDocument - [0..43)::43 - [

                        ] + MarkupBlock - [0..43)::43 + MarkupTagHelperElement - [0..43)::43 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..43)::43 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..43)::41 - attr - DoubleQuotes - Unbound - [ attr="@if (true)

                        }">

                        ] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..7)::4 - [attr] - Gen - SpanEditHandler;Accepts:Any + Text;[attr]; + Equals;[=]; + MarkupTextLiteral - [8..9)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [9..43)::34 + MarkupDynamicAttributeValue - [9..43)::34 - [@if (true)

                        }">

                        ] + GenericBlock - [9..43)::34 + CSharpCodeBlock - [9..43)::34 + CSharpTransition - [9..10)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [10..20)::10 - [if (true) ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[if]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Keyword;[true]; + RightParenthesis;[)]; + Whitespace;[ ]; + MarkupBlock - [20..43)::23 + MarkupElement - [20..43)::23 + MarkupStartTag - [20..35)::15 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + MarkupAttributeBlock - [22..34)::12 - [ attr='@foo'] + MarkupTextLiteral - [22..23)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [23..27)::4 - [attr] - Gen - SpanEditHandler;Accepts:Any + Text;[attr]; + Equals;[=]; + MarkupTextLiteral - [28..29)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [29..33)::4 + MarkupDynamicAttributeValue - [29..33)::4 - [@foo] + GenericBlock - [29..33)::4 + CSharpCodeBlock - [29..33)::4 + CSharpImplicitExpression - [29..33)::4 + CSharpTransition - [29..30)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [30..33)::3 + CSharpCodeBlock - [30..33)::3 + CSharpExpressionLiteral - [30..33)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupTextLiteral - [33..34)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTextLiteral - [35..39)::4 - [ }">] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[}]; + DoubleQuote;["]; + CloseAngle;[>]; + MarkupEndTag - [39..43)::4 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [43..43)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes20.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes20.tspans.txt new file mode 100644 index 0000000000..2dbca568cd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes20.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [43] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes3.cspans.txt new file mode 100644 index 0000000000..5c5c8a05bc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes3.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (8:0,8 [5] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [15] ) +Markup span at (13:0,13 [10] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [15] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes3.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes3.diag.txt new file mode 100644 index 0000000000..b0e5b255ec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes3.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes3.stree.txt new file mode 100644 index 0000000000..8f2705857a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes3.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..23)::23 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..23)::21 - bar - SingleQuotes - Unbound - [ bar='false ] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..6)::3 - [bar] - Gen - SpanEditHandler;Accepts:Any + Text;[bar]; + Equals;[=]; + MarkupTextLiteral - [7..8)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [8..23)::15 + MarkupLiteralAttributeValue - [8..13)::5 - [false] + MarkupTextLiteral - [8..13)::5 - [false] - Gen - SpanEditHandler;Accepts:Any + Text;[false]; + MarkupLiteralAttributeValue - [13..23)::10 - [ ] + MarkupTextLiteral - [13..15)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [15..23)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes3.tspans.txt new file mode 100644 index 0000000000..72fccbbfdc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [23] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes4.cspans.txt new file mode 100644 index 0000000000..9747a806f7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes4.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (8:0,8 [5] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [14] ) +Markup span at (13:0,13 [9] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [14] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes4.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes4.diag.txt new file mode 100644 index 0000000000..b0e5b255ec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes4.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes4.stree.txt new file mode 100644 index 0000000000..27f487ab85 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes4.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..23)::23 - [

                        - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..23)::21 - bar - SingleQuotes - Unbound - [ bar='false - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..6)::3 - [bar] - Gen - SpanEditHandler;Accepts:Any + Text;[bar]; + Equals;[=]; + MarkupTextLiteral - [7..8)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [8..22)::14 + MarkupLiteralAttributeValue - [8..13)::5 - [false] + MarkupTextLiteral - [8..13)::5 - [false] - Gen - SpanEditHandler;Accepts:Any + Text;[false]; + MarkupLiteralAttributeValue - [13..22)::9 - [ - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [15..22)::7 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupTextLiteral - [22..23)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes4.tspans.txt new file mode 100644 index 0000000000..72fccbbfdc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [23] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes5.cspans.txt new file mode 100644 index 0000000000..8a404a053c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes5.cspans.txt @@ -0,0 +1 @@ +Markup span at (7:0,7 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes5.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes5.diag.txt new file mode 100644 index 0000000000..00e5e03e70 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes5.diag.txt @@ -0,0 +1,3 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,13): Error RZ1030: TagHelper attributes must be well-formed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes5.stree.txt new file mode 100644 index 0000000000..2b87ff47b3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes5.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..13)::13 - [

                        - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..12)::10 - bar - DoubleQuotes - Unbound - [ bar=false] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..6)::3 - [bar] - Gen - SpanEditHandler;Accepts:Any + Text;[bar]; + Equals;[=]; + MarkupTagHelperAttributeValue - [7..12)::5 + MarkupLiteralAttributeValue - [7..12)::5 - [false] + MarkupTextLiteral - [7..12)::5 - [false] - Gen - SpanEditHandler;Accepts:Any + Text;[false]; + MarkupMiscAttributeContent - [12..13)::1 + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes5.tspans.txt new file mode 100644 index 0000000000..17a2d8cf26 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [13] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes6.cspans.txt new file mode 100644 index 0000000000..948bed3775 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes6.cspans.txt @@ -0,0 +1 @@ +Markup span at (8:0,8 [6] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [14] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes6.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes6.diag.txt new file mode 100644 index 0000000000..b0e5b255ec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes6.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes6.stree.txt new file mode 100644 index 0000000000..be1e33691a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes6.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..14)::14 - [

                        - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - bar - DoubleQuotes - Unbound - [ bar="false'] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..6)::3 - [bar] - Gen - SpanEditHandler;Accepts:Any + Text;[bar]; + Equals;[=]; + MarkupTextLiteral - [7..8)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [8..14)::6 + MarkupLiteralAttributeValue - [8..14)::6 - [false'] + MarkupTextLiteral - [8..14)::6 - [false'] - Gen - SpanEditHandler;Accepts:Any + Text;[false]; + SingleQuote;[']; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes6.tspans.txt new file mode 100644 index 0000000000..d4769a773a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes6.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [14] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes7.cspans.txt new file mode 100644 index 0000000000..ea7a88a5bd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes7.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (8:0,8 [6] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) +Markup span at (14:0,14 [6] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes7.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes7.diag.txt new file mode 100644 index 0000000000..b0e5b255ec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes7.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes7.stree.txt new file mode 100644 index 0000000000..75e49cc462 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes7.stree.txt @@ -0,0 +1,29 @@ +RazorDocument - [0..20)::20 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..20)::18 - bar - DoubleQuotes - Unbound - [ bar="false' >

                        ] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..6)::3 - [bar] - Gen - SpanEditHandler;Accepts:Any + Text;[bar]; + Equals;[=]; + MarkupTextLiteral - [7..8)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [8..20)::12 + MarkupLiteralAttributeValue - [8..14)::6 - [false'] + MarkupTextLiteral - [8..14)::6 - [false'] - Gen - SpanEditHandler;Accepts:Any + Text;[false]; + SingleQuote;[']; + MarkupLiteralAttributeValue - [14..20)::6 - [ >

                        ] + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [15..20)::5 - [>

                        ] - Gen - SpanEditHandler;Accepts:Any + CloseAngle;[>]; + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes7.tspans.txt new file mode 100644 index 0000000000..66adb496db --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [20] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes8.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes8.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes8.diag.txt new file mode 100644 index 0000000000..2bc23b0f86 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes8.diag.txt @@ -0,0 +1,3 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,12): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes8.stree.txt new file mode 100644 index 0000000000..d76bdc3899 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes8.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..18)::18 - [

                        ] + MarkupBlock - [0..18)::18 + MarkupTagHelperElement - [0..18)::18 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..10)::10 - [

                        - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [2..6)::4 - foo - Minimized - Unbound - [ foo] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..6)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupMinimizedTagHelperAttribute - [6..10)::4 - bar - Minimized - Unbound - [ bar] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..10)::3 - [bar] - Gen - SpanEditHandler;Accepts:Any + Text;[bar]; + CloseAngle;[]; + MarkupTagHelperElement - [10..18)::8 - strong[StartTagAndEndTag] - strongtaghelper + MarkupTagHelperStartTag - [10..18)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes8.tspans.txt new file mode 100644 index 0000000000..cc7354bc19 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes8.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [18] ) - ptaghelper +TagHelper span at (10:0,10 [8] ) - strongtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes9.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes9.cspans.txt new file mode 100644 index 0000000000..ccaa1b3f13 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes9.cspans.txt @@ -0,0 +1 @@ +Markup span at (9:0,9 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [25] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes9.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes9.diag.txt new file mode 100644 index 0000000000..00e5e03e70 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes9.diag.txt @@ -0,0 +1,3 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,13): Error RZ1030: TagHelper attributes must be well-formed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes9.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes9.stree.txt new file mode 100644 index 0000000000..19770a0945 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes9.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..25)::25 - [

                        ] + MarkupBlock - [0..25)::25 + MarkupTagHelperElement - [0..25)::25 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..25)::25 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..12)::10 - class - DoubleQuotes - Unbound - [ class=btn] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTagHelperAttributeValue - [9..12)::3 + MarkupLiteralAttributeValue - [9..12)::3 - [btn] + MarkupTextLiteral - [9..12)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupMiscAttributeContent - [12..25)::13 + MarkupTextLiteral - [12..25)::13 - [" bar] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + Whitespace;[ ]; + Text;[bar]; + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes9.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes9.tspans.txt new file mode 100644 index 0000000000..b9ccfbed4b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesErrorForMalformedTagHelpersWithAttributes9.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [25] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes1.cspans.txt new file mode 100644 index 0000000000..7c9bbe1aa9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes1.cspans.txt @@ -0,0 +1 @@ +Code span at (13:0,13 [2] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes1.stree.txt new file mode 100644 index 0000000000..e6dd180a67 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes1.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..19)::19 - [] + MarkupBlock - [0..19)::19 + MarkupTagHelperElement - [0..19)::19 - person[SelfClosing] - PersonTagHelper + MarkupTagHelperStartTag - [0..19)::19 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[person]; + MarkupTagHelperAttribute - [7..16)::9 - age - DoubleQuotes - Bound - [ age="12"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [age] - Gen - SpanEditHandler;Accepts:Any + Text;[age]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [13..15)::2 + CSharpExpressionLiteral - [13..15)::2 - [12] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[12]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [16..17)::1 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes1.tspans.txt new file mode 100644 index 0000000000..096b786f52 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [19] ) - PersonTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes10.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes10.cspans.txt new file mode 100644 index 0000000000..93c1eb44f3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes10.cspans.txt @@ -0,0 +1,5 @@ +Code span at (13:0,13 [2] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [73] ) +Code span at (27:0,27 [12] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [73] ) +Markup span at (47:0,47 [1] ) (Accepts:None) - Parent: Markup block at (47:0,47 [2] ) +Markup span at (48:0,48 [1] ) (Accepts:None) - Parent: Markup block at (47:0,47 [2] ) +Markup span at (49:0,49 [20] ) (Accepts:Any) - Parent: Markup block at (47:0,47 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes10.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes10.stree.txt new file mode 100644 index 0000000000..1ae7742122 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes10.stree.txt @@ -0,0 +1,55 @@ +RazorDocument - [0..73)::73 - [] + MarkupBlock - [0..73)::73 + MarkupTagHelperElement - [0..73)::73 - person[SelfClosing] - PersonTagHelper + MarkupTagHelperStartTag - [0..73)::73 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[person]; + MarkupTagHelperAttribute - [7..16)::9 - age - DoubleQuotes - Bound - [ age="12"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [age] - Gen - SpanEditHandler;Accepts:Any + Text;[age]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [13..15)::2 + CSharpExpressionLiteral - [13..15)::2 - [12] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[12]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [16..40)::24 - birthday - DoubleQuotes - Bound - [ birthday="DateTime.Now"] + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [17..25)::8 - [birthday] - Gen - SpanEditHandler;Accepts:Any + Text;[birthday]; + Equals;[=]; + MarkupTextLiteral - [26..27)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [27..39)::12 + CSharpExpressionLiteral - [27..39)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[DateTime.Now]; + MarkupTextLiteral - [39..40)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [40..70)::30 - name - DoubleQuotes - Bound - [ name="@@BoundStringAttribute"] + MarkupTextLiteral - [40..41)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [41..45)::4 - [name] - Gen - SpanEditHandler;Accepts:Any + Text;[name]; + Equals;[=]; + MarkupTextLiteral - [46..47)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [47..69)::22 + MarkupBlock - [47..49)::2 + MarkupTextLiteral - [47..48)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupEphemeralTextLiteral - [48..49)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupTextLiteral - [49..69)::20 - [BoundStringAttribute] - Gen - SpanEditHandler;Accepts:Any + Text;[BoundStringAttribute]; + MarkupTextLiteral - [69..70)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [70..71)::1 + MarkupTextLiteral - [70..71)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes10.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes10.tspans.txt new file mode 100644 index 0000000000..66b66f6b27 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes10.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [73] ) - PersonTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes11.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes11.cspans.txt new file mode 100644 index 0000000000..7d194474a8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes11.cspans.txt @@ -0,0 +1,12 @@ +Code span at (13:0,13 [1] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [2] ) +Code span at (14:0,14 [1] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [2] ) +Code span at (15:0,15 [0] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (15:0,15 [7] ) +Code span at (15:0,15 [1] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (15:0,15 [7] ) +Code span at (16:0,16 [1] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (15:0,15 [7] ) +Code span at (17:0,17 [4] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (15:0,15 [7] ) +Code span at (21:0,21 [1] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (15:0,15 [7] ) +Code span at (34:0,34 [12] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [77] ) +Markup span at (54:0,54 [5] ) (Accepts:Any) - Parent: Markup block at (54:0,54 [19] ) +Markup span at (59:0,59 [1] ) (Accepts:Any) - Parent: Markup block at (59:0,59 [14] ) +Transition span at (60:0,60 [1] ) (Accepts:None) - Parent: Expression block at (60:0,60 [13] ) +Code span at (61:0,61 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (60:0,60 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes11.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes11.stree.txt new file mode 100644 index 0000000000..cff16eb252 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes11.stree.txt @@ -0,0 +1,85 @@ +RazorDocument - [0..77)::77 - [] + MarkupBlock - [0..77)::77 + MarkupTagHelperElement - [0..77)::77 - person[SelfClosing] - PersonTagHelper + MarkupTagHelperStartTag - [0..77)::77 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[person]; + MarkupTagHelperAttribute - [7..23)::16 - age - DoubleQuotes - Bound - [ age="@@@(11+1)"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [age] - Gen - SpanEditHandler;Accepts:Any + Text;[age]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [13..22)::9 + MarkupBlock - [13..15)::2 + CSharpExpressionLiteral - [13..14)::1 - [@] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Transition;[@]; + CSharpEphemeralTextLiteral - [14..15)::1 - [@] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Transition;[@]; + MarkupBlock - [15..22)::7 + CSharpExpressionLiteral - [15..15)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Marker;[]; + CSharpCodeBlock - [15..22)::7 + CSharpImplicitExpression - [15..22)::7 + CSharpTransition - [15..15)::0 + Transition;[]; + CSharpImplicitExpressionBody - [15..22)::7 + CSharpCodeBlock - [15..22)::7 + CSharpExpressionLiteral - [15..16)::1 - [@] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Transition;[@]; + CSharpExpressionLiteral - [16..17)::1 - [(] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + LeftParenthesis;[(]; + CSharpExpressionLiteral - [17..21)::4 - [11+1] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + IntegerLiteral;[11]; + Plus;[+]; + IntegerLiteral;[1]; + CSharpExpressionLiteral - [21..22)::1 - [)] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + RightParenthesis;[)]; + MarkupTextLiteral - [22..23)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [23..47)::24 - birthday - DoubleQuotes - Bound - [ birthday="DateTime.Now"] + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [24..32)::8 - [birthday] - Gen - SpanEditHandler;Accepts:Any + Text;[birthday]; + Equals;[=]; + MarkupTextLiteral - [33..34)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [34..46)::12 + CSharpExpressionLiteral - [34..46)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[DateTime.Now]; + MarkupTextLiteral - [46..47)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [47..74)::27 - name - DoubleQuotes - Bound - [ name="Time: @DateTime.Now"] + MarkupTextLiteral - [47..48)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [48..52)::4 - [name] - Gen - SpanEditHandler;Accepts:Any + Text;[name]; + Equals;[=]; + MarkupTextLiteral - [53..54)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [54..73)::19 + MarkupTextLiteral - [54..59)::5 - [Time:] - Gen - SpanEditHandler;Accepts:Any + Text;[Time:]; + MarkupBlock - [59..73)::14 + MarkupTextLiteral - [59..60)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpCodeBlock - [60..73)::13 + CSharpImplicitExpression - [60..73)::13 + CSharpTransition - [60..61)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [61..73)::12 + CSharpCodeBlock - [61..73)::12 + CSharpExpressionLiteral - [61..73)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [73..74)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [74..75)::1 + MarkupTextLiteral - [74..75)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes11.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes11.tspans.txt new file mode 100644 index 0000000000..905f5d687a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes11.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [77] ) - PersonTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes12.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes12.cspans.txt new file mode 100644 index 0000000000..53bec4dfc2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes12.cspans.txt @@ -0,0 +1,4 @@ +Transition span at (13:0,13 [1] ) (Accepts:None) - Parent: Statement block at (13:0,13 [22] ) +MetaCode span at (14:0,14 [1] ) (Accepts:None) - Parent: Statement block at (13:0,13 [22] ) +Code span at (15:0,15 [19] ) (Accepts:Any) - Parent: Statement block at (13:0,13 [22] ) +MetaCode span at (34:0,34 [1] ) (Accepts:None) - Parent: Statement block at (13:0,13 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes12.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes12.stree.txt new file mode 100644 index 0000000000..58fba8ce3f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes12.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..39)::39 - [] + MarkupBlock - [0..39)::39 + MarkupTagHelperElement - [0..39)::39 - person[SelfClosing] - PersonTagHelper + MarkupTagHelperStartTag - [0..39)::39 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[person]; + MarkupTagHelperAttribute - [7..36)::29 - age - DoubleQuotes - Bound - [ age="@{flag == 0 ? 11 : 12}"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [age] - Gen - SpanEditHandler;Accepts:Any + Text;[age]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [13..35)::22 + MarkupBlock - [13..35)::22 + CSharpCodeBlock - [13..35)::22 + CSharpStatement - [13..35)::22 + CSharpTransition - [13..14)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [14..35)::21 + RazorMetaCode - [14..15)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [15..34)::19 + CSharpStatementLiteral - [15..34)::19 - [flag == 0 ? 11 : 12] - Gen - AutoCompleteEditHandler;Accepts:Any,AutoComplete:[];AtEOL + Identifier;[flag]; + Whitespace;[ ]; + Equals;[==]; + Whitespace;[ ]; + IntegerLiteral;[0]; + Whitespace;[ ]; + QuestionMark;[?]; + Whitespace;[ ]; + IntegerLiteral;[11]; + Whitespace;[ ]; + Colon;[:]; + Whitespace;[ ]; + IntegerLiteral;[12]; + RazorMetaCode - [34..35)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [35..36)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [36..37)::1 + MarkupTextLiteral - [36..37)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes12.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes12.tspans.txt new file mode 100644 index 0000000000..14c5fecb18 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes12.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [39] ) - PersonTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes2.cspans.txt new file mode 100644 index 0000000000..f743b23285 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes2.cspans.txt @@ -0,0 +1 @@ +Code span at (18:0,18 [12] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [34] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes2.stree.txt new file mode 100644 index 0000000000..3a4eb926df --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes2.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..34)::34 - [] + MarkupBlock - [0..34)::34 + MarkupTagHelperElement - [0..34)::34 - person[SelfClosing] - PersonTagHelper + MarkupTagHelperStartTag - [0..34)::34 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[person]; + MarkupTagHelperAttribute - [7..31)::24 - birthday - DoubleQuotes - Bound - [ birthday="DateTime.Now"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..16)::8 - [birthday] - Gen - SpanEditHandler;Accepts:Any + Text;[birthday]; + Equals;[=]; + MarkupTextLiteral - [17..18)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [18..30)::12 + CSharpExpressionLiteral - [18..30)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[DateTime.Now]; + MarkupTextLiteral - [30..31)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [31..32)::1 + MarkupTextLiteral - [31..32)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes2.tspans.txt new file mode 100644 index 0000000000..f873839265 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [34] ) - PersonTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes3.cspans.txt new file mode 100644 index 0000000000..47295f8488 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes3.cspans.txt @@ -0,0 +1,2 @@ +Transition span at (13:0,13 [1] ) (Accepts:None) - Parent: Expression block at (13:0,13 [18] ) +Code span at (14:0,14 [17] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (13:0,13 [18] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes3.stree.txt new file mode 100644 index 0000000000..36d6def7eb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes3.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..35)::35 - [] + MarkupBlock - [0..35)::35 + MarkupTagHelperElement - [0..35)::35 - person[SelfClosing] - PersonTagHelper + MarkupTagHelperStartTag - [0..35)::35 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[person]; + MarkupTagHelperAttribute - [7..32)::25 - age - DoubleQuotes - Bound - [ age="@DateTime.Now.Year"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [age] - Gen - SpanEditHandler;Accepts:Any + Text;[age]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [13..31)::18 + MarkupBlock - [13..31)::18 + CSharpCodeBlock - [13..31)::18 + CSharpImplicitExpression - [13..31)::18 + CSharpTransition - [13..14)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [14..31)::17 + CSharpCodeBlock - [14..31)::17 + CSharpExpressionLiteral - [14..31)::17 - [DateTime.Now.Year] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + Dot;[.]; + Identifier;[Year]; + MarkupTextLiteral - [31..32)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [32..33)::1 + MarkupTextLiteral - [32..33)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes3.tspans.txt new file mode 100644 index 0000000000..4c67f60b6d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [35] ) - PersonTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes4.cspans.txt new file mode 100644 index 0000000000..3c2486e3b9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes4.cspans.txt @@ -0,0 +1,3 @@ +Code span at (13:0,13 [1] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [19] ) +Code span at (14:0,14 [1] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (14:0,14 [18] ) +Code span at (15:0,15 [17] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (14:0,14 [18] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes4.stree.txt new file mode 100644 index 0000000000..2514097fc9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes4.stree.txt @@ -0,0 +1,39 @@ +RazorDocument - [0..36)::36 - [] + MarkupBlock - [0..36)::36 + MarkupTagHelperElement - [0..36)::36 - person[SelfClosing] - PersonTagHelper + MarkupTagHelperStartTag - [0..36)::36 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[person]; + MarkupTagHelperAttribute - [7..33)::26 - age - DoubleQuotes - Bound - [ age=" @DateTime.Now.Year"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [age] - Gen - SpanEditHandler;Accepts:Any + Text;[age]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [13..32)::19 + MarkupBlock - [13..32)::19 + CSharpExpressionLiteral - [13..14)::1 - [ ] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Whitespace;[ ]; + CSharpCodeBlock - [14..32)::18 + CSharpImplicitExpression - [14..32)::18 + CSharpTransition - [14..14)::0 + Transition;[]; + CSharpImplicitExpressionBody - [14..32)::18 + CSharpCodeBlock - [14..32)::18 + CSharpExpressionLiteral - [14..15)::1 - [@] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Transition;[@]; + CSharpExpressionLiteral - [15..32)::17 - [DateTime.Now.Year] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + Dot;[.]; + Identifier;[Year]; + MarkupTextLiteral - [32..33)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [33..34)::1 + MarkupTextLiteral - [33..34)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes4.tspans.txt new file mode 100644 index 0000000000..232251afb7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [36] ) - PersonTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes5.cspans.txt new file mode 100644 index 0000000000..7dadb4349b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes5.cspans.txt @@ -0,0 +1 @@ +Markup span at (14:0,14 [4] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes5.stree.txt new file mode 100644 index 0000000000..b7c33d5ee7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes5.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..22)::22 - [] + MarkupBlock - [0..22)::22 + MarkupTagHelperElement - [0..22)::22 - person[SelfClosing] - PersonTagHelper + MarkupTagHelperStartTag - [0..22)::22 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[person]; + MarkupTagHelperAttribute - [7..19)::12 - name - DoubleQuotes - Bound - [ name="John"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..12)::4 - [name] - Gen - SpanEditHandler;Accepts:Any + Text;[name]; + Equals;[=]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [14..18)::4 + MarkupTextLiteral - [14..18)::4 - [John] - Gen - SpanEditHandler;Accepts:Any + Text;[John]; + MarkupTextLiteral - [18..19)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [19..20)::1 + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes5.tspans.txt new file mode 100644 index 0000000000..936f7cc167 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [22] ) - PersonTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes6.cspans.txt new file mode 100644 index 0000000000..fff411360a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes6.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (14:0,14 [5] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [19] ) +Markup span at (19:0,19 [1] ) (Accepts:Any) - Parent: Markup block at (19:0,19 [14] ) +Transition span at (20:0,20 [1] ) (Accepts:None) - Parent: Expression block at (20:0,20 [13] ) +Code span at (21:0,21 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (20:0,20 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes6.stree.txt new file mode 100644 index 0000000000..40f512e21a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes6.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..37)::37 - [] + MarkupBlock - [0..37)::37 + MarkupTagHelperElement - [0..37)::37 - person[SelfClosing] - PersonTagHelper + MarkupTagHelperStartTag - [0..37)::37 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[person]; + MarkupTagHelperAttribute - [7..34)::27 - name - DoubleQuotes - Bound - [ name="Time: @DateTime.Now"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..12)::4 - [name] - Gen - SpanEditHandler;Accepts:Any + Text;[name]; + Equals;[=]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [14..33)::19 + MarkupTextLiteral - [14..19)::5 - [Time:] - Gen - SpanEditHandler;Accepts:Any + Text;[Time:]; + MarkupBlock - [19..33)::14 + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpCodeBlock - [20..33)::13 + CSharpImplicitExpression - [20..33)::13 + CSharpTransition - [20..21)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [21..33)::12 + CSharpCodeBlock - [21..33)::12 + CSharpExpressionLiteral - [21..33)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [33..34)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [34..35)::1 + MarkupTextLiteral - [34..35)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes6.tspans.txt new file mode 100644 index 0000000000..c61b8f7089 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes6.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [37] ) - PersonTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes7.cspans.txt new file mode 100644 index 0000000000..99741cf638 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes7.cspans.txt @@ -0,0 +1,18 @@ +Code span at (13:0,13 [1] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [14] ) +Code span at (14:0,14 [2] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [14] ) +Code span at (16:0,16 [1] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (16:0,16 [7] ) +Code span at (17:0,17 [1] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (17:0,17 [6] ) +Code span at (18:0,18 [5] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (17:0,17 [6] ) +Code span at (23:0,23 [2] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [14] ) +Code span at (25:0,25 [2] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [14] ) +Code span at (39:0,39 [6] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (39:0,39 [46] ) +Code span at (45:0,45 [1] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (45:0,45 [11] ) +Code span at (46:0,46 [10] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (45:0,45 [11] ) +Code span at (56:0,56 [2] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (39:0,39 [46] ) +Code span at (58:0,58 [2] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (58:0,58 [3] ) +Code span at (60:0,60 [1] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (58:0,58 [3] ) +Code span at (61:0,61 [8] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (39:0,39 [46] ) +Code span at (69:0,69 [2] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (39:0,39 [46] ) +Code span at (71:0,71 [1] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (71:0,71 [14] ) +Code span at (72:0,72 [1] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (72:0,72 [13] ) +Code span at (73:0,73 [12] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (72:0,72 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes7.stree.txt new file mode 100644 index 0000000000..ffb468a4a3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes7.stree.txt @@ -0,0 +1,99 @@ +RazorDocument - [0..88)::88 - [] + MarkupBlock - [0..88)::88 + MarkupTagHelperElement - [0..88)::88 - person[SelfClosing] - PersonTagHelper + MarkupTagHelperStartTag - [0..88)::88 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[person]; + MarkupTagHelperAttribute - [7..28)::21 - age - DoubleQuotes - Bound - [ age="1 + @value + 2"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [age] - Gen - SpanEditHandler;Accepts:Any + Text;[age]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [13..27)::14 + CSharpExpressionLiteral - [13..14)::1 - [1] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[1]; + CSharpExpressionLiteral - [14..16)::2 - [ +] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Whitespace;[ ]; + Text;[+]; + MarkupBlock - [16..23)::7 + CSharpExpressionLiteral - [16..17)::1 - [ ] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Whitespace;[ ]; + CSharpCodeBlock - [17..23)::6 + CSharpImplicitExpression - [17..23)::6 + CSharpTransition - [17..17)::0 + Transition;[]; + CSharpImplicitExpressionBody - [17..23)::6 + CSharpCodeBlock - [17..23)::6 + CSharpExpressionLiteral - [17..18)::1 - [@] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Transition;[@]; + CSharpExpressionLiteral - [18..23)::5 - [value] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Identifier;[value]; + CSharpExpressionLiteral - [23..25)::2 - [ +] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Whitespace;[ ]; + Text;[+]; + CSharpExpressionLiteral - [25..27)::2 - [ 2] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Whitespace;[ ]; + Text;[2]; + MarkupTextLiteral - [27..28)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [28..86)::58 - birthday - SingleQuotes - Bound - [ birthday='(bool)@Bag["val"] ? @@DateTime : @DateTime.Now'] + MarkupTextLiteral - [28..29)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [29..37)::8 - [birthday] - Gen - SpanEditHandler;Accepts:Any + Text;[birthday]; + Equals;[=]; + MarkupTextLiteral - [38..39)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [39..85)::46 + CSharpExpressionLiteral - [39..45)::6 - [(bool)] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[(bool)]; + MarkupBlock - [45..56)::11 + CSharpCodeBlock - [45..56)::11 + CSharpImplicitExpression - [45..56)::11 + CSharpTransition - [45..45)::0 + Transition;[]; + CSharpImplicitExpressionBody - [45..56)::11 + CSharpCodeBlock - [45..56)::11 + CSharpExpressionLiteral - [45..46)::1 - [@] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Transition;[@]; + CSharpExpressionLiteral - [46..56)::10 - [Bag["val"]] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Identifier;[Bag]; + LeftBracket;[[]; + StringLiteral;["val"]; + RightBracket;[]]; + CSharpExpressionLiteral - [56..58)::2 - [ ?] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Whitespace;[ ]; + QuestionMark;[?]; + MarkupBlock - [58..61)::3 + CSharpExpressionLiteral - [58..60)::2 - [ @] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Whitespace;[ ]; + Transition;[@]; + CSharpEphemeralTextLiteral - [60..61)::1 - [@] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Transition;[@]; + CSharpExpressionLiteral - [61..69)::8 - [DateTime] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[DateTime]; + CSharpExpressionLiteral - [69..71)::2 - [ :] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Whitespace;[ ]; + Text;[:]; + MarkupBlock - [71..85)::14 + CSharpExpressionLiteral - [71..72)::1 - [ ] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Whitespace;[ ]; + CSharpCodeBlock - [72..85)::13 + CSharpImplicitExpression - [72..85)::13 + CSharpTransition - [72..72)::0 + Transition;[]; + CSharpImplicitExpressionBody - [72..85)::13 + CSharpCodeBlock - [72..85)::13 + CSharpExpressionLiteral - [72..73)::1 - [@] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Transition;[@]; + CSharpExpressionLiteral - [73..85)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [85..86)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes7.tspans.txt new file mode 100644 index 0000000000..9cdbc1f1f8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [88] ) - PersonTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes8.cspans.txt new file mode 100644 index 0000000000..14eb11f1cf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes8.cspans.txt @@ -0,0 +1,6 @@ +Code span at (13:0,13 [2] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [70] ) +Code span at (27:0,27 [12] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [70] ) +Markup span at (47:0,47 [5] ) (Accepts:Any) - Parent: Markup block at (47:0,47 [19] ) +Markup span at (52:0,52 [1] ) (Accepts:Any) - Parent: Markup block at (52:0,52 [14] ) +Transition span at (53:0,53 [1] ) (Accepts:None) - Parent: Expression block at (53:0,53 [13] ) +Code span at (54:0,54 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (53:0,53 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes8.stree.txt new file mode 100644 index 0000000000..400226b998 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes8.stree.txt @@ -0,0 +1,63 @@ +RazorDocument - [0..70)::70 - [] + MarkupBlock - [0..70)::70 + MarkupTagHelperElement - [0..70)::70 - person[SelfClosing] - PersonTagHelper + MarkupTagHelperStartTag - [0..70)::70 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[person]; + MarkupTagHelperAttribute - [7..16)::9 - age - DoubleQuotes - Bound - [ age="12"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [age] - Gen - SpanEditHandler;Accepts:Any + Text;[age]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [13..15)::2 + CSharpExpressionLiteral - [13..15)::2 - [12] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[12]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [16..40)::24 - birthday - DoubleQuotes - Bound - [ birthday="DateTime.Now"] + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [17..25)::8 - [birthday] - Gen - SpanEditHandler;Accepts:Any + Text;[birthday]; + Equals;[=]; + MarkupTextLiteral - [26..27)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [27..39)::12 + CSharpExpressionLiteral - [27..39)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[DateTime.Now]; + MarkupTextLiteral - [39..40)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [40..67)::27 - name - DoubleQuotes - Bound - [ name="Time: @DateTime.Now"] + MarkupTextLiteral - [40..41)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [41..45)::4 - [name] - Gen - SpanEditHandler;Accepts:Any + Text;[name]; + Equals;[=]; + MarkupTextLiteral - [46..47)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [47..66)::19 + MarkupTextLiteral - [47..52)::5 - [Time:] - Gen - SpanEditHandler;Accepts:Any + Text;[Time:]; + MarkupBlock - [52..66)::14 + MarkupTextLiteral - [52..53)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpCodeBlock - [53..66)::13 + CSharpImplicitExpression - [53..66)::13 + CSharpTransition - [53..54)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [54..66)::12 + CSharpCodeBlock - [54..66)::12 + CSharpExpressionLiteral - [54..66)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [66..67)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [67..68)::1 + MarkupTextLiteral - [67..68)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes8.tspans.txt new file mode 100644 index 0000000000..ccef1ebc65 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes8.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [70] ) - PersonTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes9.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes9.cspans.txt new file mode 100644 index 0000000000..b593b2e5bc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes9.cspans.txt @@ -0,0 +1,8 @@ +Code span at (13:0,13 [2] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [73] ) +Code span at (27:0,27 [12] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [73] ) +Markup span at (47:0,47 [5] ) (Accepts:Any) - Parent: Markup block at (47:0,47 [22] ) +Markup span at (52:0,52 [2] ) (Accepts:None) - Parent: Markup block at (52:0,52 [3] ) +Markup span at (54:0,54 [1] ) (Accepts:None) - Parent: Markup block at (52:0,52 [3] ) +Markup span at (55:0,55 [1] ) (Accepts:Any) - Parent: Markup block at (55:0,55 [14] ) +Transition span at (56:0,56 [1] ) (Accepts:None) - Parent: Expression block at (56:0,56 [13] ) +Code span at (57:0,57 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (56:0,56 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes9.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes9.stree.txt new file mode 100644 index 0000000000..a6361b8d0b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes9.stree.txt @@ -0,0 +1,69 @@ +RazorDocument - [0..73)::73 - [] + MarkupBlock - [0..73)::73 + MarkupTagHelperElement - [0..73)::73 - person[SelfClosing] - PersonTagHelper + MarkupTagHelperStartTag - [0..73)::73 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[person]; + MarkupTagHelperAttribute - [7..16)::9 - age - DoubleQuotes - Bound - [ age="12"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..11)::3 - [age] - Gen - SpanEditHandler;Accepts:Any + Text;[age]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [13..15)::2 + CSharpExpressionLiteral - [13..15)::2 - [12] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[12]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [16..40)::24 - birthday - DoubleQuotes - Bound - [ birthday="DateTime.Now"] + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [17..25)::8 - [birthday] - Gen - SpanEditHandler;Accepts:Any + Text;[birthday]; + Equals;[=]; + MarkupTextLiteral - [26..27)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [27..39)::12 + CSharpExpressionLiteral - [27..39)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[DateTime.Now]; + MarkupTextLiteral - [39..40)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [40..70)::30 - name - DoubleQuotes - Bound - [ name="Time: @@ @DateTime.Now"] + MarkupTextLiteral - [40..41)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [41..45)::4 - [name] - Gen - SpanEditHandler;Accepts:Any + Text;[name]; + Equals;[=]; + MarkupTextLiteral - [46..47)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [47..69)::22 + MarkupTextLiteral - [47..52)::5 - [Time:] - Gen - SpanEditHandler;Accepts:Any + Text;[Time:]; + MarkupBlock - [52..55)::3 + MarkupTextLiteral - [52..54)::2 - [ @] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Transition;[@]; + MarkupEphemeralTextLiteral - [54..55)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupBlock - [55..69)::14 + MarkupTextLiteral - [55..56)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpCodeBlock - [56..69)::13 + CSharpImplicitExpression - [56..69)::13 + CSharpTransition - [56..57)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [57..69)::12 + CSharpCodeBlock - [57..69)::12 + CSharpExpressionLiteral - [57..69)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [69..70)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [70..71)::1 + MarkupTextLiteral - [70..71)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes9.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes9.tspans.txt new file mode 100644 index 0000000000..66b66f6b27 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes9.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [73] ) - PersonTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/FeatureDisabled_AddsErrorForMinimizedBooleanBoundAttributes.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/FeatureDisabled_AddsErrorForMinimizedBooleanBoundAttributes.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/FeatureDisabled_AddsErrorForMinimizedBooleanBoundAttributes.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/FeatureDisabled_AddsErrorForMinimizedBooleanBoundAttributes.diag.txt new file mode 100644 index 0000000000..39eecf8c70 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/FeatureDisabled_AddsErrorForMinimizedBooleanBoundAttributes.diag.txt @@ -0,0 +1,2 @@ +(1,8): Error RZ2008: Attribute 'boundbool' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. +(1,18): Error RZ2008: Attribute 'boundbooldict-key' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Boolean' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/FeatureDisabled_AddsErrorForMinimizedBooleanBoundAttributes.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/FeatureDisabled_AddsErrorForMinimizedBooleanBoundAttributes.stree.txt new file mode 100644 index 0000000000..116e8180ef --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/FeatureDisabled_AddsErrorForMinimizedBooleanBoundAttributes.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..37)::37 - [] + MarkupBlock - [0..37)::37 + MarkupTagHelperElement - [0..37)::37 - input[SelfClosing] - InputTagHelper + MarkupTagHelperStartTag - [0..37)::37 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..16)::10 - boundbool - Minimized - Bound - [ boundbool] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..16)::9 - [boundbool] - Gen - SpanEditHandler;Accepts:Any + Text;[boundbool]; + MarkupMinimizedTagHelperAttribute - [16..34)::18 - boundbooldict-key - Minimized - Bound - [ boundbooldict-key] + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [17..34)::17 - [boundbooldict-key] - Gen - SpanEditHandler;Accepts:Any + Text;[boundbooldict-key]; + MarkupMiscAttributeContent - [34..35)::1 + MarkupTextLiteral - [34..35)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/FeatureDisabled_AddsErrorForMinimizedBooleanBoundAttributes.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/FeatureDisabled_AddsErrorForMinimizedBooleanBoundAttributes.tspans.txt new file mode 100644 index 0000000000..c28ec2a704 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/FeatureDisabled_AddsErrorForMinimizedBooleanBoundAttributes.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [37] ) - InputTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block1.cspans.txt new file mode 100644 index 0000000000..0391bc3c6c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block1.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +Transition span at (24:0,24 [1] ) (Accepts:None) - Parent: Expression block at (24:0,24 [13] ) +Code span at (25:0,25 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (24:0,24 [13] ) +Code span at (41:0,41 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [42] ) +MetaCode span at (41:0,41 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +Markup span at (42:0,42 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block1.stree.txt new file mode 100644 index 0000000000..f1241cf3ec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block1.stree.txt @@ -0,0 +1,49 @@ +RazorDocument - [0..42)::42 - [@{}] + MarkupBlock - [0..42)::42 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..42)::42 + CSharpStatement - [0..42)::42 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..42)::41 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..41)::39 + MarkupBlock - [2..41)::39 + MarkupTagHelperElement - [2..41)::39 - input[SelfClosing] - inputtaghelper + MarkupTagHelperStartTag - [2..41)::39 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [8..38)::30 - data-required - SingleQuotes - Unbound - [ data-required='@DateTime.Now'] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..22)::13 - [data-required] - Gen - SpanEditHandler;Accepts:Any + Text;[data-required]; + Equals;[=]; + MarkupTextLiteral - [23..24)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [24..37)::13 + CSharpCodeBlock - [24..37)::13 + CSharpImplicitExpression - [24..37)::13 + CSharpTransition - [24..25)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [25..37)::12 + CSharpCodeBlock - [25..37)::12 + CSharpExpressionLiteral - [25..37)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [37..38)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [38..39)::1 + MarkupTextLiteral - [38..39)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [41..41)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [41..42)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [42..42)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block1.tspans.txt new file mode 100644 index 0000000000..8c4810da56 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [39] ) - inputtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block2.cspans.txt new file mode 100644 index 0000000000..b97cd38cd0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block2.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (24:0,24 [5] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [31] ) +Code span at (33:0,33 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (33:0,33 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (34:0,34 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block2.stree.txt new file mode 100644 index 0000000000..c6f66a1cf4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block2.stree.txt @@ -0,0 +1,41 @@ +RazorDocument - [0..34)::34 - [@{}] + MarkupBlock - [0..34)::34 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..34)::34 + CSharpStatement - [0..34)::34 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..34)::33 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..33)::31 + MarkupBlock - [2..33)::31 + MarkupTagHelperElement - [2..33)::31 - input[SelfClosing] - inputtaghelper + MarkupTagHelperStartTag - [2..33)::31 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [8..30)::22 - data-required - SingleQuotes - Unbound - [ data-required='value'] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..22)::13 - [data-required] - Gen - SpanEditHandler;Accepts:Any + Text;[data-required]; + Equals;[=]; + MarkupTextLiteral - [23..24)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [24..29)::5 + MarkupTextLiteral - [24..29)::5 - [value] - Gen - SpanEditHandler;Accepts:Any + Text;[value]; + MarkupTextLiteral - [29..30)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [30..31)::1 + MarkupTextLiteral - [30..31)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [33..34)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [34..34)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block2.tspans.txt new file mode 100644 index 0000000000..6104535694 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [31] ) - inputtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block3.cspans.txt new file mode 100644 index 0000000000..b42754acf3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block3.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [49] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [49] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [49] ) +Markup span at (24:0,24 [7] ) (Accepts:Any) - Parent: Markup block at (24:0,24 [20] ) +Transition span at (31:0,31 [1] ) (Accepts:None) - Parent: Expression block at (31:0,31 [13] ) +Code span at (32:0,32 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (31:0,31 [13] ) +Code span at (48:0,48 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [49] ) +MetaCode span at (48:0,48 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [49] ) +Markup span at (49:0,49 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [49] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block3.stree.txt new file mode 100644 index 0000000000..917a150b95 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block3.stree.txt @@ -0,0 +1,52 @@ +RazorDocument - [0..49)::49 - [@{}] + MarkupBlock - [0..49)::49 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..49)::49 + CSharpStatement - [0..49)::49 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..49)::48 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..48)::46 + MarkupBlock - [2..48)::46 + MarkupTagHelperElement - [2..48)::46 - input[SelfClosing] - inputtaghelper + MarkupTagHelperStartTag - [2..48)::46 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [8..45)::37 - data-required - SingleQuotes - Unbound - [ data-required='prefix @DateTime.Now'] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..22)::13 - [data-required] - Gen - SpanEditHandler;Accepts:Any + Text;[data-required]; + Equals;[=]; + MarkupTextLiteral - [23..24)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [24..44)::20 + MarkupTextLiteral - [24..31)::7 - [prefix ] - Gen - SpanEditHandler;Accepts:Any + Text;[prefix]; + Whitespace;[ ]; + CSharpCodeBlock - [31..44)::13 + CSharpImplicitExpression - [31..44)::13 + CSharpTransition - [31..32)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [32..44)::12 + CSharpCodeBlock - [32..44)::12 + CSharpExpressionLiteral - [32..44)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [44..45)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [45..46)::1 + MarkupTextLiteral - [45..46)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [48..48)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [48..49)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [49..49)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block3.tspans.txt new file mode 100644 index 0000000000..17bc990785 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [46] ) - inputtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block4.cspans.txt new file mode 100644 index 0000000000..90cbfa0f75 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block4.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [49] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [49] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [49] ) +Transition span at (24:0,24 [1] ) (Accepts:None) - Parent: Expression block at (24:0,24 [13] ) +Code span at (25:0,25 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (24:0,24 [13] ) +Markup span at (37:0,37 [7] ) (Accepts:Any) - Parent: Markup block at (24:0,24 [20] ) +Code span at (48:0,48 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [49] ) +MetaCode span at (48:0,48 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [49] ) +Markup span at (49:0,49 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [49] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block4.stree.txt new file mode 100644 index 0000000000..cbfa94a75a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block4.stree.txt @@ -0,0 +1,52 @@ +RazorDocument - [0..49)::49 - [@{}] + MarkupBlock - [0..49)::49 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..49)::49 + CSharpStatement - [0..49)::49 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..49)::48 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..48)::46 + MarkupBlock - [2..48)::46 + MarkupTagHelperElement - [2..48)::46 - input[SelfClosing] - inputtaghelper + MarkupTagHelperStartTag - [2..48)::46 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [8..45)::37 - data-required - SingleQuotes - Unbound - [ data-required='@DateTime.Now suffix'] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..22)::13 - [data-required] - Gen - SpanEditHandler;Accepts:Any + Text;[data-required]; + Equals;[=]; + MarkupTextLiteral - [23..24)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [24..44)::20 + CSharpCodeBlock - [24..37)::13 + CSharpImplicitExpression - [24..37)::13 + CSharpTransition - [24..25)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [25..37)::12 + CSharpCodeBlock - [25..37)::12 + CSharpExpressionLiteral - [25..37)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [37..44)::7 - [ suffix] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[suffix]; + MarkupTextLiteral - [44..45)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [45..46)::1 + MarkupTextLiteral - [45..46)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [48..48)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [48..49)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [49..49)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block4.tspans.txt new file mode 100644 index 0000000000..17bc990785 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [46] ) - inputtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block5.cspans.txt new file mode 100644 index 0000000000..912f6a9910 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block5.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [56] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [56] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [56] ) +Markup span at (24:0,24 [7] ) (Accepts:Any) - Parent: Markup block at (24:0,24 [27] ) +Transition span at (31:0,31 [1] ) (Accepts:None) - Parent: Expression block at (31:0,31 [13] ) +Code span at (32:0,32 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (31:0,31 [13] ) +Markup span at (44:0,44 [7] ) (Accepts:Any) - Parent: Markup block at (24:0,24 [27] ) +Code span at (55:0,55 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [56] ) +MetaCode span at (55:0,55 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [56] ) +Markup span at (56:0,56 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [56] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block5.stree.txt new file mode 100644 index 0000000000..c511a32c13 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block5.stree.txt @@ -0,0 +1,55 @@ +RazorDocument - [0..56)::56 - [@{}] + MarkupBlock - [0..56)::56 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..56)::56 + CSharpStatement - [0..56)::56 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..56)::55 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..55)::53 + MarkupBlock - [2..55)::53 + MarkupTagHelperElement - [2..55)::53 - input[SelfClosing] - inputtaghelper + MarkupTagHelperStartTag - [2..55)::53 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [8..52)::44 - data-required - SingleQuotes - Unbound - [ data-required='prefix @DateTime.Now suffix'] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..22)::13 - [data-required] - Gen - SpanEditHandler;Accepts:Any + Text;[data-required]; + Equals;[=]; + MarkupTextLiteral - [23..24)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [24..51)::27 + MarkupTextLiteral - [24..31)::7 - [prefix ] - Gen - SpanEditHandler;Accepts:Any + Text;[prefix]; + Whitespace;[ ]; + CSharpCodeBlock - [31..44)::13 + CSharpImplicitExpression - [31..44)::13 + CSharpTransition - [31..32)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [32..44)::12 + CSharpCodeBlock - [32..44)::12 + CSharpExpressionLiteral - [32..44)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [44..51)::7 - [ suffix] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[suffix]; + MarkupTextLiteral - [51..52)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [52..53)::1 + MarkupTextLiteral - [52..53)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [55..55)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [55..56)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [56..56)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block5.tspans.txt new file mode 100644 index 0000000000..b3c0a3f1b5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [53] ) - inputtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block6.cspans.txt new file mode 100644 index 0000000000..a02a857505 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block6.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [85] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [85] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [85] ) +Markup span at (38:0,38 [7] ) (Accepts:Any) - Parent: Markup block at (38:0,38 [27] ) +Transition span at (45:0,45 [1] ) (Accepts:None) - Parent: Expression block at (45:0,45 [13] ) +Code span at (46:0,46 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (45:0,45 [13] ) +Markup span at (58:0,58 [7] ) (Accepts:Any) - Parent: Markup block at (38:0,38 [27] ) +Code span at (84:0,84 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [85] ) +MetaCode span at (84:0,84 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [85] ) +Markup span at (85:0,85 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [85] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block6.stree.txt new file mode 100644 index 0000000000..3233942ef7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block6.stree.txt @@ -0,0 +1,65 @@ +RazorDocument - [0..85)::85 - [@{}] + MarkupBlock - [0..85)::85 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..85)::85 + CSharpStatement - [0..85)::85 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..85)::84 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..84)::82 + MarkupBlock - [2..84)::82 + MarkupTagHelperElement - [2..84)::82 - input[SelfClosing] - inputtaghelper + MarkupTagHelperStartTag - [2..84)::82 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [8..22)::14 - pre-attribute - Minimized - Unbound - [ pre-attribute] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..22)::13 - [pre-attribute] - Gen - SpanEditHandler;Accepts:Any + Text;[pre-attribute]; + MarkupTagHelperAttribute - [22..66)::44 - data-required - SingleQuotes - Unbound - [ data-required='prefix @DateTime.Now suffix'] + MarkupTextLiteral - [22..23)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [23..36)::13 - [data-required] - Gen - SpanEditHandler;Accepts:Any + Text;[data-required]; + Equals;[=]; + MarkupTextLiteral - [37..38)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [38..65)::27 + MarkupTextLiteral - [38..45)::7 - [prefix ] - Gen - SpanEditHandler;Accepts:Any + Text;[prefix]; + Whitespace;[ ]; + CSharpCodeBlock - [45..58)::13 + CSharpImplicitExpression - [45..58)::13 + CSharpTransition - [45..46)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [46..58)::12 + CSharpCodeBlock - [46..58)::12 + CSharpExpressionLiteral - [46..58)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [58..65)::7 - [ suffix] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[suffix]; + MarkupTextLiteral - [65..66)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [66..81)::15 - post-attribute - Minimized - Unbound - [ post-attribute] + MarkupTextLiteral - [66..67)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [67..81)::14 - [post-attribute] - Gen - SpanEditHandler;Accepts:Any + Text;[post-attribute]; + MarkupMiscAttributeContent - [81..82)::1 + MarkupTextLiteral - [81..82)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [84..84)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [84..85)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [85..85)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block6.tspans.txt new file mode 100644 index 0000000000..c5d9978610 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block6.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [82] ) - inputtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block7.cspans.txt new file mode 100644 index 0000000000..636e0fa0e0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block7.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [63] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [63] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [63] ) +Transition span at (24:0,24 [1] ) (Accepts:None) - Parent: Expression block at (24:0,24 [13] ) +Code span at (25:0,25 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (24:0,24 [13] ) +Markup span at (37:0,37 [8] ) (Accepts:Any) - Parent: Markup block at (24:0,24 [34] ) +Transition span at (45:0,45 [1] ) (Accepts:None) - Parent: Expression block at (45:0,45 [13] ) +Code span at (46:0,46 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (45:0,45 [13] ) +Code span at (62:0,62 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [63] ) +MetaCode span at (62:0,62 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [63] ) +Markup span at (63:0,63 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [63] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block7.stree.txt new file mode 100644 index 0000000000..f9bd7098d2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block7.stree.txt @@ -0,0 +1,63 @@ +RazorDocument - [0..63)::63 - [@{}] + MarkupBlock - [0..63)::63 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..63)::63 + CSharpStatement - [0..63)::63 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..63)::62 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..62)::60 + MarkupBlock - [2..62)::60 + MarkupTagHelperElement - [2..62)::60 - input[SelfClosing] - inputtaghelper + MarkupTagHelperStartTag - [2..62)::60 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [8..59)::51 - data-required - SingleQuotes - Unbound - [ data-required='@DateTime.Now middle @DateTime.Now'] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..22)::13 - [data-required] - Gen - SpanEditHandler;Accepts:Any + Text;[data-required]; + Equals;[=]; + MarkupTextLiteral - [23..24)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [24..58)::34 + CSharpCodeBlock - [24..37)::13 + CSharpImplicitExpression - [24..37)::13 + CSharpTransition - [24..25)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [25..37)::12 + CSharpCodeBlock - [25..37)::12 + CSharpExpressionLiteral - [25..37)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [37..45)::8 - [ middle ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[middle]; + Whitespace;[ ]; + CSharpCodeBlock - [45..58)::13 + CSharpImplicitExpression - [45..58)::13 + CSharpTransition - [45..46)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [46..58)::12 + CSharpCodeBlock - [46..58)::12 + CSharpExpressionLiteral - [46..58)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [58..59)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [59..60)::1 + MarkupTextLiteral - [59..60)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [62..62)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [62..63)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [63..63)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block7.tspans.txt new file mode 100644 index 0000000000..d2ec83b74f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Block7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [60] ) - inputtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document1.cspans.txt new file mode 100644 index 0000000000..0f363fa410 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document1.cspans.txt @@ -0,0 +1,2 @@ +Transition span at (22:0,22 [1] ) (Accepts:None) - Parent: Expression block at (22:0,22 [13] ) +Code span at (23:0,23 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (22:0,22 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document1.stree.txt new file mode 100644 index 0000000000..005a8559dc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document1.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..39)::39 - [] + MarkupBlock - [0..39)::39 + MarkupTagHelperElement - [0..39)::39 - input[SelfClosing] - inputtaghelper + MarkupTagHelperStartTag - [0..39)::39 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..36)::30 - data-required - SingleQuotes - Unbound - [ data-required='@DateTime.Now'] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..20)::13 - [data-required] - Gen - SpanEditHandler;Accepts:Any + Text;[data-required]; + Equals;[=]; + MarkupTextLiteral - [21..22)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [22..35)::13 + CSharpCodeBlock - [22..35)::13 + CSharpImplicitExpression - [22..35)::13 + CSharpTransition - [22..23)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [23..35)::12 + CSharpCodeBlock - [23..35)::12 + CSharpExpressionLiteral - [23..35)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [35..36)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [36..37)::1 + MarkupTextLiteral - [36..37)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document1.tspans.txt new file mode 100644 index 0000000000..12328928a9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [39] ) - inputtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document2.cspans.txt new file mode 100644 index 0000000000..c7e4c20b33 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document2.cspans.txt @@ -0,0 +1 @@ +Markup span at (22:0,22 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [31] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document2.stree.txt new file mode 100644 index 0000000000..6add56eab5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document2.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..31)::31 - [] + MarkupBlock - [0..31)::31 + MarkupTagHelperElement - [0..31)::31 - input[SelfClosing] - inputtaghelper + MarkupTagHelperStartTag - [0..31)::31 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..28)::22 - data-required - SingleQuotes - Unbound - [ data-required='value'] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..20)::13 - [data-required] - Gen - SpanEditHandler;Accepts:Any + Text;[data-required]; + Equals;[=]; + MarkupTextLiteral - [21..22)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [22..27)::5 + MarkupTextLiteral - [22..27)::5 - [value] - Gen - SpanEditHandler;Accepts:Any + Text;[value]; + MarkupTextLiteral - [27..28)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [28..29)::1 + MarkupTextLiteral - [28..29)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document2.tspans.txt new file mode 100644 index 0000000000..230d60af71 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [31] ) - inputtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document3.cspans.txt new file mode 100644 index 0000000000..1500c5924f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document3.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (22:0,22 [7] ) (Accepts:Any) - Parent: Markup block at (22:0,22 [20] ) +Transition span at (29:0,29 [1] ) (Accepts:None) - Parent: Expression block at (29:0,29 [13] ) +Code span at (30:0,30 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (29:0,29 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document3.stree.txt new file mode 100644 index 0000000000..c473d31919 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document3.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..46)::46 - [] + MarkupBlock - [0..46)::46 + MarkupTagHelperElement - [0..46)::46 - input[SelfClosing] - inputtaghelper + MarkupTagHelperStartTag - [0..46)::46 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..43)::37 - data-required - SingleQuotes - Unbound - [ data-required='prefix @DateTime.Now'] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..20)::13 - [data-required] - Gen - SpanEditHandler;Accepts:Any + Text;[data-required]; + Equals;[=]; + MarkupTextLiteral - [21..22)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [22..42)::20 + MarkupTextLiteral - [22..29)::7 - [prefix ] - Gen - SpanEditHandler;Accepts:Any + Text;[prefix]; + Whitespace;[ ]; + CSharpCodeBlock - [29..42)::13 + CSharpImplicitExpression - [29..42)::13 + CSharpTransition - [29..30)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [30..42)::12 + CSharpCodeBlock - [30..42)::12 + CSharpExpressionLiteral - [30..42)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [42..43)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [43..44)::1 + MarkupTextLiteral - [43..44)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document3.tspans.txt new file mode 100644 index 0000000000..81cfc6f2a1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [46] ) - inputtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document4.cspans.txt new file mode 100644 index 0000000000..7a49d77d28 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document4.cspans.txt @@ -0,0 +1,3 @@ +Transition span at (22:0,22 [1] ) (Accepts:None) - Parent: Expression block at (22:0,22 [13] ) +Code span at (23:0,23 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (22:0,22 [13] ) +Markup span at (35:0,35 [7] ) (Accepts:Any) - Parent: Markup block at (22:0,22 [20] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document4.stree.txt new file mode 100644 index 0000000000..1933f85f88 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document4.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..46)::46 - [] + MarkupBlock - [0..46)::46 + MarkupTagHelperElement - [0..46)::46 - input[SelfClosing] - inputtaghelper + MarkupTagHelperStartTag - [0..46)::46 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..43)::37 - data-required - SingleQuotes - Unbound - [ data-required='@DateTime.Now suffix'] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..20)::13 - [data-required] - Gen - SpanEditHandler;Accepts:Any + Text;[data-required]; + Equals;[=]; + MarkupTextLiteral - [21..22)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [22..42)::20 + CSharpCodeBlock - [22..35)::13 + CSharpImplicitExpression - [22..35)::13 + CSharpTransition - [22..23)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [23..35)::12 + CSharpCodeBlock - [23..35)::12 + CSharpExpressionLiteral - [23..35)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [35..42)::7 - [ suffix] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[suffix]; + MarkupTextLiteral - [42..43)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [43..44)::1 + MarkupTextLiteral - [43..44)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document4.tspans.txt new file mode 100644 index 0000000000..81cfc6f2a1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [46] ) - inputtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document5.cspans.txt new file mode 100644 index 0000000000..4ffa71d61f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document5.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (22:0,22 [7] ) (Accepts:Any) - Parent: Markup block at (22:0,22 [27] ) +Transition span at (29:0,29 [1] ) (Accepts:None) - Parent: Expression block at (29:0,29 [13] ) +Code span at (30:0,30 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (29:0,29 [13] ) +Markup span at (42:0,42 [7] ) (Accepts:Any) - Parent: Markup block at (22:0,22 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document5.stree.txt new file mode 100644 index 0000000000..1e750fbb5a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document5.stree.txt @@ -0,0 +1,38 @@ +RazorDocument - [0..53)::53 - [] + MarkupBlock - [0..53)::53 + MarkupTagHelperElement - [0..53)::53 - input[SelfClosing] - inputtaghelper + MarkupTagHelperStartTag - [0..53)::53 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..50)::44 - data-required - SingleQuotes - Unbound - [ data-required='prefix @DateTime.Now suffix'] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..20)::13 - [data-required] - Gen - SpanEditHandler;Accepts:Any + Text;[data-required]; + Equals;[=]; + MarkupTextLiteral - [21..22)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [22..49)::27 + MarkupTextLiteral - [22..29)::7 - [prefix ] - Gen - SpanEditHandler;Accepts:Any + Text;[prefix]; + Whitespace;[ ]; + CSharpCodeBlock - [29..42)::13 + CSharpImplicitExpression - [29..42)::13 + CSharpTransition - [29..30)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [30..42)::12 + CSharpCodeBlock - [30..42)::12 + CSharpExpressionLiteral - [30..42)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [42..49)::7 - [ suffix] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[suffix]; + MarkupTextLiteral - [49..50)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [50..51)::1 + MarkupTextLiteral - [50..51)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document5.tspans.txt new file mode 100644 index 0000000000..0a6025f261 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [53] ) - inputtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document6.cspans.txt new file mode 100644 index 0000000000..72d6434606 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document6.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (36:0,36 [7] ) (Accepts:Any) - Parent: Markup block at (36:0,36 [27] ) +Transition span at (43:0,43 [1] ) (Accepts:None) - Parent: Expression block at (43:0,43 [13] ) +Code span at (44:0,44 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (43:0,43 [13] ) +Markup span at (56:0,56 [7] ) (Accepts:Any) - Parent: Markup block at (36:0,36 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document6.stree.txt new file mode 100644 index 0000000000..2389a37fac --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document6.stree.txt @@ -0,0 +1,48 @@ +RazorDocument - [0..82)::82 - [] + MarkupBlock - [0..82)::82 + MarkupTagHelperElement - [0..82)::82 - input[SelfClosing] - inputtaghelper + MarkupTagHelperStartTag - [0..82)::82 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..20)::14 - pre-attribute - Minimized - Unbound - [ pre-attribute] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..20)::13 - [pre-attribute] - Gen - SpanEditHandler;Accepts:Any + Text;[pre-attribute]; + MarkupTagHelperAttribute - [20..64)::44 - data-required - SingleQuotes - Unbound - [ data-required='prefix @DateTime.Now suffix'] + MarkupTextLiteral - [20..21)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [21..34)::13 - [data-required] - Gen - SpanEditHandler;Accepts:Any + Text;[data-required]; + Equals;[=]; + MarkupTextLiteral - [35..36)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [36..63)::27 + MarkupTextLiteral - [36..43)::7 - [prefix ] - Gen - SpanEditHandler;Accepts:Any + Text;[prefix]; + Whitespace;[ ]; + CSharpCodeBlock - [43..56)::13 + CSharpImplicitExpression - [43..56)::13 + CSharpTransition - [43..44)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [44..56)::12 + CSharpCodeBlock - [44..56)::12 + CSharpExpressionLiteral - [44..56)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [56..63)::7 - [ suffix] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[suffix]; + MarkupTextLiteral - [63..64)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [64..79)::15 - post-attribute - Minimized - Unbound - [ post-attribute] + MarkupTextLiteral - [64..65)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [65..79)::14 - [post-attribute] - Gen - SpanEditHandler;Accepts:Any + Text;[post-attribute]; + MarkupMiscAttributeContent - [79..80)::1 + MarkupTextLiteral - [79..80)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document6.tspans.txt new file mode 100644 index 0000000000..368fd6b6d8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document6.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [82] ) - inputtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document7.cspans.txt new file mode 100644 index 0000000000..4cf3018f98 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document7.cspans.txt @@ -0,0 +1,5 @@ +Transition span at (22:0,22 [1] ) (Accepts:None) - Parent: Expression block at (22:0,22 [13] ) +Code span at (23:0,23 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (22:0,22 [13] ) +Markup span at (35:0,35 [8] ) (Accepts:Any) - Parent: Markup block at (22:0,22 [34] ) +Transition span at (43:0,43 [1] ) (Accepts:None) - Parent: Expression block at (43:0,43 [13] ) +Code span at (44:0,44 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (43:0,43 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document7.stree.txt new file mode 100644 index 0000000000..f8d3ba9284 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document7.stree.txt @@ -0,0 +1,46 @@ +RazorDocument - [0..60)::60 - [] + MarkupBlock - [0..60)::60 + MarkupTagHelperElement - [0..60)::60 - input[SelfClosing] - inputtaghelper + MarkupTagHelperStartTag - [0..60)::60 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..57)::51 - data-required - SingleQuotes - Unbound - [ data-required='@DateTime.Now middle @DateTime.Now'] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..20)::13 - [data-required] - Gen - SpanEditHandler;Accepts:Any + Text;[data-required]; + Equals;[=]; + MarkupTextLiteral - [21..22)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [22..56)::34 + CSharpCodeBlock - [22..35)::13 + CSharpImplicitExpression - [22..35)::13 + CSharpTransition - [22..23)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [23..35)::12 + CSharpCodeBlock - [23..35)::12 + CSharpExpressionLiteral - [23..35)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [35..43)::8 - [ middle ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[middle]; + Whitespace;[ ]; + CSharpCodeBlock - [43..56)::13 + CSharpImplicitExpression - [43..56)::13 + CSharpTransition - [43..44)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [44..56)::12 + CSharpCodeBlock - [44..56)::12 + CSharpExpressionLiteral - [44..56)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [56..57)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [57..58)::1 + MarkupTextLiteral - [57..58)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document7.tspans.txt new file mode 100644 index 0000000000..cd85eb4a9f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/GeneratesExpectedOutputForUnboundDataDashAttributes_Document7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [60] ) - inputtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml1.cspans.txt new file mode 100644 index 0000000000..b036e36e17 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml1.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [1] ) +Markup span at (1:0,1 [1] ) (Accepts:Any) - Parent: Tag block at (1:0,1 [1] ) +Markup span at (5:0,5 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml1.stree.txt new file mode 100644 index 0000000000..d7c4029b8d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml1.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..11)::11 - [<<

                        >>

                        ] + MarkupBlock - [0..11)::11 + MarkupElement - [0..1)::1 + MarkupStartTag - [0..1)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupElement - [1..2)::1 + MarkupStartTag - [1..2)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperElement - [2..11)::9 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [2..5)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [5..7)::2 - [>>] - Gen - SpanEditHandler;Accepts:Any + CloseAngle;[>]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [7..11)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml1.tspans.txt new file mode 100644 index 0000000000..894ab5361e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [9] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml10.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml10.cspans.txt new file mode 100644 index 0000000000..2961977bf2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml10.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (3:0,3 [2] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [17] ) +Transition span at (5:0,5 [1] ) (Accepts:None) - Parent: Expression block at (5:0,5 [13] ) +Code span at (6:0,6 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (5:0,5 [13] ) +Markup span at (18:0,18 [2] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [17] ) +Markup span at (20:0,20 [3] ) (Accepts:Any) - Parent: Tag block at (20:0,20 [3] ) +Transition span at (23:0,23 [1] ) (Accepts:None) - Parent: Expression block at (23:0,23 [13] ) +Code span at (24:0,24 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (23:0,23 [13] ) +Markup span at (36:0,36 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [42] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml10.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml10.stree.txt new file mode 100644 index 0000000000..d7132ba6a3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml10.stree.txt @@ -0,0 +1,53 @@ +RazorDocument - [0..42)::42 - [

                        < @DateTime.Now >

                        ] + MarkupBlock - [0..42)::42 + MarkupTagHelperElement - [0..42)::42 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [3..23)::20 + MarkupStartTag - [3..20)::17 - [< @DateTime.Now >] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + MarkupMiscAttributeContent - [4..19)::15 + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CSharpCodeBlock - [5..18)::13 + CSharpImplicitExpression - [5..18)::13 + CSharpTransition - [5..6)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [6..18)::12 + CSharpCodeBlock - [6..18)::12 + CSharpExpressionLiteral - [6..18)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [18..19)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[>]; + MarkupEndTag - [20..23)::3 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[]; + MarkupMiscAttributeContent - [22..23)::1 + MarkupTextLiteral - [22..23)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[]; + CSharpCodeBlock - [23..36)::13 + CSharpImplicitExpression - [23..36)::13 + CSharpTransition - [23..24)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [24..36)::12 + CSharpCodeBlock - [24..36)::12 + CSharpExpressionLiteral - [24..36)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [36..38)::2 - [ >] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [38..42)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml10.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml10.tspans.txt new file mode 100644 index 0000000000..ba17544451 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml10.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [42] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml2.cspans.txt new file mode 100644 index 0000000000..0e6957363a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml2.cspans.txt @@ -0,0 +1 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [1] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml2.stree.txt new file mode 100644 index 0000000000..6287be03cd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml2.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..6)::6 - [<

                        ] + MarkupBlock - [0..6)::6 + MarkupElement - [0..1)::1 + MarkupStartTag - [0..1)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperElement - [1..6)::5 - p[SelfClosing] - ptaghelper + MarkupTagHelperStartTag - [1..6)::5 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMiscAttributeContent - [3..4)::1 + MarkupTextLiteral - [3..4)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml2.tspans.txt new file mode 100644 index 0000000000..84e47f2a85 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (1:0,1 [5] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml3.cspans.txt new file mode 100644 index 0000000000..a81209229a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml3.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [6] ) +Markup span at (1:0,1 [2] ) (Accepts:Any) - Parent: Markup block at (1:0,1 [2] ) +Markup span at (3:0,3 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml3.stree.txt new file mode 100644 index 0000000000..3ad4a9bcc6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml3.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..6)::6 - [< p />] + MarkupBlock - [0..6)::6 + MarkupElement - [0..6)::6 + MarkupStartTag - [0..6)::6 - [< p />] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + MarkupMinimizedAttributeBlock - [1..3)::2 - [ p] + MarkupTextLiteral - [1..2)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [2..3)::1 - [p] - Gen - SpanEditHandler;Accepts:Any + Text;[p]; + MarkupMiscAttributeContent - [3..4)::1 + MarkupTextLiteral - [3..4)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml4.cspans.txt new file mode 100644 index 0000000000..4f69cb3f10 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml4.cspans.txt @@ -0,0 +1 @@ +Markup span at (0:0,0 [7] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml4.stree.txt new file mode 100644 index 0000000000..ed83e316d0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml4.stree.txt @@ -0,0 +1,19 @@ +RazorDocument - [0..12)::12 - [] + MarkupBlock - [0..12)::12 + MarkupElement - [0..7)::7 + MarkupStartTag - [0..7)::7 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMiscAttributeContent - [6..7)::1 + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[]; + MarkupTagHelperElement - [7..12)::5 - p[SelfClosing] - ptaghelper + MarkupTagHelperStartTag - [7..12)::5 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMiscAttributeContent - [9..10)::1 + MarkupTextLiteral - [9..10)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml4.tspans.txt new file mode 100644 index 0000000000..42777cb027 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (7:0,7 [5] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml5.cspans.txt new file mode 100644 index 0000000000..c6be2f1925 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml5.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [14] ) +Markup span at (1:0,1 [8] ) (Accepts:Any) - Parent: Markup block at (1:0,1 [12] ) +Markup span at (9:0,9 [3] ) (Accepts:Any) - Parent: Markup block at (1:0,1 [12] ) +Markup span at (12:0,12 [1] ) (Accepts:Any) - Parent: Markup block at (1:0,1 [12] ) +Markup span at (13:0,13 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [14] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml5.stree.txt new file mode 100644 index 0000000000..cf46a0834f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml5.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..19)::19 - [< class="foo"

                        ] + MarkupBlock - [0..19)::19 + MarkupElement - [0..14)::14 + MarkupStartTag - [0..14)::14 - [< class="foo" ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + MarkupAttributeBlock - [1..13)::12 - [ class="foo"] + MarkupTextLiteral - [1..2)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [2..7)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [8..9)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [9..12)::3 + MarkupLiteralAttributeValue - [9..12)::3 - [foo] + MarkupTextLiteral - [9..12)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [13..14)::1 + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[]; + MarkupTagHelperElement - [14..19)::5 - p[SelfClosing] - ptaghelper + MarkupTagHelperStartTag - [14..19)::5 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMiscAttributeContent - [16..17)::1 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml5.tspans.txt new file mode 100644 index 0000000000..ad370b61a7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (14:0,14 [5] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml6.cspans.txt new file mode 100644 index 0000000000..680a4f547c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml6.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [2] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [1] ) +Markup span at (6:0,6 [2] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [9] ) +Markup span at (12:0,12 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml6.stree.txt new file mode 100644 index 0000000000..3203e9a1e8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml6.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..13)::13 - [/>

                        >] + MarkupBlock - [0..13)::13 + MarkupElement - [0..2)::2 + MarkupEndTag - [0..2)::2 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[]; + CloseAngle;[]; + MarkupElement - [2..3)::1 + MarkupStartTag - [2..3)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperElement - [3..12)::9 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [3..6)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [6..8)::2 - [/>] - Gen - SpanEditHandler;Accepts:Any + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [8..12)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [12..13)::1 - [>] - Gen - SpanEditHandler;Accepts:Any + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml6.tspans.txt new file mode 100644 index 0000000000..4efdfadfb9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml6.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (3:0,3 [9] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml7.cspans.txt new file mode 100644 index 0000000000..026682c72d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml7.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [2] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [1] ) +Markup span at (6:0,6 [2] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [17] ) +Markup span at (8:0,8 [8] ) (Accepts:Any) - Parent: Tag block at (8:0,8 [8] ) +Markup span at (20:0,20 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml7.stree.txt new file mode 100644 index 0000000000..e7a7bd8bef --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml7.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..21)::21 - [/>

                        >] + MarkupBlock - [0..21)::21 + MarkupElement - [0..2)::2 + MarkupEndTag - [0..2)::2 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[]; + CloseAngle;[]; + MarkupElement - [2..3)::1 + MarkupStartTag - [2..3)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperElement - [3..20)::17 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [3..6)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [6..8)::2 - [/>] - Gen - SpanEditHandler;Accepts:Any + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupElement - [8..16)::8 + MarkupStartTag - [8..16)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [16..20)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [20..21)::1 - [>] - Gen - SpanEditHandler;Accepts:Any + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml7.tspans.txt new file mode 100644 index 0000000000..f66bf28d95 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (3:0,3 [17] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml8.cspans.txt new file mode 100644 index 0000000000..31aa41b4cd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml8.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [2] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [1] ) +Transition span at (6:0,6 [1] ) (Accepts:None) - Parent: Expression block at (6:0,6 [13] ) +Code span at (7:0,7 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (6:0,6 [13] ) +Markup span at (19:0,19 [2] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [30] ) +Markup span at (21:0,21 [8] ) (Accepts:Any) - Parent: Tag block at (21:0,21 [8] ) +Markup span at (33:0,33 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml8.stree.txt new file mode 100644 index 0000000000..d15f747b50 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml8.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..34)::34 - [@DateTime.Now/>

                        >] + MarkupBlock - [0..34)::34 + MarkupElement - [0..2)::2 + MarkupEndTag - [0..2)::2 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[]; + CloseAngle;[]; + MarkupElement - [2..3)::1 + MarkupStartTag - [2..3)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperElement - [3..33)::30 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [3..6)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + CSharpCodeBlock - [6..19)::13 + CSharpImplicitExpression - [6..19)::13 + CSharpTransition - [6..7)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [7..19)::12 + CSharpCodeBlock - [7..19)::12 + CSharpExpressionLiteral - [7..19)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [19..21)::2 - [/>] - Gen - SpanEditHandler;Accepts:Any + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupElement - [21..29)::8 + MarkupStartTag - [21..29)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [29..33)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [33..34)::1 - [>] - Gen - SpanEditHandler;Accepts:Any + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml8.tspans.txt new file mode 100644 index 0000000000..9953ea6327 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml8.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (3:0,3 [30] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml9.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml9.cspans.txt new file mode 100644 index 0000000000..38e6112313 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml9.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [4] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [4] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [52] ) +Markup span at (5:0,5 [4] ) (Accepts:Any) - Parent: Tag block at (5:0,5 [4] ) +Transition span at (12:0,12 [1] ) (Accepts:None) - Parent: Expression block at (12:0,12 [13] ) +Code span at (13:0,13 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (12:0,12 [13] ) +Markup span at (25:0,25 [4] ) (Accepts:Any) - Parent: Tag block at (9:0,9 [32] ) +Markup span at (29:0,29 [8] ) (Accepts:Any) - Parent: Tag block at (29:0,29 [8] ) +Markup span at (41:0,41 [11] ) (Accepts:Any) - Parent: Tag block at (41:0,41 [11] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml9.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml9.stree.txt new file mode 100644 index 0000000000..d7790cca1f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml9.stree.txt @@ -0,0 +1,59 @@ +RazorDocument - [0..52)::52 - [

                        @DateTime.Now / >

                        ] + MarkupBlock - [0..52)::52 + MarkupElement - [0..4)::4 + MarkupEndTag - [0..4)::4 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[]; + MarkupMiscAttributeContent - [2..4)::2 + MarkupTextLiteral - [2..4)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[]; + MarkupTextLiteral - [4..5)::1 - [/] - Gen - SpanEditHandler;Accepts:Any + ForwardSlash;[/]; + MarkupElement - [5..52)::47 + MarkupStartTag - [5..9)::4 - [< >] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + MarkupMiscAttributeContent - [6..8)::2 + MarkupTextLiteral - [6..8)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[>]; + MarkupTagHelperElement - [9..41)::32 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [9..12)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + CSharpCodeBlock - [12..25)::13 + CSharpImplicitExpression - [12..25)::13 + CSharpTransition - [12..13)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [13..25)::12 + CSharpCodeBlock - [13..25)::12 + CSharpExpressionLiteral - [13..25)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [25..29)::4 - [ / >] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + Whitespace;[ ]; + CloseAngle;[>]; + MarkupElement - [29..37)::8 + MarkupStartTag - [29..37)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [37..41)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [41..52)::11 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[]; + MarkupMiscAttributeContent - [43..51)::8 + MarkupTextLiteral - [43..51)::8 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml9.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml9.tspans.txt new file mode 100644 index 0000000000..4d43ab5dde --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_AllowsInvalidHtml9.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (9:0,9 [32] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper1.cspans.txt new file mode 100644 index 0000000000..e3af2600c1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper1.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (9:0,9 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [64] ) +Transition span at (21:0,21 [1] ) (Accepts:None) - Parent: Expression block at (21:0,21 [13] ) +Code span at (22:0,22 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (21:0,21 [13] ) +Markup span at (41:0,41 [10] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [64] ) +Markup span at (64:0,64 [9] ) (Accepts:Any) - Parent: Tag block at (64:0,64 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper1.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper1.diag.txt new file mode 100644 index 0000000000..2578ab72e2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper1.diag.txt @@ -0,0 +1,2 @@ +(1,54): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,67): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper1.stree.txt new file mode 100644 index 0000000000..2ed0823d1f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper1.stree.txt @@ -0,0 +1,62 @@ +RazorDocument - [0..73)::73 - [

                        ] + MarkupBlock - [0..73)::73 + MarkupTagHelperElement - [0..64)::64 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..52)::52 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..12)::10 - class - DoubleQuotes - Unbound - [ class=foo] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTagHelperAttributeValue - [9..12)::3 + MarkupLiteralAttributeValue - [9..12)::3 - [foo] + MarkupTextLiteral - [9..12)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTagHelperAttribute - [12..34)::22 - dynamic - DoubleQuotes - Unbound - [ dynamic=@DateTime.Now] + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [13..20)::7 - [dynamic] - Gen - SpanEditHandler;Accepts:Any + Text;[dynamic]; + Equals;[=]; + MarkupTagHelperAttributeValue - [21..34)::13 + MarkupDynamicAttributeValue - [21..34)::13 - [@DateTime.Now] + GenericBlock - [21..34)::13 + CSharpCodeBlock - [21..34)::13 + CSharpImplicitExpression - [21..34)::13 + CSharpTransition - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [22..34)::12 + CSharpCodeBlock - [22..34)::12 + CSharpExpressionLiteral - [22..34)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTagHelperAttribute - [34..51)::17 - style - DoubleQuotes - Unbound - [ style=color:red;] + MarkupTextLiteral - [34..35)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [35..40)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTagHelperAttributeValue - [41..51)::10 + MarkupLiteralAttributeValue - [41..51)::10 - [color:red;] + MarkupTextLiteral - [41..51)::10 - [color:red;] - Gen - SpanEditHandler;Accepts:Any + Text;[color:red;]; + CloseAngle;[>]; + MarkupTagHelperElement - [52..60)::8 - strong[StartTagAndEndTag] - strongtaghelper + MarkupTagHelperStartTag - [52..60)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [60..64)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [64..73)::9 + MarkupEndTag - [64..73)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper1.tspans.txt new file mode 100644 index 0000000000..13065315b2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper1.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [64] ) - ptaghelper +TagHelper span at (52:0,52 [8] ) - strongtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper2.cspans.txt new file mode 100644 index 0000000000..f4e5ce935c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper2.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (8:0,8 [6] ) (Accepts:Any) - Parent: Tag block at (5:0,5 [31] ) +Markup span at (22:0,22 [5] ) (Accepts:Any) - Parent: Tag block at (14:0,14 [22] ) +Markup span at (36:0,36 [6] ) (Accepts:Any) - Parent: Tag block at (36:0,36 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper2.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper2.diag.txt new file mode 100644 index 0000000000..b1d7d8700f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper2.diag.txt @@ -0,0 +1 @@ +(1,7): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper2.stree.txt new file mode 100644 index 0000000000..b14f935845 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper2.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..42)::42 - [

                        Hello World

                        ] + MarkupBlock - [0..42)::42 + MarkupElement - [0..42)::42 + MarkupStartTag - [0..5)::5 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTagHelperElement - [5..36)::31 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [5..8)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [8..14)::6 - [Hello ] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + MarkupTagHelperElement - [14..36)::22 - strong[StartTagAndEndTag] - strongtaghelper + MarkupTagHelperStartTag - [14..22)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [22..27)::5 - [World] - Gen - SpanEditHandler;Accepts:Any + Text;[World]; + MarkupTagHelperEndTag - [27..36)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [36..42)::6 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper2.tspans.txt new file mode 100644 index 0000000000..36dd08e818 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper2.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (5:0,5 [31] ) - ptaghelper +TagHelper span at (14:0,14 [22] ) - strongtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper3.cspans.txt new file mode 100644 index 0000000000..a003b54d78 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper3.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (8:0,8 [6] ) (Accepts:Any) - Parent: Tag block at (5:0,5 [22] ) +Markup span at (22:0,22 [5] ) (Accepts:Any) - Parent: Tag block at (14:0,14 [13] ) +Markup span at (27:0,27 [6] ) (Accepts:Any) - Parent: Tag block at (27:0,27 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper3.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper3.diag.txt new file mode 100644 index 0000000000..f0fb702841 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper3.diag.txt @@ -0,0 +1,2 @@ +(1,7): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,16): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper3.stree.txt new file mode 100644 index 0000000000..d81b716ffb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper3.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..33)::33 - [

                        Hello World

                        ] + MarkupBlock - [0..33)::33 + MarkupElement - [0..33)::33 + MarkupStartTag - [0..5)::5 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTagHelperElement - [5..27)::22 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [5..8)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [8..14)::6 - [Hello ] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + MarkupTagHelperElement - [14..27)::13 - strong[StartTagAndEndTag] - strongtaghelper + MarkupTagHelperStartTag - [14..22)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [22..27)::5 - [World] - Gen - SpanEditHandler;Accepts:Any + Text;[World]; + MarkupEndTag - [27..33)::6 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper3.tspans.txt new file mode 100644 index 0000000000..9fc6edf71a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper3.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (5:0,5 [22] ) - ptaghelper +TagHelper span at (14:0,14 [13] ) - strongtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper4.cspans.txt new file mode 100644 index 0000000000..201fd033d5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper4.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [52] ) +Markup span at (15:0,15 [6] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [52] ) +Markup span at (31:0,31 [10] ) (Accepts:Any) - Parent: Tag block at (21:0,21 [31] ) +Markup span at (43:0,43 [5] ) (Accepts:Any) - Parent: Tag block at (21:0,21 [31] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper4.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper4.diag.txt new file mode 100644 index 0000000000..d177eb6df7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper4.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper4.stree.txt new file mode 100644 index 0000000000..acba7a8979 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper4.stree.txt @@ -0,0 +1,50 @@ +RazorDocument - [0..52)::52 - [

                        Hello

                        World

                        ] + MarkupBlock - [0..52)::52 + MarkupTagHelperElement - [0..52)::52 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..15)::15 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="foo"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [foo] + MarkupTextLiteral - [10..13)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [15..21)::6 - [Hello ] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + MarkupTagHelperElement - [21..52)::31 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [21..43)::22 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [23..42)::19 - style - DoubleQuotes - Unbound - [ style="color:red;"] + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [24..29)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [30..31)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [31..41)::10 + MarkupLiteralAttributeValue - [31..41)::10 - [color:red;] + MarkupTextLiteral - [31..41)::10 - [color:red;] - Gen - SpanEditHandler;Accepts:Any + Text;[color:red;]; + MarkupTextLiteral - [41..42)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [43..48)::5 - [World] - Gen - SpanEditHandler;Accepts:Any + Text;[World]; + MarkupTagHelperEndTag - [48..52)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper4.tspans.txt new file mode 100644 index 0000000000..9cc0f52b9b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_CreatesErrorForIncompleteTagHelper4.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [52] ) - ptaghelper +TagHelper span at (21:0,21 [31] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks1.cspans.txt new file mode 100644 index 0000000000..646bf548d8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks1.cspans.txt @@ -0,0 +1,4 @@ +Transition span at (10:0,10 [1] ) (Accepts:None) - Parent: Expression block at (10:0,10 [13] ) +Code span at (11:0,11 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (10:0,10 [13] ) +Transition span at (32:0,32 [1] ) (Accepts:None) - Parent: Expression block at (32:0,32 [13] ) +Code span at (33:0,33 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (32:0,32 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks1.stree.txt new file mode 100644 index 0000000000..62a46d7e1b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks1.stree.txt @@ -0,0 +1,58 @@ +RazorDocument - [0..51)::51 - [

                        ] + MarkupBlock - [0..51)::51 + MarkupTagHelperElement - [0..51)::51 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..47)::47 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..24)::22 - class - DoubleQuotes - Unbound - [ class="@DateTime.Now"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..23)::13 + MarkupDynamicAttributeValue - [10..23)::13 - [@DateTime.Now] + GenericBlock - [10..23)::13 + CSharpCodeBlock - [10..23)::13 + CSharpImplicitExpression - [10..23)::13 + CSharpTransition - [10..11)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [11..23)::12 + CSharpCodeBlock - [11..23)::12 + CSharpExpressionLiteral - [11..23)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [23..24)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [24..46)::22 - style - SingleQuotes - Unbound - [ style='@DateTime.Now'] + MarkupTextLiteral - [24..25)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [25..30)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [31..32)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [32..45)::13 + MarkupDynamicAttributeValue - [32..45)::13 - [@DateTime.Now] + GenericBlock - [32..45)::13 + CSharpCodeBlock - [32..45)::13 + CSharpImplicitExpression - [32..45)::13 + CSharpTransition - [32..33)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [33..45)::12 + CSharpCodeBlock - [33..45)::12 + CSharpExpressionLiteral - [33..45)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [45..46)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTagHelperEndTag - [47..51)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks1.tspans.txt new file mode 100644 index 0000000000..23e57e8f34 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [51] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks2.cspans.txt new file mode 100644 index 0000000000..d595d25c40 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks2.cspans.txt @@ -0,0 +1,12 @@ +Transition span at (10:0,10 [1] ) (Accepts:None) - Parent: Statement block at (10:0,10 [64] ) +Code span at (11:0,11 [20] ) (Accepts:Any) - Parent: Statement block at (10:0,10 [64] ) +Transition span at (31:0,31 [6] ) (Accepts:None) - Parent: Tag block at (31:0,31 [6] ) +Markup span at (37:0,37 [3] ) (Accepts:Any) - Parent: Markup block at (31:0,31 [16] ) +Transition span at (40:0,40 [7] ) (Accepts:None) - Parent: Tag block at (40:0,40 [7] ) +Code span at (47:0,47 [27] ) (Accepts:None) - Parent: Statement block at (10:0,10 [64] ) +Transition span at (83:0,83 [1] ) (Accepts:None) - Parent: Statement block at (83:0,83 [64] ) +Code span at (84:0,84 [20] ) (Accepts:Any) - Parent: Statement block at (83:0,83 [64] ) +Transition span at (104:0,104 [6] ) (Accepts:None) - Parent: Tag block at (104:0,104 [6] ) +Markup span at (110:0,110 [3] ) (Accepts:Any) - Parent: Markup block at (104:0,104 [16] ) +Transition span at (113:0,113 [7] ) (Accepts:None) - Parent: Tag block at (113:0,113 [7] ) +Code span at (120:0,120 [27] ) (Accepts:None) - Parent: Statement block at (83:0,83 [64] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks2.stree.txt new file mode 100644 index 0000000000..3ebf48a454 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks2.stree.txt @@ -0,0 +1,132 @@ +RazorDocument - [0..153)::153 - [

                        ] + MarkupBlock - [0..153)::153 + MarkupTagHelperElement - [0..153)::153 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..149)::149 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..75)::73 - class - DoubleQuotes - Unbound - [ class="@do { var foo = bar; Foo foo++; } while (foo);"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..74)::64 + MarkupDynamicAttributeValue - [10..74)::64 - [@do { var foo = bar; Foo foo++; } while (foo);] + GenericBlock - [10..74)::64 + CSharpCodeBlock - [10..74)::64 + CSharpTransition - [10..11)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [11..31)::20 - [do { var foo = bar; ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + MarkupBlock - [31..47)::16 + MarkupElement - [31..47)::16 + MarkupStartTag - [31..37)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [37..40)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [40..47)::7 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [47..74)::27 - [ foo++; } while (foo);] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Identifier;[foo]; + Increment;[++]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[while]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + LessThan;[<]; + Identifier;[bar]; + GreaterThan;[>]; + RightParenthesis;[)]; + Semicolon;[;]; + MarkupTextLiteral - [74..75)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [75..148)::73 - style - SingleQuotes - Unbound - [ style='@do { var foo = bar; Foo foo++; } while (foo);'] + MarkupTextLiteral - [75..76)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [76..81)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [82..83)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [83..147)::64 + MarkupDynamicAttributeValue - [83..147)::64 - [@do { var foo = bar; Foo foo++; } while (foo);] + GenericBlock - [83..147)::64 + CSharpCodeBlock - [83..147)::64 + CSharpTransition - [83..84)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [84..104)::20 - [do { var foo = bar; ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + MarkupBlock - [104..120)::16 + MarkupElement - [104..120)::16 + MarkupStartTag - [104..110)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [110..113)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [113..120)::7 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [120..147)::27 - [ foo++; } while (foo);] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Identifier;[foo]; + Increment;[++]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[while]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + LessThan;[<]; + Identifier;[bar]; + GreaterThan;[>]; + RightParenthesis;[)]; + Semicolon;[;]; + MarkupTextLiteral - [147..148)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTagHelperEndTag - [149..153)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks2.tspans.txt new file mode 100644 index 0000000000..112587be7d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [153] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks3.cspans.txt new file mode 100644 index 0000000000..b49460175d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks3.cspans.txt @@ -0,0 +1,5 @@ +Transition span at (10:0,10 [1] ) (Accepts:None) - Parent: Expression block at (10:0,10 [13] ) +Code span at (11:0,11 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (10:0,10 [13] ) +Transition span at (32:0,32 [1] ) (Accepts:None) - Parent: Expression block at (32:0,32 [13] ) +Code span at (33:0,33 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (32:0,32 [13] ) +Markup span at (47:0,47 [11] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [62] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks3.stree.txt new file mode 100644 index 0000000000..9ea39a5bf5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks3.stree.txt @@ -0,0 +1,62 @@ +RazorDocument - [0..62)::62 - [

                        Hello World

                        ] + MarkupBlock - [0..62)::62 + MarkupTagHelperElement - [0..62)::62 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..47)::47 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..24)::22 - class - DoubleQuotes - Unbound - [ class="@DateTime.Now"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..23)::13 + MarkupDynamicAttributeValue - [10..23)::13 - [@DateTime.Now] + GenericBlock - [10..23)::13 + CSharpCodeBlock - [10..23)::13 + CSharpImplicitExpression - [10..23)::13 + CSharpTransition - [10..11)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [11..23)::12 + CSharpCodeBlock - [11..23)::12 + CSharpExpressionLiteral - [11..23)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [23..24)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [24..46)::22 - style - SingleQuotes - Unbound - [ style='@DateTime.Now'] + MarkupTextLiteral - [24..25)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [25..30)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [31..32)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [32..45)::13 + MarkupDynamicAttributeValue - [32..45)::13 - [@DateTime.Now] + GenericBlock - [32..45)::13 + CSharpCodeBlock - [32..45)::13 + CSharpImplicitExpression - [32..45)::13 + CSharpTransition - [32..33)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [33..45)::12 + CSharpCodeBlock - [33..45)::12 + CSharpExpressionLiteral - [33..45)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [45..46)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTextLiteral - [47..58)::11 - [Hello World] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + MarkupTagHelperEndTag - [58..62)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks3.tspans.txt new file mode 100644 index 0000000000..d720c816de --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [62] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks4.cspans.txt new file mode 100644 index 0000000000..dc6757f2fe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks4.cspans.txt @@ -0,0 +1,13 @@ +Transition span at (10:0,10 [1] ) (Accepts:None) - Parent: Statement block at (10:0,10 [64] ) +Code span at (11:0,11 [20] ) (Accepts:Any) - Parent: Statement block at (10:0,10 [64] ) +Transition span at (31:0,31 [6] ) (Accepts:None) - Parent: Tag block at (31:0,31 [6] ) +Markup span at (37:0,37 [3] ) (Accepts:Any) - Parent: Markup block at (31:0,31 [16] ) +Transition span at (40:0,40 [7] ) (Accepts:None) - Parent: Tag block at (40:0,40 [7] ) +Code span at (47:0,47 [27] ) (Accepts:None) - Parent: Statement block at (10:0,10 [64] ) +Transition span at (83:0,83 [1] ) (Accepts:None) - Parent: Statement block at (83:0,83 [64] ) +Code span at (84:0,84 [20] ) (Accepts:Any) - Parent: Statement block at (83:0,83 [64] ) +Transition span at (104:0,104 [6] ) (Accepts:None) - Parent: Tag block at (104:0,104 [6] ) +Markup span at (110:0,110 [3] ) (Accepts:Any) - Parent: Markup block at (104:0,104 [16] ) +Transition span at (113:0,113 [7] ) (Accepts:None) - Parent: Tag block at (113:0,113 [7] ) +Code span at (120:0,120 [27] ) (Accepts:None) - Parent: Statement block at (83:0,83 [64] ) +Markup span at (149:0,149 [11] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [164] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks4.stree.txt new file mode 100644 index 0000000000..ccd70b5787 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks4.stree.txt @@ -0,0 +1,136 @@ +RazorDocument - [0..164)::164 - [

                        Hello World

                        ] + MarkupBlock - [0..164)::164 + MarkupTagHelperElement - [0..164)::164 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..149)::149 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..75)::73 - class - DoubleQuotes - Unbound - [ class="@do { var foo = bar; Foo foo++; } while (foo);"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..74)::64 + MarkupDynamicAttributeValue - [10..74)::64 - [@do { var foo = bar; Foo foo++; } while (foo);] + GenericBlock - [10..74)::64 + CSharpCodeBlock - [10..74)::64 + CSharpTransition - [10..11)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [11..31)::20 - [do { var foo = bar; ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + MarkupBlock - [31..47)::16 + MarkupElement - [31..47)::16 + MarkupStartTag - [31..37)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [37..40)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [40..47)::7 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [47..74)::27 - [ foo++; } while (foo);] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Identifier;[foo]; + Increment;[++]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[while]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + LessThan;[<]; + Identifier;[bar]; + GreaterThan;[>]; + RightParenthesis;[)]; + Semicolon;[;]; + MarkupTextLiteral - [74..75)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [75..148)::73 - style - SingleQuotes - Unbound - [ style='@do { var foo = bar; Foo foo++; } while (foo);'] + MarkupTextLiteral - [75..76)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [76..81)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [82..83)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [83..147)::64 + MarkupDynamicAttributeValue - [83..147)::64 - [@do { var foo = bar; Foo foo++; } while (foo);] + GenericBlock - [83..147)::64 + CSharpCodeBlock - [83..147)::64 + CSharpTransition - [83..84)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [84..104)::20 - [do { var foo = bar; ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + MarkupBlock - [104..120)::16 + MarkupElement - [104..120)::16 + MarkupStartTag - [104..110)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [110..113)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [113..120)::7 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [120..147)::27 - [ foo++; } while (foo);] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Identifier;[foo]; + Increment;[++]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[while]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + LessThan;[<]; + Identifier;[bar]; + GreaterThan;[>]; + RightParenthesis;[)]; + Semicolon;[;]; + MarkupTextLiteral - [147..148)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTextLiteral - [149..160)::11 - [Hello World] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + MarkupTagHelperEndTag - [160..164)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks4.tspans.txt new file mode 100644 index 0000000000..396ba4cb79 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [164] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks5.cspans.txt new file mode 100644 index 0000000000..8737eaeaf8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks5.cspans.txt @@ -0,0 +1,7 @@ +Transition span at (10:0,10 [1] ) (Accepts:None) - Parent: Expression block at (10:0,10 [13] ) +Code span at (11:0,11 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (10:0,10 [13] ) +Markup span at (25:0,25 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [34] ) +Markup span at (34:0,34 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [69] ) +Transition span at (45:0,45 [1] ) (Accepts:None) - Parent: Expression block at (45:0,45 [13] ) +Code span at (46:0,46 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (45:0,45 [13] ) +Markup span at (60:0,60 [5] ) (Accepts:Any) - Parent: Tag block at (35:0,35 [34] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks5.stree.txt new file mode 100644 index 0000000000..80c82a5ec0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks5.stree.txt @@ -0,0 +1,74 @@ +RazorDocument - [0..69)::69 - [

                        Hello

                        World

                        ] + MarkupBlock - [0..69)::69 + MarkupTagHelperElement - [0..34)::34 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..25)::25 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..24)::22 - class - DoubleQuotes - Unbound - [ class="@DateTime.Now"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..23)::13 + MarkupDynamicAttributeValue - [10..23)::13 - [@DateTime.Now] + GenericBlock - [10..23)::13 + CSharpCodeBlock - [10..23)::13 + CSharpImplicitExpression - [10..23)::13 + CSharpTransition - [10..11)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [11..23)::12 + CSharpCodeBlock - [11..23)::12 + CSharpExpressionLiteral - [11..23)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [23..24)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [25..30)::5 - [Hello] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + MarkupTagHelperEndTag - [30..34)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [34..35)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [35..69)::34 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [35..60)::25 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [37..59)::22 - style - SingleQuotes - Unbound - [ style='@DateTime.Now'] + MarkupTextLiteral - [37..38)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [38..43)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [44..45)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [45..58)::13 + MarkupDynamicAttributeValue - [45..58)::13 - [@DateTime.Now] + GenericBlock - [45..58)::13 + CSharpCodeBlock - [45..58)::13 + CSharpImplicitExpression - [45..58)::13 + CSharpTransition - [45..46)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [46..58)::12 + CSharpCodeBlock - [46..58)::12 + CSharpExpressionLiteral - [46..58)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [58..59)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTextLiteral - [60..65)::5 - [World] - Gen - SpanEditHandler;Accepts:Any + Text;[World]; + MarkupTagHelperEndTag - [65..69)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks5.tspans.txt new file mode 100644 index 0000000000..0c0ec10e16 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks5.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [34] ) - ptaghelper +TagHelper span at (35:0,35 [34] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks6.cspans.txt new file mode 100644 index 0000000000..a07650681c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks6.cspans.txt @@ -0,0 +1,15 @@ +Transition span at (10:0,10 [1] ) (Accepts:None) - Parent: Statement block at (10:0,10 [64] ) +Code span at (11:0,11 [20] ) (Accepts:Any) - Parent: Statement block at (10:0,10 [64] ) +Transition span at (31:0,31 [6] ) (Accepts:None) - Parent: Tag block at (31:0,31 [6] ) +Markup span at (37:0,37 [3] ) (Accepts:Any) - Parent: Markup block at (31:0,31 [16] ) +Transition span at (40:0,40 [7] ) (Accepts:None) - Parent: Tag block at (40:0,40 [7] ) +Code span at (47:0,47 [27] ) (Accepts:None) - Parent: Statement block at (10:0,10 [64] ) +Markup span at (76:0,76 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [85] ) +Markup span at (85:0,85 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [171] ) +Transition span at (96:0,96 [1] ) (Accepts:None) - Parent: Statement block at (96:0,96 [64] ) +Code span at (97:0,97 [20] ) (Accepts:Any) - Parent: Statement block at (96:0,96 [64] ) +Transition span at (117:0,117 [6] ) (Accepts:None) - Parent: Tag block at (117:0,117 [6] ) +Markup span at (123:0,123 [3] ) (Accepts:Any) - Parent: Markup block at (117:0,117 [16] ) +Transition span at (126:0,126 [7] ) (Accepts:None) - Parent: Tag block at (126:0,126 [7] ) +Code span at (133:0,133 [27] ) (Accepts:None) - Parent: Statement block at (96:0,96 [64] ) +Markup span at (162:0,162 [5] ) (Accepts:Any) - Parent: Tag block at (86:0,86 [85] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks6.stree.txt new file mode 100644 index 0000000000..b3c3b71e1c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks6.stree.txt @@ -0,0 +1,148 @@ +RazorDocument - [0..171)::171 - [

                        Hello

                        World

                        ] + MarkupBlock - [0..171)::171 + MarkupTagHelperElement - [0..85)::85 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..76)::76 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..75)::73 - class - DoubleQuotes - Unbound - [ class="@do { var foo = bar; Foo foo++; } while (foo);"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..74)::64 + MarkupDynamicAttributeValue - [10..74)::64 - [@do { var foo = bar; Foo foo++; } while (foo);] + GenericBlock - [10..74)::64 + CSharpCodeBlock - [10..74)::64 + CSharpTransition - [10..11)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [11..31)::20 - [do { var foo = bar; ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + MarkupBlock - [31..47)::16 + MarkupElement - [31..47)::16 + MarkupStartTag - [31..37)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [37..40)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [40..47)::7 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [47..74)::27 - [ foo++; } while (foo);] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Identifier;[foo]; + Increment;[++]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[while]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + LessThan;[<]; + Identifier;[bar]; + GreaterThan;[>]; + RightParenthesis;[)]; + Semicolon;[;]; + MarkupTextLiteral - [74..75)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [76..81)::5 - [Hello] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + MarkupTagHelperEndTag - [81..85)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [85..86)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [86..171)::85 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [86..162)::76 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [88..161)::73 - style - SingleQuotes - Unbound - [ style='@do { var foo = bar; Foo foo++; } while (foo);'] + MarkupTextLiteral - [88..89)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [89..94)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [95..96)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [96..160)::64 + MarkupDynamicAttributeValue - [96..160)::64 - [@do { var foo = bar; Foo foo++; } while (foo);] + GenericBlock - [96..160)::64 + CSharpCodeBlock - [96..160)::64 + CSharpTransition - [96..97)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [97..117)::20 - [do { var foo = bar; ] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + Whitespace;[ ]; + MarkupBlock - [117..133)::16 + MarkupElement - [117..133)::16 + MarkupStartTag - [117..123)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [123..126)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [126..133)::7 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [133..160)::27 - [ foo++; } while (foo);] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + Identifier;[foo]; + Increment;[++]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[while]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + LessThan;[<]; + Identifier;[bar]; + GreaterThan;[>]; + RightParenthesis;[)]; + Semicolon;[;]; + MarkupTextLiteral - [160..161)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTextLiteral - [162..167)::5 - [World] - Gen - SpanEditHandler;Accepts:Any + Text;[World]; + MarkupTagHelperEndTag - [167..171)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks6.tspans.txt new file mode 100644 index 0000000000..f8dba79588 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks6.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [85] ) - ptaghelper +TagHelper span at (86:0,86 [85] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks7.cspans.txt new file mode 100644 index 0000000000..c60ad109b8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks7.cspans.txt @@ -0,0 +1,13 @@ +Transition span at (10:0,10 [1] ) (Accepts:None) - Parent: Expression block at (10:0,10 [13] ) +Code span at (11:0,11 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (10:0,10 [13] ) +Transition span at (32:0,32 [1] ) (Accepts:None) - Parent: Expression block at (32:0,32 [13] ) +Code span at (33:0,33 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (32:0,32 [13] ) +Markup span at (47:0,47 [12] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [122] ) +Markup span at (59:0,59 [7] ) (Accepts:Any) - Parent: Tag block at (59:0,59 [30] ) +Markup span at (66:0,66 [8] ) (Accepts:Any) - Parent: Markup block at (66:0,66 [22] ) +Transition span at (74:0,74 [1] ) (Accepts:None) - Parent: Expression block at (74:0,74 [13] ) +Code span at (75:0,75 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (74:0,74 [13] ) +Markup span at (87:0,87 [1] ) (Accepts:Any) - Parent: Markup block at (66:0,66 [22] ) +Markup span at (88:0,88 [1] ) (Accepts:Any) - Parent: Tag block at (59:0,59 [30] ) +Markup span at (89:0,89 [20] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [122] ) +Markup span at (109:0,109 [9] ) (Accepts:Any) - Parent: Tag block at (109:0,109 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks7.stree.txt new file mode 100644 index 0000000000..a40af76de2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks7.stree.txt @@ -0,0 +1,104 @@ +RazorDocument - [0..122)::122 - [

                        Hello World inside of strong tag

                        ] + MarkupBlock - [0..122)::122 + MarkupTagHelperElement - [0..122)::122 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..47)::47 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..24)::22 - class - DoubleQuotes - Unbound - [ class="@DateTime.Now"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..23)::13 + MarkupDynamicAttributeValue - [10..23)::13 - [@DateTime.Now] + GenericBlock - [10..23)::13 + CSharpCodeBlock - [10..23)::13 + CSharpImplicitExpression - [10..23)::13 + CSharpTransition - [10..11)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [11..23)::12 + CSharpCodeBlock - [11..23)::12 + CSharpExpressionLiteral - [11..23)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [23..24)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [24..46)::22 - style - SingleQuotes - Unbound - [ style='@DateTime.Now'] + MarkupTextLiteral - [24..25)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [25..30)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [31..32)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [32..45)::13 + MarkupDynamicAttributeValue - [32..45)::13 - [@DateTime.Now] + GenericBlock - [32..45)::13 + CSharpCodeBlock - [32..45)::13 + CSharpImplicitExpression - [32..45)::13 + CSharpTransition - [32..33)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [33..45)::12 + CSharpCodeBlock - [33..45)::12 + CSharpExpressionLiteral - [33..45)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [45..46)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTextLiteral - [47..59)::12 - [Hello World ] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + Whitespace;[ ]; + MarkupElement - [59..118)::59 + MarkupStartTag - [59..89)::30 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupAttributeBlock - [66..88)::22 - [ class="@DateTime.Now"] + MarkupTextLiteral - [66..67)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [67..72)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [73..74)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [74..87)::13 + MarkupDynamicAttributeValue - [74..87)::13 - [@DateTime.Now] + GenericBlock - [74..87)::13 + CSharpCodeBlock - [74..87)::13 + CSharpImplicitExpression - [74..87)::13 + CSharpTransition - [74..75)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [75..87)::12 + CSharpCodeBlock - [75..87)::12 + CSharpExpressionLiteral - [75..87)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [87..88)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [89..109)::20 - [inside of strong tag] - Gen - SpanEditHandler;Accepts:Any + Text;[inside]; + Whitespace;[ ]; + Text;[of]; + Whitespace;[ ]; + Text;[strong]; + Whitespace;[ ]; + Text;[tag]; + MarkupEndTag - [109..118)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [118..122)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks7.tspans.txt new file mode 100644 index 0000000000..e881d9b302 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexAttributeTagHelperTagBlocks7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [122] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks1.cspans.txt new file mode 100644 index 0000000000..1a81781533 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks1.cspans.txt @@ -0,0 +1,2 @@ +Transition span at (3:0,3 [1] ) (Accepts:None) - Parent: Expression block at (3:0,3 [13] ) +Code span at (4:0,4 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (3:0,3 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks1.stree.txt new file mode 100644 index 0000000000..eb398bbcec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks1.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..20)::20 - [

                        @DateTime.Now

                        ] + MarkupBlock - [0..20)::20 + MarkupTagHelperElement - [0..20)::20 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + CSharpCodeBlock - [3..16)::13 + CSharpImplicitExpression - [3..16)::13 + CSharpTransition - [3..4)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [4..16)::12 + CSharpCodeBlock - [4..16)::12 + CSharpExpressionLiteral - [4..16)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTagHelperEndTag - [16..20)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks1.tspans.txt new file mode 100644 index 0000000000..66adb496db --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [20] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks2.cspans.txt new file mode 100644 index 0000000000..1f24e0d42a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks2.cspans.txt @@ -0,0 +1,6 @@ +Transition span at (3:0,3 [1] ) (Accepts:None) - Parent: Statement block at (3:0,3 [58] ) +Code span at (4:0,4 [19] ) (Accepts:Any) - Parent: Statement block at (3:0,3 [58] ) +Markup span at (23:0,23 [1] ) (Accepts:Any) - Parent: Markup block at (23:0,23 [12] ) +Markup span at (27:0,27 [3] ) (Accepts:Any) - Parent: Tag block at (24:0,24 [10] ) +Markup span at (34:0,34 [1] ) (Accepts:None) - Parent: Markup block at (23:0,23 [12] ) +Code span at (35:0,35 [26] ) (Accepts:None) - Parent: Statement block at (3:0,3 [58] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks2.stree.txt new file mode 100644 index 0000000000..0fa891e8bd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks2.stree.txt @@ -0,0 +1,61 @@ +RazorDocument - [0..65)::65 - [

                        @do { var foo = bar;

                        Foo

                        foo++; } while (foo);

                        ] + MarkupBlock - [0..65)::65 + MarkupTagHelperElement - [0..65)::65 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + CSharpCodeBlock - [3..61)::58 + CSharpTransition - [3..4)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [4..23)::19 - [do { var foo = bar;] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + MarkupBlock - [23..35)::12 + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [24..34)::10 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [24..27)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [27..30)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTagHelperEndTag - [30..34)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [34..35)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [35..61)::26 - [foo++; } while (foo);] - Gen - SpanEditHandler;Accepts:None + Identifier;[foo]; + Increment;[++]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[while]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + LessThan;[<]; + Identifier;[bar]; + GreaterThan;[>]; + RightParenthesis;[)]; + Semicolon;[;]; + MarkupTagHelperEndTag - [61..65)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks2.tspans.txt new file mode 100644 index 0000000000..7799cf6bf0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks2.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [65] ) - ptaghelper +TagHelper span at (24:0,24 [10] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks3.cspans.txt new file mode 100644 index 0000000000..09807c89f4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks3.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (3:0,3 [12] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [32] ) +Transition span at (15:0,15 [1] ) (Accepts:None) - Parent: Expression block at (15:0,15 [13] ) +Code span at (16:0,16 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (15:0,15 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks3.stree.txt new file mode 100644 index 0000000000..cdb14643e4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks3.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..32)::32 - [

                        Hello World @DateTime.Now

                        ] + MarkupBlock - [0..32)::32 + MarkupTagHelperElement - [0..32)::32 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..15)::12 - [Hello World ] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + Whitespace;[ ]; + CSharpCodeBlock - [15..28)::13 + CSharpImplicitExpression - [15..28)::13 + CSharpTransition - [15..16)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [16..28)::12 + CSharpCodeBlock - [16..28)::12 + CSharpExpressionLiteral - [16..28)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTagHelperEndTag - [28..32)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks3.tspans.txt new file mode 100644 index 0000000000..5cb039743d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [32] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks4.cspans.txt new file mode 100644 index 0000000000..2ad93795ce --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks4.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (3:0,3 [12] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [77] ) +Transition span at (15:0,15 [1] ) (Accepts:None) - Parent: Statement block at (15:0,15 [58] ) +Code span at (16:0,16 [19] ) (Accepts:Any) - Parent: Statement block at (15:0,15 [58] ) +Markup span at (35:0,35 [1] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [12] ) +Markup span at (39:0,39 [3] ) (Accepts:Any) - Parent: Tag block at (36:0,36 [10] ) +Markup span at (46:0,46 [1] ) (Accepts:None) - Parent: Markup block at (35:0,35 [12] ) +Code span at (47:0,47 [26] ) (Accepts:None) - Parent: Statement block at (15:0,15 [58] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks4.stree.txt new file mode 100644 index 0000000000..9bb210bc79 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks4.stree.txt @@ -0,0 +1,66 @@ +RazorDocument - [0..77)::77 - [

                        Hello World @do { var foo = bar;

                        Foo

                        foo++; } while (foo);

                        ] + MarkupBlock - [0..77)::77 + MarkupTagHelperElement - [0..77)::77 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..15)::12 - [Hello World ] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + Whitespace;[ ]; + CSharpCodeBlock - [15..73)::58 + CSharpTransition - [15..16)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [16..35)::19 - [do { var foo = bar;] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + MarkupBlock - [35..47)::12 + MarkupTextLiteral - [35..36)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [36..46)::10 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [36..39)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [39..42)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTagHelperEndTag - [42..46)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [46..47)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [47..73)::26 - [foo++; } while (foo);] - Gen - SpanEditHandler;Accepts:None + Identifier;[foo]; + Increment;[++]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[while]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + LessThan;[<]; + Identifier;[bar]; + GreaterThan;[>]; + RightParenthesis;[)]; + Semicolon;[;]; + MarkupTagHelperEndTag - [73..77)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks4.tspans.txt new file mode 100644 index 0000000000..24d79866fb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks4.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [77] ) - ptaghelper +TagHelper span at (36:0,36 [10] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks5.cspans.txt new file mode 100644 index 0000000000..1f1417e4fd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks5.cspans.txt @@ -0,0 +1,5 @@ +Transition span at (3:0,3 [1] ) (Accepts:None) - Parent: Expression block at (3:0,3 [13] ) +Code span at (4:0,4 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (3:0,3 [13] ) +Markup span at (20:0,20 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [41] ) +Transition span at (24:0,24 [1] ) (Accepts:None) - Parent: Expression block at (24:0,24 [13] ) +Code span at (25:0,25 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (24:0,24 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks5.stree.txt new file mode 100644 index 0000000000..4939b76203 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks5.stree.txt @@ -0,0 +1,44 @@ +RazorDocument - [0..41)::41 - [

                        @DateTime.Now

                        @DateTime.Now

                        ] + MarkupBlock - [0..41)::41 + MarkupTagHelperElement - [0..20)::20 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + CSharpCodeBlock - [3..16)::13 + CSharpImplicitExpression - [3..16)::13 + CSharpTransition - [3..4)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [4..16)::12 + CSharpCodeBlock - [4..16)::12 + CSharpExpressionLiteral - [4..16)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTagHelperEndTag - [16..20)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [20..21)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [21..41)::20 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [21..24)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + CSharpCodeBlock - [24..37)::13 + CSharpImplicitExpression - [24..37)::13 + CSharpTransition - [24..25)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [25..37)::12 + CSharpCodeBlock - [25..37)::12 + CSharpExpressionLiteral - [25..37)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTagHelperEndTag - [37..41)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks5.tspans.txt new file mode 100644 index 0000000000..5c19dd2b8b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks5.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [20] ) - ptaghelper +TagHelper span at (21:0,21 [20] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks6.cspans.txt new file mode 100644 index 0000000000..e79b4cf049 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks6.cspans.txt @@ -0,0 +1,13 @@ +Transition span at (3:0,3 [1] ) (Accepts:None) - Parent: Statement block at (3:0,3 [58] ) +Code span at (4:0,4 [19] ) (Accepts:Any) - Parent: Statement block at (3:0,3 [58] ) +Markup span at (23:0,23 [1] ) (Accepts:Any) - Parent: Markup block at (23:0,23 [12] ) +Markup span at (27:0,27 [3] ) (Accepts:Any) - Parent: Tag block at (24:0,24 [10] ) +Markup span at (34:0,34 [1] ) (Accepts:None) - Parent: Markup block at (23:0,23 [12] ) +Code span at (35:0,35 [26] ) (Accepts:None) - Parent: Statement block at (3:0,3 [58] ) +Markup span at (65:0,65 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [131] ) +Transition span at (69:0,69 [1] ) (Accepts:None) - Parent: Statement block at (69:0,69 [58] ) +Code span at (70:0,70 [19] ) (Accepts:Any) - Parent: Statement block at (69:0,69 [58] ) +Markup span at (89:0,89 [1] ) (Accepts:Any) - Parent: Markup block at (89:0,89 [12] ) +Markup span at (93:0,93 [3] ) (Accepts:Any) - Parent: Tag block at (90:0,90 [10] ) +Markup span at (100:0,100 [1] ) (Accepts:None) - Parent: Markup block at (89:0,89 [12] ) +Code span at (101:0,101 [26] ) (Accepts:None) - Parent: Statement block at (69:0,69 [58] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks6.stree.txt new file mode 100644 index 0000000000..599b101b45 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks6.stree.txt @@ -0,0 +1,122 @@ +RazorDocument - [0..131)::131 - [

                        @do { var foo = bar;

                        Foo

                        foo++; } while (foo);

                        @do { var foo = bar;

                        Foo

                        foo++; } while (foo);

                        ] + MarkupBlock - [0..131)::131 + MarkupTagHelperElement - [0..65)::65 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + CSharpCodeBlock - [3..61)::58 + CSharpTransition - [3..4)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [4..23)::19 - [do { var foo = bar;] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + MarkupBlock - [23..35)::12 + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [24..34)::10 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [24..27)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [27..30)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTagHelperEndTag - [30..34)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [34..35)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [35..61)::26 - [foo++; } while (foo);] - Gen - SpanEditHandler;Accepts:None + Identifier;[foo]; + Increment;[++]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[while]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + LessThan;[<]; + Identifier;[bar]; + GreaterThan;[>]; + RightParenthesis;[)]; + Semicolon;[;]; + MarkupTagHelperEndTag - [61..65)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [65..66)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [66..131)::65 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [66..69)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + CSharpCodeBlock - [69..127)::58 + CSharpTransition - [69..70)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [70..89)::19 - [do { var foo = bar;] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + MarkupBlock - [89..101)::12 + MarkupTextLiteral - [89..90)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [90..100)::10 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [90..93)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [93..96)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTagHelperEndTag - [96..100)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [100..101)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [101..127)::26 - [foo++; } while (foo);] - Gen - SpanEditHandler;Accepts:None + Identifier;[foo]; + Increment;[++]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[while]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + LessThan;[<]; + Identifier;[bar]; + GreaterThan;[>]; + RightParenthesis;[)]; + Semicolon;[;]; + MarkupTagHelperEndTag - [127..131)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks6.tspans.txt new file mode 100644 index 0000000000..eef88691cc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks6.tspans.txt @@ -0,0 +1,4 @@ +TagHelper span at (0:0,0 [65] ) - ptaghelper +TagHelper span at (24:0,24 [10] ) - ptaghelper +TagHelper span at (66:0,66 [65] ) - ptaghelper +TagHelper span at (90:0,90 [10] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks7.cspans.txt new file mode 100644 index 0000000000..289b98f67f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks7.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (3:0,3 [6] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [77] ) +Transition span at (9:0,9 [1] ) (Accepts:None) - Parent: Expression block at (9:0,9 [13] ) +Code span at (10:0,10 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (9:0,9 [13] ) +Markup span at (22:0,22 [8] ) (Accepts:Any) - Parent: Tag block at (22:0,22 [8] ) +Markup span at (30:0,30 [10] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [77] ) +Transition span at (40:0,40 [1] ) (Accepts:None) - Parent: Expression block at (40:0,40 [13] ) +Code span at (41:0,41 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (40:0,40 [13] ) +Markup span at (53:0,53 [11] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [77] ) +Markup span at (64:0,64 [9] ) (Accepts:Any) - Parent: Tag block at (64:0,64 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks7.stree.txt new file mode 100644 index 0000000000..5aa23f352a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks7.stree.txt @@ -0,0 +1,55 @@ +RazorDocument - [0..77)::77 - [

                        Hello @DateTime.Nowinside of @DateTime.Now strong tag

                        ] + MarkupBlock - [0..77)::77 + MarkupTagHelperElement - [0..77)::77 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..9)::6 - [Hello ] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + CSharpCodeBlock - [9..22)::13 + CSharpImplicitExpression - [9..22)::13 + CSharpTransition - [9..10)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [10..22)::12 + CSharpCodeBlock - [10..22)::12 + CSharpExpressionLiteral - [10..22)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupElement - [22..73)::51 + MarkupStartTag - [22..30)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [30..40)::10 - [inside of ] - Gen - SpanEditHandler;Accepts:Any + Text;[inside]; + Whitespace;[ ]; + Text;[of]; + Whitespace;[ ]; + CSharpCodeBlock - [40..53)::13 + CSharpImplicitExpression - [40..53)::13 + CSharpTransition - [40..41)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [41..53)::12 + CSharpCodeBlock - [41..53)::12 + CSharpExpressionLiteral - [41..53)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [53..64)::11 - [ strong tag] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[strong]; + Whitespace;[ ]; + Text;[tag]; + MarkupEndTag - [64..73)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [73..77)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks7.tspans.txt new file mode 100644 index 0000000000..fdd25b54f6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [77] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks8.cspans.txt new file mode 100644 index 0000000000..d03e66d5c9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks8.cspans.txt @@ -0,0 +1,17 @@ +Markup span at (3:0,3 [6] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [167] ) +Transition span at (9:0,9 [1] ) (Accepts:None) - Parent: Statement block at (9:0,9 [58] ) +Code span at (10:0,10 [19] ) (Accepts:Any) - Parent: Statement block at (9:0,9 [58] ) +Markup span at (29:0,29 [1] ) (Accepts:Any) - Parent: Markup block at (29:0,29 [12] ) +Markup span at (33:0,33 [3] ) (Accepts:Any) - Parent: Tag block at (30:0,30 [10] ) +Markup span at (40:0,40 [1] ) (Accepts:None) - Parent: Markup block at (29:0,29 [12] ) +Code span at (41:0,41 [26] ) (Accepts:None) - Parent: Statement block at (9:0,9 [58] ) +Markup span at (67:0,67 [8] ) (Accepts:Any) - Parent: Tag block at (67:0,67 [8] ) +Markup span at (75:0,75 [10] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [167] ) +Transition span at (85:0,85 [1] ) (Accepts:None) - Parent: Statement block at (85:0,85 [58] ) +Code span at (86:0,86 [19] ) (Accepts:Any) - Parent: Statement block at (85:0,85 [58] ) +Markup span at (105:0,105 [1] ) (Accepts:Any) - Parent: Markup block at (105:0,105 [12] ) +Markup span at (109:0,109 [3] ) (Accepts:Any) - Parent: Tag block at (106:0,106 [10] ) +Markup span at (116:0,116 [1] ) (Accepts:None) - Parent: Markup block at (105:0,105 [12] ) +Code span at (117:0,117 [26] ) (Accepts:None) - Parent: Statement block at (85:0,85 [58] ) +Markup span at (143:0,143 [11] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [167] ) +Markup span at (154:0,154 [9] ) (Accepts:Any) - Parent: Tag block at (154:0,154 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks8.stree.txt new file mode 100644 index 0000000000..a471bacbf0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks8.stree.txt @@ -0,0 +1,133 @@ +RazorDocument - [0..167)::167 - [

                        Hello @do { var foo = bar;

                        Foo

                        foo++; } while (foo);inside of @do { var foo = bar;

                        Foo

                        foo++; } while (foo); strong tag

                        ] + MarkupBlock - [0..167)::167 + MarkupTagHelperElement - [0..167)::167 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..9)::6 - [Hello ] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + CSharpCodeBlock - [9..67)::58 + CSharpTransition - [9..10)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [10..29)::19 - [do { var foo = bar;] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + MarkupBlock - [29..41)::12 + MarkupTextLiteral - [29..30)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [30..40)::10 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [30..33)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [33..36)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTagHelperEndTag - [36..40)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [40..41)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [41..67)::26 - [foo++; } while (foo);] - Gen - SpanEditHandler;Accepts:None + Identifier;[foo]; + Increment;[++]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[while]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + LessThan;[<]; + Identifier;[bar]; + GreaterThan;[>]; + RightParenthesis;[)]; + Semicolon;[;]; + MarkupElement - [67..163)::96 + MarkupStartTag - [67..75)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [75..85)::10 - [inside of ] - Gen - SpanEditHandler;Accepts:Any + Text;[inside]; + Whitespace;[ ]; + Text;[of]; + Whitespace;[ ]; + CSharpCodeBlock - [85..143)::58 + CSharpTransition - [85..86)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementLiteral - [86..105)::19 - [do { var foo = bar;] - Gen - SpanEditHandler;Accepts:Any + Keyword;[do]; + Whitespace;[ ]; + LeftBrace;[{]; + Whitespace;[ ]; + Identifier;[var]; + Whitespace;[ ]; + Identifier;[foo]; + Whitespace;[ ]; + Assign;[=]; + Whitespace;[ ]; + Identifier;[bar]; + Semicolon;[;]; + MarkupBlock - [105..117)::12 + MarkupTextLiteral - [105..106)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [106..116)::10 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [106..109)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [109..112)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupTagHelperEndTag - [112..116)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [116..117)::1 - [ ] - Gen - SpanEditHandler;Accepts:None + Whitespace;[ ]; + CSharpStatementLiteral - [117..143)::26 - [foo++; } while (foo);] - Gen - SpanEditHandler;Accepts:None + Identifier;[foo]; + Increment;[++]; + Semicolon;[;]; + Whitespace;[ ]; + RightBrace;[}]; + Whitespace;[ ]; + Keyword;[while]; + Whitespace;[ ]; + LeftParenthesis;[(]; + Identifier;[foo]; + LessThan;[<]; + Identifier;[bar]; + GreaterThan;[>]; + RightParenthesis;[)]; + Semicolon;[;]; + MarkupTextLiteral - [143..154)::11 - [ strong tag] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[strong]; + Whitespace;[ ]; + Text;[tag]; + MarkupEndTag - [154..163)::9 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [163..167)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks8.tspans.txt new file mode 100644 index 0000000000..f972911c7b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesComplexTagHelperTagBlocks8.tspans.txt @@ -0,0 +1,3 @@ +TagHelper span at (0:0,0 [167] ) - ptaghelper +TagHelper span at (30:0,30 [10] ) - ptaghelper +TagHelper span at (106:0,106 [10] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks1.cspans.txt new file mode 100644 index 0000000000..ddb3c37d48 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks1.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (15:0,15 [8] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [66] ) +Markup span at (35:0,35 [8] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [21] ) +Markup span at (43:0,43 [2] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [21] ) +Markup span at (45:0,45 [5] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [21] ) +Markup span at (50:0,50 [3] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [21] ) +Markup span at (53:0,53 [3] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [21] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks1.stree.txt new file mode 100644 index 0000000000..b48530199c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks1.stree.txt @@ -0,0 +1,65 @@ +RazorDocument - [0..66)::66 - [

                        ] + MarkupBlock - [0..66)::66 + MarkupTagHelperElement - [0..66)::66 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..62)::62 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..24)::22 - class - DoubleQuotes - Unbound - [ class=" foo"] + MarkupTextLiteral - [2..8)::6 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..13)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [14..15)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [15..23)::8 + MarkupLiteralAttributeValue - [15..23)::8 - [ foo] + MarkupTextLiteral - [15..20)::5 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [20..23)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTextLiteral - [23..24)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [24..57)::33 - style - DoubleQuotes - Unbound - [ style=" color : red ; "] + MarkupTextLiteral - [24..28)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [28..33)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [34..35)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [35..56)::21 + MarkupLiteralAttributeValue - [35..43)::8 - [ color] + MarkupTextLiteral - [35..38)::3 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [38..43)::5 - [color] - Gen - SpanEditHandler;Accepts:Any + Text;[color]; + MarkupLiteralAttributeValue - [43..45)::2 - [ :] + MarkupTextLiteral - [43..44)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [44..45)::1 - [:] - Gen - SpanEditHandler;Accepts:Any + Text;[:]; + MarkupLiteralAttributeValue - [45..50)::5 - [ red] + MarkupTextLiteral - [45..47)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [47..50)::3 - [red] - Gen - SpanEditHandler;Accepts:Any + Text;[red]; + MarkupLiteralAttributeValue - [50..53)::3 - [ ;] + MarkupTextLiteral - [50..52)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [52..53)::1 - [;] - Gen - SpanEditHandler;Accepts:Any + Text;[;]; + MarkupLiteralAttributeValue - [53..56)::3 - [ ] + MarkupTextLiteral - [53..56)::3 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [56..57)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [57..61)::4 + MarkupTextLiteral - [57..61)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [62..66)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks1.tspans.txt new file mode 100644 index 0000000000..ef54ffee1b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [66] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks2.cspans.txt new file mode 100644 index 0000000000..9a63e4f2b7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks2.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (15:0,15 [8] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [77] ) +Markup span at (35:0,35 [8] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [21] ) +Markup span at (43:0,43 [2] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [21] ) +Markup span at (45:0,45 [5] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [21] ) +Markup span at (50:0,50 [3] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [21] ) +Markup span at (53:0,53 [3] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [21] ) +Markup span at (62:0,62 [11] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [77] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks2.stree.txt new file mode 100644 index 0000000000..1747206b92 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks2.stree.txt @@ -0,0 +1,69 @@ +RazorDocument - [0..77)::77 - [

                        Hello World

                        ] + MarkupBlock - [0..77)::77 + MarkupTagHelperElement - [0..77)::77 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..62)::62 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..24)::22 - class - DoubleQuotes - Unbound - [ class=" foo"] + MarkupTextLiteral - [2..8)::6 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..13)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [14..15)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [15..23)::8 + MarkupLiteralAttributeValue - [15..23)::8 - [ foo] + MarkupTextLiteral - [15..20)::5 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [20..23)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTextLiteral - [23..24)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [24..57)::33 - style - DoubleQuotes - Unbound - [ style=" color : red ; "] + MarkupTextLiteral - [24..28)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [28..33)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [34..35)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [35..56)::21 + MarkupLiteralAttributeValue - [35..43)::8 - [ color] + MarkupTextLiteral - [35..38)::3 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [38..43)::5 - [color] - Gen - SpanEditHandler;Accepts:Any + Text;[color]; + MarkupLiteralAttributeValue - [43..45)::2 - [ :] + MarkupTextLiteral - [43..44)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [44..45)::1 - [:] - Gen - SpanEditHandler;Accepts:Any + Text;[:]; + MarkupLiteralAttributeValue - [45..50)::5 - [ red] + MarkupTextLiteral - [45..47)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [47..50)::3 - [red] - Gen - SpanEditHandler;Accepts:Any + Text;[red]; + MarkupLiteralAttributeValue - [50..53)::3 - [ ;] + MarkupTextLiteral - [50..52)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [52..53)::1 - [;] - Gen - SpanEditHandler;Accepts:Any + Text;[;]; + MarkupLiteralAttributeValue - [53..56)::3 - [ ] + MarkupTextLiteral - [53..56)::3 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [56..57)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [57..61)::4 + MarkupTextLiteral - [57..61)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[>]; + MarkupTextLiteral - [62..73)::11 - [Hello World] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + MarkupTagHelperEndTag - [73..77)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks2.tspans.txt new file mode 100644 index 0000000000..fdd25b54f6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [77] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks3.cspans.txt new file mode 100644 index 0000000000..ac0c044abb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks3.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (14:0,14 [6] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [8] ) +Markup span at (20:0,20 [2] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [8] ) +Markup span at (25:0,25 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [34] ) +Markup span at (34:0,34 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [73] ) +Markup span at (48:0,48 [12] ) (Accepts:Any) - Parent: Markup block at (48:0,48 [13] ) +Markup span at (60:0,60 [1] ) (Accepts:Any) - Parent: Markup block at (48:0,48 [13] ) +Markup span at (64:0,64 [5] ) (Accepts:Any) - Parent: Tag block at (35:0,35 [38] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks3.stree.txt new file mode 100644 index 0000000000..17887106ad --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks3.stree.txt @@ -0,0 +1,72 @@ +RazorDocument - [0..73)::73 - [

                        Hello

                        World

                        ] + MarkupBlock - [0..73)::73 + MarkupTagHelperElement - [0..34)::34 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..25)::25 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..23)::21 - class - DoubleQuotes - Unbound - [ class=" foo "] + MarkupTextLiteral - [2..7)::5 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..12)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [14..22)::8 + MarkupLiteralAttributeValue - [14..20)::6 - [ foo] + MarkupTextLiteral - [14..17)::3 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [17..20)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupLiteralAttributeValue - [20..22)::2 - [ ] + MarkupTextLiteral - [20..22)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [22..23)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [23..24)::1 + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[>]; + MarkupTextLiteral - [25..30)::5 - [Hello] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + MarkupTagHelperEndTag - [30..34)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [34..35)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [35..73)::38 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [35..64)::29 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [37..62)::25 - style - DoubleQuotes - Unbound - [ style=" color:red; "] + MarkupTextLiteral - [37..41)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [41..46)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [47..48)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [48..61)::13 + MarkupLiteralAttributeValue - [48..60)::12 - [ color:red;] + MarkupTextLiteral - [48..50)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [50..60)::10 - [color:red;] - Gen - SpanEditHandler;Accepts:Any + Text;[color:red;]; + MarkupLiteralAttributeValue - [60..61)::1 - [ ] + MarkupTextLiteral - [60..61)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [61..62)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [62..63)::1 + MarkupTextLiteral - [62..63)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[>]; + MarkupTextLiteral - [64..69)::5 - [World] - Gen - SpanEditHandler;Accepts:Any + Text;[World]; + MarkupTagHelperEndTag - [69..73)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks3.tspans.txt new file mode 100644 index 0000000000..ac76be0a56 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesOddlySpacedTagHelperTagBlocks3.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [34] ) - ptaghelper +TagHelper span at (35:0,35 [38] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks1.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks1.stree.txt new file mode 100644 index 0000000000..3c6c5782ca --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks1.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..7)::7 - [

                        ] + MarkupBlock - [0..7)::7 + MarkupTagHelperElement - [0..7)::7 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [3..7)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks1.tspans.txt new file mode 100644 index 0000000000..8c084941d6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [7] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks2.cspans.txt new file mode 100644 index 0000000000..f82aba421e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks2.cspans.txt @@ -0,0 +1 @@ +Markup span at (3:0,3 [11] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [18] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks2.stree.txt new file mode 100644 index 0000000000..1cad064338 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks2.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..18)::18 - [

                        Hello World

                        ] + MarkupBlock - [0..18)::18 + MarkupTagHelperElement - [0..18)::18 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..14)::11 - [Hello World] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + MarkupTagHelperEndTag - [14..18)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks2.tspans.txt new file mode 100644 index 0000000000..952b7c9df9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [18] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks3.cspans.txt new file mode 100644 index 0000000000..bae5d9e829 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks3.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (3:0,3 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [12] ) +Markup span at (12:0,12 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Markup span at (16:0,16 [5] ) (Accepts:Any) - Parent: Tag block at (13:0,13 [12] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks3.stree.txt new file mode 100644 index 0000000000..a1430c006e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks3.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..25)::25 - [

                        Hello

                        World

                        ] + MarkupBlock - [0..25)::25 + MarkupTagHelperElement - [0..12)::12 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..8)::5 - [Hello] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + MarkupTagHelperEndTag - [8..12)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [13..25)::12 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [13..16)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [16..21)::5 - [World] - Gen - SpanEditHandler;Accepts:Any + Text;[World]; + MarkupTagHelperEndTag - [21..25)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks3.tspans.txt new file mode 100644 index 0000000000..9c65b6e8ce --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks3.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [12] ) - ptaghelper +TagHelper span at (13:0,13 [12] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks4.cspans.txt new file mode 100644 index 0000000000..6d458bf721 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks4.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (3:0,3 [12] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [56] ) +Markup span at (15:0,15 [8] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [8] ) +Markup span at (23:0,23 [20] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [56] ) +Markup span at (43:0,43 [9] ) (Accepts:Any) - Parent: Tag block at (43:0,43 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks4.stree.txt new file mode 100644 index 0000000000..c49a39a260 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks4.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..56)::56 - [

                        Hello World inside of strong tag

                        ] + MarkupBlock - [0..56)::56 + MarkupTagHelperElement - [0..56)::56 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..15)::12 - [Hello World ] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + Whitespace;[ ]; + MarkupElement - [15..52)::37 + MarkupStartTag - [15..23)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [23..43)::20 - [inside of strong tag] - Gen - SpanEditHandler;Accepts:Any + Text;[inside]; + Whitespace;[ ]; + Text;[of]; + Whitespace;[ ]; + Text;[strong]; + Whitespace;[ ]; + Text;[tag]; + MarkupEndTag - [43..52)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [52..56)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks4.tspans.txt new file mode 100644 index 0000000000..43d407d913 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesPlainTagHelperTagBlocks4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [56] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers1.cspans.txt new file mode 100644 index 0000000000..d972e4a4f9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers1.cspans.txt @@ -0,0 +1 @@ +Markup span at (8:0,8 [14] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [31] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers1.stree.txt new file mode 100644 index 0000000000..f5a2d95995 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers1.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..31)::31 - [] + MarkupBlock - [0..31)::31 + MarkupTagHelperElement - [0..31)::31 - script[StartTagAndEndTag] - scripttaghelper + MarkupTagHelperStartTag - [0..8)::8 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers1.tspans.txt new file mode 100644 index 0000000000..8c61f52583 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [31] ) - scripttaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers2.cspans.txt new file mode 100644 index 0000000000..20e0cf45b6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers2.cspans.txt @@ -0,0 +1 @@ +Markup span at (8:0,8 [23] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [40] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers2.stree.txt new file mode 100644 index 0000000000..e51cba2264 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers2.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..40)::40 - [] + MarkupBlock - [0..40)::40 + MarkupTagHelperElement - [0..40)::40 - script[StartTagAndEndTag] - scripttaghelper + MarkupTagHelperStartTag - [0..8)::8 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers2.tspans.txt new file mode 100644 index 0000000000..ac63486204 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [40] ) - scripttaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers3.cspans.txt new file mode 100644 index 0000000000..8cebd4fdd9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers3.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (8:0,8 [12] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [29] ) +Markup span at (29:0,29 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [53] ) +Markup span at (38:0,38 [5] ) (Accepts:Any) - Parent: Tag block at (33:0,33 [16] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers3.stree.txt new file mode 100644 index 0000000000..2f3212ad0a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers3.stree.txt @@ -0,0 +1,46 @@ +RazorDocument - [0..53)::53 - [

                        World

                        ] + MarkupBlock - [0..53)::53 + MarkupTagHelperElement - [0..29)::29 - script[StartTagAndEndTag] - scripttaghelper + MarkupTagHelperStartTag - [0..8)::8 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; + MarkupTextLiteral - [29..30)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [30..53)::23 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [30..33)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [33..49)::16 - div[StartTagAndEndTag] - divtaghelper + MarkupTagHelperStartTag - [33..38)::5 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [38..43)::5 - [World] - Gen - SpanEditHandler;Accepts:Any + Text;[World]; + MarkupTagHelperEndTag - [43..49)::6 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [49..53)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers3.tspans.txt new file mode 100644 index 0000000000..a253e4c493 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers3.tspans.txt @@ -0,0 +1,3 @@ +TagHelper span at (0:0,0 [29] ) - scripttaghelper +TagHelper span at (30:0,30 [23] ) - ptaghelper +TagHelper span at (33:0,33 [16] ) - divtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers4.cspans.txt new file mode 100644 index 0000000000..a94da0fb8a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers4.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (8:0,8 [22] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [39] ) +Markup span at (39:0,39 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [75] ) +Markup span at (48:0,48 [18] ) (Accepts:Any) - Parent: Tag block at (40:0,40 [35] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers4.stree.txt new file mode 100644 index 0000000000..ad304014f9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers4.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..75)::75 - [ ] + MarkupBlock - [0..75)::75 + MarkupTagHelperElement - [0..39)::39 - script[StartTagAndEndTag] - scripttaghelper + MarkupTagHelperStartTag - [0..8)::8 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; + MarkupTextLiteral - [39..40)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [40..75)::35 - script[StartTagAndEndTag] - scripttaghelper + MarkupTagHelperStartTag - [40..48)::8 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers4.tspans.txt new file mode 100644 index 0000000000..e884343e22 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers4.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [39] ) - scripttaghelper +TagHelper span at (40:0,40 [35] ) - scripttaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers5.cspans.txt new file mode 100644 index 0000000000..76b38b02c6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers5.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (15:0,15 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [41] ) +Markup span at (27:0,27 [10] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [41] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers5.stree.txt new file mode 100644 index 0000000000..3e88278df7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers5.stree.txt @@ -0,0 +1,39 @@ +RazorDocument - [0..41)::41 - [ World

                        ] + MarkupBlock - [0..67)::67 + MarkupTagHelperElement - [0..67)::67 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..9)::6 - [Hello ] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + MarkupTagHelperElement - [9..57)::48 - script[StartTagAndEndTag] - scripttaghelper + MarkupTagHelperStartTag - [9..48)::39 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; + MarkupTextLiteral - [57..63)::6 - [ World] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[World]; + MarkupTagHelperEndTag - [63..67)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers6.tspans.txt new file mode 100644 index 0000000000..928d196eb5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers6.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [67] ) - ptaghelper +TagHelper span at (9:0,9 [48] ) - scripttaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers7.cspans.txt new file mode 100644 index 0000000000..572d8641d1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers7.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (3:0,3 [6] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [77] ) +Markup span at (24:0,24 [1] ) (Accepts:None) - Parent: Markup block at (24:0,24 [2] ) +Markup span at (25:0,25 [1] ) (Accepts:None) - Parent: Markup block at (24:0,24 [2] ) +Markup span at (26:0,26 [11] ) (Accepts:Any) - Parent: Markup block at (24:0,24 [13] ) +Markup span at (46:0,46 [10] ) (Accepts:Any) - Parent: Tag block at (9:0,9 [58] ) +Markup span at (67:0,67 [6] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [77] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers7.stree.txt new file mode 100644 index 0000000000..81f89f3081 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers7.stree.txt @@ -0,0 +1,61 @@ +RazorDocument - [0..77)::77 - [

                        Hello World

                        ] + MarkupBlock - [0..77)::77 + MarkupTagHelperElement - [0..77)::77 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..9)::6 - [Hello ] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + MarkupTagHelperElement - [9..67)::58 - script[StartTagAndEndTag] - scripttaghelper + MarkupTagHelperStartTag - [9..58)::49 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; + MarkupTextLiteral - [67..73)::6 - [ World] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[World]; + MarkupTagHelperEndTag - [73..77)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers7.tspans.txt new file mode 100644 index 0000000000..fcf8bee101 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesScriptTagHelpers7.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [77] ) - ptaghelper +TagHelper span at (9:0,9 [58] ) - scripttaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers1.cspans.txt new file mode 100644 index 0000000000..e4af93f808 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers1.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [36] ) +Markup span at (22:0,22 [10] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [36] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers1.stree.txt new file mode 100644 index 0000000000..cdd8993f77 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers1.stree.txt @@ -0,0 +1,39 @@ +RazorDocument - [0..36)::36 - [

                        ] + MarkupBlock - [0..36)::36 + MarkupTagHelperElement - [0..36)::36 - p[SelfClosing] - ptaghelper + MarkupTagHelperStartTag - [0..36)::36 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="foo"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [foo] + MarkupTextLiteral - [10..13)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [14..33)::19 - style - DoubleQuotes - Unbound - [ style="color:red;"] + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [15..20)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [21..22)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [22..32)::10 + MarkupLiteralAttributeValue - [22..32)::10 - [color:red;] + MarkupTextLiteral - [22..32)::10 - [color:red;] - Gen - SpanEditHandler;Accepts:Any + Text;[color:red;]; + MarkupTextLiteral - [32..33)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [33..34)::1 + MarkupTextLiteral - [33..34)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers1.tspans.txt new file mode 100644 index 0000000000..c32a52d977 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [36] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers2.cspans.txt new file mode 100644 index 0000000000..3b11382a00 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers2.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (3:0,3 [6] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [55] ) +Markup span at (19:0,19 [3] ) (Accepts:Any) - Parent: Tag block at (9:0,9 [36] ) +Markup span at (31:0,31 [10] ) (Accepts:Any) - Parent: Tag block at (9:0,9 [36] ) +Markup span at (45:0,45 [6] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [55] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers2.stree.txt new file mode 100644 index 0000000000..1b96cc1caa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers2.stree.txt @@ -0,0 +1,55 @@ +RazorDocument - [0..55)::55 - [

                        Hello

                        World

                        ] + MarkupBlock - [0..55)::55 + MarkupTagHelperElement - [0..55)::55 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..9)::6 - [Hello ] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + MarkupTagHelperElement - [9..45)::36 - p[SelfClosing] - ptaghelper + MarkupTagHelperStartTag - [9..45)::36 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [11..23)::12 - class - DoubleQuotes - Unbound - [ class="foo"] + MarkupTextLiteral - [11..12)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [12..17)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [18..19)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [19..22)::3 + MarkupLiteralAttributeValue - [19..22)::3 - [foo] + MarkupTextLiteral - [19..22)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTextLiteral - [22..23)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [23..42)::19 - style - DoubleQuotes - Unbound - [ style="color:red;"] + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [24..29)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [30..31)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [31..41)::10 + MarkupLiteralAttributeValue - [31..41)::10 - [color:red;] + MarkupTextLiteral - [31..41)::10 - [color:red;] - Gen - SpanEditHandler;Accepts:Any + Text;[color:red;]; + MarkupTextLiteral - [41..42)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [42..43)::1 + MarkupTextLiteral - [42..43)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTextLiteral - [45..51)::6 - [ World] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[World]; + MarkupTagHelperEndTag - [51..55)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers2.tspans.txt new file mode 100644 index 0000000000..6dc6c9b953 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers2.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [55] ) - ptaghelper +TagHelper span at (9:0,9 [36] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers3.cspans.txt new file mode 100644 index 0000000000..a55ddcf08a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers3.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [52] ) +Markup span at (15:0,15 [3] ) (Accepts:Any) - Parent: Tag block at (5:0,5 [17] ) +Markup span at (22:0,22 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [52] ) +Markup span at (33:0,33 [10] ) (Accepts:Any) - Parent: Tag block at (23:0,23 [24] ) +Markup span at (47:0,47 [5] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [52] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers3.stree.txt new file mode 100644 index 0000000000..f2e68f8dfa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers3.stree.txt @@ -0,0 +1,54 @@ +RazorDocument - [0..52)::52 - [Hello

                        World] + MarkupBlock - [0..52)::52 + MarkupTextLiteral - [0..5)::5 - [Hello] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + MarkupTagHelperElement - [5..22)::17 - p[SelfClosing] - ptaghelper + MarkupTagHelperStartTag - [5..22)::17 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [7..19)::12 - class - DoubleQuotes - Unbound - [ class="foo"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..13)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [14..15)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [15..18)::3 + MarkupLiteralAttributeValue - [15..18)::3 - [foo] + MarkupTextLiteral - [15..18)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTextLiteral - [18..19)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [19..20)::1 + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTextLiteral - [22..23)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [23..47)::24 - p[SelfClosing] - ptaghelper + MarkupTagHelperStartTag - [23..47)::24 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [25..44)::19 - style - DoubleQuotes - Unbound - [ style="color:red;"] + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [26..31)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [32..33)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [33..43)::10 + MarkupLiteralAttributeValue - [33..43)::10 - [color:red;] + MarkupTextLiteral - [33..43)::10 - [color:red;] - Gen - SpanEditHandler;Accepts:Any + Text;[color:red;]; + MarkupTextLiteral - [43..44)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [44..45)::1 + MarkupTextLiteral - [44..45)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTextLiteral - [47..52)::5 - [World] - Gen - SpanEditHandler;Accepts:Any + Text;[World]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers3.tspans.txt new file mode 100644 index 0000000000..9cf7822faf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesSelfClosingTagHelpers3.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (5:0,5 [17] ) - ptaghelper +TagHelper span at (23:0,23 [24] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes1.cspans.txt new file mode 100644 index 0000000000..ecfdc446c7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes1.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [38] ) +Markup span at (22:0,22 [10] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [38] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes1.stree.txt new file mode 100644 index 0000000000..1f1c00012e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes1.stree.txt @@ -0,0 +1,40 @@ +RazorDocument - [0..38)::38 - [

                        ] + MarkupBlock - [0..38)::38 + MarkupTagHelperElement - [0..38)::38 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..34)::34 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="foo"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [foo] + MarkupTextLiteral - [10..13)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [14..33)::19 - style - DoubleQuotes - Unbound - [ style="color:red;"] + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [15..20)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [21..22)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [22..32)::10 + MarkupLiteralAttributeValue - [22..32)::10 - [color:red;] + MarkupTextLiteral - [22..32)::10 - [color:red;] - Gen - SpanEditHandler;Accepts:Any + Text;[color:red;]; + MarkupTextLiteral - [32..33)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [34..38)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes1.tspans.txt new file mode 100644 index 0000000000..3cc3264682 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [38] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes2.cspans.txt new file mode 100644 index 0000000000..9f93b41526 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes2.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [49] ) +Markup span at (22:0,22 [10] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [49] ) +Markup span at (34:0,34 [11] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [49] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes2.stree.txt new file mode 100644 index 0000000000..bed786ce0b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes2.stree.txt @@ -0,0 +1,44 @@ +RazorDocument - [0..49)::49 - [

                        Hello World

                        ] + MarkupBlock - [0..49)::49 + MarkupTagHelperElement - [0..49)::49 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..34)::34 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="foo"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [foo] + MarkupTextLiteral - [10..13)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [14..33)::19 - style - DoubleQuotes - Unbound - [ style="color:red;"] + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [15..20)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [21..22)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [22..32)::10 + MarkupLiteralAttributeValue - [22..32)::10 - [color:red;] + MarkupTextLiteral - [22..32)::10 - [color:red;] - Gen - SpanEditHandler;Accepts:Any + Text;[color:red;]; + MarkupTextLiteral - [32..33)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [34..45)::11 - [Hello World] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + MarkupTagHelperEndTag - [45..49)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes2.tspans.txt new file mode 100644 index 0000000000..f12231fbd7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [49] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes3.cspans.txt new file mode 100644 index 0000000000..9663987bab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes3.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [24] ) +Markup span at (15:0,15 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [24] ) +Markup span at (24:0,24 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [56] ) +Markup span at (35:0,35 [10] ) (Accepts:Any) - Parent: Tag block at (25:0,25 [31] ) +Markup span at (47:0,47 [5] ) (Accepts:Any) - Parent: Tag block at (25:0,25 [31] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes3.stree.txt new file mode 100644 index 0000000000..3366d7ed09 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes3.stree.txt @@ -0,0 +1,56 @@ +RazorDocument - [0..56)::56 - [

                        Hello

                        World

                        ] + MarkupBlock - [0..56)::56 + MarkupTagHelperElement - [0..24)::24 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..15)::15 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="foo"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [foo] + MarkupTextLiteral - [10..13)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [15..20)::5 - [Hello] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + MarkupTagHelperEndTag - [20..24)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [24..25)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [25..56)::31 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [25..47)::22 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [27..46)::19 - style - DoubleQuotes - Unbound - [ style="color:red;"] + MarkupTextLiteral - [27..28)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [28..33)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [34..35)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [35..45)::10 + MarkupLiteralAttributeValue - [35..45)::10 - [color:red;] + MarkupTextLiteral - [35..45)::10 - [color:red;] - Gen - SpanEditHandler;Accepts:Any + Text;[color:red;]; + MarkupTextLiteral - [45..46)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [47..52)::5 - [World] - Gen - SpanEditHandler;Accepts:Any + Text;[World]; + MarkupTagHelperEndTag - [52..56)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes3.tspans.txt new file mode 100644 index 0000000000..75b14aa3c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes3.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [24] ) - ptaghelper +TagHelper span at (25:0,25 [31] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes4.cspans.txt new file mode 100644 index 0000000000..944a88693b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes4.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [99] ) +Markup span at (22:0,22 [10] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [99] ) +Markup span at (34:0,34 [12] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [99] ) +Markup span at (46:0,46 [7] ) (Accepts:Any) - Parent: Tag block at (46:0,46 [20] ) +Markup span at (53:0,53 [8] ) (Accepts:Any) - Parent: Markup block at (53:0,53 [12] ) +Markup span at (61:0,61 [3] ) (Accepts:Any) - Parent: Markup block at (53:0,53 [12] ) +Markup span at (64:0,64 [1] ) (Accepts:Any) - Parent: Markup block at (53:0,53 [12] ) +Markup span at (65:0,65 [1] ) (Accepts:Any) - Parent: Tag block at (46:0,46 [20] ) +Markup span at (66:0,66 [20] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [99] ) +Markup span at (86:0,86 [9] ) (Accepts:Any) - Parent: Tag block at (86:0,86 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes4.stree.txt new file mode 100644 index 0000000000..e3e248f40b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes4.stree.txt @@ -0,0 +1,77 @@ +RazorDocument - [0..99)::99 - [

                        Hello World inside of strong tag

                        ] + MarkupBlock - [0..99)::99 + MarkupTagHelperElement - [0..99)::99 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..34)::34 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="foo"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [foo] + MarkupTextLiteral - [10..13)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [14..33)::19 - style - DoubleQuotes - Unbound - [ style="color:red;"] + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [15..20)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [21..22)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [22..32)::10 + MarkupLiteralAttributeValue - [22..32)::10 - [color:red;] + MarkupTextLiteral - [22..32)::10 - [color:red;] - Gen - SpanEditHandler;Accepts:Any + Text;[color:red;]; + MarkupTextLiteral - [32..33)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [34..46)::12 - [Hello World ] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + Whitespace;[ ]; + MarkupElement - [46..95)::49 + MarkupStartTag - [46..66)::20 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupAttributeBlock - [53..65)::12 - [ class="foo"] + MarkupTextLiteral - [53..54)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [54..59)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [60..61)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [61..64)::3 + MarkupLiteralAttributeValue - [61..64)::3 - [foo] + MarkupTextLiteral - [61..64)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTextLiteral - [64..65)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [66..86)::20 - [inside of strong tag] - Gen - SpanEditHandler;Accepts:Any + Text;[inside]; + Whitespace;[ ]; + Text;[of]; + Whitespace;[ ]; + Text;[strong]; + Whitespace;[ ]; + Text;[tag]; + MarkupEndTag - [86..95)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [95..99)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes4.tspans.txt new file mode 100644 index 0000000000..06bcd7e03e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithPlainAttributes4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [99] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes1.cspans.txt new file mode 100644 index 0000000000..f08a9b491a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes1.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (9:0,9 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [56] ) +Transition span at (21:0,21 [1] ) (Accepts:None) - Parent: Expression block at (21:0,21 [13] ) +Code span at (22:0,22 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (21:0,21 [13] ) +Markup span at (41:0,41 [10] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [56] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes1.stree.txt new file mode 100644 index 0000000000..dc9e705e9f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes1.stree.txt @@ -0,0 +1,51 @@ +RazorDocument - [0..56)::56 - [

                        ] + MarkupBlock - [0..56)::56 + MarkupTagHelperElement - [0..56)::56 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..52)::52 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..12)::10 - class - DoubleQuotes - Unbound - [ class=foo] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTagHelperAttributeValue - [9..12)::3 + MarkupLiteralAttributeValue - [9..12)::3 - [foo] + MarkupTextLiteral - [9..12)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTagHelperAttribute - [12..34)::22 - dynamic - DoubleQuotes - Unbound - [ dynamic=@DateTime.Now] + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [13..20)::7 - [dynamic] - Gen - SpanEditHandler;Accepts:Any + Text;[dynamic]; + Equals;[=]; + MarkupTagHelperAttributeValue - [21..34)::13 + MarkupDynamicAttributeValue - [21..34)::13 - [@DateTime.Now] + GenericBlock - [21..34)::13 + CSharpCodeBlock - [21..34)::13 + CSharpImplicitExpression - [21..34)::13 + CSharpTransition - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [22..34)::12 + CSharpCodeBlock - [22..34)::12 + CSharpExpressionLiteral - [22..34)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTagHelperAttribute - [34..51)::17 - style - DoubleQuotes - Unbound - [ style=color:red;] + MarkupTextLiteral - [34..35)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [35..40)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTagHelperAttributeValue - [41..51)::10 + MarkupLiteralAttributeValue - [41..51)::10 - [color:red;] + MarkupTextLiteral - [41..51)::10 - [color:red;] - Gen - SpanEditHandler;Accepts:Any + Text;[color:red;]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [52..56)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes1.tspans.txt new file mode 100644 index 0000000000..43d407d913 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [56] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes2.cspans.txt new file mode 100644 index 0000000000..a52e2d29cd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes2.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (9:0,9 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [67] ) +Transition span at (21:0,21 [1] ) (Accepts:None) - Parent: Expression block at (21:0,21 [13] ) +Code span at (22:0,22 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (21:0,21 [13] ) +Markup span at (41:0,41 [10] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [67] ) +Markup span at (52:0,52 [11] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [67] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes2.stree.txt new file mode 100644 index 0000000000..f609519290 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes2.stree.txt @@ -0,0 +1,55 @@ +RazorDocument - [0..67)::67 - [

                        Hello World

                        ] + MarkupBlock - [0..67)::67 + MarkupTagHelperElement - [0..67)::67 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..52)::52 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..12)::10 - class - DoubleQuotes - Unbound - [ class=foo] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTagHelperAttributeValue - [9..12)::3 + MarkupLiteralAttributeValue - [9..12)::3 - [foo] + MarkupTextLiteral - [9..12)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTagHelperAttribute - [12..34)::22 - dynamic - DoubleQuotes - Unbound - [ dynamic=@DateTime.Now] + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [13..20)::7 - [dynamic] - Gen - SpanEditHandler;Accepts:Any + Text;[dynamic]; + Equals;[=]; + MarkupTagHelperAttributeValue - [21..34)::13 + MarkupDynamicAttributeValue - [21..34)::13 - [@DateTime.Now] + GenericBlock - [21..34)::13 + CSharpCodeBlock - [21..34)::13 + CSharpImplicitExpression - [21..34)::13 + CSharpTransition - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [22..34)::12 + CSharpCodeBlock - [22..34)::12 + CSharpExpressionLiteral - [22..34)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTagHelperAttribute - [34..51)::17 - style - DoubleQuotes - Unbound - [ style=color:red;] + MarkupTextLiteral - [34..35)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [35..40)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTagHelperAttributeValue - [41..51)::10 + MarkupLiteralAttributeValue - [41..51)::10 - [color:red;] + MarkupTextLiteral - [41..51)::10 - [color:red;] - Gen - SpanEditHandler;Accepts:Any + Text;[color:red;]; + CloseAngle;[>]; + MarkupTextLiteral - [52..63)::11 - [Hello World] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + MarkupTagHelperEndTag - [63..67)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes2.tspans.txt new file mode 100644 index 0000000000..fc4df1931c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [67] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes3.cspans.txt new file mode 100644 index 0000000000..9b90d7819d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes3.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (9:0,9 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [69] ) +Transition span at (21:0,21 [1] ) (Accepts:None) - Parent: Expression block at (21:0,21 [13] ) +Code span at (22:0,22 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (21:0,21 [13] ) +Markup span at (41:0,41 [5] ) (Accepts:Any) - Parent: Markup block at (41:0,41 [12] ) +Markup span at (46:0,46 [1] ) (Accepts:None) - Parent: Markup block at (46:0,46 [2] ) +Markup span at (47:0,47 [1] ) (Accepts:None) - Parent: Markup block at (46:0,46 [2] ) +Markup span at (48:0,48 [5] ) (Accepts:Any) - Parent: Markup block at (41:0,41 [12] ) +Markup span at (54:0,54 [11] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [69] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes3.stree.txt new file mode 100644 index 0000000000..725028c4d2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes3.stree.txt @@ -0,0 +1,63 @@ +RazorDocument - [0..69)::69 - [

                        Hello World

                        ] + MarkupBlock - [0..69)::69 + MarkupTagHelperElement - [0..69)::69 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..54)::54 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..12)::10 - class - DoubleQuotes - Unbound - [ class=foo] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTagHelperAttributeValue - [9..12)::3 + MarkupLiteralAttributeValue - [9..12)::3 - [foo] + MarkupTextLiteral - [9..12)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTagHelperAttribute - [12..34)::22 - dynamic - DoubleQuotes - Unbound - [ dynamic=@DateTime.Now] + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [13..20)::7 - [dynamic] - Gen - SpanEditHandler;Accepts:Any + Text;[dynamic]; + Equals;[=]; + MarkupTagHelperAttributeValue - [21..34)::13 + MarkupDynamicAttributeValue - [21..34)::13 - [@DateTime.Now] + GenericBlock - [21..34)::13 + CSharpCodeBlock - [21..34)::13 + CSharpImplicitExpression - [21..34)::13 + CSharpTransition - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [22..34)::12 + CSharpCodeBlock - [22..34)::12 + CSharpExpressionLiteral - [22..34)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTagHelperAttribute - [34..53)::19 - style - DoubleQuotes - Unbound - [ style=color@@:red;] + MarkupTextLiteral - [34..35)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [35..40)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTagHelperAttributeValue - [41..53)::12 + MarkupLiteralAttributeValue - [41..46)::5 - [color] + MarkupTextLiteral - [41..46)::5 - [color] - Gen - SpanEditHandler;Accepts:Any + Text;[color]; + MarkupBlock - [46..48)::2 + MarkupTextLiteral - [46..47)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupEphemeralTextLiteral - [47..48)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupLiteralAttributeValue - [48..53)::5 - [:red;] + MarkupTextLiteral - [48..53)::5 - [:red;] - Gen - SpanEditHandler;Accepts:Any + Text;[:red;]; + CloseAngle;[>]; + MarkupTextLiteral - [54..65)::11 - [Hello World] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + MarkupTagHelperEndTag - [65..69)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes3.tspans.txt new file mode 100644 index 0000000000..ff9e419de7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [69] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes4.cspans.txt new file mode 100644 index 0000000000..ed2cf9ddf2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes4.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (9:0,9 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [44] ) +Transition span at (21:0,21 [1] ) (Accepts:None) - Parent: Expression block at (21:0,21 [13] ) +Code span at (22:0,22 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (21:0,21 [13] ) +Markup span at (35:0,35 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [44] ) +Markup span at (44:0,44 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [96] ) +Markup span at (54:0,54 [10] ) (Accepts:Any) - Parent: Tag block at (45:0,45 [51] ) +Transition span at (73:0,73 [1] ) (Accepts:None) - Parent: Expression block at (73:0,73 [13] ) +Code span at (74:0,74 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (73:0,73 [13] ) +Markup span at (87:0,87 [5] ) (Accepts:Any) - Parent: Tag block at (45:0,45 [51] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes4.stree.txt new file mode 100644 index 0000000000..8ff07ec1ed --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes4.stree.txt @@ -0,0 +1,86 @@ +RazorDocument - [0..96)::96 - [

                        Hello

                        World

                        ] + MarkupBlock - [0..96)::96 + MarkupTagHelperElement - [0..44)::44 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..35)::35 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..12)::10 - class - DoubleQuotes - Unbound - [ class=foo] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTagHelperAttributeValue - [9..12)::3 + MarkupLiteralAttributeValue - [9..12)::3 - [foo] + MarkupTextLiteral - [9..12)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTagHelperAttribute - [12..34)::22 - dynamic - DoubleQuotes - Unbound - [ dynamic=@DateTime.Now] + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [13..20)::7 - [dynamic] - Gen - SpanEditHandler;Accepts:Any + Text;[dynamic]; + Equals;[=]; + MarkupTagHelperAttributeValue - [21..34)::13 + MarkupDynamicAttributeValue - [21..34)::13 - [@DateTime.Now] + GenericBlock - [21..34)::13 + CSharpCodeBlock - [21..34)::13 + CSharpImplicitExpression - [21..34)::13 + CSharpTransition - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [22..34)::12 + CSharpCodeBlock - [22..34)::12 + CSharpExpressionLiteral - [22..34)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + CloseAngle;[>]; + MarkupTextLiteral - [35..40)::5 - [Hello] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + MarkupTagHelperEndTag - [40..44)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [44..45)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [45..96)::51 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [45..87)::42 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [47..64)::17 - style - DoubleQuotes - Unbound - [ style=color:red;] + MarkupTextLiteral - [47..48)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [48..53)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTagHelperAttributeValue - [54..64)::10 + MarkupLiteralAttributeValue - [54..64)::10 - [color:red;] + MarkupTextLiteral - [54..64)::10 - [color:red;] - Gen - SpanEditHandler;Accepts:Any + Text;[color:red;]; + MarkupTagHelperAttribute - [64..86)::22 - dynamic - DoubleQuotes - Unbound - [ dynamic=@DateTime.Now] + MarkupTextLiteral - [64..65)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [65..72)::7 - [dynamic] - Gen - SpanEditHandler;Accepts:Any + Text;[dynamic]; + Equals;[=]; + MarkupTagHelperAttributeValue - [73..86)::13 + MarkupDynamicAttributeValue - [73..86)::13 - [@DateTime.Now] + GenericBlock - [73..86)::13 + CSharpCodeBlock - [73..86)::13 + CSharpImplicitExpression - [73..86)::13 + CSharpTransition - [73..74)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [74..86)::12 + CSharpCodeBlock - [74..86)::12 + CSharpExpressionLiteral - [74..86)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + CloseAngle;[>]; + MarkupTextLiteral - [87..92)::5 - [World] - Gen - SpanEditHandler;Accepts:Any + Text;[World]; + MarkupTagHelperEndTag - [92..96)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes4.tspans.txt new file mode 100644 index 0000000000..bddced97ea --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes4.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [44] ) - ptaghelper +TagHelper span at (45:0,45 [51] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes5.cspans.txt new file mode 100644 index 0000000000..2b1a126add --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes5.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (9:0,9 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [117] ) +Transition span at (21:0,21 [1] ) (Accepts:None) - Parent: Expression block at (21:0,21 [13] ) +Code span at (22:0,22 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (21:0,21 [13] ) +Markup span at (41:0,41 [10] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [117] ) +Markup span at (52:0,52 [12] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [117] ) +Markup span at (64:0,64 [7] ) (Accepts:Any) - Parent: Tag block at (64:0,64 [20] ) +Markup span at (71:0,71 [8] ) (Accepts:Any) - Parent: Markup block at (71:0,71 [12] ) +Markup span at (79:0,79 [3] ) (Accepts:Any) - Parent: Markup block at (71:0,71 [12] ) +Markup span at (82:0,82 [1] ) (Accepts:Any) - Parent: Markup block at (71:0,71 [12] ) +Markup span at (83:0,83 [1] ) (Accepts:Any) - Parent: Tag block at (64:0,64 [20] ) +Markup span at (84:0,84 [20] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [117] ) +Markup span at (104:0,104 [9] ) (Accepts:Any) - Parent: Tag block at (104:0,104 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes5.stree.txt new file mode 100644 index 0000000000..4c8ad505c1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes5.stree.txt @@ -0,0 +1,88 @@ +RazorDocument - [0..117)::117 - [

                        Hello World inside of strong tag

                        ] + MarkupBlock - [0..117)::117 + MarkupTagHelperElement - [0..117)::117 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..52)::52 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..12)::10 - class - DoubleQuotes - Unbound - [ class=foo] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTagHelperAttributeValue - [9..12)::3 + MarkupLiteralAttributeValue - [9..12)::3 - [foo] + MarkupTextLiteral - [9..12)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTagHelperAttribute - [12..34)::22 - dynamic - DoubleQuotes - Unbound - [ dynamic=@DateTime.Now] + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [13..20)::7 - [dynamic] - Gen - SpanEditHandler;Accepts:Any + Text;[dynamic]; + Equals;[=]; + MarkupTagHelperAttributeValue - [21..34)::13 + MarkupDynamicAttributeValue - [21..34)::13 - [@DateTime.Now] + GenericBlock - [21..34)::13 + CSharpCodeBlock - [21..34)::13 + CSharpImplicitExpression - [21..34)::13 + CSharpTransition - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [22..34)::12 + CSharpCodeBlock - [22..34)::12 + CSharpExpressionLiteral - [22..34)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTagHelperAttribute - [34..51)::17 - style - DoubleQuotes - Unbound - [ style=color:red;] + MarkupTextLiteral - [34..35)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [35..40)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTagHelperAttributeValue - [41..51)::10 + MarkupLiteralAttributeValue - [41..51)::10 - [color:red;] + MarkupTextLiteral - [41..51)::10 - [color:red;] - Gen - SpanEditHandler;Accepts:Any + Text;[color:red;]; + CloseAngle;[>]; + MarkupTextLiteral - [52..64)::12 - [Hello World ] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + Whitespace;[ ]; + MarkupElement - [64..113)::49 + MarkupStartTag - [64..84)::20 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupAttributeBlock - [71..83)::12 - [ class="foo"] + MarkupTextLiteral - [71..72)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [72..77)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [78..79)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [79..82)::3 + MarkupLiteralAttributeValue - [79..82)::3 - [foo] + MarkupTextLiteral - [79..82)::3 - [foo] - Gen - SpanEditHandler;Accepts:Any + Text;[foo]; + MarkupTextLiteral - [82..83)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [84..104)::20 - [inside of strong tag] - Gen - SpanEditHandler;Accepts:Any + Text;[inside]; + Whitespace;[ ]; + Text;[of]; + Whitespace;[ ]; + Text;[strong]; + Whitespace;[ ]; + Text;[tag]; + MarkupEndTag - [104..113)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [113..117)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes5.tspans.txt new file mode 100644 index 0000000000..dc61572b3f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/TagHelperParseTreeRewriter_RewritesTagHelpersWithQuotelessAttributes5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [117] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers1.cspans.txt new file mode 100644 index 0000000000..92e6c778c6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers1.cspans.txt @@ -0,0 +1 @@ +Markup span at (10:0,10 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [16] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers1.stree.txt new file mode 100644 index 0000000000..8d78aa6741 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers1.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..16)::16 - [

                        ] + MarkupBlock - [0..16)::16 + MarkupTagHelperElement - [0..16)::16 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..12)::12 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..11)::9 - class - DoubleQuotes - Unbound - [ class=""] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..10)::0 + MarkupTextLiteral - [10..10)::0 - [] + MarkupTextLiteral - [10..11)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [12..16)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers1.tspans.txt new file mode 100644 index 0000000000..52dba16922 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [16] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers2.cspans.txt new file mode 100644 index 0000000000..92e6c778c6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers2.cspans.txt @@ -0,0 +1 @@ +Markup span at (10:0,10 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [16] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers2.stree.txt new file mode 100644 index 0000000000..4c062cddf9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers2.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..16)::16 - [

                        ] + MarkupBlock - [0..16)::16 + MarkupTagHelperElement - [0..16)::16 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..12)::12 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..11)::9 - class - SingleQuotes - Unbound - [ class=''] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [10..10)::0 + MarkupTextLiteral - [10..10)::0 - [] + MarkupTextLiteral - [10..11)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTagHelperEndTag - [12..16)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers2.tspans.txt new file mode 100644 index 0000000000..52dba16922 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [16] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers3.cspans.txt new file mode 100644 index 0000000000..065cf74b88 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers3.cspans.txt @@ -0,0 +1 @@ +Markup span at (9:0,9 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [14] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers3.stree.txt new file mode 100644 index 0000000000..b82bd69b7d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers3.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..14)::14 - [

                        ] + MarkupBlock - [0..14)::14 + MarkupTagHelperElement - [0..14)::14 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..10)::10 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..9)::7 - class - DoubleQuotes - Unbound - [ class=] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTagHelperAttributeValue - [9..9)::0 + MarkupTextLiteral - [9..9)::0 - [] + CloseAngle;[>]; + MarkupTagHelperEndTag - [10..14)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers3.tspans.txt new file mode 100644 index 0000000000..d4769a773a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [14] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers4.cspans.txt new file mode 100644 index 0000000000..eeee563c5d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers4.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (11:0,11 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [33] ) +Markup span at (20:0,20 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [33] ) +Markup span at (29:0,29 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [33] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers4.stree.txt new file mode 100644 index 0000000000..cf02383422 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers4.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..33)::33 - [

                        ] + MarkupBlock - [0..33)::33 + MarkupTagHelperElement - [0..33)::33 - p[SelfClosing] - ptaghelper + MarkupTagHelperStartTag - [0..33)::33 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..12)::10 - class1 - SingleQuotes - Unbound - [ class1=''] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..9)::6 - [class1] - Gen - SpanEditHandler;Accepts:Any + Text;[class1]; + Equals;[=]; + MarkupTextLiteral - [10..11)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [11..11)::0 + MarkupTextLiteral - [11..11)::0 - [] + MarkupTextLiteral - [11..12)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttribute - [12..20)::8 - class2 - DoubleQuotes - Unbound - [ class2=] + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [13..19)::6 - [class2] - Gen - SpanEditHandler;Accepts:Any + Text;[class2]; + Equals;[=]; + MarkupTagHelperAttributeValue - [20..20)::0 + MarkupTextLiteral - [20..20)::0 - [] + MarkupTagHelperAttribute - [20..30)::10 - class3 - DoubleQuotes - Unbound - [ class3=""] + MarkupTextLiteral - [20..21)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [21..27)::6 - [class3] - Gen - SpanEditHandler;Accepts:Any + Text;[class3]; + Equals;[=]; + MarkupTextLiteral - [28..29)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [29..29)::0 + MarkupTextLiteral - [29..29)::0 - [] + MarkupTextLiteral - [29..30)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [30..31)::1 + MarkupTextLiteral - [30..31)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers4.tspans.txt new file mode 100644 index 0000000000..d6131fed67 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [33] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers5.cspans.txt new file mode 100644 index 0000000000..7b54ebc00d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers5.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (11:0,11 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [31] ) +Markup span at (20:0,20 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [31] ) +Markup span at (28:0,28 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [31] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers5.stree.txt new file mode 100644 index 0000000000..768a93f630 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers5.stree.txt @@ -0,0 +1,39 @@ +RazorDocument - [0..31)::31 - [

                        ] + MarkupBlock - [0..31)::31 + MarkupTagHelperElement - [0..31)::31 - p[SelfClosing] - ptaghelper + MarkupTagHelperStartTag - [0..31)::31 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..12)::10 - class1 - SingleQuotes - Unbound - [ class1=''] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..9)::6 - [class1] - Gen - SpanEditHandler;Accepts:Any + Text;[class1]; + Equals;[=]; + MarkupTextLiteral - [10..11)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [11..11)::0 + MarkupTextLiteral - [11..11)::0 - [] + MarkupTextLiteral - [11..12)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttribute - [12..21)::9 - class2 - DoubleQuotes - Unbound - [class2=""] + MarkupTextLiteral - [12..18)::6 - [class2] - Gen - SpanEditHandler;Accepts:Any + Text;[class2]; + Equals;[=]; + MarkupTextLiteral - [19..20)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [20..20)::0 + MarkupTextLiteral - [20..20)::0 - [] + MarkupTextLiteral - [20..21)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [21..28)::7 - class3 - DoubleQuotes - Unbound - [class3=] + MarkupTextLiteral - [21..27)::6 - [class3] - Gen - SpanEditHandler;Accepts:Any + Text;[class3]; + Equals;[=]; + MarkupTagHelperAttributeValue - [28..28)::0 + MarkupTextLiteral - [28..28)::0 - [] + MarkupMiscAttributeContent - [28..29)::1 + MarkupTextLiteral - [28..29)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers5.tspans.txt new file mode 100644 index 0000000000..b3437d8dea --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsEmptyAttributeTagHelpers5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [31] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block1.cspans.txt new file mode 100644 index 0000000000..2681dbe5c7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block1.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +Code span at (28:0,28 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [29] ) +MetaCode span at (28:0,28 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +Markup span at (29:0,29 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block1.stree.txt new file mode 100644 index 0000000000..0bfd3f50eb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block1.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..29)::29 - [@{}] + MarkupBlock - [0..29)::29 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..29)::29 + CSharpStatement - [0..29)::29 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..29)::28 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..28)::26 + MarkupBlock - [2..28)::26 + MarkupTagHelperElement - [2..28)::26 - input[SelfClosing] - InputTagHelper1 - InputTagHelper3 + MarkupTagHelperStartTag - [2..28)::26 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [8..25)::17 - unbound-required - Minimized - Unbound - [ unbound-required] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..25)::16 - [unbound-required] - Gen - SpanEditHandler;Accepts:Any + Text;[unbound-required]; + MarkupMiscAttributeContent - [25..26)::1 + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [28..28)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [28..29)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [29..29)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block1.tspans.txt new file mode 100644 index 0000000000..2af3e60e20 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [26] ) - InputTagHelper1 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block10.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block10.cspans.txt new file mode 100644 index 0000000000..20f962b4cd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block10.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [28] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [28] ) +Code span at (27:0,27 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [28] ) +MetaCode span at (27:0,27 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [28] ) +Markup span at (28:0,28 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block10.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block10.diag.txt new file mode 100644 index 0000000000..1fba524ca7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block10.diag.txt @@ -0,0 +1 @@ +(1,10): Error RZ2008: Attribute 'int-prefix-value' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block10.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block10.stree.txt new file mode 100644 index 0000000000..73a3bdc16a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block10.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..28)::28 - [@{}] + MarkupBlock - [0..28)::28 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..28)::28 + CSharpStatement - [0..28)::28 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..28)::27 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..27)::25 + MarkupBlock - [2..27)::25 + MarkupTagHelperElement - [2..27)::25 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [2..27)::25 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [8..25)::17 - int-prefix-value - Minimized - Bound - [ int-prefix-value] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..25)::16 - [int-prefix-value] - Gen - SpanEditHandler;Accepts:Any + Text;[int-prefix-value]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [27..27)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [27..28)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [28..28)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block10.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block10.tspans.txt new file mode 100644 index 0000000000..0744554d85 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block10.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [25] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block11.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block11.cspans.txt new file mode 100644 index 0000000000..a9bbc9d9b6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block11.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Code span at (31:0,31 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (31:0,31 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Markup span at (32:0,32 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block11.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block11.diag.txt new file mode 100644 index 0000000000..f50988eac1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block11.diag.txt @@ -0,0 +1 @@ +(1,10): Error RZ2008: Attribute 'string-prefix-value' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block11.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block11.stree.txt new file mode 100644 index 0000000000..47c931a035 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block11.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..32)::32 - [@{}] + MarkupBlock - [0..32)::32 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..32)::32 + CSharpStatement - [0..32)::32 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..32)::31 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..31)::29 + MarkupBlock - [2..31)::29 + MarkupTagHelperElement - [2..31)::29 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [2..31)::29 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [8..28)::20 - string-prefix-value - Minimized - Bound - [ string-prefix-value] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..28)::19 - [string-prefix-value] - Gen - SpanEditHandler;Accepts:Any + Text;[string-prefix-value]; + MarkupMiscAttributeContent - [28..29)::1 + MarkupTextLiteral - [28..29)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [31..31)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [31..32)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block11.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block11.tspans.txt new file mode 100644 index 0000000000..2806d5b970 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block11.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [29] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block12.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block12.cspans.txt new file mode 100644 index 0000000000..37fd3df813 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block12.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Code span at (27:0,27 [0] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (2:0,2 [29] ) +Code span at (31:0,31 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (31:0,31 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Markup span at (32:0,32 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block12.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block12.diag.txt new file mode 100644 index 0000000000..1fba524ca7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block12.diag.txt @@ -0,0 +1 @@ +(1,10): Error RZ2008: Attribute 'int-prefix-value' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block12.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block12.stree.txt new file mode 100644 index 0000000000..fe5d6fd5f8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block12.stree.txt @@ -0,0 +1,40 @@ +RazorDocument - [0..32)::32 - [@{}] + MarkupBlock - [0..32)::32 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..32)::32 + CSharpStatement - [0..32)::32 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..32)::31 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..31)::29 + MarkupBlock - [2..31)::29 + MarkupTagHelperElement - [2..31)::29 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [2..31)::29 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [8..28)::20 - int-prefix-value - SingleQuotes - Bound - [ int-prefix-value=''] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..25)::16 - [int-prefix-value] - Gen - SpanEditHandler;Accepts:Any + Text;[int-prefix-value]; + Equals;[=]; + MarkupTextLiteral - [26..27)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [27..27)::0 + CSharpExpressionLiteral - [27..27)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + MarkupTextLiteral - [27..28)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [28..29)::1 + MarkupTextLiteral - [28..29)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [31..31)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [31..32)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block12.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block12.tspans.txt new file mode 100644 index 0000000000..2806d5b970 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block12.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [29] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block13.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block13.cspans.txt new file mode 100644 index 0000000000..dfa5d6b255 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block13.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (30:0,30 [0] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [31] ) +Code span at (33:0,33 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (33:0,33 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (34:0,34 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block13.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block13.stree.txt new file mode 100644 index 0000000000..b280afb3c6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block13.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..34)::34 - [@{}] + MarkupBlock - [0..34)::34 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..34)::34 + CSharpStatement - [0..34)::34 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..34)::33 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..33)::31 + MarkupBlock - [2..33)::31 + MarkupTagHelperElement - [2..33)::31 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [2..33)::31 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [8..31)::23 - string-prefix-value - SingleQuotes - Bound - [ string-prefix-value=''] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..28)::19 - [string-prefix-value] - Gen - SpanEditHandler;Accepts:Any + Text;[string-prefix-value]; + Equals;[=]; + MarkupTextLiteral - [29..30)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [30..30)::0 + MarkupTextLiteral - [30..30)::0 - [] + MarkupTextLiteral - [30..31)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [33..34)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [34..34)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block13.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block13.tspans.txt new file mode 100644 index 0000000000..8182ed93b6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block13.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [31] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block14.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block14.cspans.txt new file mode 100644 index 0000000000..3a6e32aaf1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block14.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Code span at (27:0,27 [1] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (2:0,2 [29] ) +Code span at (31:0,31 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (31:0,31 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Markup span at (32:0,32 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block14.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block14.stree.txt new file mode 100644 index 0000000000..96c8c36003 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block14.stree.txt @@ -0,0 +1,38 @@ +RazorDocument - [0..32)::32 - [@{}] + MarkupBlock - [0..32)::32 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..32)::32 + CSharpStatement - [0..32)::32 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..32)::31 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..31)::29 + MarkupBlock - [2..31)::29 + MarkupTagHelperElement - [2..31)::29 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [2..31)::29 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [8..29)::21 - int-prefix-value - SingleQuotes - Bound - [ int-prefix-value='3'] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..25)::16 - [int-prefix-value] - Gen - SpanEditHandler;Accepts:Any + Text;[int-prefix-value]; + Equals;[=]; + MarkupTextLiteral - [26..27)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [27..28)::1 + CSharpExpressionLiteral - [27..28)::1 - [3] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[3]; + MarkupTextLiteral - [28..29)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [31..31)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [31..32)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block14.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block14.tspans.txt new file mode 100644 index 0000000000..2806d5b970 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block14.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [29] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block15.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block15.cspans.txt new file mode 100644 index 0000000000..1b14171eab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block15.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +Markup span at (30:0,30 [4] ) (Accepts:Any) - Parent: Markup block at (30:0,30 [11] ) +Markup span at (34:0,34 [7] ) (Accepts:Any) - Parent: Markup block at (30:0,30 [11] ) +Code span at (45:0,45 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [46] ) +MetaCode span at (45:0,45 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +Markup span at (46:0,46 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block15.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block15.stree.txt new file mode 100644 index 0000000000..98d61ab15a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block15.stree.txt @@ -0,0 +1,44 @@ +RazorDocument - [0..46)::46 - [@{}] + MarkupBlock - [0..46)::46 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..46)::46 + CSharpStatement - [0..46)::46 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..46)::45 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..45)::43 + MarkupBlock - [2..45)::43 + MarkupTagHelperElement - [2..45)::43 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [2..45)::43 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [8..42)::34 - string-prefix-value - SingleQuotes - Bound - [ string-prefix-value='some string'] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..28)::19 - [string-prefix-value] - Gen - SpanEditHandler;Accepts:Any + Text;[string-prefix-value]; + Equals;[=]; + MarkupTextLiteral - [29..30)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [30..41)::11 + MarkupTextLiteral - [30..34)::4 - [some] - Gen - SpanEditHandler;Accepts:Any + Text;[some]; + MarkupTextLiteral - [34..41)::7 - [ string] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[string]; + MarkupTextLiteral - [41..42)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [42..43)::1 + MarkupTextLiteral - [42..43)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [45..45)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [45..46)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [46..46)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block15.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block15.tspans.txt new file mode 100644 index 0000000000..02d9781340 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block15.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [43] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block16.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block16.cspans.txt new file mode 100644 index 0000000000..cf35066b4c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block16.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [51] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [51] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [51] ) +Code span at (50:0,50 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [51] ) +MetaCode span at (50:0,50 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [51] ) +Markup span at (51:0,51 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [51] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block16.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block16.diag.txt new file mode 100644 index 0000000000..34a097ddbd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block16.diag.txt @@ -0,0 +1 @@ +(1,27): Error RZ2008: Attribute 'bound-required-string' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block16.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block16.stree.txt new file mode 100644 index 0000000000..9f865a9054 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block16.stree.txt @@ -0,0 +1,38 @@ +RazorDocument - [0..51)::51 - [@{}] + MarkupBlock - [0..51)::51 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..51)::51 + CSharpStatement - [0..51)::51 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..51)::50 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..50)::48 + MarkupBlock - [2..50)::48 + MarkupTagHelperElement - [2..50)::48 - input[SelfClosing] - InputTagHelper1 - InputTagHelper3 + MarkupTagHelperStartTag - [2..50)::48 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [8..25)::17 - unbound-required - Minimized - Unbound - [ unbound-required] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..25)::16 - [unbound-required] - Gen - SpanEditHandler;Accepts:Any + Text;[unbound-required]; + MarkupMinimizedTagHelperAttribute - [25..47)::22 - bound-required-string - Minimized - Bound - [ bound-required-string] + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [26..47)::21 - [bound-required-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-string]; + MarkupMiscAttributeContent - [47..48)::1 + MarkupTextLiteral - [47..48)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [50..50)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [50..51)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [51..51)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block16.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block16.tspans.txt new file mode 100644 index 0000000000..720abefec9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block16.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [48] ) - InputTagHelper1 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block17.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block17.cspans.txt new file mode 100644 index 0000000000..8d6822ee97 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block17.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +Code span at (32:0,32 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [33] ) +MetaCode span at (32:0,32 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [33] ) +Markup span at (33:0,33 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [33] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block17.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block17.diag.txt new file mode 100644 index 0000000000..1f297c49c9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block17.diag.txt @@ -0,0 +1,2 @@ +(1,6): Error RZ2008: Attribute 'bound-int' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +(1,16): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block17.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block17.stree.txt new file mode 100644 index 0000000000..1befcaa705 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block17.stree.txt @@ -0,0 +1,39 @@ +RazorDocument - [0..33)::33 - [@{

                        }] + MarkupBlock - [0..33)::33 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..33)::33 + CSharpStatement - [0..33)::33 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..33)::32 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..32)::30 + MarkupBlock - [2..32)::30 + MarkupTagHelperElement - [2..32)::30 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [2..28)::26 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [4..14)::10 - bound-int - Minimized - Bound - [ bound-int] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..14)::9 - [bound-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-int]; + MarkupMinimizedTagHelperAttribute - [14..27)::13 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [15..27)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [28..32)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [32..33)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block17.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block17.tspans.txt new file mode 100644 index 0000000000..1c716c5737 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block17.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [30] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block18.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block18.cspans.txt new file mode 100644 index 0000000000..27127e839a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block18.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [70] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [70] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [70] ) +Code span at (69:0,69 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [70] ) +MetaCode span at (69:0,69 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [70] ) +Markup span at (70:0,70 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [70] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block18.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block18.diag.txt new file mode 100644 index 0000000000..85acb7466e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block18.diag.txt @@ -0,0 +1,2 @@ +(1,10): Error RZ2008: Attribute 'bound-required-int' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +(1,46): Error RZ2008: Attribute 'bound-required-string' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block18.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block18.stree.txt new file mode 100644 index 0000000000..25b3448e77 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block18.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..70)::70 - [@{}] + MarkupBlock - [0..70)::70 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..70)::70 + CSharpStatement - [0..70)::70 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..70)::69 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..69)::67 + MarkupBlock - [2..69)::67 + MarkupTagHelperElement - [2..69)::67 - input[SelfClosing] - InputTagHelper1 - InputTagHelper2 - InputTagHelper3 + MarkupTagHelperStartTag - [2..69)::67 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [8..27)::19 - bound-required-int - Minimized - Bound - [ bound-required-int] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..27)::18 - [bound-required-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-int]; + MarkupMinimizedTagHelperAttribute - [27..44)::17 - unbound-required - Minimized - Unbound - [ unbound-required] + MarkupTextLiteral - [27..28)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [28..44)::16 - [unbound-required] - Gen - SpanEditHandler;Accepts:Any + Text;[unbound-required]; + MarkupMinimizedTagHelperAttribute - [44..66)::22 - bound-required-string - Minimized - Bound - [ bound-required-string] + MarkupTextLiteral - [44..45)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [45..66)::21 - [bound-required-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-string]; + MarkupMiscAttributeContent - [66..67)::1 + MarkupTextLiteral - [66..67)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [69..69)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [69..70)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [70..70)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block18.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block18.tspans.txt new file mode 100644 index 0000000000..d52f0760b6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block18.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [67] ) - InputTagHelper1 - InputTagHelper2 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block19.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block19.cspans.txt new file mode 100644 index 0000000000..3c04339e4d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block19.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +Code span at (45:0,45 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [46] ) +MetaCode span at (45:0,45 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +Markup span at (46:0,46 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block19.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block19.diag.txt new file mode 100644 index 0000000000..40bd70e718 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block19.diag.txt @@ -0,0 +1,3 @@ +(1,6): Error RZ2008: Attribute 'bound-int' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +(1,16): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. +(1,29): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block19.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block19.stree.txt new file mode 100644 index 0000000000..e8733ace63 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block19.stree.txt @@ -0,0 +1,44 @@ +RazorDocument - [0..46)::46 - [@{

                        }] + MarkupBlock - [0..46)::46 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..46)::46 + CSharpStatement - [0..46)::46 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..46)::45 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..45)::43 + MarkupBlock - [2..45)::43 + MarkupTagHelperElement - [2..45)::43 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [2..41)::39 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [4..14)::10 - bound-int - Minimized - Bound - [ bound-int] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..14)::9 - [bound-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-int]; + MarkupMinimizedTagHelperAttribute - [14..27)::13 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [15..27)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + MarkupMinimizedTagHelperAttribute - [27..40)::13 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [27..28)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [28..40)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [41..45)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [45..45)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [45..46)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [46..46)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block19.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block19.tspans.txt new file mode 100644 index 0000000000..a82989a6ce --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block19.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [43] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block2.cspans.txt new file mode 100644 index 0000000000..db6a9525a0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block2.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Code span at (22:0,22 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [23] ) +MetaCode span at (22:0,22 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (23:0,23 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block2.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block2.diag.txt new file mode 100644 index 0000000000..7aaa747435 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block2.diag.txt @@ -0,0 +1 @@ +(1,6): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block2.stree.txt new file mode 100644 index 0000000000..e68706d9ff --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block2.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..23)::23 - [@{

                        }] + MarkupBlock - [0..23)::23 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..23)::23 + CSharpStatement - [0..23)::23 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..23)::22 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..22)::20 + MarkupBlock - [2..22)::20 + MarkupTagHelperElement - [2..22)::20 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [2..18)::16 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [4..17)::13 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..17)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [18..22)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [22..22)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [22..23)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [23..23)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block2.tspans.txt new file mode 100644 index 0000000000..d9c1c8ba6b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [20] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block20.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block20.cspans.txt new file mode 100644 index 0000000000..eeed5a0f9b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block20.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [41] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [41] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [41] ) +Markup span at (33:0,33 [3] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [38] ) +Code span at (40:0,40 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [41] ) +MetaCode span at (40:0,40 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [41] ) +Markup span at (41:0,41 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [41] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block20.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block20.stree.txt new file mode 100644 index 0000000000..7664ec06e2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block20.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..41)::41 - [@{}] + MarkupBlock - [0..41)::41 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..41)::41 + CSharpStatement - [0..41)::41 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..41)::40 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..40)::38 + MarkupBlock - [2..40)::38 + MarkupTagHelperElement - [2..40)::38 - input[SelfClosing] - InputTagHelper1 - InputTagHelper3 + MarkupTagHelperStartTag - [2..40)::38 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [8..25)::17 - unbound-required - Minimized - Unbound - [ unbound-required] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..25)::16 - [unbound-required] - Gen - SpanEditHandler;Accepts:Any + Text;[unbound-required]; + MarkupTagHelperAttribute - [25..37)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [26..31)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [32..33)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [33..36)::3 + MarkupLiteralAttributeValue - [33..36)::3 - [btn] + MarkupTextLiteral - [33..36)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [36..37)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [37..38)::1 + MarkupTextLiteral - [37..38)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [40..40)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [40..41)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [41..41)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block20.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block20.tspans.txt new file mode 100644 index 0000000000..d3b1fd3647 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block20.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [38] ) - InputTagHelper1 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block21.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block21.cspans.txt new file mode 100644 index 0000000000..59bf8f8330 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block21.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [35] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [35] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [35] ) +Markup span at (25:0,25 [3] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [32] ) +Code span at (34:0,34 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [35] ) +MetaCode span at (34:0,34 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [35] ) +Markup span at (35:0,35 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [35] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block21.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block21.diag.txt new file mode 100644 index 0000000000..7aaa747435 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block21.diag.txt @@ -0,0 +1 @@ +(1,6): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block21.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block21.stree.txt new file mode 100644 index 0000000000..25bcd111d6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block21.stree.txt @@ -0,0 +1,48 @@ +RazorDocument - [0..35)::35 - [@{

                        }] + MarkupBlock - [0..35)::35 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..35)::35 + CSharpStatement - [0..35)::35 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..35)::34 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..34)::32 + MarkupBlock - [2..34)::32 + MarkupTagHelperElement - [2..34)::32 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [2..30)::28 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [4..17)::13 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..17)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + MarkupTagHelperAttribute - [17..29)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [18..23)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [24..25)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [25..28)::3 + MarkupLiteralAttributeValue - [25..28)::3 - [btn] + MarkupTextLiteral - [25..28)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [28..29)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTagHelperEndTag - [30..34)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [34..34)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [34..35)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [35..35)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block21.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block21.tspans.txt new file mode 100644 index 0000000000..89ddbae3e2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block21.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [32] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block22.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block22.cspans.txt new file mode 100644 index 0000000000..5543e2871d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block22.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [41] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [41] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [41] ) +Markup span at (16:0,16 [3] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [38] ) +Code span at (40:0,40 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [41] ) +MetaCode span at (40:0,40 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [41] ) +Markup span at (41:0,41 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [41] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block22.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block22.stree.txt new file mode 100644 index 0000000000..f57f78fc06 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block22.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..41)::41 - [@{}] + MarkupBlock - [0..41)::41 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..41)::41 + CSharpStatement - [0..41)::41 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..41)::40 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..40)::38 + MarkupBlock - [2..40)::38 + MarkupTagHelperElement - [2..40)::38 - input[SelfClosing] - InputTagHelper1 - InputTagHelper3 + MarkupTagHelperStartTag - [2..40)::38 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [8..20)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..14)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [16..19)::3 + MarkupLiteralAttributeValue - [16..19)::3 - [btn] + MarkupTextLiteral - [16..19)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [19..20)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [20..37)::17 - unbound-required - Minimized - Unbound - [ unbound-required] + MarkupTextLiteral - [20..21)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [21..37)::16 - [unbound-required] - Gen - SpanEditHandler;Accepts:Any + Text;[unbound-required]; + MarkupMiscAttributeContent - [37..38)::1 + MarkupTextLiteral - [37..38)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [40..40)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [40..41)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [41..41)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block22.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block22.tspans.txt new file mode 100644 index 0000000000..d3b1fd3647 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block22.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [38] ) - InputTagHelper1 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block23.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block23.cspans.txt new file mode 100644 index 0000000000..2a00c88428 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block23.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [35] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [35] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [35] ) +Markup span at (12:0,12 [3] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [32] ) +Code span at (34:0,34 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [35] ) +MetaCode span at (34:0,34 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [35] ) +Markup span at (35:0,35 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [35] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block23.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block23.diag.txt new file mode 100644 index 0000000000..2e64b8d326 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block23.diag.txt @@ -0,0 +1 @@ +(1,18): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block23.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block23.stree.txt new file mode 100644 index 0000000000..4e5dc02713 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block23.stree.txt @@ -0,0 +1,48 @@ +RazorDocument - [0..35)::35 - [@{

                        }] + MarkupBlock - [0..35)::35 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..35)::35 + CSharpStatement - [0..35)::35 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..35)::34 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..34)::32 + MarkupBlock - [2..34)::32 + MarkupTagHelperElement - [2..34)::32 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [2..30)::28 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [4..16)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..10)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [12..15)::3 + MarkupLiteralAttributeValue - [12..15)::3 - [btn] + MarkupTextLiteral - [12..15)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [15..16)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [16..29)::13 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [17..29)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [30..34)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [34..34)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [34..35)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [35..35)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block23.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block23.tspans.txt new file mode 100644 index 0000000000..89ddbae3e2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block23.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [32] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block24.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block24.cspans.txt new file mode 100644 index 0000000000..376263f7c5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block24.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +Markup span at (38:0,38 [3] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [43] ) +Code span at (45:0,45 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [46] ) +MetaCode span at (45:0,45 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +Markup span at (46:0,46 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block24.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block24.diag.txt new file mode 100644 index 0000000000..17ba3c5206 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block24.diag.txt @@ -0,0 +1 @@ +(1,10): Error RZ2008: Attribute 'bound-required-string' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block24.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block24.stree.txt new file mode 100644 index 0000000000..9f5ca01f01 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block24.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..46)::46 - [@{}] + MarkupBlock - [0..46)::46 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..46)::46 + CSharpStatement - [0..46)::46 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..46)::45 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..45)::43 + MarkupBlock - [2..45)::43 + MarkupTagHelperElement - [2..45)::43 - input[SelfClosing] - InputTagHelper1 - InputTagHelper3 + MarkupTagHelperStartTag - [2..45)::43 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [8..30)::22 - bound-required-string - Minimized - Bound - [ bound-required-string] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..30)::21 - [bound-required-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-string]; + MarkupTagHelperAttribute - [30..42)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [30..31)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [31..36)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [37..38)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [38..41)::3 + MarkupLiteralAttributeValue - [38..41)::3 - [btn] + MarkupTextLiteral - [38..41)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [41..42)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [42..43)::1 + MarkupTextLiteral - [42..43)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [45..45)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [45..46)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [46..46)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block24.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block24.tspans.txt new file mode 100644 index 0000000000..1521fa98cf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block24.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [43] ) - InputTagHelper1 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block25.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block25.cspans.txt new file mode 100644 index 0000000000..1d5021398f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block25.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +Markup span at (16:0,16 [3] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [43] ) +Code span at (45:0,45 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [46] ) +MetaCode span at (45:0,45 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +Markup span at (46:0,46 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block25.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block25.diag.txt new file mode 100644 index 0000000000..4d52547683 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block25.diag.txt @@ -0,0 +1 @@ +(1,22): Error RZ2008: Attribute 'bound-required-string' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block25.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block25.stree.txt new file mode 100644 index 0000000000..5ac62870b1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block25.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..46)::46 - [@{}] + MarkupBlock - [0..46)::46 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..46)::46 + CSharpStatement - [0..46)::46 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..46)::45 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..45)::43 + MarkupBlock - [2..45)::43 + MarkupTagHelperElement - [2..45)::43 - input[SelfClosing] - InputTagHelper1 - InputTagHelper3 + MarkupTagHelperStartTag - [2..45)::43 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [8..20)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..14)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [16..19)::3 + MarkupLiteralAttributeValue - [16..19)::3 - [btn] + MarkupTextLiteral - [16..19)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [19..20)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [20..42)::22 - bound-required-string - Minimized - Bound - [ bound-required-string] + MarkupTextLiteral - [20..21)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [21..42)::21 - [bound-required-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-string]; + MarkupMiscAttributeContent - [42..43)::1 + MarkupTextLiteral - [42..43)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [45..45)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [45..46)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [46..46)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block25.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block25.tspans.txt new file mode 100644 index 0000000000..1521fa98cf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block25.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [43] ) - InputTagHelper1 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block26.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block26.cspans.txt new file mode 100644 index 0000000000..c5c968408f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block26.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [43] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [43] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [43] ) +Markup span at (35:0,35 [3] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [40] ) +Code span at (42:0,42 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [43] ) +MetaCode span at (42:0,42 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [43] ) +Markup span at (43:0,43 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [43] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block26.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block26.diag.txt new file mode 100644 index 0000000000..e49be8f23f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block26.diag.txt @@ -0,0 +1 @@ +(1,10): Error RZ2008: Attribute 'bound-required-int' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block26.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block26.stree.txt new file mode 100644 index 0000000000..304bc83217 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block26.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..43)::43 - [@{}] + MarkupBlock - [0..43)::43 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..43)::43 + CSharpStatement - [0..43)::43 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..43)::42 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..42)::40 + MarkupBlock - [2..42)::40 + MarkupTagHelperElement - [2..42)::40 - input[SelfClosing] - InputTagHelper2 - InputTagHelper3 + MarkupTagHelperStartTag - [2..42)::40 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [8..27)::19 - bound-required-int - Minimized - Bound - [ bound-required-int] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..27)::18 - [bound-required-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-int]; + MarkupTagHelperAttribute - [27..39)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [27..28)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [28..33)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [34..35)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [35..38)::3 + MarkupLiteralAttributeValue - [35..38)::3 - [btn] + MarkupTextLiteral - [35..38)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [38..39)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [39..40)::1 + MarkupTextLiteral - [39..40)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [42..42)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [42..43)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [43..43)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block26.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block26.tspans.txt new file mode 100644 index 0000000000..e397c293b7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block26.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [40] ) - InputTagHelper2 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block27.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block27.cspans.txt new file mode 100644 index 0000000000..c99bc193a4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block27.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Markup span at (22:0,22 [3] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [29] ) +Code span at (31:0,31 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (31:0,31 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Markup span at (32:0,32 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block27.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block27.diag.txt new file mode 100644 index 0000000000..d801de11d6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block27.diag.txt @@ -0,0 +1 @@ +(1,6): Error RZ2008: Attribute 'bound-int' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block27.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block27.stree.txt new file mode 100644 index 0000000000..21c03176d4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block27.stree.txt @@ -0,0 +1,48 @@ +RazorDocument - [0..32)::32 - [@{

                        }] + MarkupBlock - [0..32)::32 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..32)::32 + CSharpStatement - [0..32)::32 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..32)::31 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..31)::29 + MarkupBlock - [2..31)::29 + MarkupTagHelperElement - [2..31)::29 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [2..27)::25 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [4..14)::10 - bound-int - Minimized - Bound - [ bound-int] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..14)::9 - [bound-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-int]; + MarkupTagHelperAttribute - [14..26)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [15..20)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [21..22)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [22..25)::3 + MarkupLiteralAttributeValue - [22..25)::3 - [btn] + MarkupTextLiteral - [22..25)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [25..26)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTagHelperEndTag - [27..31)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [31..31)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [31..32)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block27.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block27.tspans.txt new file mode 100644 index 0000000000..59132499f6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block27.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [29] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block28.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block28.cspans.txt new file mode 100644 index 0000000000..44774dadad --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block28.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [43] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [43] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [43] ) +Markup span at (16:0,16 [3] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [40] ) +Code span at (42:0,42 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [43] ) +MetaCode span at (42:0,42 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [43] ) +Markup span at (43:0,43 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [43] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block28.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block28.diag.txt new file mode 100644 index 0000000000..44cbbd120a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block28.diag.txt @@ -0,0 +1 @@ +(1,22): Error RZ2008: Attribute 'bound-required-int' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block28.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block28.stree.txt new file mode 100644 index 0000000000..6927648f4b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block28.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..43)::43 - [@{}] + MarkupBlock - [0..43)::43 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..43)::43 + CSharpStatement - [0..43)::43 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..43)::42 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..42)::40 + MarkupBlock - [2..42)::40 + MarkupTagHelperElement - [2..42)::40 - input[SelfClosing] - InputTagHelper2 - InputTagHelper3 + MarkupTagHelperStartTag - [2..42)::40 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [8..20)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..14)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [16..19)::3 + MarkupLiteralAttributeValue - [16..19)::3 - [btn] + MarkupTextLiteral - [16..19)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [19..20)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [20..39)::19 - bound-required-int - Minimized - Bound - [ bound-required-int] + MarkupTextLiteral - [20..21)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [21..39)::18 - [bound-required-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-int]; + MarkupMiscAttributeContent - [39..40)::1 + MarkupTextLiteral - [39..40)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [42..42)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [42..43)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [43..43)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block28.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block28.tspans.txt new file mode 100644 index 0000000000..e397c293b7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block28.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [40] ) - InputTagHelper2 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block29.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block29.cspans.txt new file mode 100644 index 0000000000..1bfedce83b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block29.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Markup span at (12:0,12 [3] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [29] ) +Code span at (31:0,31 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [32] ) +MetaCode span at (31:0,31 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [32] ) +Markup span at (32:0,32 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [32] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block29.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block29.diag.txt new file mode 100644 index 0000000000..b0d4ba275b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block29.diag.txt @@ -0,0 +1 @@ +(1,18): Error RZ2008: Attribute 'bound-int' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block29.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block29.stree.txt new file mode 100644 index 0000000000..a42df8f2d6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block29.stree.txt @@ -0,0 +1,48 @@ +RazorDocument - [0..32)::32 - [@{

                        }] + MarkupBlock - [0..32)::32 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..32)::32 + CSharpStatement - [0..32)::32 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..32)::31 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..31)::29 + MarkupBlock - [2..31)::29 + MarkupTagHelperElement - [2..31)::29 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [2..27)::25 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [4..16)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..10)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [12..15)::3 + MarkupLiteralAttributeValue - [12..15)::3 - [btn] + MarkupTextLiteral - [12..15)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [15..16)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [16..26)::10 - bound-int - Minimized - Bound - [ bound-int] + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [17..26)::9 - [bound-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-int]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [27..31)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [31..31)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [31..32)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [32..32)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block29.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block29.tspans.txt new file mode 100644 index 0000000000..59132499f6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block29.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [29] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block3.cspans.txt new file mode 100644 index 0000000000..1b7db58ccc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block3.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Code span at (33:0,33 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (33:0,33 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (34:0,34 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block3.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block3.diag.txt new file mode 100644 index 0000000000..17ba3c5206 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block3.diag.txt @@ -0,0 +1 @@ +(1,10): Error RZ2008: Attribute 'bound-required-string' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block3.stree.txt new file mode 100644 index 0000000000..f86315c309 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block3.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..34)::34 - [@{}] + MarkupBlock - [0..34)::34 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..34)::34 + CSharpStatement - [0..34)::34 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..34)::33 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..33)::31 + MarkupBlock - [2..33)::31 + MarkupTagHelperElement - [2..33)::31 - input[SelfClosing] - InputTagHelper1 - InputTagHelper3 + MarkupTagHelperStartTag - [2..33)::31 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [8..30)::22 - bound-required-string - Minimized - Bound - [ bound-required-string] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..30)::21 - [bound-required-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-string]; + MarkupMiscAttributeContent - [30..31)::1 + MarkupTextLiteral - [30..31)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [33..34)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [34..34)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block3.tspans.txt new file mode 100644 index 0000000000..15e0c638a1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [31] ) - InputTagHelper1 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block30.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block30.cspans.txt new file mode 100644 index 0000000000..e24fb99361 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block30.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [57] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [57] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [57] ) +Transition span at (16:0,16 [1] ) (Accepts:None) - Parent: Expression block at (16:0,16 [13] ) +Code span at (17:0,17 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (16:0,16 [13] ) +Markup span at (29:0,29 [2] ) (Accepts:Any) - Parent: Markup block at (16:0,16 [17] ) +Markup span at (31:0,31 [2] ) (Accepts:Any) - Parent: Markup block at (16:0,16 [17] ) +Code span at (56:0,56 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [57] ) +MetaCode span at (56:0,56 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [57] ) +Markup span at (57:0,57 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [57] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block30.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block30.diag.txt new file mode 100644 index 0000000000..f13ebc1193 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block30.diag.txt @@ -0,0 +1 @@ +(1,36): Error RZ2008: Attribute 'bound-required-int' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block30.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block30.stree.txt new file mode 100644 index 0000000000..82d4899171 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block30.stree.txt @@ -0,0 +1,66 @@ +RazorDocument - [0..57)::57 - [@{}] + MarkupBlock - [0..57)::57 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..57)::57 + CSharpStatement - [0..57)::57 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..57)::56 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..56)::54 + MarkupBlock - [2..56)::54 + MarkupTagHelperElement - [2..56)::54 - input[SelfClosing] - InputTagHelper2 - InputTagHelper3 + MarkupTagHelperStartTag - [2..56)::54 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [8..34)::26 - class - SingleQuotes - Unbound - [ class='@DateTime.Now + 1'] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..14)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [16..33)::17 + MarkupDynamicAttributeValue - [16..29)::13 - [@DateTime.Now] + GenericBlock - [16..29)::13 + CSharpCodeBlock - [16..29)::13 + CSharpImplicitExpression - [16..29)::13 + CSharpTransition - [16..17)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [17..29)::12 + CSharpCodeBlock - [17..29)::12 + CSharpExpressionLiteral - [17..29)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupLiteralAttributeValue - [29..31)::2 - [ +] + MarkupTextLiteral - [29..30)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [30..31)::1 - [+] - Gen - SpanEditHandler;Accepts:Any + Text;[+]; + MarkupLiteralAttributeValue - [31..33)::2 - [ 1] + MarkupTextLiteral - [31..32)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [32..33)::1 - [1] - Gen - SpanEditHandler;Accepts:Any + Text;[1]; + MarkupTextLiteral - [33..34)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [34..53)::19 - bound-required-int - Minimized - Bound - [ bound-required-int] + MarkupTextLiteral - [34..35)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [35..53)::18 - [bound-required-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-int]; + MarkupMiscAttributeContent - [53..54)::1 + MarkupTextLiteral - [53..54)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [56..56)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [56..57)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [57..57)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block30.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block30.tspans.txt new file mode 100644 index 0000000000..48c553ef88 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block30.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [54] ) - InputTagHelper2 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block31.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block31.cspans.txt new file mode 100644 index 0000000000..50cbc5077c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block31.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +Transition span at (12:0,12 [1] ) (Accepts:None) - Parent: Expression block at (12:0,12 [13] ) +Code span at (13:0,13 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (12:0,12 [13] ) +Markup span at (25:0,25 [2] ) (Accepts:Any) - Parent: Markup block at (12:0,12 [17] ) +Markup span at (27:0,27 [2] ) (Accepts:Any) - Parent: Markup block at (12:0,12 [17] ) +Code span at (45:0,45 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [46] ) +MetaCode span at (45:0,45 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [46] ) +Markup span at (46:0,46 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [46] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block31.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block31.diag.txt new file mode 100644 index 0000000000..df44096ccc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block31.diag.txt @@ -0,0 +1 @@ +(1,32): Error RZ2008: Attribute 'bound-int' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block31.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block31.stree.txt new file mode 100644 index 0000000000..d44ffc1fa8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block31.stree.txt @@ -0,0 +1,67 @@ +RazorDocument - [0..46)::46 - [@{

                        }] + MarkupBlock - [0..46)::46 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..46)::46 + CSharpStatement - [0..46)::46 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..46)::45 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..45)::43 + MarkupBlock - [2..45)::43 + MarkupTagHelperElement - [2..45)::43 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [2..41)::39 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [4..30)::26 - class - SingleQuotes - Unbound - [ class='@DateTime.Now + 1'] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..10)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [12..29)::17 + MarkupDynamicAttributeValue - [12..25)::13 - [@DateTime.Now] + GenericBlock - [12..25)::13 + CSharpCodeBlock - [12..25)::13 + CSharpImplicitExpression - [12..25)::13 + CSharpTransition - [12..13)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [13..25)::12 + CSharpCodeBlock - [13..25)::12 + CSharpExpressionLiteral - [13..25)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupLiteralAttributeValue - [25..27)::2 - [ +] + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [26..27)::1 - [+] - Gen - SpanEditHandler;Accepts:Any + Text;[+]; + MarkupLiteralAttributeValue - [27..29)::2 - [ 1] + MarkupTextLiteral - [27..28)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [28..29)::1 - [1] - Gen - SpanEditHandler;Accepts:Any + Text;[1]; + MarkupTextLiteral - [29..30)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [30..40)::10 - bound-int - Minimized - Bound - [ bound-int] + MarkupTextLiteral - [30..31)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [31..40)::9 - [bound-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-int]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [41..45)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [45..45)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [45..46)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [46..46)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block31.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block31.tspans.txt new file mode 100644 index 0000000000..a82989a6ce --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block31.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [43] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block32.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block32.cspans.txt new file mode 100644 index 0000000000..24ce3652a1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block32.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [129] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [129] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [129] ) +Transition span at (38:0,38 [1] ) (Accepts:None) - Parent: Expression block at (38:0,38 [13] ) +Code span at (39:0,39 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (38:0,38 [13] ) +Markup span at (51:0,51 [2] ) (Accepts:Any) - Parent: Markup block at (38:0,38 [17] ) +Markup span at (53:0,53 [2] ) (Accepts:Any) - Parent: Markup block at (38:0,38 [17] ) +Transition span at (88:0,88 [1] ) (Accepts:None) - Parent: Expression block at (88:0,88 [13] ) +Code span at (89:0,89 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (88:0,88 [13] ) +Markup span at (101:0,101 [2] ) (Accepts:Any) - Parent: Markup block at (88:0,88 [17] ) +Markup span at (103:0,103 [2] ) (Accepts:Any) - Parent: Markup block at (88:0,88 [17] ) +Code span at (128:0,128 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [129] ) +MetaCode span at (128:0,128 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [129] ) +Markup span at (129:0,129 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [129] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block32.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block32.diag.txt new file mode 100644 index 0000000000..f7ecf89f20 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block32.diag.txt @@ -0,0 +1,2 @@ +(1,13): Error RZ2008: Attribute 'bound-required-int' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +(1,60): Error RZ2008: Attribute 'bound-required-string' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block32.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block32.stree.txt new file mode 100644 index 0000000000..3d0a162a8f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block32.stree.txt @@ -0,0 +1,109 @@ +RazorDocument - [0..129)::129 - [@{}] + MarkupBlock - [0..129)::129 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..129)::129 + CSharpStatement - [0..129)::129 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..129)::128 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..128)::126 + MarkupBlock - [2..128)::126 + MarkupTagHelperElement - [2..128)::126 - input[SelfClosing] - InputTagHelper1 - InputTagHelper2 - InputTagHelper3 + MarkupTagHelperStartTag - [2..128)::126 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [8..30)::22 - bound-required-int - Minimized - Bound - [ bound-required-int] + MarkupTextLiteral - [8..12)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [12..30)::18 - [bound-required-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-int]; + MarkupTagHelperAttribute - [30..56)::26 - class - SingleQuotes - Unbound - [ class='@DateTime.Now + 1'] + MarkupTextLiteral - [30..31)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [31..36)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [37..38)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [38..55)::17 + MarkupDynamicAttributeValue - [38..51)::13 - [@DateTime.Now] + GenericBlock - [38..51)::13 + CSharpCodeBlock - [38..51)::13 + CSharpImplicitExpression - [38..51)::13 + CSharpTransition - [38..39)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [39..51)::12 + CSharpCodeBlock - [39..51)::12 + CSharpExpressionLiteral - [39..51)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupLiteralAttributeValue - [51..53)::2 - [ +] + MarkupTextLiteral - [51..52)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [52..53)::1 - [+] - Gen - SpanEditHandler;Accepts:Any + Text;[+]; + MarkupLiteralAttributeValue - [53..55)::2 - [ 1] + MarkupTextLiteral - [53..54)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [54..55)::1 - [1] - Gen - SpanEditHandler;Accepts:Any + Text;[1]; + MarkupTextLiteral - [55..56)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [56..80)::24 - bound-required-string - Minimized - Bound - [ bound-required-string] + MarkupTextLiteral - [56..59)::3 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [59..80)::21 - [bound-required-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-string]; + MarkupTagHelperAttribute - [80..106)::26 - class - SingleQuotes - Unbound - [ class='@DateTime.Now + 1'] + MarkupTextLiteral - [80..81)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [81..86)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [87..88)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [88..105)::17 + MarkupDynamicAttributeValue - [88..101)::13 - [@DateTime.Now] + GenericBlock - [88..101)::13 + CSharpCodeBlock - [88..101)::13 + CSharpImplicitExpression - [88..101)::13 + CSharpTransition - [88..89)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [89..101)::12 + CSharpCodeBlock - [89..101)::12 + CSharpExpressionLiteral - [89..101)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupLiteralAttributeValue - [101..103)::2 - [ +] + MarkupTextLiteral - [101..102)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [102..103)::1 - [+] - Gen - SpanEditHandler;Accepts:Any + Text;[+]; + MarkupLiteralAttributeValue - [103..105)::2 - [ 1] + MarkupTextLiteral - [103..104)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [104..105)::1 - [1] - Gen - SpanEditHandler;Accepts:Any + Text;[1]; + MarkupTextLiteral - [105..106)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [106..124)::18 - unbound-required - Minimized - Unbound - [ unbound-required] + MarkupTextLiteral - [106..108)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [108..124)::16 - [unbound-required] - Gen - SpanEditHandler;Accepts:Any + Text;[unbound-required]; + MarkupMiscAttributeContent - [124..126)::2 + MarkupTextLiteral - [124..126)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [128..128)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [128..129)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [129..129)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block32.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block32.tspans.txt new file mode 100644 index 0000000000..166c08fd21 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block32.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [126] ) - InputTagHelper1 - InputTagHelper2 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block33.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block33.cspans.txt new file mode 100644 index 0000000000..a67845db19 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block33.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [104] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [104] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [104] ) +Transition span at (25:0,25 [1] ) (Accepts:None) - Parent: Expression block at (25:0,25 [13] ) +Code span at (26:0,26 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (25:0,25 [13] ) +Markup span at (38:0,38 [2] ) (Accepts:Any) - Parent: Markup block at (25:0,25 [17] ) +Markup span at (40:0,40 [2] ) (Accepts:Any) - Parent: Markup block at (25:0,25 [17] ) +Transition span at (66:0,66 [1] ) (Accepts:None) - Parent: Expression block at (66:0,66 [13] ) +Code span at (67:0,67 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (66:0,66 [13] ) +Markup span at (79:0,79 [2] ) (Accepts:Any) - Parent: Markup block at (66:0,66 [17] ) +Markup span at (81:0,81 [2] ) (Accepts:Any) - Parent: Markup block at (66:0,66 [17] ) +Code span at (103:0,103 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [104] ) +MetaCode span at (103:0,103 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [104] ) +Markup span at (104:0,104 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [104] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block33.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block33.diag.txt new file mode 100644 index 0000000000..02bcf3e7fa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block33.diag.txt @@ -0,0 +1,3 @@ +(1,9): Error RZ2008: Attribute 'bound-int' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +(1,47): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. +(1,87): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block33.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block33.stree.txt new file mode 100644 index 0000000000..b29b523237 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block33.stree.txt @@ -0,0 +1,110 @@ +RazorDocument - [0..104)::104 - [@{

                        }] + MarkupBlock - [0..104)::104 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..104)::104 + CSharpStatement - [0..104)::104 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..104)::103 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..103)::101 + MarkupBlock - [2..103)::101 + MarkupTagHelperElement - [2..103)::101 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [2..99)::97 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [4..17)::13 - bound-int - Minimized - Bound - [ bound-int] + MarkupTextLiteral - [4..8)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..17)::9 - [bound-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-int]; + MarkupTagHelperAttribute - [17..43)::26 - class - SingleQuotes - Unbound - [ class='@DateTime.Now + 1'] + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [18..23)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [24..25)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [25..42)::17 + MarkupDynamicAttributeValue - [25..38)::13 - [@DateTime.Now] + GenericBlock - [25..38)::13 + CSharpCodeBlock - [25..38)::13 + CSharpImplicitExpression - [25..38)::13 + CSharpTransition - [25..26)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [26..38)::12 + CSharpCodeBlock - [26..38)::12 + CSharpExpressionLiteral - [26..38)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupLiteralAttributeValue - [38..40)::2 - [ +] + MarkupTextLiteral - [38..39)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [39..40)::1 - [+] - Gen - SpanEditHandler;Accepts:Any + Text;[+]; + MarkupLiteralAttributeValue - [40..42)::2 - [ 1] + MarkupTextLiteral - [40..41)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [41..42)::1 - [1] - Gen - SpanEditHandler;Accepts:Any + Text;[1]; + MarkupTextLiteral - [42..43)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [43..58)::15 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [43..46)::3 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [46..58)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + MarkupTagHelperAttribute - [58..84)::26 - class - SingleQuotes - Unbound - [ class='@DateTime.Now + 1'] + MarkupTextLiteral - [58..59)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [59..64)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [65..66)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [66..83)::17 + MarkupDynamicAttributeValue - [66..79)::13 - [@DateTime.Now] + GenericBlock - [66..79)::13 + CSharpCodeBlock - [66..79)::13 + CSharpImplicitExpression - [66..79)::13 + CSharpTransition - [66..67)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [67..79)::12 + CSharpCodeBlock - [67..79)::12 + CSharpExpressionLiteral - [67..79)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupLiteralAttributeValue - [79..81)::2 - [ +] + MarkupTextLiteral - [79..80)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [80..81)::1 - [+] - Gen - SpanEditHandler;Accepts:Any + Text;[+]; + MarkupLiteralAttributeValue - [81..83)::2 - [ 1] + MarkupTextLiteral - [81..82)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [82..83)::1 - [1] - Gen - SpanEditHandler;Accepts:Any + Text;[1]; + MarkupTextLiteral - [83..84)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [84..98)::14 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [84..86)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [86..98)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [99..103)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [103..103)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [103..104)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [104..104)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block33.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block33.tspans.txt new file mode 100644 index 0000000000..9fcda621d7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block33.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [101] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block4.cspans.txt new file mode 100644 index 0000000000..98013e5de4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block4.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +Code span at (30:0,30 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [31] ) +MetaCode span at (30:0,30 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +Markup span at (31:0,31 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block4.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block4.diag.txt new file mode 100644 index 0000000000..e49be8f23f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block4.diag.txt @@ -0,0 +1 @@ +(1,10): Error RZ2008: Attribute 'bound-required-int' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block4.stree.txt new file mode 100644 index 0000000000..aec5a2ef4a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block4.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..31)::31 - [@{}] + MarkupBlock - [0..31)::31 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..31)::31 + CSharpStatement - [0..31)::31 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..31)::30 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..30)::28 + MarkupBlock - [2..30)::28 + MarkupTagHelperElement - [2..30)::28 - input[SelfClosing] - InputTagHelper2 - InputTagHelper3 + MarkupTagHelperStartTag - [2..30)::28 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [8..27)::19 - bound-required-int - Minimized - Bound - [ bound-required-int] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..27)::18 - [bound-required-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-int]; + MarkupMiscAttributeContent - [27..28)::1 + MarkupTextLiteral - [27..28)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [30..30)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [30..31)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [31..31)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block4.tspans.txt new file mode 100644 index 0000000000..84da2d9138 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [28] ) - InputTagHelper2 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block5.cspans.txt new file mode 100644 index 0000000000..2397a13ae4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block5.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +Code span at (19:0,19 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [20] ) +MetaCode span at (19:0,19 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +Markup span at (20:0,20 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block5.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block5.diag.txt new file mode 100644 index 0000000000..d801de11d6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block5.diag.txt @@ -0,0 +1 @@ +(1,6): Error RZ2008: Attribute 'bound-int' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block5.stree.txt new file mode 100644 index 0000000000..f61bc90a08 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block5.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..20)::20 - [@{

                        }] + MarkupBlock - [0..20)::20 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..20)::20 + CSharpStatement - [0..20)::20 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..20)::19 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..19)::17 + MarkupBlock - [2..19)::17 + MarkupTagHelperElement - [2..19)::17 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [2..15)::13 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [4..14)::10 - bound-int - Minimized - Bound - [ bound-int] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..14)::9 - [bound-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-int]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [15..19)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [19..19)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [19..20)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [20..20)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block5.tspans.txt new file mode 100644 index 0000000000..b8f49f313a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [17] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block6.cspans.txt new file mode 100644 index 0000000000..24e649f2da --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block6.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Code span at (25:0,25 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) +MetaCode span at (25:0,25 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Markup span at (26:0,26 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block6.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block6.diag.txt new file mode 100644 index 0000000000..4ea65e9705 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block6.diag.txt @@ -0,0 +1 @@ +(1,10): Error RZ2008: Attribute 'int-dictionary' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Collections.Generic.IDictionary' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block6.stree.txt new file mode 100644 index 0000000000..cffd8ef998 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block6.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..26)::26 - [@{}] + MarkupBlock - [0..26)::26 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..26)::26 + CSharpStatement - [0..26)::26 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..26)::25 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..25)::23 + MarkupBlock - [2..25)::23 + MarkupTagHelperElement - [2..25)::23 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [2..25)::23 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [8..23)::15 - int-dictionary - Minimized - Bound - [ int-dictionary] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..23)::14 - [int-dictionary] - Gen - SpanEditHandler;Accepts:Any + Text;[int-dictionary]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [25..25)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [25..26)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [26..26)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block6.tspans.txt new file mode 100644 index 0000000000..15dbcaa307 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block6.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [23] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block7.cspans.txt new file mode 100644 index 0000000000..3b00b2167f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block7.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [30] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [30] ) +Code span at (29:0,29 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [30] ) +MetaCode span at (29:0,29 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [30] ) +Markup span at (30:0,30 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block7.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block7.diag.txt new file mode 100644 index 0000000000..c4f2e7af6d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block7.diag.txt @@ -0,0 +1 @@ +(1,10): Error RZ2008: Attribute 'string-dictionary' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Collections.Generic.IDictionary' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block7.stree.txt new file mode 100644 index 0000000000..de57398940 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block7.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..30)::30 - [@{}] + MarkupBlock - [0..30)::30 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..30)::30 + CSharpStatement - [0..30)::30 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..30)::29 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..29)::27 + MarkupBlock - [2..29)::27 + MarkupTagHelperElement - [2..29)::27 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [2..29)::27 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [8..26)::18 - string-dictionary - Minimized - Bound - [ string-dictionary] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..26)::17 - [string-dictionary] - Gen - SpanEditHandler;Accepts:Any + Text;[string-dictionary]; + MarkupMiscAttributeContent - [26..27)::1 + MarkupTextLiteral - [26..27)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [29..29)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [29..30)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [30..30)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block7.tspans.txt new file mode 100644 index 0000000000..e5276ea81f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [27] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.cspans.txt new file mode 100644 index 0000000000..b4b9c0325e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +Code span at (23:0,23 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [24] ) +MetaCode span at (23:0,23 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +Markup span at (24:0,24 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt new file mode 100644 index 0000000000..132178a225 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt @@ -0,0 +1,2 @@ +(1,10): Error RZ2008: Attribute 'int-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +(1,10): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.stree.txt new file mode 100644 index 0000000000..54f08693c4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..24)::24 - [@{}] + MarkupBlock - [0..24)::24 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..24)::24 + CSharpStatement - [0..24)::24 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..24)::23 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..23)::21 + MarkupBlock - [2..23)::21 + MarkupTagHelperElement - [2..23)::21 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [2..23)::21 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [8..20)::12 - int-prefix- - Minimized - Bound - [ int-prefix-] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..20)::11 - [int-prefix-] - Gen - SpanEditHandler;Accepts:Any + Text;[int-prefix-]; + MarkupMiscAttributeContent - [20..21)::1 + MarkupTextLiteral - [20..21)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [23..23)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [23..24)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [24..24)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.tspans.txt new file mode 100644 index 0000000000..a323d89c7a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [21] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.cspans.txt new file mode 100644 index 0000000000..24e649f2da --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Code span at (25:0,25 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [26] ) +MetaCode span at (25:0,25 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [26] ) +Markup span at (26:0,26 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [26] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt new file mode 100644 index 0000000000..b9efc3a749 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt @@ -0,0 +1,2 @@ +(1,10): Error RZ2008: Attribute 'string-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. +(1,10): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.stree.txt new file mode 100644 index 0000000000..54a9bbcb1c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..26)::26 - [@{}] + MarkupBlock - [0..26)::26 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..26)::26 + CSharpStatement - [0..26)::26 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..26)::25 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..25)::23 + MarkupBlock - [2..25)::23 + MarkupTagHelperElement - [2..25)::23 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [2..25)::23 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [8..23)::15 - string-prefix- - Minimized - Bound - [ string-prefix-] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..23)::14 - [string-prefix-] - Gen - SpanEditHandler;Accepts:Any + Text;[string-prefix-]; + ForwardSlash;[/]; + CloseAngle;[>]; + CSharpStatementLiteral - [25..25)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [25..26)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [26..26)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.tspans.txt new file mode 100644 index 0000000000..15dbcaa307 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [23] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document1.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document1.stree.txt new file mode 100644 index 0000000000..47f7be7833 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document1.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..26)::26 - [] + MarkupBlock - [0..26)::26 + MarkupTagHelperElement - [0..26)::26 - input[SelfClosing] - InputTagHelper1 - InputTagHelper3 + MarkupTagHelperStartTag - [0..26)::26 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..23)::17 - unbound-required - Minimized - Unbound - [ unbound-required] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..23)::16 - [unbound-required] - Gen - SpanEditHandler;Accepts:Any + Text;[unbound-required]; + MarkupMiscAttributeContent - [23..24)::1 + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document1.tspans.txt new file mode 100644 index 0000000000..c70b63a3a2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [26] ) - InputTagHelper1 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document10.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document10.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document10.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document10.diag.txt new file mode 100644 index 0000000000..f9aca6bc06 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document10.diag.txt @@ -0,0 +1 @@ +(1,8): Error RZ2008: Attribute 'int-prefix-value' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document10.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document10.stree.txt new file mode 100644 index 0000000000..b4a299b04e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document10.stree.txt @@ -0,0 +1,13 @@ +RazorDocument - [0..25)::25 - [] + MarkupBlock - [0..25)::25 + MarkupTagHelperElement - [0..25)::25 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [0..25)::25 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..23)::17 - int-prefix-value - Minimized - Bound - [ int-prefix-value] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..23)::16 - [int-prefix-value] - Gen - SpanEditHandler;Accepts:Any + Text;[int-prefix-value]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document10.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document10.tspans.txt new file mode 100644 index 0000000000..1cdf61374d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document10.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [25] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document11.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document11.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document11.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document11.diag.txt new file mode 100644 index 0000000000..34c821c786 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document11.diag.txt @@ -0,0 +1 @@ +(1,8): Error RZ2008: Attribute 'string-prefix-value' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document11.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document11.stree.txt new file mode 100644 index 0000000000..7e2884d597 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document11.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..29)::29 - [] + MarkupBlock - [0..29)::29 + MarkupTagHelperElement - [0..29)::29 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [0..29)::29 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..26)::20 - string-prefix-value - Minimized - Bound - [ string-prefix-value] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..26)::19 - [string-prefix-value] - Gen - SpanEditHandler;Accepts:Any + Text;[string-prefix-value]; + MarkupMiscAttributeContent - [26..27)::1 + MarkupTextLiteral - [26..27)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document11.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document11.tspans.txt new file mode 100644 index 0000000000..0cecc8878e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document11.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [29] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document12.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document12.cspans.txt new file mode 100644 index 0000000000..fd32ae8345 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document12.cspans.txt @@ -0,0 +1 @@ +Code span at (25:0,25 [0] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [29] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document12.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document12.diag.txt new file mode 100644 index 0000000000..f9aca6bc06 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document12.diag.txt @@ -0,0 +1 @@ +(1,8): Error RZ2008: Attribute 'int-prefix-value' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document12.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document12.stree.txt new file mode 100644 index 0000000000..f30adc9039 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document12.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..29)::29 - [] + MarkupBlock - [0..29)::29 + MarkupTagHelperElement - [0..29)::29 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [0..29)::29 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..26)::20 - int-prefix-value - SingleQuotes - Bound - [ int-prefix-value=''] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..23)::16 - [int-prefix-value] - Gen - SpanEditHandler;Accepts:Any + Text;[int-prefix-value]; + Equals;[=]; + MarkupTextLiteral - [24..25)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [25..25)::0 + CSharpExpressionLiteral - [25..25)::0 - [] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + MarkupTextLiteral - [25..26)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [26..27)::1 + MarkupTextLiteral - [26..27)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document12.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document12.tspans.txt new file mode 100644 index 0000000000..0cecc8878e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document12.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [29] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document13.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document13.cspans.txt new file mode 100644 index 0000000000..8bfb200837 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document13.cspans.txt @@ -0,0 +1 @@ +Markup span at (28:0,28 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [31] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document13.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document13.stree.txt new file mode 100644 index 0000000000..c8402947c8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document13.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..31)::31 - [] + MarkupBlock - [0..31)::31 + MarkupTagHelperElement - [0..31)::31 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [0..31)::31 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..29)::23 - string-prefix-value - SingleQuotes - Bound - [ string-prefix-value=''] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..26)::19 - [string-prefix-value] - Gen - SpanEditHandler;Accepts:Any + Text;[string-prefix-value]; + Equals;[=]; + MarkupTextLiteral - [27..28)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [28..28)::0 + MarkupTextLiteral - [28..28)::0 - [] + MarkupTextLiteral - [28..29)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document13.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document13.tspans.txt new file mode 100644 index 0000000000..fb3dd52d1f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document13.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [31] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document14.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document14.cspans.txt new file mode 100644 index 0000000000..ef4d8f2892 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document14.cspans.txt @@ -0,0 +1 @@ +Code span at (25:0,25 [1] ) (Accepts:AnyExceptNewline) - Parent: Tag block at (0:0,0 [29] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document14.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document14.stree.txt new file mode 100644 index 0000000000..1073b6dcce --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document14.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..29)::29 - [] + MarkupBlock - [0..29)::29 + MarkupTagHelperElement - [0..29)::29 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [0..29)::29 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..27)::21 - int-prefix-value - SingleQuotes - Bound - [ int-prefix-value='3'] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..23)::16 - [int-prefix-value] - Gen - SpanEditHandler;Accepts:Any + Text;[int-prefix-value]; + Equals;[=]; + MarkupTextLiteral - [24..25)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [25..26)::1 + CSharpExpressionLiteral - [25..26)::1 - [3] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Text;[3]; + MarkupTextLiteral - [26..27)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document14.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document14.tspans.txt new file mode 100644 index 0000000000..0cecc8878e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document14.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [29] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document15.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document15.cspans.txt new file mode 100644 index 0000000000..59085ec1f9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document15.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (28:0,28 [4] ) (Accepts:Any) - Parent: Markup block at (28:0,28 [11] ) +Markup span at (32:0,32 [7] ) (Accepts:Any) - Parent: Markup block at (28:0,28 [11] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document15.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document15.stree.txt new file mode 100644 index 0000000000..db5120a644 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document15.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..43)::43 - [] + MarkupBlock - [0..43)::43 + MarkupTagHelperElement - [0..43)::43 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [0..43)::43 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..40)::34 - string-prefix-value - SingleQuotes - Bound - [ string-prefix-value='some string'] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..26)::19 - [string-prefix-value] - Gen - SpanEditHandler;Accepts:Any + Text;[string-prefix-value]; + Equals;[=]; + MarkupTextLiteral - [27..28)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [28..39)::11 + MarkupTextLiteral - [28..32)::4 - [some] - Gen - SpanEditHandler;Accepts:Any + Text;[some]; + MarkupTextLiteral - [32..39)::7 - [ string] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[string]; + MarkupTextLiteral - [39..40)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [40..41)::1 + MarkupTextLiteral - [40..41)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document15.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document15.tspans.txt new file mode 100644 index 0000000000..cdcaa72be2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document15.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [43] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document16.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document16.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document16.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document16.diag.txt new file mode 100644 index 0000000000..f16231c79a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document16.diag.txt @@ -0,0 +1 @@ +(1,25): Error RZ2008: Attribute 'bound-required-string' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document16.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document16.stree.txt new file mode 100644 index 0000000000..2eb0da7317 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document16.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..48)::48 - [] + MarkupBlock - [0..48)::48 + MarkupTagHelperElement - [0..48)::48 - input[SelfClosing] - InputTagHelper1 - InputTagHelper3 + MarkupTagHelperStartTag - [0..48)::48 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..23)::17 - unbound-required - Minimized - Unbound - [ unbound-required] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..23)::16 - [unbound-required] - Gen - SpanEditHandler;Accepts:Any + Text;[unbound-required]; + MarkupMinimizedTagHelperAttribute - [23..45)::22 - bound-required-string - Minimized - Bound - [ bound-required-string] + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [24..45)::21 - [bound-required-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-string]; + MarkupMiscAttributeContent - [45..46)::1 + MarkupTextLiteral - [45..46)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document16.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document16.tspans.txt new file mode 100644 index 0000000000..d2f983f82e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document16.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [48] ) - InputTagHelper1 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document17.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document17.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document17.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document17.diag.txt new file mode 100644 index 0000000000..a34289902a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document17.diag.txt @@ -0,0 +1,2 @@ +(1,4): Error RZ2008: Attribute 'bound-int' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +(1,14): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document17.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document17.stree.txt new file mode 100644 index 0000000000..7e4b51696b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document17.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..30)::30 - [

                        ] + MarkupBlock - [0..30)::30 + MarkupTagHelperElement - [0..30)::30 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..26)::26 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [2..12)::10 - bound-int - Minimized - Bound - [ bound-int] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..12)::9 - [bound-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-int]; + MarkupMinimizedTagHelperAttribute - [12..25)::13 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [13..25)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [26..30)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document17.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document17.tspans.txt new file mode 100644 index 0000000000..2e5914e934 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document17.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [30] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document18.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document18.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document18.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document18.diag.txt new file mode 100644 index 0000000000..b62a808863 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document18.diag.txt @@ -0,0 +1,2 @@ +(1,8): Error RZ2008: Attribute 'bound-required-int' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +(1,44): Error RZ2008: Attribute 'bound-required-string' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document18.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document18.stree.txt new file mode 100644 index 0000000000..f0769355d3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document18.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..67)::67 - [] + MarkupBlock - [0..67)::67 + MarkupTagHelperElement - [0..67)::67 - input[SelfClosing] - InputTagHelper1 - InputTagHelper2 - InputTagHelper3 + MarkupTagHelperStartTag - [0..67)::67 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..25)::19 - bound-required-int - Minimized - Bound - [ bound-required-int] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..25)::18 - [bound-required-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-int]; + MarkupMinimizedTagHelperAttribute - [25..42)::17 - unbound-required - Minimized - Unbound - [ unbound-required] + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [26..42)::16 - [unbound-required] - Gen - SpanEditHandler;Accepts:Any + Text;[unbound-required]; + MarkupMinimizedTagHelperAttribute - [42..64)::22 - bound-required-string - Minimized - Bound - [ bound-required-string] + MarkupTextLiteral - [42..43)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [43..64)::21 - [bound-required-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-string]; + MarkupMiscAttributeContent - [64..65)::1 + MarkupTextLiteral - [64..65)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document18.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document18.tspans.txt new file mode 100644 index 0000000000..bd906590f5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document18.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [67] ) - InputTagHelper1 - InputTagHelper2 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document19.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document19.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document19.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document19.diag.txt new file mode 100644 index 0000000000..2d5adeffaa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document19.diag.txt @@ -0,0 +1,3 @@ +(1,4): Error RZ2008: Attribute 'bound-int' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +(1,14): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. +(1,27): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document19.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document19.stree.txt new file mode 100644 index 0000000000..3e7583e45f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document19.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..43)::43 - [

                        ] + MarkupBlock - [0..43)::43 + MarkupTagHelperElement - [0..43)::43 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..39)::39 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [2..12)::10 - bound-int - Minimized - Bound - [ bound-int] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..12)::9 - [bound-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-int]; + MarkupMinimizedTagHelperAttribute - [12..25)::13 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [13..25)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + MarkupMinimizedTagHelperAttribute - [25..38)::13 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [26..38)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [39..43)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document19.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document19.tspans.txt new file mode 100644 index 0000000000..9b75c4b72a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document19.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [43] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document2.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document2.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document2.diag.txt new file mode 100644 index 0000000000..73d0ec9b72 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document2.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document2.stree.txt new file mode 100644 index 0000000000..145201b308 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document2.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..20)::20 - [

                        ] + MarkupBlock - [0..20)::20 + MarkupTagHelperElement - [0..20)::20 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..16)::16 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [2..15)::13 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..15)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [16..20)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document2.tspans.txt new file mode 100644 index 0000000000..c5f5d51854 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [20] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document20.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document20.cspans.txt new file mode 100644 index 0000000000..f887502903 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document20.cspans.txt @@ -0,0 +1 @@ +Markup span at (31:0,31 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [38] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document20.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document20.stree.txt new file mode 100644 index 0000000000..adfdb4997a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document20.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..38)::38 - [] + MarkupBlock - [0..38)::38 + MarkupTagHelperElement - [0..38)::38 - input[SelfClosing] - InputTagHelper1 - InputTagHelper3 + MarkupTagHelperStartTag - [0..38)::38 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..23)::17 - unbound-required - Minimized - Unbound - [ unbound-required] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..23)::16 - [unbound-required] - Gen - SpanEditHandler;Accepts:Any + Text;[unbound-required]; + MarkupTagHelperAttribute - [23..35)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [24..29)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [30..31)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [31..34)::3 + MarkupLiteralAttributeValue - [31..34)::3 - [btn] + MarkupTextLiteral - [31..34)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [34..35)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [35..36)::1 + MarkupTextLiteral - [35..36)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document20.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document20.tspans.txt new file mode 100644 index 0000000000..3530a0ad39 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document20.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [38] ) - InputTagHelper1 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document21.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document21.cspans.txt new file mode 100644 index 0000000000..f3168ff72f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document21.cspans.txt @@ -0,0 +1 @@ +Markup span at (23:0,23 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [32] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document21.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document21.diag.txt new file mode 100644 index 0000000000..73d0ec9b72 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document21.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document21.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document21.stree.txt new file mode 100644 index 0000000000..3619bf04fb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document21.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..32)::32 - [

                        ] + MarkupBlock - [0..32)::32 + MarkupTagHelperElement - [0..32)::32 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..28)::28 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [2..15)::13 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..15)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + MarkupTagHelperAttribute - [15..27)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [15..16)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [16..21)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [22..23)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [23..26)::3 + MarkupLiteralAttributeValue - [23..26)::3 - [btn] + MarkupTextLiteral - [23..26)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [26..27)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTagHelperEndTag - [28..32)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document21.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document21.tspans.txt new file mode 100644 index 0000000000..96056a17cb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document21.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [32] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document22.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document22.cspans.txt new file mode 100644 index 0000000000..da12d8c524 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document22.cspans.txt @@ -0,0 +1 @@ +Markup span at (14:0,14 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [38] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document22.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document22.stree.txt new file mode 100644 index 0000000000..bb3a09acef --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document22.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..38)::38 - [] + MarkupBlock - [0..38)::38 + MarkupTagHelperElement - [0..38)::38 - input[SelfClosing] - InputTagHelper1 - InputTagHelper3 + MarkupTagHelperStartTag - [0..38)::38 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..18)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..12)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [13..14)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [14..17)::3 + MarkupLiteralAttributeValue - [14..17)::3 - [btn] + MarkupTextLiteral - [14..17)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [18..35)::17 - unbound-required - Minimized - Unbound - [ unbound-required] + MarkupTextLiteral - [18..19)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [19..35)::16 - [unbound-required] - Gen - SpanEditHandler;Accepts:Any + Text;[unbound-required]; + MarkupMiscAttributeContent - [35..36)::1 + MarkupTextLiteral - [35..36)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document22.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document22.tspans.txt new file mode 100644 index 0000000000..3530a0ad39 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document22.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [38] ) - InputTagHelper1 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document23.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document23.cspans.txt new file mode 100644 index 0000000000..aaba30723e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document23.cspans.txt @@ -0,0 +1 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [32] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document23.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document23.diag.txt new file mode 100644 index 0000000000..1379c04890 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document23.diag.txt @@ -0,0 +1 @@ +(1,16): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document23.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document23.stree.txt new file mode 100644 index 0000000000..05e69ed46a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document23.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..32)::32 - [

                        ] + MarkupBlock - [0..32)::32 + MarkupTagHelperElement - [0..32)::32 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..28)::28 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [13..14)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [14..27)::13 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [15..27)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [28..32)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document23.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document23.tspans.txt new file mode 100644 index 0000000000..96056a17cb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document23.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [32] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document24.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document24.cspans.txt new file mode 100644 index 0000000000..617d58dd6c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document24.cspans.txt @@ -0,0 +1 @@ +Markup span at (36:0,36 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [43] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document24.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document24.diag.txt new file mode 100644 index 0000000000..fa5bd9298e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document24.diag.txt @@ -0,0 +1 @@ +(1,8): Error RZ2008: Attribute 'bound-required-string' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document24.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document24.stree.txt new file mode 100644 index 0000000000..b8bdaa9a32 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document24.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..43)::43 - [] + MarkupBlock - [0..43)::43 + MarkupTagHelperElement - [0..43)::43 - input[SelfClosing] - InputTagHelper1 - InputTagHelper3 + MarkupTagHelperStartTag - [0..43)::43 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..28)::22 - bound-required-string - Minimized - Bound - [ bound-required-string] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..28)::21 - [bound-required-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-string]; + MarkupTagHelperAttribute - [28..40)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [28..29)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [29..34)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [35..36)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [36..39)::3 + MarkupLiteralAttributeValue - [36..39)::3 - [btn] + MarkupTextLiteral - [36..39)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [39..40)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [40..41)::1 + MarkupTextLiteral - [40..41)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document24.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document24.tspans.txt new file mode 100644 index 0000000000..4b2bde1a22 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document24.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [43] ) - InputTagHelper1 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document25.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document25.cspans.txt new file mode 100644 index 0000000000..5d5e86a3ff --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document25.cspans.txt @@ -0,0 +1 @@ +Markup span at (14:0,14 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [43] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document25.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document25.diag.txt new file mode 100644 index 0000000000..107ae7e349 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document25.diag.txt @@ -0,0 +1 @@ +(1,20): Error RZ2008: Attribute 'bound-required-string' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document25.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document25.stree.txt new file mode 100644 index 0000000000..809d101bcb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document25.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..43)::43 - [] + MarkupBlock - [0..43)::43 + MarkupTagHelperElement - [0..43)::43 - input[SelfClosing] - InputTagHelper1 - InputTagHelper3 + MarkupTagHelperStartTag - [0..43)::43 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..18)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..12)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [13..14)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [14..17)::3 + MarkupLiteralAttributeValue - [14..17)::3 - [btn] + MarkupTextLiteral - [14..17)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [18..40)::22 - bound-required-string - Minimized - Bound - [ bound-required-string] + MarkupTextLiteral - [18..19)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [19..40)::21 - [bound-required-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-string]; + MarkupMiscAttributeContent - [40..41)::1 + MarkupTextLiteral - [40..41)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document25.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document25.tspans.txt new file mode 100644 index 0000000000..4b2bde1a22 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document25.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [43] ) - InputTagHelper1 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document26.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document26.cspans.txt new file mode 100644 index 0000000000..a407f3ff42 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document26.cspans.txt @@ -0,0 +1 @@ +Markup span at (33:0,33 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [40] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document26.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document26.diag.txt new file mode 100644 index 0000000000..7c6942351c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document26.diag.txt @@ -0,0 +1 @@ +(1,8): Error RZ2008: Attribute 'bound-required-int' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document26.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document26.stree.txt new file mode 100644 index 0000000000..d2a0becaf5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document26.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..40)::40 - [] + MarkupBlock - [0..40)::40 + MarkupTagHelperElement - [0..40)::40 - input[SelfClosing] - InputTagHelper2 - InputTagHelper3 + MarkupTagHelperStartTag - [0..40)::40 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..25)::19 - bound-required-int - Minimized - Bound - [ bound-required-int] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..25)::18 - [bound-required-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-int]; + MarkupTagHelperAttribute - [25..37)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [26..31)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [32..33)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [33..36)::3 + MarkupLiteralAttributeValue - [33..36)::3 - [btn] + MarkupTextLiteral - [33..36)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [36..37)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMiscAttributeContent - [37..38)::1 + MarkupTextLiteral - [37..38)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document26.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document26.tspans.txt new file mode 100644 index 0000000000..e303f87929 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document26.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [40] ) - InputTagHelper2 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document27.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document27.cspans.txt new file mode 100644 index 0000000000..b760071418 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document27.cspans.txt @@ -0,0 +1 @@ +Markup span at (20:0,20 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [29] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document27.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document27.diag.txt new file mode 100644 index 0000000000..522de8be51 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document27.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ2008: Attribute 'bound-int' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document27.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document27.stree.txt new file mode 100644 index 0000000000..ba99c42800 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document27.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..29)::29 - [

                        ] + MarkupBlock - [0..29)::29 + MarkupTagHelperElement - [0..29)::29 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..25)::25 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [2..12)::10 - bound-int - Minimized - Bound - [ bound-int] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..12)::9 - [bound-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-int]; + MarkupTagHelperAttribute - [12..24)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [13..18)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [19..20)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [20..23)::3 + MarkupLiteralAttributeValue - [20..23)::3 - [btn] + MarkupTextLiteral - [20..23)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [23..24)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupTagHelperEndTag - [25..29)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document27.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document27.tspans.txt new file mode 100644 index 0000000000..4a617a9985 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document27.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [29] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document28.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document28.cspans.txt new file mode 100644 index 0000000000..bbfaeade34 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document28.cspans.txt @@ -0,0 +1 @@ +Markup span at (14:0,14 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [40] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document28.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document28.diag.txt new file mode 100644 index 0000000000..b147ff3b8e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document28.diag.txt @@ -0,0 +1 @@ +(1,20): Error RZ2008: Attribute 'bound-required-int' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document28.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document28.stree.txt new file mode 100644 index 0000000000..9938367174 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document28.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..40)::40 - [] + MarkupBlock - [0..40)::40 + MarkupTagHelperElement - [0..40)::40 - input[SelfClosing] - InputTagHelper2 - InputTagHelper3 + MarkupTagHelperStartTag - [0..40)::40 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..18)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..12)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [13..14)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [14..17)::3 + MarkupLiteralAttributeValue - [14..17)::3 - [btn] + MarkupTextLiteral - [14..17)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [17..18)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [18..37)::19 - bound-required-int - Minimized - Bound - [ bound-required-int] + MarkupTextLiteral - [18..19)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [19..37)::18 - [bound-required-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-int]; + MarkupMiscAttributeContent - [37..38)::1 + MarkupTextLiteral - [37..38)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document28.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document28.tspans.txt new file mode 100644 index 0000000000..e303f87929 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document28.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [40] ) - InputTagHelper2 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document29.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document29.cspans.txt new file mode 100644 index 0000000000..9886c6c9e9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document29.cspans.txt @@ -0,0 +1 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [29] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document29.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document29.diag.txt new file mode 100644 index 0000000000..070a2efcbf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document29.diag.txt @@ -0,0 +1 @@ +(1,16): Error RZ2008: Attribute 'bound-int' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document29.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document29.stree.txt new file mode 100644 index 0000000000..56b05f2f39 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document29.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..29)::29 - [

                        ] + MarkupBlock - [0..29)::29 + MarkupTagHelperElement - [0..29)::29 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..25)::25 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - SingleQuotes - Unbound - [ class='btn'] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [13..14)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [14..24)::10 - bound-int - Minimized - Bound - [ bound-int] + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [15..24)::9 - [bound-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-int]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [25..29)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document29.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document29.tspans.txt new file mode 100644 index 0000000000..4a617a9985 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document29.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [29] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document3.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document3.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document3.diag.txt new file mode 100644 index 0000000000..fa5bd9298e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document3.diag.txt @@ -0,0 +1 @@ +(1,8): Error RZ2008: Attribute 'bound-required-string' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document3.stree.txt new file mode 100644 index 0000000000..8e3178ad8e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document3.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..31)::31 - [] + MarkupBlock - [0..31)::31 + MarkupTagHelperElement - [0..31)::31 - input[SelfClosing] - InputTagHelper1 - InputTagHelper3 + MarkupTagHelperStartTag - [0..31)::31 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..28)::22 - bound-required-string - Minimized - Bound - [ bound-required-string] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..28)::21 - [bound-required-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-string]; + MarkupMiscAttributeContent - [28..29)::1 + MarkupTextLiteral - [28..29)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document3.tspans.txt new file mode 100644 index 0000000000..69e54d8aad --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [31] ) - InputTagHelper1 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document30.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document30.cspans.txt new file mode 100644 index 0000000000..b7f3cfaf69 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document30.cspans.txt @@ -0,0 +1,4 @@ +Transition span at (14:0,14 [1] ) (Accepts:None) - Parent: Expression block at (14:0,14 [13] ) +Code span at (15:0,15 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (14:0,14 [13] ) +Markup span at (27:0,27 [2] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [17] ) +Markup span at (29:0,29 [2] ) (Accepts:Any) - Parent: Markup block at (14:0,14 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document30.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document30.diag.txt new file mode 100644 index 0000000000..35bf3d2029 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document30.diag.txt @@ -0,0 +1 @@ +(1,34): Error RZ2008: Attribute 'bound-required-int' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document30.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document30.stree.txt new file mode 100644 index 0000000000..dda375000b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document30.stree.txt @@ -0,0 +1,49 @@ +RazorDocument - [0..54)::54 - [] + MarkupBlock - [0..54)::54 + MarkupTagHelperElement - [0..54)::54 - input[SelfClosing] - InputTagHelper2 - InputTagHelper3 + MarkupTagHelperStartTag - [0..54)::54 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupTagHelperAttribute - [6..32)::26 - class - SingleQuotes - Unbound - [ class='@DateTime.Now + 1'] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..12)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [13..14)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [14..31)::17 + MarkupDynamicAttributeValue - [14..27)::13 - [@DateTime.Now] + GenericBlock - [14..27)::13 + CSharpCodeBlock - [14..27)::13 + CSharpImplicitExpression - [14..27)::13 + CSharpTransition - [14..15)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [15..27)::12 + CSharpCodeBlock - [15..27)::12 + CSharpExpressionLiteral - [15..27)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupLiteralAttributeValue - [27..29)::2 - [ +] + MarkupTextLiteral - [27..28)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [28..29)::1 - [+] - Gen - SpanEditHandler;Accepts:Any + Text;[+]; + MarkupLiteralAttributeValue - [29..31)::2 - [ 1] + MarkupTextLiteral - [29..30)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [30..31)::1 - [1] - Gen - SpanEditHandler;Accepts:Any + Text;[1]; + MarkupTextLiteral - [31..32)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [32..51)::19 - bound-required-int - Minimized - Bound - [ bound-required-int] + MarkupTextLiteral - [32..33)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [33..51)::18 - [bound-required-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-int]; + MarkupMiscAttributeContent - [51..52)::1 + MarkupTextLiteral - [51..52)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document30.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document30.tspans.txt new file mode 100644 index 0000000000..3416d837b0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document30.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [54] ) - InputTagHelper2 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document31.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document31.cspans.txt new file mode 100644 index 0000000000..5279ba8415 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document31.cspans.txt @@ -0,0 +1,4 @@ +Transition span at (10:0,10 [1] ) (Accepts:None) - Parent: Expression block at (10:0,10 [13] ) +Code span at (11:0,11 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (10:0,10 [13] ) +Markup span at (23:0,23 [2] ) (Accepts:Any) - Parent: Markup block at (10:0,10 [17] ) +Markup span at (25:0,25 [2] ) (Accepts:Any) - Parent: Markup block at (10:0,10 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document31.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document31.diag.txt new file mode 100644 index 0000000000..49aae9f038 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document31.diag.txt @@ -0,0 +1 @@ +(1,30): Error RZ2008: Attribute 'bound-int' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document31.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document31.stree.txt new file mode 100644 index 0000000000..a086544147 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document31.stree.txt @@ -0,0 +1,50 @@ +RazorDocument - [0..43)::43 - [

                        ] + MarkupBlock - [0..43)::43 + MarkupTagHelperElement - [0..43)::43 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..39)::39 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..28)::26 - class - SingleQuotes - Unbound - [ class='@DateTime.Now + 1'] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [10..27)::17 + MarkupDynamicAttributeValue - [10..23)::13 - [@DateTime.Now] + GenericBlock - [10..23)::13 + CSharpCodeBlock - [10..23)::13 + CSharpImplicitExpression - [10..23)::13 + CSharpTransition - [10..11)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [11..23)::12 + CSharpCodeBlock - [11..23)::12 + CSharpExpressionLiteral - [11..23)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupLiteralAttributeValue - [23..25)::2 - [ +] + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [24..25)::1 - [+] - Gen - SpanEditHandler;Accepts:Any + Text;[+]; + MarkupLiteralAttributeValue - [25..27)::2 - [ 1] + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [26..27)::1 - [1] - Gen - SpanEditHandler;Accepts:Any + Text;[1]; + MarkupTextLiteral - [27..28)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [28..38)::10 - bound-int - Minimized - Bound - [ bound-int] + MarkupTextLiteral - [28..29)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [29..38)::9 - [bound-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-int]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [39..43)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document31.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document31.tspans.txt new file mode 100644 index 0000000000..9b75c4b72a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document31.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [43] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document32.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document32.cspans.txt new file mode 100644 index 0000000000..d4bd228d1f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document32.cspans.txt @@ -0,0 +1,8 @@ +Transition span at (36:0,36 [1] ) (Accepts:None) - Parent: Expression block at (36:0,36 [13] ) +Code span at (37:0,37 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (36:0,36 [13] ) +Markup span at (49:0,49 [2] ) (Accepts:Any) - Parent: Markup block at (36:0,36 [17] ) +Markup span at (51:0,51 [2] ) (Accepts:Any) - Parent: Markup block at (36:0,36 [17] ) +Transition span at (86:0,86 [1] ) (Accepts:None) - Parent: Expression block at (86:0,86 [13] ) +Code span at (87:0,87 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (86:0,86 [13] ) +Markup span at (99:0,99 [2] ) (Accepts:Any) - Parent: Markup block at (86:0,86 [17] ) +Markup span at (101:0,101 [2] ) (Accepts:Any) - Parent: Markup block at (86:0,86 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document32.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document32.diag.txt new file mode 100644 index 0000000000..87c50385f2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document32.diag.txt @@ -0,0 +1,2 @@ +(1,11): Error RZ2008: Attribute 'bound-required-int' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +(1,58): Error RZ2008: Attribute 'bound-required-string' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document32.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document32.stree.txt new file mode 100644 index 0000000000..438ff977ce --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document32.stree.txt @@ -0,0 +1,92 @@ +RazorDocument - [0..126)::126 - [] + MarkupBlock - [0..126)::126 + MarkupTagHelperElement - [0..126)::126 - input[SelfClosing] - InputTagHelper1 - InputTagHelper2 - InputTagHelper3 + MarkupTagHelperStartTag - [0..126)::126 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..28)::22 - bound-required-int - Minimized - Bound - [ bound-required-int] + MarkupTextLiteral - [6..10)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [10..28)::18 - [bound-required-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-int]; + MarkupTagHelperAttribute - [28..54)::26 - class - SingleQuotes - Unbound - [ class='@DateTime.Now + 1'] + MarkupTextLiteral - [28..29)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [29..34)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [35..36)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [36..53)::17 + MarkupDynamicAttributeValue - [36..49)::13 - [@DateTime.Now] + GenericBlock - [36..49)::13 + CSharpCodeBlock - [36..49)::13 + CSharpImplicitExpression - [36..49)::13 + CSharpTransition - [36..37)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [37..49)::12 + CSharpCodeBlock - [37..49)::12 + CSharpExpressionLiteral - [37..49)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupLiteralAttributeValue - [49..51)::2 - [ +] + MarkupTextLiteral - [49..50)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [50..51)::1 - [+] - Gen - SpanEditHandler;Accepts:Any + Text;[+]; + MarkupLiteralAttributeValue - [51..53)::2 - [ 1] + MarkupTextLiteral - [51..52)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [52..53)::1 - [1] - Gen - SpanEditHandler;Accepts:Any + Text;[1]; + MarkupTextLiteral - [53..54)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [54..78)::24 - bound-required-string - Minimized - Bound - [ bound-required-string] + MarkupTextLiteral - [54..57)::3 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [57..78)::21 - [bound-required-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-string]; + MarkupTagHelperAttribute - [78..104)::26 - class - SingleQuotes - Unbound - [ class='@DateTime.Now + 1'] + MarkupTextLiteral - [78..79)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [79..84)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [85..86)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [86..103)::17 + MarkupDynamicAttributeValue - [86..99)::13 - [@DateTime.Now] + GenericBlock - [86..99)::13 + CSharpCodeBlock - [86..99)::13 + CSharpImplicitExpression - [86..99)::13 + CSharpTransition - [86..87)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [87..99)::12 + CSharpCodeBlock - [87..99)::12 + CSharpExpressionLiteral - [87..99)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupLiteralAttributeValue - [99..101)::2 - [ +] + MarkupTextLiteral - [99..100)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [100..101)::1 - [+] - Gen - SpanEditHandler;Accepts:Any + Text;[+]; + MarkupLiteralAttributeValue - [101..103)::2 - [ 1] + MarkupTextLiteral - [101..102)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [102..103)::1 - [1] - Gen - SpanEditHandler;Accepts:Any + Text;[1]; + MarkupTextLiteral - [103..104)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [104..122)::18 - unbound-required - Minimized - Unbound - [ unbound-required] + MarkupTextLiteral - [104..106)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [106..122)::16 - [unbound-required] - Gen - SpanEditHandler;Accepts:Any + Text;[unbound-required]; + MarkupMiscAttributeContent - [122..124)::2 + MarkupTextLiteral - [122..124)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document32.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document32.tspans.txt new file mode 100644 index 0000000000..ed3ef89c3e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document32.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [126] ) - InputTagHelper1 - InputTagHelper2 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document33.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document33.cspans.txt new file mode 100644 index 0000000000..0a331cbddd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document33.cspans.txt @@ -0,0 +1,8 @@ +Transition span at (23:0,23 [1] ) (Accepts:None) - Parent: Expression block at (23:0,23 [13] ) +Code span at (24:0,24 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (23:0,23 [13] ) +Markup span at (36:0,36 [2] ) (Accepts:Any) - Parent: Markup block at (23:0,23 [17] ) +Markup span at (38:0,38 [2] ) (Accepts:Any) - Parent: Markup block at (23:0,23 [17] ) +Transition span at (64:0,64 [1] ) (Accepts:None) - Parent: Expression block at (64:0,64 [13] ) +Code span at (65:0,65 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (64:0,64 [13] ) +Markup span at (77:0,77 [2] ) (Accepts:Any) - Parent: Markup block at (64:0,64 [17] ) +Markup span at (79:0,79 [2] ) (Accepts:Any) - Parent: Markup block at (64:0,64 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document33.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document33.diag.txt new file mode 100644 index 0000000000..482a02baa0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document33.diag.txt @@ -0,0 +1,3 @@ +(1,7): Error RZ2008: Attribute 'bound-int' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +(1,45): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. +(1,85): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document33.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document33.stree.txt new file mode 100644 index 0000000000..6b70ada3ec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document33.stree.txt @@ -0,0 +1,93 @@ +RazorDocument - [0..101)::101 - [

                        ] + MarkupBlock - [0..101)::101 + MarkupTagHelperElement - [0..101)::101 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..97)::97 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [2..15)::13 - bound-int - Minimized - Bound - [ bound-int] + MarkupTextLiteral - [2..6)::4 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..15)::9 - [bound-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-int]; + MarkupTagHelperAttribute - [15..41)::26 - class - SingleQuotes - Unbound - [ class='@DateTime.Now + 1'] + MarkupTextLiteral - [15..16)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [16..21)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [22..23)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [23..40)::17 + MarkupDynamicAttributeValue - [23..36)::13 - [@DateTime.Now] + GenericBlock - [23..36)::13 + CSharpCodeBlock - [23..36)::13 + CSharpImplicitExpression - [23..36)::13 + CSharpTransition - [23..24)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [24..36)::12 + CSharpCodeBlock - [24..36)::12 + CSharpExpressionLiteral - [24..36)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupLiteralAttributeValue - [36..38)::2 - [ +] + MarkupTextLiteral - [36..37)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [37..38)::1 - [+] - Gen - SpanEditHandler;Accepts:Any + Text;[+]; + MarkupLiteralAttributeValue - [38..40)::2 - [ 1] + MarkupTextLiteral - [38..39)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [39..40)::1 - [1] - Gen - SpanEditHandler;Accepts:Any + Text;[1]; + MarkupTextLiteral - [40..41)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [41..56)::15 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [41..44)::3 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [44..56)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + MarkupTagHelperAttribute - [56..82)::26 - class - SingleQuotes - Unbound - [ class='@DateTime.Now + 1'] + MarkupTextLiteral - [56..57)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [57..62)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [63..64)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupTagHelperAttributeValue - [64..81)::17 + MarkupDynamicAttributeValue - [64..77)::13 - [@DateTime.Now] + GenericBlock - [64..77)::13 + CSharpCodeBlock - [64..77)::13 + CSharpImplicitExpression - [64..77)::13 + CSharpTransition - [64..65)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [65..77)::12 + CSharpCodeBlock - [65..77)::12 + CSharpExpressionLiteral - [65..77)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupLiteralAttributeValue - [77..79)::2 - [ +] + MarkupTextLiteral - [77..78)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [78..79)::1 - [+] - Gen - SpanEditHandler;Accepts:Any + Text;[+]; + MarkupLiteralAttributeValue - [79..81)::2 - [ 1] + MarkupTextLiteral - [79..80)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [80..81)::1 - [1] - Gen - SpanEditHandler;Accepts:Any + Text;[1]; + MarkupTextLiteral - [81..82)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupMinimizedTagHelperAttribute - [82..96)::14 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [82..84)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [84..96)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [97..101)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document33.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document33.tspans.txt new file mode 100644 index 0000000000..2c2b6d9444 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document33.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [101] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document4.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document4.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document4.diag.txt new file mode 100644 index 0000000000..7c6942351c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document4.diag.txt @@ -0,0 +1 @@ +(1,8): Error RZ2008: Attribute 'bound-required-int' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document4.stree.txt new file mode 100644 index 0000000000..a2981d26cd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document4.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..28)::28 - [] + MarkupBlock - [0..28)::28 + MarkupTagHelperElement - [0..28)::28 - input[SelfClosing] - InputTagHelper2 - InputTagHelper3 + MarkupTagHelperStartTag - [0..28)::28 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..25)::19 - bound-required-int - Minimized - Bound - [ bound-required-int] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..25)::18 - [bound-required-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-int]; + MarkupMiscAttributeContent - [25..26)::1 + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document4.tspans.txt new file mode 100644 index 0000000000..61fc991231 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [28] ) - InputTagHelper2 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document5.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document5.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document5.diag.txt new file mode 100644 index 0000000000..522de8be51 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document5.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ2008: Attribute 'bound-int' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document5.stree.txt new file mode 100644 index 0000000000..3fcce47716 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document5.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..17)::17 - [

                        ] + MarkupBlock - [0..17)::17 + MarkupTagHelperElement - [0..17)::17 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..13)::13 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [2..12)::10 - bound-int - Minimized - Bound - [ bound-int] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..12)::9 - [bound-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-int]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [13..17)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document5.tspans.txt new file mode 100644 index 0000000000..3e5ab2dd80 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [17] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document6.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document6.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document6.diag.txt new file mode 100644 index 0000000000..087db6b299 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document6.diag.txt @@ -0,0 +1 @@ +(1,8): Error RZ2008: Attribute 'int-dictionary' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Collections.Generic.IDictionary' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document6.stree.txt new file mode 100644 index 0000000000..40a3abd8ee --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document6.stree.txt @@ -0,0 +1,13 @@ +RazorDocument - [0..23)::23 - [] + MarkupBlock - [0..23)::23 + MarkupTagHelperElement - [0..23)::23 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [0..23)::23 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..21)::15 - int-dictionary - Minimized - Bound - [ int-dictionary] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..21)::14 - [int-dictionary] - Gen - SpanEditHandler;Accepts:Any + Text;[int-dictionary]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document6.tspans.txt new file mode 100644 index 0000000000..9e2dbbf7ab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document6.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [23] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document7.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document7.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document7.diag.txt new file mode 100644 index 0000000000..2d79facfa7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document7.diag.txt @@ -0,0 +1 @@ +(1,8): Error RZ2008: Attribute 'string-dictionary' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Collections.Generic.IDictionary' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document7.stree.txt new file mode 100644 index 0000000000..b4727002f7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document7.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..27)::27 - [] + MarkupBlock - [0..27)::27 + MarkupTagHelperElement - [0..27)::27 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [0..27)::27 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..24)::18 - string-dictionary - Minimized - Bound - [ string-dictionary] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..24)::17 - [string-dictionary] - Gen - SpanEditHandler;Accepts:Any + Text;[string-dictionary]; + MarkupMiscAttributeContent - [24..25)::1 + MarkupTextLiteral - [24..25)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document7.tspans.txt new file mode 100644 index 0000000000..a3749faee2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [27] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt new file mode 100644 index 0000000000..0b5a932381 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt @@ -0,0 +1,2 @@ +(1,8): Error RZ2008: Attribute 'int-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +(1,8): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.stree.txt new file mode 100644 index 0000000000..b0f4f09641 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..21)::21 - [] + MarkupBlock - [0..21)::21 + MarkupTagHelperElement - [0..21)::21 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [0..21)::21 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..18)::12 - int-prefix- - Minimized - Bound - [ int-prefix-] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..18)::11 - [int-prefix-] - Gen - SpanEditHandler;Accepts:Any + Text;[int-prefix-]; + MarkupMiscAttributeContent - [18..19)::1 + MarkupTextLiteral - [18..19)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.tspans.txt new file mode 100644 index 0000000000..d140288679 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [21] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt new file mode 100644 index 0000000000..6b9780fc87 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt @@ -0,0 +1,2 @@ +(1,8): Error RZ2008: Attribute 'string-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. +(1,8): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.stree.txt new file mode 100644 index 0000000000..d352a5b08f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.stree.txt @@ -0,0 +1,13 @@ +RazorDocument - [0..23)::23 - [] + MarkupBlock - [0..23)::23 + MarkupTagHelperElement - [0..23)::23 - input[SelfClosing] - InputTagHelper3 + MarkupTagHelperStartTag - [0..23)::23 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..21)::15 - string-prefix- - Minimized - Bound - [ string-prefix-] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..21)::14 - [string-prefix-] - Gen - SpanEditHandler;Accepts:Any + Text;[string-prefix-]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.tspans.txt new file mode 100644 index 0000000000..9e2dbbf7ab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [23] ) - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags1.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags1.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags1.diag.txt new file mode 100644 index 0000000000..b90634a515 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags1.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'input'. +(1,2): Error RZ1034: Found a malformed 'input' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags1.stree.txt new file mode 100644 index 0000000000..b3980dc81a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags1.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..23)::23 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..23)::17 - unbound-required - Minimized - Unbound - [ unbound-required] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..23)::16 - [unbound-required] - Gen - SpanEditHandler;Accepts:Any + Text;[unbound-required]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags1.tspans.txt new file mode 100644 index 0000000000..c0685318c0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [23] ) - InputTagHelper1 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags2.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags2.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags2.diag.txt new file mode 100644 index 0000000000..3b6c11fc6b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags2.diag.txt @@ -0,0 +1,3 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'input'. +(1,2): Error RZ1034: Found a malformed 'input' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,8): Error RZ2008: Attribute 'bound-required-string' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags2.stree.txt new file mode 100644 index 0000000000..3a1bb42157 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags2.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..28)::28 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..28)::22 - bound-required-string - Minimized - Bound - [ bound-required-string] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..28)::21 - [bound-required-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-string]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags2.tspans.txt new file mode 100644 index 0000000000..918bc21db0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [28] ) - InputTagHelper1 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags3.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags3.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags3.diag.txt new file mode 100644 index 0000000000..cb730a6dc9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags3.diag.txt @@ -0,0 +1,3 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'input'. +(1,2): Error RZ1034: Found a malformed 'input' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,8): Error RZ2008: Attribute 'bound-required-int' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags3.stree.txt new file mode 100644 index 0000000000..bb81e143f0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags3.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..25)::25 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..25)::19 - bound-required-int - Minimized - Bound - [ bound-required-int] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..25)::18 - [bound-required-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-int]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags3.tspans.txt new file mode 100644 index 0000000000..27bc016b3e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [25] ) - InputTagHelper2 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags4.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags4.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags4.diag.txt new file mode 100644 index 0000000000..19ac9103b0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags4.diag.txt @@ -0,0 +1,4 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'input'. +(1,2): Error RZ1034: Found a malformed 'input' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,8): Error RZ2008: Attribute 'bound-required-int' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +(1,44): Error RZ2008: Attribute 'bound-required-string' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags4.stree.txt new file mode 100644 index 0000000000..edceae1dac --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags4.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..64)::64 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..25)::19 - bound-required-int - Minimized - Bound - [ bound-required-int] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..25)::18 - [bound-required-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-int]; + MarkupMinimizedTagHelperAttribute - [25..42)::17 - unbound-required - Minimized - Unbound - [ unbound-required] + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [26..42)::16 - [unbound-required] - Gen - SpanEditHandler;Accepts:Any + Text;[unbound-required]; + MarkupMinimizedTagHelperAttribute - [42..64)::22 - bound-required-string - Minimized - Bound - [ bound-required-string] + MarkupTextLiteral - [42..43)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [43..64)::21 - [bound-required-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-string]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags4.tspans.txt new file mode 100644 index 0000000000..49cb0fe449 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [64] ) - InputTagHelper1 - InputTagHelper2 - InputTagHelper3 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags5.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags5.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags5.diag.txt new file mode 100644 index 0000000000..a1ee83bf6d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags5.diag.txt @@ -0,0 +1,3 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,4): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags5.stree.txt new file mode 100644 index 0000000000..0b7dc80111 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags5.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..15)::15 - [

                        - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [2..15)::13 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..15)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags5.tspans.txt new file mode 100644 index 0000000000..6a366b1c64 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [15] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags6.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags6.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags6.diag.txt new file mode 100644 index 0000000000..fb20eab90d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags6.diag.txt @@ -0,0 +1,3 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,4): Error RZ2008: Attribute 'bound-int' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags6.stree.txt new file mode 100644 index 0000000000..151355fd87 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags6.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..12)::12 - [

                        - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [2..12)::10 - bound-int - Minimized - Bound - [ bound-int] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..12)::9 - [bound-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-int]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags6.tspans.txt new file mode 100644 index 0000000000..5cd52523a9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags6.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [12] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags7.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags7.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags7.diag.txt new file mode 100644 index 0000000000..4d7e0d9d26 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags7.diag.txt @@ -0,0 +1,4 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,4): Error RZ2008: Attribute 'bound-int' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +(1,14): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags7.stree.txt new file mode 100644 index 0000000000..4cc7c8aebb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags7.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..25)::25 - [

                        - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [2..12)::10 - bound-int - Minimized - Bound - [ bound-int] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..12)::9 - [bound-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-int]; + MarkupMinimizedTagHelperAttribute - [12..25)::13 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [12..13)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [13..25)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags7.tspans.txt new file mode 100644 index 0000000000..e3e08d013c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [25] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags8.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags8.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags8.diag.txt new file mode 100644 index 0000000000..c64141f180 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags8.diag.txt @@ -0,0 +1,8 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'input'. +(1,2): Error RZ1034: Found a malformed 'input' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,8): Error RZ2008: Attribute 'bound-required-int' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +(1,44): Error RZ2008: Attribute 'bound-required-string' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. +(1,66): Error RZ1035: Missing close angle for tag helper 'p'. +(1,66): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,68): Error RZ2008: Attribute 'bound-int' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace. +(1,78): Error RZ2008: Attribute 'bound-string' on tag helper element 'p' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags8.stree.txt new file mode 100644 index 0000000000..bf383c8b52 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags8.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..89)::89 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..25)::19 - bound-required-int - Minimized - Bound - [ bound-required-int] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..25)::18 - [bound-required-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-int]; + MarkupMinimizedTagHelperAttribute - [25..42)::17 - unbound-required - Minimized - Unbound - [ unbound-required] + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [26..42)::16 - [unbound-required] - Gen - SpanEditHandler;Accepts:Any + Text;[unbound-required]; + MarkupMinimizedTagHelperAttribute - [42..64)::22 - bound-required-string - Minimized - Bound - [ bound-required-string] + MarkupTextLiteral - [42..43)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [43..64)::21 - [bound-required-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-required-string]; + CloseAngle;[]; + MarkupTagHelperElement - [64..89)::25 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [64..89)::25 - [

                        - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMinimizedTagHelperAttribute - [66..76)::10 - bound-int - Minimized - Bound - [ bound-int] + MarkupTextLiteral - [66..67)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [67..76)::9 - [bound-int] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-int]; + MarkupMinimizedTagHelperAttribute - [76..89)::13 - bound-string - Minimized - Bound - [ bound-string] + MarkupTextLiteral - [76..77)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [77..89)::12 - [bound-string] - Gen - SpanEditHandler;Accepts:Any + Text;[bound-string]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags8.tspans.txt new file mode 100644 index 0000000000..846bc42dc8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_PartialTags8.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [64] ) - InputTagHelper1 - InputTagHelper2 - InputTagHelper3 +TagHelper span at (64:0,64 [25] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedBooleanBoundAttributes.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedBooleanBoundAttributes.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedBooleanBoundAttributes.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedBooleanBoundAttributes.stree.txt new file mode 100644 index 0000000000..116e8180ef --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedBooleanBoundAttributes.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..37)::37 - [] + MarkupBlock - [0..37)::37 + MarkupTagHelperElement - [0..37)::37 - input[SelfClosing] - InputTagHelper + MarkupTagHelperStartTag - [0..37)::37 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMinimizedTagHelperAttribute - [6..16)::10 - boundbool - Minimized - Bound - [ boundbool] + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [7..16)::9 - [boundbool] - Gen - SpanEditHandler;Accepts:Any + Text;[boundbool]; + MarkupMinimizedTagHelperAttribute - [16..34)::18 - boundbooldict-key - Minimized - Bound - [ boundbooldict-key] + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [17..34)::17 - [boundbooldict-key] - Gen - SpanEditHandler;Accepts:Any + Text;[boundbooldict-key]; + MarkupMiscAttributeContent - [34..35)::1 + MarkupTextLiteral - [34..35)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedBooleanBoundAttributes.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedBooleanBoundAttributes.tspans.txt new file mode 100644 index 0000000000..c28ec2a704 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedBooleanBoundAttributes.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [37] ) - InputTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers1.cspans.txt new file mode 100644 index 0000000000..4f69cb3f10 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers1.cspans.txt @@ -0,0 +1 @@ +Markup span at (0:0,0 [7] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers1.stree.txt new file mode 100644 index 0000000000..c691ddf36b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers1.stree.txt @@ -0,0 +1,11 @@ +RazorDocument - [0..7)::7 - [] + MarkupBlock - [0..7)::7 + MarkupElement - [0..7)::7 + MarkupStartTag - [0..7)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[th:]; + MarkupMiscAttributeContent - [4..5)::1 + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers10.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers10.cspans.txt new file mode 100644 index 0000000000..df2aec385d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers10.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (16:0,16 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [47] ) +Markup span at (21:0,21 [16] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [47] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers10.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers10.stree.txt new file mode 100644 index 0000000000..6b9e1a1f12 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers10.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..47)::47 - [words and spaces] + MarkupBlock - [0..47)::47 + MarkupTagHelperElement - [0..47)::47 - th:myth[StartTagAndEndTag] - mythTagHelper + MarkupTagHelperStartTag - [0..21)::21 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[th:myth]; + MarkupTagHelperAttribute - [8..20)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..14)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [16..19)::3 + MarkupLiteralAttributeValue - [16..19)::3 - [btn] + MarkupTextLiteral - [16..19)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [19..20)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [21..37)::16 - [words and spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[and]; + Whitespace;[ ]; + Text;[spaces]; + MarkupTagHelperEndTag - [37..47)::10 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[th:myth]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers10.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers10.tspans.txt new file mode 100644 index 0000000000..a1b89d4d45 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers10.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [47] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers11.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers11.cspans.txt new file mode 100644 index 0000000000..b824ad55f1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers11.cspans.txt @@ -0,0 +1,2 @@ +Transition span at (17:0,17 [1] ) (Accepts:None) - Parent: Expression block at (17:0,17 [13] ) +Code span at (18:0,18 [12] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (17:0,17 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers11.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers11.stree.txt new file mode 100644 index 0000000000..4fe58fe635 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers11.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..34)::34 - [] + MarkupBlock - [0..34)::34 + MarkupTagHelperElement - [0..34)::34 - th:myth2[SelfClosing] - mythTagHelper2 + MarkupTagHelperStartTag - [0..34)::34 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[th:myth2]; + MarkupTagHelperAttribute - [9..31)::22 - bound - DoubleQuotes - Bound - [ bound="@DateTime.Now"] + MarkupTextLiteral - [9..10)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [10..15)::5 - [bound] - Gen - SpanEditHandler;Accepts:Any + Text;[bound]; + Equals;[=]; + MarkupTextLiteral - [16..17)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [17..30)::13 + MarkupBlock - [17..30)::13 + CSharpCodeBlock - [17..30)::13 + CSharpImplicitExpression - [17..30)::13 + CSharpTransition - [17..18)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [18..30)::12 + CSharpCodeBlock - [18..30)::12 + CSharpExpressionLiteral - [18..30)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:AnyExceptNewline;ImplicitExpression[ATD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [30..31)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [31..32)::1 + MarkupTextLiteral - [31..32)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers11.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers11.tspans.txt new file mode 100644 index 0000000000..33b53566f1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers11.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [34] ) - mythTagHelper2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers2.cspans.txt new file mode 100644 index 0000000000..022d559da1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers2.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (5:0,5 [16] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Markup span at (21:0,21 [6] ) (Accepts:Any) - Parent: Tag block at (21:0,21 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers2.stree.txt new file mode 100644 index 0000000000..e031e1ac8c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers2.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..27)::27 - [words and spaces] + MarkupBlock - [0..27)::27 + MarkupElement - [0..27)::27 + MarkupStartTag - [0..5)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[th:]; + CloseAngle;[>]; + MarkupTextLiteral - [5..21)::16 - [words and spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[and]; + Whitespace;[ ]; + Text;[spaces]; + MarkupEndTag - [21..27)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[th:]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers3.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers3.stree.txt new file mode 100644 index 0000000000..0eb6fd801a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers3.stree.txt @@ -0,0 +1,11 @@ +RazorDocument - [0..11)::11 - [] + MarkupBlock - [0..11)::11 + MarkupTagHelperElement - [0..11)::11 - th:myth[SelfClosing] - mythTagHelper + MarkupTagHelperStartTag - [0..11)::11 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[th:myth]; + MarkupMiscAttributeContent - [8..9)::1 + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers3.tspans.txt new file mode 100644 index 0000000000..20562b3e6b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [11] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers4.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers4.stree.txt new file mode 100644 index 0000000000..9f01e240d2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers4.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..19)::19 - [] + MarkupBlock - [0..19)::19 + MarkupTagHelperElement - [0..19)::19 - th:myth[StartTagAndEndTag] - mythTagHelper + MarkupTagHelperStartTag - [0..9)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[th:myth]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [9..19)::10 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[th:myth]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers4.tspans.txt new file mode 100644 index 0000000000..6dfea7ba4f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [19] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers5.cspans.txt new file mode 100644 index 0000000000..e868b55b3e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers5.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (9:0,9 [10] ) (Accepts:Any) - Parent: Tag block at (9:0,9 [10] ) +Markup span at (19:0,19 [11] ) (Accepts:Any) - Parent: Tag block at (19:0,19 [11] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers5.stree.txt new file mode 100644 index 0000000000..bc5c8beed8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers5.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..40)::40 - [] + MarkupBlock - [0..40)::40 + MarkupTagHelperElement - [0..40)::40 - th:myth[StartTagAndEndTag] - mythTagHelper + MarkupTagHelperStartTag - [0..9)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[th:myth]; + CloseAngle;[>]; + MarkupElement - [9..30)::21 + MarkupStartTag - [9..19)::10 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[th:my2th]; + CloseAngle;[>]; + MarkupEndTag - [19..30)::11 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[th:my2th]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [30..40)::10 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[th:myth]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers5.tspans.txt new file mode 100644 index 0000000000..9a9154c80d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [40] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers6.cspans.txt new file mode 100644 index 0000000000..d9e9a04dc1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers6.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [12] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [12] ) +Markup span at (2:0,2 [10] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [12] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers6.stree.txt new file mode 100644 index 0000000000..d5bc42d5e8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers6.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..12)::12 - [] + MarkupBlock - [0..12)::12 + MarkupElement - [0..12)::12 + MarkupStartTag - [0..12)::12 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[th:myth]; + MarkupMiscAttributeContent - [9..10)::1 + MarkupTextLiteral - [9..10)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers7.cspans.txt new file mode 100644 index 0000000000..59cd08d3b5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers7.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [10] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [10] ) +Markup span at (2:0,2 [8] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [10] ) +Markup span at (10:0,10 [2] ) (Accepts:Any) - Parent: Tag block at (10:0,10 [11] ) +MetaCode span at (12:0,12 [1] ) (Accepts:None) - Parent: Tag block at (10:0,10 [11] ) +Markup span at (13:0,13 [8] ) (Accepts:Any) - Parent: Tag block at (10:0,10 [11] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers7.stree.txt new file mode 100644 index 0000000000..6f048dd34c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers7.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..21)::21 - [] + MarkupBlock - [0..21)::21 + MarkupElement - [0..21)::21 + MarkupStartTag - [0..10)::10 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[th:myth]; + CloseAngle;[>]; + MarkupEndTag - [10..21)::11 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[th:myth]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers8.cspans.txt new file mode 100644 index 0000000000..3bc0454091 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers8.cspans.txt @@ -0,0 +1 @@ +Markup span at (16:0,16 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [23] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers8.stree.txt new file mode 100644 index 0000000000..53c0c892c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers8.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..23)::23 - [] + MarkupBlock - [0..23)::23 + MarkupTagHelperElement - [0..23)::23 - th:myth[SelfClosing] - mythTagHelper + MarkupTagHelperStartTag - [0..23)::23 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[th:myth]; + MarkupTagHelperAttribute - [8..20)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..14)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [16..19)::3 + MarkupLiteralAttributeValue - [16..19)::3 - [btn] + MarkupTextLiteral - [16..19)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [19..20)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [20..21)::1 + MarkupTextLiteral - [20..21)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers8.tspans.txt new file mode 100644 index 0000000000..17b38715bc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers8.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [23] ) - mythTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers9.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers9.cspans.txt new file mode 100644 index 0000000000..7898d0d47e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers9.cspans.txt @@ -0,0 +1 @@ +Markup span at (17:0,17 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [24] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers9.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers9.stree.txt new file mode 100644 index 0000000000..33ddd48291 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers9.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..24)::24 - [] + MarkupBlock - [0..24)::24 + MarkupTagHelperElement - [0..24)::24 - th:myth2[SelfClosing] - mythTagHelper2 + MarkupTagHelperStartTag - [0..24)::24 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[th:myth2]; + MarkupTagHelperAttribute - [9..21)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [9..10)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [10..15)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [16..17)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [17..20)::3 + MarkupLiteralAttributeValue - [17..20)::3 - [btn] + MarkupTextLiteral - [17..20)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [20..21)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [21..22)::1 + MarkupTextLiteral - [21..22)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers9.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers9.tspans.txt new file mode 100644 index 0000000000..fba983601b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsPrefixedTagHelpers9.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [24] ) - mythTagHelper2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorCommentsAsChildren.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorCommentsAsChildren.cspans.txt new file mode 100644 index 0000000000..72a6a954d3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorCommentsAsChildren.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (3:0,3 [3] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [3] ) +Markup span at (6:0,6 [4] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [26] ) +Markup span at (10:0,10 [4] ) (Accepts:Any) - Parent: Tag block at (10:0,10 [4] ) +Transition span at (14:0,14 [1] ) (Accepts:None) - Parent: Comment block at (14:0,14 [8] ) +MetaCode span at (15:0,15 [1] ) (Accepts:None) - Parent: Comment block at (14:0,14 [8] ) +Comment span at (16:0,16 [4] ) (Accepts:Any) - Parent: Comment block at (14:0,14 [8] ) +MetaCode span at (20:0,20 [1] ) (Accepts:None) - Parent: Comment block at (14:0,14 [8] ) +Transition span at (21:0,21 [1] ) (Accepts:None) - Parent: Comment block at (14:0,14 [8] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorCommentsAsChildren.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorCommentsAsChildren.stree.txt new file mode 100644 index 0000000000..25ecc40085 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorCommentsAsChildren.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..26)::26 - [

                        asdf@*asdf*@

                        ] + MarkupBlock - [0..26)::26 + MarkupTagHelperElement - [0..26)::26 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [3..14)::11 + MarkupStartTag - [3..6)::3 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[b]; + CloseAngle;[>]; + MarkupTextLiteral - [6..10)::4 - [asdf] - Gen - SpanEditHandler;Accepts:Any + Text;[asdf]; + MarkupEndTag - [10..14)::4 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[b]; + CloseAngle;[>]; + RazorComment - [14..22)::8 + RazorCommentTransition;[@]; + RazorCommentStar;[*]; + RazorCommentLiteral;[asdf]; + RazorCommentStar;[*]; + RazorCommentTransition;[@]; + MarkupTagHelperEndTag - [22..26)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorCommentsAsChildren.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorCommentsAsChildren.tspans.txt new file mode 100644 index 0000000000..41a4059c21 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorCommentsAsChildren.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [26] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorMarkupInHtmlComment.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorMarkupInHtmlComment.cspans.txt new file mode 100644 index 0000000000..841cefa3f9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorMarkupInHtmlComment.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (3:0,3 [3] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [3] ) +Markup span at (6:0,6 [4] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [37] ) +Markup span at (10:0,10 [4] ) (Accepts:Any) - Parent: Tag block at (10:0,10 [4] ) +Markup span at (14:0,14 [4] ) (Accepts:None) - Parent: HtmlComment block at (14:0,14 [19] ) +Markup span at (18:0,18 [6] ) (Accepts:Whitespace) - Parent: HtmlComment block at (14:0,14 [19] ) +Transition span at (24:0,24 [1] ) (Accepts:None) - Parent: Expression block at (24:0,24 [6] ) +Code span at (25:0,25 [5] ) (Accepts:NonWhitespace) - Parent: Expression block at (24:0,24 [6] ) +Markup span at (30:0,30 [3] ) (Accepts:None) - Parent: HtmlComment block at (14:0,14 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorMarkupInHtmlComment.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorMarkupInHtmlComment.stree.txt new file mode 100644 index 0000000000..c66d2e2fd3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorMarkupInHtmlComment.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..37)::37 - [

                        asdf

                        ] + MarkupBlock - [0..37)::37 + MarkupTagHelperElement - [0..37)::37 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [3..14)::11 + MarkupStartTag - [3..6)::3 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[b]; + CloseAngle;[>]; + MarkupTextLiteral - [6..10)::4 - [asdf] - Gen - SpanEditHandler;Accepts:Any + Text;[asdf]; + MarkupEndTag - [10..14)::4 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[b]; + CloseAngle;[>]; + MarkupCommentBlock - [14..33)::19 + MarkupTextLiteral - [14..18)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [33..37)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorMarkupInHtmlComment.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorMarkupInHtmlComment.tspans.txt new file mode 100644 index 0000000000..01ef9b42cc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsRazorMarkupInHtmlComment.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [37] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsSimpleHtmlCommentsAsChildren.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsSimpleHtmlCommentsAsChildren.cspans.txt new file mode 100644 index 0000000000..df900ecba5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsSimpleHtmlCommentsAsChildren.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (3:0,3 [3] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [3] ) +Markup span at (6:0,6 [4] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [36] ) +Markup span at (10:0,10 [4] ) (Accepts:Any) - Parent: Tag block at (10:0,10 [4] ) +Markup span at (14:0,14 [4] ) (Accepts:None) - Parent: HtmlComment block at (14:0,14 [18] ) +Markup span at (18:0,18 [11] ) (Accepts:Whitespace) - Parent: HtmlComment block at (14:0,14 [18] ) +Markup span at (29:0,29 [3] ) (Accepts:None) - Parent: HtmlComment block at (14:0,14 [18] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsSimpleHtmlCommentsAsChildren.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsSimpleHtmlCommentsAsChildren.stree.txt new file mode 100644 index 0000000000..d619bdc2a9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsSimpleHtmlCommentsAsChildren.stree.txt @@ -0,0 +1,36 @@ +RazorDocument - [0..36)::36 - [

                        asdf

                        ] + MarkupBlock - [0..36)::36 + MarkupTagHelperElement - [0..36)::36 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [3..14)::11 + MarkupStartTag - [3..6)::3 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[b]; + CloseAngle;[>]; + MarkupTextLiteral - [6..10)::4 - [asdf] - Gen - SpanEditHandler;Accepts:Any + Text;[asdf]; + MarkupEndTag - [10..14)::4 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[b]; + CloseAngle;[>]; + MarkupCommentBlock - [14..32)::18 + MarkupTextLiteral - [14..18)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [32..36)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsSimpleHtmlCommentsAsChildren.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsSimpleHtmlCommentsAsChildren.tspans.txt new file mode 100644 index 0000000000..af2c446e1f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsSimpleHtmlCommentsAsChildren.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [36] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag1.cspans.txt new file mode 100644 index 0000000000..e473d0582c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag1.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [22] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [22] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [19] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [19] ) +Markup span at (4:0,4 [4] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [19] ) +Markup span at (8:0,8 [8] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) +Markup span at (16:0,16 [3] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) +Markup span at (19:0,19 [1] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) +Markup span at (20:0,20 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [19] ) +Markup span at (21:0,21 [1] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [20] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag1.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag1.diag.txt new file mode 100644 index 0000000000..6f41e61f18 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag1.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1025: The "!text" element was not closed. All elements must be either self-closing or have a matching end tag. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag1.stree.txt new file mode 100644 index 0000000000..36f03692c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag1.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..22)::22 - [@{}] + MarkupBlock - [0..22)::22 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..22)::22 + CSharpStatement - [0..22)::22 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..22)::21 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..22)::20 + MarkupBlock - [2..22)::20 + MarkupElement - [2..22)::20 + MarkupStartTag - [2..21)::19 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[text]; + MarkupAttributeBlock - [8..20)::12 - [ class="btn"] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..14)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [16..19)::3 + MarkupLiteralAttributeValue - [16..19)::3 - [btn] + MarkupTextLiteral - [16..19)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [19..20)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [21..22)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + RazorMetaCode - [22..22)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag2.cspans.txt new file mode 100644 index 0000000000..a20ec606c8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag2.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [30] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [30] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [19] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [19] ) +Markup span at (4:0,4 [4] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [19] ) +Markup span at (8:0,8 [8] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) +Markup span at (16:0,16 [3] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) +Markup span at (19:0,19 [1] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) +Markup span at (20:0,20 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [19] ) +Markup span at (21:0,21 [2] ) (Accepts:Any) - Parent: Tag block at (21:0,21 [8] ) +MetaCode span at (23:0,23 [1] ) (Accepts:None) - Parent: Tag block at (21:0,21 [8] ) +Markup span at (24:0,24 [5] ) (Accepts:None) - Parent: Tag block at (21:0,21 [8] ) +Code span at (29:0,29 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [30] ) +MetaCode span at (29:0,29 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [30] ) +Markup span at (30:0,30 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [30] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag2.stree.txt new file mode 100644 index 0000000000..891c5297d7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag2.stree.txt @@ -0,0 +1,45 @@ +RazorDocument - [0..30)::30 - [@{}] + MarkupBlock - [0..30)::30 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..30)::30 + CSharpStatement - [0..30)::30 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..30)::29 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..29)::27 + MarkupBlock - [2..29)::27 + MarkupElement - [2..29)::27 + MarkupStartTag - [2..21)::19 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[text]; + MarkupAttributeBlock - [8..20)::12 - [ class="btn"] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..14)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [16..19)::3 + MarkupLiteralAttributeValue - [16..19)::3 - [btn] + MarkupTextLiteral - [16..19)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [19..20)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupEndTag - [21..29)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [29..29)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [29..30)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [30..30)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag3.cspans.txt new file mode 100644 index 0000000000..f4c2992c67 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag3.cspans.txt @@ -0,0 +1,17 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [47] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [47] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [47] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [19] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [19] ) +Markup span at (4:0,4 [4] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [19] ) +Markup span at (8:0,8 [8] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) +Markup span at (16:0,16 [3] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) +Markup span at (19:0,19 [1] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) +Markup span at (20:0,20 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [19] ) +Markup span at (21:0,21 [17] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [44] ) +Markup span at (38:0,38 [2] ) (Accepts:Any) - Parent: Tag block at (38:0,38 [8] ) +MetaCode span at (40:0,40 [1] ) (Accepts:None) - Parent: Tag block at (38:0,38 [8] ) +Markup span at (41:0,41 [5] ) (Accepts:None) - Parent: Tag block at (38:0,38 [8] ) +Code span at (46:0,46 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [47] ) +MetaCode span at (46:0,46 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [47] ) +Markup span at (47:0,47 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [47] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag3.stree.txt new file mode 100644 index 0000000000..128de38bf2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag3.stree.txt @@ -0,0 +1,51 @@ +RazorDocument - [0..47)::47 - [@{words with spaces}] + MarkupBlock - [0..47)::47 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..47)::47 + CSharpStatement - [0..47)::47 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..47)::46 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..46)::44 + MarkupBlock - [2..46)::44 + MarkupElement - [2..46)::44 + MarkupStartTag - [2..21)::19 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[text]; + MarkupAttributeBlock - [8..20)::12 - [ class="btn"] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..14)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [16..19)::3 + MarkupLiteralAttributeValue - [16..19)::3 - [btn] + MarkupTextLiteral - [16..19)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [19..20)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [21..38)::17 - [words with spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[with]; + Whitespace;[ ]; + Text;[spaces]; + MarkupEndTag - [38..46)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [46..46)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [46..47)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [47..47)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag4.cspans.txt new file mode 100644 index 0000000000..3c3a95f854 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag4.cspans.txt @@ -0,0 +1,19 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [47] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [47] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [47] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [36] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [36] ) +Markup span at (4:0,4 [4] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [36] ) +Markup span at (8:0,8 [8] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [18] ) +Markup span at (16:0,16 [4] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [18] ) +Markup span at (20:0,20 [5] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [18] ) +Markup span at (25:0,25 [1] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [18] ) +Markup span at (26:0,26 [8] ) (Accepts:Any) - Parent: Markup block at (26:0,26 [11] ) +Markup span at (34:0,34 [3] ) (Accepts:Any) - Parent: Markup block at (26:0,26 [11] ) +Markup span at (37:0,37 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [36] ) +Markup span at (38:0,38 [2] ) (Accepts:Any) - Parent: Tag block at (38:0,38 [8] ) +MetaCode span at (40:0,40 [1] ) (Accepts:None) - Parent: Tag block at (38:0,38 [8] ) +Markup span at (41:0,41 [5] ) (Accepts:None) - Parent: Tag block at (38:0,38 [8] ) +Code span at (46:0,46 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [47] ) +MetaCode span at (46:0,46 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [47] ) +Markup span at (47:0,47 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [47] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag4.stree.txt new file mode 100644 index 0000000000..2cc6fc5b3a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag4.stree.txt @@ -0,0 +1,60 @@ +RazorDocument - [0..47)::47 - [@{}] + MarkupBlock - [0..47)::47 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..47)::47 + CSharpStatement - [0..47)::47 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..47)::46 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..46)::44 + MarkupBlock - [2..46)::44 + MarkupElement - [2..46)::44 + MarkupStartTag - [2..38)::36 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[text]; + MarkupAttributeBlock - [8..26)::18 - [ class='btn1 btn2'] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..14)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [16..25)::9 + MarkupLiteralAttributeValue - [16..20)::4 - [btn1] + MarkupTextLiteral - [16..20)::4 - [btn1] - Gen - SpanEditHandler;Accepts:Any + Text;[btn1]; + MarkupLiteralAttributeValue - [20..25)::5 - [ btn2] + MarkupTextLiteral - [20..21)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [21..25)::4 - [btn2] - Gen - SpanEditHandler;Accepts:Any + Text;[btn2]; + MarkupTextLiteral - [25..26)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [26..37)::11 - [ class2=btn] + MarkupTextLiteral - [26..27)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [27..33)::6 - [class2] - Gen - SpanEditHandler;Accepts:Any + Text;[class2]; + Equals;[=]; + GenericBlock - [34..37)::3 + MarkupLiteralAttributeValue - [34..37)::3 - [btn] + MarkupTextLiteral - [34..37)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + CloseAngle;[>]; + MarkupEndTag - [38..46)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [46..46)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [46..47)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [47..47)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag5.cspans.txt new file mode 100644 index 0000000000..8543c4eeb6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag5.cspans.txt @@ -0,0 +1,20 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [50] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [50] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [50] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [39] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [39] ) +Markup span at (4:0,4 [4] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [39] ) +Markup span at (8:0,8 [8] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [32] ) +Markup span at (16:0,16 [4] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [32] ) +Markup span at (20:0,20 [1] ) (Accepts:Any) - Parent: Markup block at (20:0,20 [14] ) +Transition span at (21:0,21 [1] ) (Accepts:None) - Parent: Expression block at (21:0,21 [13] ) +Code span at (22:0,22 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (21:0,21 [13] ) +Markup span at (34:0,34 [5] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [32] ) +Markup span at (39:0,39 [1] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [32] ) +Markup span at (40:0,40 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [39] ) +Markup span at (41:0,41 [2] ) (Accepts:Any) - Parent: Tag block at (41:0,41 [8] ) +MetaCode span at (43:0,43 [1] ) (Accepts:None) - Parent: Tag block at (41:0,41 [8] ) +Markup span at (44:0,44 [5] ) (Accepts:None) - Parent: Tag block at (41:0,41 [8] ) +Code span at (49:0,49 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [50] ) +MetaCode span at (49:0,49 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [50] ) +Markup span at (50:0,50 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [50] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag5.stree.txt new file mode 100644 index 0000000000..68864e97d9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithAttrTextTag5.stree.txt @@ -0,0 +1,64 @@ +RazorDocument - [0..50)::50 - [@{}] + MarkupBlock - [0..50)::50 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..50)::50 + CSharpStatement - [0..50)::50 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..50)::49 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..49)::47 + MarkupBlock - [2..49)::47 + MarkupElement - [2..49)::47 + MarkupStartTag - [2..41)::39 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[text]; + MarkupAttributeBlock - [8..40)::32 - [ class='btn1 @DateTime.Now btn2'] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..14)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [16..39)::23 + MarkupLiteralAttributeValue - [16..20)::4 - [btn1] + MarkupTextLiteral - [16..20)::4 - [btn1] - Gen - SpanEditHandler;Accepts:Any + Text;[btn1]; + MarkupDynamicAttributeValue - [20..34)::14 - [ @DateTime.Now] + MarkupTextLiteral - [20..21)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + GenericBlock - [21..34)::13 + CSharpCodeBlock - [21..34)::13 + CSharpImplicitExpression - [21..34)::13 + CSharpTransition - [21..22)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [22..34)::12 + CSharpCodeBlock - [22..34)::12 + CSharpExpressionLiteral - [22..34)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupLiteralAttributeValue - [34..39)::5 - [ btn2] + MarkupTextLiteral - [34..35)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [35..39)::4 - [btn2] - Gen - SpanEditHandler;Accepts:Any + Text;[btn2]; + MarkupTextLiteral - [39..40)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupEndTag - [41..49)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [49..49)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [49..50)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [50..50)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag1.cspans.txt new file mode 100644 index 0000000000..4c82a55e34 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag1.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [10] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [10] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [7] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [7] ) +Markup span at (4:0,4 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [7] ) +Markup span at (9:0,9 [1] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [8] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag1.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag1.diag.txt new file mode 100644 index 0000000000..6f41e61f18 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag1.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1025: The "!text" element was not closed. All elements must be either self-closing or have a matching end tag. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag1.stree.txt new file mode 100644 index 0000000000..adc9746a55 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag1.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..10)::10 - [@{}] + MarkupBlock - [0..10)::10 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..10)::10 + CSharpStatement - [0..10)::10 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..10)::9 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..10)::8 + MarkupBlock - [2..10)::8 + MarkupElement - [2..10)::8 + MarkupStartTag - [2..9)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [9..10)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + RazorMetaCode - [10..10)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag2.cspans.txt new file mode 100644 index 0000000000..d849d367fe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag2.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [11] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [8] ) +MetaCode span at (4:0,4 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [8] ) +Markup span at (5:0,5 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [8] ) +Code span at (10:0,10 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [11] ) +MetaCode span at (10:0,10 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +Markup span at (11:0,11 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [11] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag2.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag2.diag.txt new file mode 100644 index 0000000000..5bcfe7b2f4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag2.diag.txt @@ -0,0 +1 @@ +(1,5): Error RZ1026: Encountered end tag "!text" with no matching start tag. Are your start/end tags properly balanced? diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag2.stree.txt new file mode 100644 index 0000000000..fe12c3634d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag2.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..11)::11 - [@{}] + MarkupBlock - [0..11)::11 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..11)::11 + CSharpStatement - [0..11)::11 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..11)::10 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..10)::8 + MarkupBlock - [2..10)::8 + MarkupElement - [2..10)::8 + MarkupEndTag - [2..10)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [10..10)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [10..11)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [11..11)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag3.cspans.txt new file mode 100644 index 0000000000..8c4834386d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag3.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [18] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [18] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [18] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [7] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [7] ) +Markup span at (4:0,4 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [7] ) +Markup span at (9:0,9 [2] ) (Accepts:Any) - Parent: Tag block at (9:0,9 [8] ) +MetaCode span at (11:0,11 [1] ) (Accepts:None) - Parent: Tag block at (9:0,9 [8] ) +Markup span at (12:0,12 [5] ) (Accepts:None) - Parent: Tag block at (9:0,9 [8] ) +Code span at (17:0,17 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [18] ) +MetaCode span at (17:0,17 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [18] ) +Markup span at (18:0,18 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [18] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag3.stree.txt new file mode 100644 index 0000000000..58e11b84c9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag3.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..18)::18 - [@{}] + MarkupBlock - [0..18)::18 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..18)::18 + CSharpStatement - [0..18)::18 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..18)::17 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..17)::15 + MarkupBlock - [2..17)::15 + MarkupElement - [2..17)::15 + MarkupStartTag - [2..9)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + MarkupEndTag - [9..17)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [17..17)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [17..18)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [18..18)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag4.cspans.txt new file mode 100644 index 0000000000..8e4cc26c88 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag4.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [7] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [7] ) +Markup span at (4:0,4 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [7] ) +Markup span at (9:0,9 [16] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [31] ) +Markup span at (25:0,25 [2] ) (Accepts:Any) - Parent: Tag block at (25:0,25 [8] ) +MetaCode span at (27:0,27 [1] ) (Accepts:None) - Parent: Tag block at (25:0,25 [8] ) +Markup span at (28:0,28 [5] ) (Accepts:None) - Parent: Tag block at (25:0,25 [8] ) +Code span at (33:0,33 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (33:0,33 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (34:0,34 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag4.stree.txt new file mode 100644 index 0000000000..b9443879a5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag4.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..34)::34 - [@{words and spaces}] + MarkupBlock - [0..34)::34 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..34)::34 + CSharpStatement - [0..34)::34 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..34)::33 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..33)::31 + MarkupBlock - [2..33)::31 + MarkupElement - [2..33)::31 + MarkupStartTag - [2..9)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [9..25)::16 - [words and spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[and]; + Whitespace;[ ]; + Text;[spaces]; + MarkupEndTag - [25..33)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [33..34)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [34..34)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag5.cspans.txt new file mode 100644 index 0000000000..bceaf09553 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag5.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [17] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [17] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [7] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [7] ) +Markup span at (4:0,4 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [7] ) +Markup span at (9:0,9 [7] ) (Accepts:None) - Parent: Tag block at (9:0,9 [7] ) +Code span at (16:0,16 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [17] ) +MetaCode span at (16:0,16 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [17] ) +Markup span at (17:0,17 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag5.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag5.diag.txt new file mode 100644 index 0000000000..9e700e22b8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag5.diag.txt @@ -0,0 +1,2 @@ +(1,4): Error RZ1025: The "!text" element was not closed. All elements must be either self-closing or have a matching end tag. +(1,12): Error RZ1034: Found a malformed 'text' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag5.stree.txt new file mode 100644 index 0000000000..89bf9b2706 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag5.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..17)::17 - [@{}] + MarkupBlock - [0..17)::17 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..17)::17 + CSharpStatement - [0..17)::17 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..17)::16 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..16)::14 + MarkupBlock - [2..16)::14 + MarkupElement - [2..16)::14 + MarkupStartTag - [2..9)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + MarkupElement - [9..16)::7 + MarkupEndTag - [9..16)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [16..16)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [16..17)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [17..17)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag6.cspans.txt new file mode 100644 index 0000000000..35c9da1c43 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag6.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [17] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [17] ) +Transition span at (2:0,2 [6] ) (Accepts:None) - Parent: Tag block at (2:0,2 [6] ) +Markup span at (8:0,8 [2] ) (Accepts:Any) - Parent: Tag block at (8:0,8 [8] ) +MetaCode span at (10:0,10 [1] ) (Accepts:None) - Parent: Tag block at (8:0,8 [8] ) +Markup span at (11:0,11 [5] ) (Accepts:None) - Parent: Tag block at (8:0,8 [8] ) +Code span at (16:0,16 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [17] ) +MetaCode span at (16:0,16 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [17] ) +Markup span at (17:0,17 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag6.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag6.diag.txt new file mode 100644 index 0000000000..5b84341f8d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag6.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ1025: The "text" element was not closed. All elements must be either self-closing or have a matching end tag. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag6.stree.txt new file mode 100644 index 0000000000..ae7f265b93 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag6.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..17)::17 - [@{}] + MarkupBlock - [0..17)::17 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..17)::17 + CSharpStatement - [0..17)::17 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..17)::16 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..16)::14 + MarkupBlock - [2..16)::14 + MarkupElement - [2..16)::14 + MarkupStartTag - [2..8)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupElement - [8..16)::8 + MarkupEndTag - [8..16)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [16..16)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [16..17)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [17..17)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag7.cspans.txt new file mode 100644 index 0000000000..e4ec1ec100 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag7.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [7] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [7] ) +Markup span at (4:0,4 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [7] ) +Markup span at (22:0,22 [2] ) (Accepts:Any) - Parent: Tag block at (22:0,22 [8] ) +MetaCode span at (24:0,24 [1] ) (Accepts:None) - Parent: Tag block at (22:0,22 [8] ) +Markup span at (25:0,25 [5] ) (Accepts:None) - Parent: Tag block at (22:0,22 [8] ) +Code span at (30:0,30 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [31] ) +MetaCode span at (30:0,30 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [31] ) +Markup span at (31:0,31 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag7.stree.txt new file mode 100644 index 0000000000..d6a9f5f320 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag7.stree.txt @@ -0,0 +1,41 @@ +RazorDocument - [0..31)::31 - [@{}] + MarkupBlock - [0..31)::31 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..31)::31 + CSharpStatement - [0..31)::31 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..31)::30 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..30)::28 + MarkupBlock - [2..30)::28 + MarkupElement - [2..30)::28 + MarkupStartTag - [2..9)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + MarkupTagHelperElement - [9..22)::13 - text[StartTagAndEndTag] - texttaghelper + MarkupTagHelperStartTag - [9..15)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [15..22)::7 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + MarkupEndTag - [22..30)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [30..30)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [30..31)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [31..31)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag7.tspans.txt new file mode 100644 index 0000000000..9f67aaf5a4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (9:0,9 [13] ) - texttaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag8.cspans.txt new file mode 100644 index 0000000000..c21ff53c60 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag8.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +Transition span at (2:0,2 [6] ) (Accepts:None) - Parent: Tag block at (2:0,2 [6] ) +Markup span at (8:0,8 [1] ) (Accepts:Any) - Parent: Tag block at (8:0,8 [7] ) +MetaCode span at (9:0,9 [1] ) (Accepts:None) - Parent: Tag block at (8:0,8 [7] ) +Markup span at (10:0,10 [5] ) (Accepts:None) - Parent: Tag block at (8:0,8 [7] ) +Markup span at (15:0,15 [2] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [8] ) +MetaCode span at (17:0,17 [1] ) (Accepts:None) - Parent: Tag block at (15:0,15 [8] ) +Markup span at (18:0,18 [5] ) (Accepts:None) - Parent: Tag block at (15:0,15 [8] ) +Markup span at (23:0,23 [1] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [22] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag8.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag8.diag.txt new file mode 100644 index 0000000000..27a90c4a3e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag8.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1025: The "text" element was not closed. All elements must be either self-closing or have a matching end tag. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag8.stree.txt new file mode 100644 index 0000000000..8841774978 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag8.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..24)::24 - [@{}] + MarkupBlock - [0..24)::24 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..24)::24 + CSharpStatement - [0..24)::24 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..24)::23 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..24)::22 + MarkupBlock - [2..24)::22 + MarkupElement - [2..24)::22 + MarkupStartTag - [2..8)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupElement - [8..23)::15 + MarkupStartTag - [8..15)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + MarkupEndTag - [15..23)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [23..24)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + RazorMetaCode - [24..24)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag9.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag9.cspans.txt new file mode 100644 index 0000000000..b311f8f748 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag9.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [7] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [7] ) +Markup span at (4:0,4 [5] ) (Accepts:None) - Parent: Tag block at (2:0,2 [7] ) +Markup span at (9:0,9 [2] ) (Accepts:Any) - Parent: Tag block at (9:0,9 [8] ) +MetaCode span at (11:0,11 [1] ) (Accepts:None) - Parent: Tag block at (9:0,9 [8] ) +Markup span at (12:0,12 [5] ) (Accepts:None) - Parent: Tag block at (9:0,9 [8] ) +Markup span at (17:0,17 [7] ) (Accepts:None) - Parent: Tag block at (17:0,17 [7] ) +Code span at (24:0,24 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [25] ) +MetaCode span at (24:0,24 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +Markup span at (25:0,25 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag9.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag9.diag.txt new file mode 100644 index 0000000000..d82bb8c1a6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag9.diag.txt @@ -0,0 +1,2 @@ +(1,20): Error RZ1026: Encountered end tag "text" with no matching start tag. Are your start/end tags properly balanced? +(1,20): Error RZ1034: Found a malformed 'text' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag9.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag9.stree.txt new file mode 100644 index 0000000000..dd66d9333a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTHElementOptForCompleteTextTagInCSharpBlock_WithBlockTextTag9.stree.txt @@ -0,0 +1,38 @@ +RazorDocument - [0..25)::25 - [@{}] + MarkupBlock - [0..25)::25 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..25)::25 + CSharpStatement - [0..25)::25 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..25)::24 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..24)::22 + MarkupBlock - [2..17)::15 + MarkupElement - [2..17)::15 + MarkupStartTag - [2..9)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + MarkupEndTag - [9..17)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[text]; + CloseAngle;[>]; + MarkupBlock - [17..24)::7 + MarkupElement - [17..24)::7 + MarkupEndTag - [17..24)::7 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [24..24)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [24..25)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [25..25)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML1.cspans.txt new file mode 100644 index 0000000000..68230d2f76 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML1.cspans.txt @@ -0,0 +1 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [2] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML1.stree.txt new file mode 100644 index 0000000000..61c1a03dc4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML1.stree.txt @@ -0,0 +1,5 @@ +RazorDocument - [0..2)::2 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML2.cspans.txt new file mode 100644 index 0000000000..108c031df7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML2.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [3] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [3] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML2.stree.txt new file mode 100644 index 0000000000..10d9274ac3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML2.stree.txt @@ -0,0 +1,8 @@ +RazorDocument - [0..3)::3 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML3.cspans.txt new file mode 100644 index 0000000000..9bdd5fbf73 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML3.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (2:0,2 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML3.stree.txt new file mode 100644 index 0000000000..c9bce33c62 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML3.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..5)::5 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupMiscAttributeContent - [3..4)::1 + MarkupTextLiteral - [3..4)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupMiscAttributeContent - [4..5)::1 + MarkupTextLiteral - [4..5)::1 - [/] - Gen - SpanEditHandler;Accepts:Any + ForwardSlash;[/]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML4.cspans.txt new file mode 100644 index 0000000000..30af8ce509 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML4.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [10] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [10] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [10] ) +Markup span at (3:0,3 [7] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML4.stree.txt new file mode 100644 index 0000000000..ee66c8047f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML4.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..10)::10 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [3..10)::7 - [ class=] + MarkupTextLiteral - [3..4)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [4..9)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML5.cspans.txt new file mode 100644 index 0000000000..9c594e7ceb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML5.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [14] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [14] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [14] ) +Markup span at (3:0,3 [8] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [11] ) +Markup span at (11:0,11 [3] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [11] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML5.stree.txt new file mode 100644 index 0000000000..d8fc2bc069 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML5.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..14)::14 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [3..14)::11 - [ class="btn] + MarkupTextLiteral - [3..4)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [4..9)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [10..11)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [11..14)::3 + MarkupLiteralAttributeValue - [11..14)::3 - [btn] + MarkupTextLiteral - [11..14)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML6.cspans.txt new file mode 100644 index 0000000000..dd532d116d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML6.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [15] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [15] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [15] ) +Markup span at (3:0,3 [8] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [12] ) +Markup span at (11:0,11 [3] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [12] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [12] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML6.stree.txt new file mode 100644 index 0000000000..560ec950e3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML6.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..15)::15 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [3..15)::12 - [ class="btn"] + MarkupTextLiteral - [3..4)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [4..9)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [10..11)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [11..14)::3 + MarkupLiteralAttributeValue - [11..14)::3 - [btn] + MarkupTextLiteral - [11..14)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [14..15)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML7.cspans.txt new file mode 100644 index 0000000000..524195f446 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML7.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [17] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [17] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [17] ) +Markup span at (3:0,3 [8] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [12] ) +Markup span at (11:0,11 [3] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [12] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [12] ) +Markup span at (15:0,15 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML7.stree.txt new file mode 100644 index 0000000000..4aae4d9300 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTML7.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..17)::17 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [3..15)::12 - [ class="btn"] + MarkupTextLiteral - [3..4)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [4..9)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [10..11)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [11..14)::3 + MarkupLiteralAttributeValue - [11..14)::3 - [btn] + MarkupTextLiteral - [11..14)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [14..15)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [15..16)::1 + MarkupTextLiteral - [15..16)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupMiscAttributeContent - [16..17)::1 + MarkupTextLiteral - [16..17)::1 - [/] - Gen - SpanEditHandler;Accepts:Any + ForwardSlash;[/]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock1.cspans.txt new file mode 100644 index 0000000000..e2f572686f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock1.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [5] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [5] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [3] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [3] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock1.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock1.diag.txt new file mode 100644 index 0000000000..5e05d58d34 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock1.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1024: End of file or an unexpected character was reached before the "!}" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                        ") or have matching end tags ("

                        Hello

                        "). If you intended to display a "<" character, use the "<" HTML entity. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock1.stree.txt new file mode 100644 index 0000000000..22f2b09439 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock1.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..5)::5 - [@{ - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..5)::5 + CSharpStatement - [0..5)::5 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..5)::4 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..5)::3 + MarkupBlock - [2..5)::3 + MarkupElement - [2..5)::3 + MarkupStartTag - [2..5)::3 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[}]; + CloseAngle;[]; + RazorMetaCode - [5..5)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock2.cspans.txt new file mode 100644 index 0000000000..269e709b18 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock2.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [6] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [6] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [6] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [4] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [4] ) +Markup span at (4:0,4 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock2.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock2.diag.txt new file mode 100644 index 0000000000..7fcf4c636a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock2.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1024: End of file or an unexpected character was reached before the "!p}" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                        ") or have matching end tags ("

                        Hello

                        "). If you intended to display a "<" character, use the "<" HTML entity. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock2.stree.txt new file mode 100644 index 0000000000..3e5244b17f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock2.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..6)::6 - [@{ - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..6)::6 + CSharpStatement - [0..6)::6 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..6)::5 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..6)::4 + MarkupBlock - [2..6)::4 + MarkupElement - [2..6)::4 + MarkupStartTag - [2..6)::4 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p}]; + CloseAngle;[]; + RazorMetaCode - [6..6)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock3.cspans.txt new file mode 100644 index 0000000000..3686f93385 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock3.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [8] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [8] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [8] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [6] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [6] ) +Markup span at (4:0,4 [3] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [6] ) +Markup span at (7:0,7 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [1] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock3.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock3.diag.txt new file mode 100644 index 0000000000..7f76f09dfe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock3.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1024: End of file or an unexpected character was reached before the "!p" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                        ") or have matching end tags ("

                        Hello

                        "). If you intended to display a "<" character, use the "<" HTML entity. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock3.stree.txt new file mode 100644 index 0000000000..c3079ddde3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock3.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..8)::8 - [@{ - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + CSharpStatement - [0..8)::8 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..8)::7 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..8)::6 + MarkupBlock - [2..8)::6 + MarkupElement - [2..8)::6 + MarkupStartTag - [2..8)::6 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupMiscAttributeContent - [5..6)::1 + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupMiscAttributeContent - [6..7)::1 + MarkupTextLiteral - [6..7)::1 - [/] - Gen - SpanEditHandler;Accepts:Any + ForwardSlash;[/]; + MarkupMinimizedAttributeBlock - [7..8)::1 - [}] + MarkupTextLiteral - [7..8)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + CloseAngle;[]; + RazorMetaCode - [8..8)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock4.cspans.txt new file mode 100644 index 0000000000..ae931de581 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock4.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [13] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [13] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [13] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [11] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [11] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [11] ) +Markup span at (5:0,5 [7] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [8] ) +Markup span at (12:0,12 [1] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [8] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock4.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock4.diag.txt new file mode 100644 index 0000000000..7f76f09dfe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock4.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1024: End of file or an unexpected character was reached before the "!p" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                        ") or have matching end tags ("

                        Hello

                        "). If you intended to display a "<" character, use the "<" HTML entity. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock4.stree.txt new file mode 100644 index 0000000000..a4553c78cb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock4.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..13)::13 - [@{ - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..13)::13 + CSharpStatement - [0..13)::13 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..13)::12 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..13)::11 + MarkupBlock - [2..13)::11 + MarkupElement - [2..13)::11 + MarkupStartTag - [2..13)::11 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [5..13)::8 - [ class=}] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + GenericBlock - [12..13)::1 + MarkupLiteralAttributeValue - [12..13)::1 - [}] + MarkupTextLiteral - [12..13)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + CloseAngle;[]; + RazorMetaCode - [13..13)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock5.cspans.txt new file mode 100644 index 0000000000..497c2da8bf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock5.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [17] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [17] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [17] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [15] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [15] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [15] ) +Markup span at (5:0,5 [8] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [12] ) +Markup span at (13:0,13 [4] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [12] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock5.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock5.diag.txt new file mode 100644 index 0000000000..7f76f09dfe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock5.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1024: End of file or an unexpected character was reached before the "!p" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                        ") or have matching end tags ("

                        Hello

                        "). If you intended to display a "<" character, use the "<" HTML entity. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock5.stree.txt new file mode 100644 index 0000000000..4eb9d06416 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock5.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..17)::17 - [@{ - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..17)::17 + CSharpStatement - [0..17)::17 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..17)::16 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..17)::15 + MarkupBlock - [2..17)::15 + MarkupElement - [2..17)::15 + MarkupStartTag - [2..17)::15 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [5..17)::12 - [ class="btn}] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [13..17)::4 + MarkupLiteralAttributeValue - [13..17)::4 - [btn}] + MarkupTextLiteral - [13..17)::4 - [btn}] - Gen - SpanEditHandler;Accepts:Any + Text;[btn}]; + CloseAngle;[]; + RazorMetaCode - [17..17)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock6.cspans.txt new file mode 100644 index 0000000000..7280874c3d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock6.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [17] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [17] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [17] ) +Markup span at (5:0,5 [8] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [14] ) +Markup span at (13:0,13 [3] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [14] ) +Markup span at (16:0,16 [1] ) (Accepts:None) - Parent: Markup block at (16:0,16 [2] ) +Markup span at (17:0,17 [1] ) (Accepts:None) - Parent: Markup block at (16:0,16 [2] ) +Markup span at (18:0,18 [1] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [14] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock6.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock6.diag.txt new file mode 100644 index 0000000000..7f76f09dfe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock6.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1024: End of file or an unexpected character was reached before the "!p" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                        ") or have matching end tags ("

                        Hello

                        "). If you intended to display a "<" character, use the "<" HTML entity. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock6.stree.txt new file mode 100644 index 0000000000..0c7a00828d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock6.stree.txt @@ -0,0 +1,41 @@ +RazorDocument - [0..19)::19 - [@{ - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..19)::19 + CSharpStatement - [0..19)::19 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..19)::18 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..19)::17 + MarkupBlock - [2..19)::17 + MarkupElement - [2..19)::17 + MarkupStartTag - [2..19)::17 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [5..19)::14 - [ class="btn@@}] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [13..19)::6 + MarkupLiteralAttributeValue - [13..16)::3 - [btn] + MarkupTextLiteral - [13..16)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupBlock - [16..18)::2 + MarkupTextLiteral - [16..17)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupEphemeralTextLiteral - [17..18)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupLiteralAttributeValue - [18..19)::1 - [}] + MarkupTextLiteral - [18..19)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + CloseAngle;[]; + RazorMetaCode - [19..19)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock7.cspans.txt new file mode 100644 index 0000000000..f1e91016d8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock7.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [18] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [18] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [18] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [16] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [16] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [16] ) +Markup span at (5:0,5 [8] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [12] ) +Markup span at (13:0,13 [3] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [12] ) +Markup span at (16:0,16 [1] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [12] ) +Markup span at (17:0,17 [1] ) (Accepts:Any) - Parent: Markup block at (17:0,17 [1] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock7.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock7.diag.txt new file mode 100644 index 0000000000..7f76f09dfe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock7.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1024: End of file or an unexpected character was reached before the "!p" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                        ") or have matching end tags ("

                        Hello

                        "). If you intended to display a "<" character, use the "<" HTML entity. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock7.stree.txt new file mode 100644 index 0000000000..c2ce0b5aa3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock7.stree.txt @@ -0,0 +1,38 @@ +RazorDocument - [0..18)::18 - [@{ - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..18)::18 + CSharpStatement - [0..18)::18 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..18)::17 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..18)::16 + MarkupBlock - [2..18)::16 + MarkupElement - [2..18)::16 + MarkupStartTag - [2..18)::16 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [5..17)::12 - [ class="btn"] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [13..16)::3 + MarkupLiteralAttributeValue - [13..16)::3 - [btn] + MarkupTextLiteral - [13..16)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [16..17)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMinimizedAttributeBlock - [17..18)::1 - [}] + MarkupTextLiteral - [17..18)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + CloseAngle;[]; + RazorMetaCode - [18..18)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock8.cspans.txt new file mode 100644 index 0000000000..a5183e69ea --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock8.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [18] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [18] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [18] ) +Markup span at (5:0,5 [8] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [12] ) +Markup span at (13:0,13 [3] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [12] ) +Markup span at (16:0,16 [1] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [12] ) +Markup span at (17:0,17 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [18] ) +Markup span at (19:0,19 [1] ) (Accepts:Any) - Parent: Markup block at (19:0,19 [1] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock8.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock8.diag.txt new file mode 100644 index 0000000000..7f76f09dfe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock8.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1024: End of file or an unexpected character was reached before the "!p" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                        ") or have matching end tags ("

                        Hello

                        "). If you intended to display a "<" character, use the "<" HTML entity. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock8.stree.txt new file mode 100644 index 0000000000..a2cbc80690 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteHTMLInCSharpBlock8.stree.txt @@ -0,0 +1,44 @@ +RazorDocument - [0..20)::20 - [@{ - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..20)::20 + CSharpStatement - [0..20)::20 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..20)::19 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..20)::18 + MarkupBlock - [2..20)::18 + MarkupElement - [2..20)::18 + MarkupStartTag - [2..20)::18 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [5..17)::12 - [ class="btn"] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [13..16)::3 + MarkupLiteralAttributeValue - [13..16)::3 - [btn] + MarkupTextLiteral - [13..16)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [16..17)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [17..18)::1 + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupMiscAttributeContent - [18..19)::1 + MarkupTextLiteral - [18..19)::1 - [/] - Gen - SpanEditHandler;Accepts:Any + ForwardSlash;[/]; + MarkupMinimizedAttributeBlock - [19..20)::1 - [}] + MarkupTextLiteral - [19..20)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + CloseAngle;[]; + RazorMetaCode - [20..20)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock1.cspans.txt new file mode 100644 index 0000000000..f4f4680be7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock1.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [9] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [9] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [9] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [7] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [7] ) +Markup span at (4:0,4 [5] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock1.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock1.diag.txt new file mode 100644 index 0000000000..c9edfe9426 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock1.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1024: End of file or an unexpected character was reached before the "!text}" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                        ") or have matching end tags ("

                        Hello

                        "). If you intended to display a "<" character, use the "<" HTML entity. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock1.stree.txt new file mode 100644 index 0000000000..35c2ab7638 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock1.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..9)::9 - [@{ - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..9)::9 + CSharpStatement - [0..9)::9 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..9)::8 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..9)::7 + MarkupBlock - [2..9)::7 + MarkupElement - [2..9)::7 + MarkupStartTag - [2..9)::7 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[text}]; + CloseAngle;[]; + RazorMetaCode - [9..9)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock2.cspans.txt new file mode 100644 index 0000000000..18195965b2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock2.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [11] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [9] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [9] ) +Markup span at (4:0,4 [6] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [9] ) +Markup span at (10:0,10 [1] ) (Accepts:Any) - Parent: Markup block at (10:0,10 [1] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock2.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock2.diag.txt new file mode 100644 index 0000000000..2edb2cd77e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock2.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1024: End of file or an unexpected character was reached before the "!text" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                        ") or have matching end tags ("

                        Hello

                        "). If you intended to display a "<" character, use the "<" HTML entity. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock2.stree.txt new file mode 100644 index 0000000000..39f47161bc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock2.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..11)::11 - [@{ - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..11)::11 + CSharpStatement - [0..11)::11 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..11)::10 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..11)::9 + MarkupBlock - [2..11)::9 + MarkupElement - [2..11)::9 + MarkupStartTag - [2..11)::9 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[text]; + MarkupMiscAttributeContent - [8..9)::1 + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupMiscAttributeContent - [9..10)::1 + MarkupTextLiteral - [9..10)::1 - [/] - Gen - SpanEditHandler;Accepts:Any + ForwardSlash;[/]; + MarkupMinimizedAttributeBlock - [10..11)::1 - [}] + MarkupTextLiteral - [10..11)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + CloseAngle;[]; + RazorMetaCode - [11..11)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock3.cspans.txt new file mode 100644 index 0000000000..0e8da83799 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock3.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [16] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [16] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [14] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [14] ) +Markup span at (4:0,4 [4] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [14] ) +Markup span at (8:0,8 [7] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [8] ) +Markup span at (15:0,15 [1] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [8] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock3.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock3.diag.txt new file mode 100644 index 0000000000..2edb2cd77e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock3.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1024: End of file or an unexpected character was reached before the "!text" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                        ") or have matching end tags ("

                        Hello

                        "). If you intended to display a "<" character, use the "<" HTML entity. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock3.stree.txt new file mode 100644 index 0000000000..dca3d187b9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock3.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..16)::16 - [@{ - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..16)::16 + CSharpStatement - [0..16)::16 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..16)::15 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..16)::14 + MarkupBlock - [2..16)::14 + MarkupElement - [2..16)::14 + MarkupStartTag - [2..16)::14 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[text]; + MarkupAttributeBlock - [8..16)::8 - [ class=}] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..14)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + GenericBlock - [15..16)::1 + MarkupLiteralAttributeValue - [15..16)::1 - [}] + MarkupTextLiteral - [15..16)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + CloseAngle;[]; + RazorMetaCode - [16..16)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock4.cspans.txt new file mode 100644 index 0000000000..c8e364dcaf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock4.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [20] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [20] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [18] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [18] ) +Markup span at (4:0,4 [4] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [18] ) +Markup span at (8:0,8 [8] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) +Markup span at (16:0,16 [4] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock4.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock4.diag.txt new file mode 100644 index 0000000000..2edb2cd77e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock4.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1024: End of file or an unexpected character was reached before the "!text" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                        ") or have matching end tags ("

                        Hello

                        "). If you intended to display a "<" character, use the "<" HTML entity. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock4.stree.txt new file mode 100644 index 0000000000..9b3b552c08 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock4.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..20)::20 - [@{ - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..20)::20 + CSharpStatement - [0..20)::20 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..20)::19 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..20)::18 + MarkupBlock - [2..20)::18 + MarkupElement - [2..20)::18 + MarkupStartTag - [2..20)::18 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[text]; + MarkupAttributeBlock - [8..20)::12 - [ class="btn}] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..14)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [16..20)::4 + MarkupLiteralAttributeValue - [16..20)::4 - [btn}] + MarkupTextLiteral - [16..20)::4 - [btn}] - Gen - SpanEditHandler;Accepts:Any + Text;[btn}]; + CloseAngle;[]; + RazorMetaCode - [20..20)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock5.cspans.txt new file mode 100644 index 0000000000..e0c99a858b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock5.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [21] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [21] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [19] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [19] ) +Markup span at (4:0,4 [4] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [19] ) +Markup span at (8:0,8 [8] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) +Markup span at (16:0,16 [3] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) +Markup span at (19:0,19 [1] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) +Markup span at (20:0,20 [1] ) (Accepts:Any) - Parent: Markup block at (20:0,20 [1] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock5.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock5.diag.txt new file mode 100644 index 0000000000..2edb2cd77e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock5.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1024: End of file or an unexpected character was reached before the "!text" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                        ") or have matching end tags ("

                        Hello

                        "). If you intended to display a "<" character, use the "<" HTML entity. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock5.stree.txt new file mode 100644 index 0000000000..d09a1c8d3d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock5.stree.txt @@ -0,0 +1,38 @@ +RazorDocument - [0..21)::21 - [@{ - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..21)::21 + CSharpStatement - [0..21)::21 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..21)::20 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..21)::19 + MarkupBlock - [2..21)::19 + MarkupElement - [2..21)::19 + MarkupStartTag - [2..21)::19 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[text]; + MarkupAttributeBlock - [8..20)::12 - [ class="btn"] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..14)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [16..19)::3 + MarkupLiteralAttributeValue - [16..19)::3 - [btn] + MarkupTextLiteral - [16..19)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [19..20)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMinimizedAttributeBlock - [20..21)::1 - [}] + MarkupTextLiteral - [20..21)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + CloseAngle;[]; + RazorMetaCode - [21..21)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock6.cspans.txt new file mode 100644 index 0000000000..20509e6706 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock6.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [23] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [23] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [21] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [21] ) +Markup span at (4:0,4 [4] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [21] ) +Markup span at (8:0,8 [8] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) +Markup span at (16:0,16 [3] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) +Markup span at (19:0,19 [1] ) (Accepts:Any) - Parent: Markup block at (8:0,8 [12] ) +Markup span at (20:0,20 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [21] ) +Markup span at (22:0,22 [1] ) (Accepts:Any) - Parent: Markup block at (22:0,22 [1] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock6.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock6.diag.txt new file mode 100644 index 0000000000..2edb2cd77e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock6.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1024: End of file or an unexpected character was reached before the "!text" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("
                        ") or have matching end tags ("

                        Hello

                        "). If you intended to display a "<" character, use the "<" HTML entity. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock6.stree.txt new file mode 100644 index 0000000000..6ac32b74b0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptForIncompleteTextTagInCSharpBlock6.stree.txt @@ -0,0 +1,44 @@ +RazorDocument - [0..23)::23 - [@{ - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..23)::23 + CSharpStatement - [0..23)::23 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..23)::22 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..23)::21 + MarkupBlock - [2..23)::21 + MarkupElement - [2..23)::21 + MarkupStartTag - [2..23)::21 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[text]; + MarkupAttributeBlock - [8..20)::12 - [ class="btn"] + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [9..14)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [16..19)::3 + MarkupLiteralAttributeValue - [16..19)::3 - [btn] + MarkupTextLiteral - [16..19)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [19..20)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [20..21)::1 + MarkupTextLiteral - [20..21)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupMiscAttributeContent - [21..22)::1 + MarkupTextLiteral - [21..22)::1 - [/] - Gen - SpanEditHandler;Accepts:Any + ForwardSlash;[/]; + MarkupMinimizedAttributeBlock - [22..23)::1 - [}] + MarkupTextLiteral - [22..23)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + CloseAngle;[]; + RazorMetaCode - [23..23)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData1.cspans.txt new file mode 100644 index 0000000000..e4c8d0d243 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData1.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [16] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [16] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [16] ) +Markup span at (5:0,5 [8] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [12] ) +Markup span at (13:0,13 [3] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [12] ) +Markup span at (16:0,16 [1] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [12] ) +Markup span at (17:0,17 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [16] ) +Markup span at (18:0,18 [1] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData1.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData1.diag.txt new file mode 100644 index 0000000000..d208c6a957 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData1.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1025: The "!p" element was not closed. All elements must be either self-closing or have a matching end tag. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData1.stree.txt new file mode 100644 index 0000000000..8b490e6137 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData1.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..19)::19 - [@{}] + MarkupBlock - [0..19)::19 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..19)::19 + CSharpStatement - [0..19)::19 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..19)::18 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..19)::17 + MarkupBlock - [2..19)::17 + MarkupElement - [2..19)::17 + MarkupStartTag - [2..18)::16 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [5..17)::12 - [ class="btn"] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [13..16)::3 + MarkupLiteralAttributeValue - [13..16)::3 - [btn] + MarkupTextLiteral - [13..16)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [16..17)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [18..19)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + RazorMetaCode - [19..19)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData2.cspans.txt new file mode 100644 index 0000000000..cf364bf3b2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData2.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [16] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [16] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [16] ) +Markup span at (5:0,5 [8] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [12] ) +Markup span at (13:0,13 [3] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [12] ) +Markup span at (16:0,16 [1] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [12] ) +Markup span at (17:0,17 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [16] ) +Markup span at (18:0,18 [2] ) (Accepts:Any) - Parent: Tag block at (18:0,18 [5] ) +MetaCode span at (20:0,20 [1] ) (Accepts:None) - Parent: Tag block at (18:0,18 [5] ) +Markup span at (21:0,21 [2] ) (Accepts:None) - Parent: Tag block at (18:0,18 [5] ) +Code span at (23:0,23 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [24] ) +MetaCode span at (23:0,23 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [24] ) +Markup span at (24:0,24 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData2.stree.txt new file mode 100644 index 0000000000..02a7efb7f0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData2.stree.txt @@ -0,0 +1,45 @@ +RazorDocument - [0..24)::24 - [@{}] + MarkupBlock - [0..24)::24 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..24)::24 + CSharpStatement - [0..24)::24 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..24)::23 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..23)::21 + MarkupBlock - [2..23)::21 + MarkupElement - [2..23)::21 + MarkupStartTag - [2..18)::16 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [5..17)::12 - [ class="btn"] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [13..16)::3 + MarkupLiteralAttributeValue - [13..16)::3 - [btn] + MarkupTextLiteral - [13..16)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [16..17)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupEndTag - [18..23)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [23..23)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [23..24)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [24..24)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData3.cspans.txt new file mode 100644 index 0000000000..60b9da83b0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData3.cspans.txt @@ -0,0 +1,17 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [41] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [41] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [41] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [16] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [16] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [16] ) +Markup span at (5:0,5 [8] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [12] ) +Markup span at (13:0,13 [3] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [12] ) +Markup span at (16:0,16 [1] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [12] ) +Markup span at (17:0,17 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [16] ) +Markup span at (18:0,18 [17] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [38] ) +Markup span at (35:0,35 [2] ) (Accepts:Any) - Parent: Tag block at (35:0,35 [5] ) +MetaCode span at (37:0,37 [1] ) (Accepts:None) - Parent: Tag block at (35:0,35 [5] ) +Markup span at (38:0,38 [2] ) (Accepts:None) - Parent: Tag block at (35:0,35 [5] ) +Code span at (40:0,40 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [41] ) +MetaCode span at (40:0,40 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [41] ) +Markup span at (41:0,41 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [41] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData3.stree.txt new file mode 100644 index 0000000000..7e359df115 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData3.stree.txt @@ -0,0 +1,51 @@ +RazorDocument - [0..41)::41 - [@{words with spaces}] + MarkupBlock - [0..41)::41 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..41)::41 + CSharpStatement - [0..41)::41 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..41)::40 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..40)::38 + MarkupBlock - [2..40)::38 + MarkupElement - [2..40)::38 + MarkupStartTag - [2..18)::16 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [5..17)::12 - [ class="btn"] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [13..16)::3 + MarkupLiteralAttributeValue - [13..16)::3 - [btn] + MarkupTextLiteral - [13..16)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [16..17)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [18..35)::17 - [words with spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[with]; + Whitespace;[ ]; + Text;[spaces]; + MarkupEndTag - [35..40)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [40..40)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [40..41)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [41..41)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData4.cspans.txt new file mode 100644 index 0000000000..f3fec76103 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData4.cspans.txt @@ -0,0 +1,19 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [41] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [41] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [41] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [33] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [33] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [33] ) +Markup span at (5:0,5 [8] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [18] ) +Markup span at (13:0,13 [4] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [18] ) +Markup span at (17:0,17 [5] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [18] ) +Markup span at (22:0,22 [1] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [18] ) +Markup span at (23:0,23 [8] ) (Accepts:Any) - Parent: Markup block at (23:0,23 [11] ) +Markup span at (31:0,31 [3] ) (Accepts:Any) - Parent: Markup block at (23:0,23 [11] ) +Markup span at (34:0,34 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [33] ) +Markup span at (35:0,35 [2] ) (Accepts:Any) - Parent: Tag block at (35:0,35 [5] ) +MetaCode span at (37:0,37 [1] ) (Accepts:None) - Parent: Tag block at (35:0,35 [5] ) +Markup span at (38:0,38 [2] ) (Accepts:None) - Parent: Tag block at (35:0,35 [5] ) +Code span at (40:0,40 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [41] ) +MetaCode span at (40:0,40 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [41] ) +Markup span at (41:0,41 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [41] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData4.stree.txt new file mode 100644 index 0000000000..fdb98b1be0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData4.stree.txt @@ -0,0 +1,60 @@ +RazorDocument - [0..41)::41 - [@{}] + MarkupBlock - [0..41)::41 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..41)::41 + CSharpStatement - [0..41)::41 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..41)::40 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..40)::38 + MarkupBlock - [2..40)::38 + MarkupElement - [2..40)::38 + MarkupStartTag - [2..35)::33 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [5..23)::18 - [ class='btn1 btn2'] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [13..22)::9 + MarkupLiteralAttributeValue - [13..17)::4 - [btn1] + MarkupTextLiteral - [13..17)::4 - [btn1] - Gen - SpanEditHandler;Accepts:Any + Text;[btn1]; + MarkupLiteralAttributeValue - [17..22)::5 - [ btn2] + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [18..22)::4 - [btn2] - Gen - SpanEditHandler;Accepts:Any + Text;[btn2]; + MarkupTextLiteral - [22..23)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [23..34)::11 - [ class2=btn] + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [24..30)::6 - [class2] - Gen - SpanEditHandler;Accepts:Any + Text;[class2]; + Equals;[=]; + GenericBlock - [31..34)::3 + MarkupLiteralAttributeValue - [31..34)::3 - [btn] + MarkupTextLiteral - [31..34)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + CloseAngle;[>]; + MarkupEndTag - [35..40)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [40..40)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [40..41)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [41..41)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData5.cspans.txt new file mode 100644 index 0000000000..a539659df7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData5.cspans.txt @@ -0,0 +1,20 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [44] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [44] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [44] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [36] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [36] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [36] ) +Markup span at (5:0,5 [8] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [32] ) +Markup span at (13:0,13 [4] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [32] ) +Markup span at (17:0,17 [1] ) (Accepts:Any) - Parent: Markup block at (17:0,17 [14] ) +Transition span at (18:0,18 [1] ) (Accepts:None) - Parent: Expression block at (18:0,18 [13] ) +Code span at (19:0,19 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (18:0,18 [13] ) +Markup span at (31:0,31 [5] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [32] ) +Markup span at (36:0,36 [1] ) (Accepts:Any) - Parent: Markup block at (5:0,5 [32] ) +Markup span at (37:0,37 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [36] ) +Markup span at (38:0,38 [2] ) (Accepts:Any) - Parent: Tag block at (38:0,38 [5] ) +MetaCode span at (40:0,40 [1] ) (Accepts:None) - Parent: Tag block at (38:0,38 [5] ) +Markup span at (41:0,41 [2] ) (Accepts:None) - Parent: Tag block at (38:0,38 [5] ) +Code span at (43:0,43 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [44] ) +MetaCode span at (43:0,43 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [44] ) +Markup span at (44:0,44 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [44] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData5.stree.txt new file mode 100644 index 0000000000..4dd069d28c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithAttributeData5.stree.txt @@ -0,0 +1,64 @@ +RazorDocument - [0..44)::44 - [@{}] + MarkupBlock - [0..44)::44 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..44)::44 + CSharpStatement - [0..44)::44 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..44)::43 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..43)::41 + MarkupBlock - [2..43)::41 + MarkupElement - [2..43)::41 + MarkupStartTag - [2..38)::36 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [5..37)::32 - [ class='btn1 @DateTime.Now btn2'] + MarkupTextLiteral - [5..6)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [6..11)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [12..13)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [13..36)::23 + MarkupLiteralAttributeValue - [13..17)::4 - [btn1] + MarkupTextLiteral - [13..17)::4 - [btn1] - Gen - SpanEditHandler;Accepts:Any + Text;[btn1]; + MarkupDynamicAttributeValue - [17..31)::14 - [ @DateTime.Now] + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + GenericBlock - [18..31)::13 + CSharpCodeBlock - [18..31)::13 + CSharpImplicitExpression - [18..31)::13 + CSharpTransition - [18..19)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [19..31)::12 + CSharpCodeBlock - [19..31)::12 + CSharpExpressionLiteral - [19..31)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupLiteralAttributeValue - [31..36)::5 - [ btn2] + MarkupTextLiteral - [31..32)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [32..36)::4 - [btn2] - Gen - SpanEditHandler;Accepts:Any + Text;[btn2]; + MarkupTextLiteral - [36..37)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupEndTag - [38..43)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [43..43)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [43..44)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [44..44)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData1.cspans.txt new file mode 100644 index 0000000000..17ced29a2c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData1.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [7] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [7] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [7] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [4] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [4] ) +Markup span at (4:0,4 [2] ) (Accepts:None) - Parent: Tag block at (2:0,2 [4] ) +Markup span at (6:0,6 [1] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData1.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData1.diag.txt new file mode 100644 index 0000000000..d208c6a957 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData1.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1025: The "!p" element was not closed. All elements must be either self-closing or have a matching end tag. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData1.stree.txt new file mode 100644 index 0000000000..e3f97b1ee0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData1.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..7)::7 - [@{}] + MarkupBlock - [0..7)::7 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..7)::7 + CSharpStatement - [0..7)::7 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..7)::6 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..7)::5 + MarkupBlock - [2..7)::5 + MarkupElement - [2..7)::5 + MarkupStartTag - [2..6)::4 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [6..7)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + RazorMetaCode - [7..7)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData10.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData10.cspans.txt new file mode 100644 index 0000000000..7e92920d2b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData10.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +Markup span at (10:0,10 [2] ) (Accepts:Any) - Parent: Tag block at (10:0,10 [5] ) +MetaCode span at (12:0,12 [1] ) (Accepts:None) - Parent: Tag block at (10:0,10 [5] ) +Markup span at (13:0,13 [2] ) (Accepts:None) - Parent: Tag block at (10:0,10 [5] ) +Markup span at (15:0,15 [9] ) (Accepts:None) - Parent: Tag block at (15:0,15 [9] ) +Code span at (24:0,24 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [25] ) +MetaCode span at (24:0,24 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [25] ) +Markup span at (25:0,25 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData10.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData10.diag.txt new file mode 100644 index 0000000000..fba405aa8b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData10.diag.txt @@ -0,0 +1,4 @@ +(1,4): Error RZ1025: The "strong" element was not closed. All elements must be either self-closing or have a matching end tag. +(1,4): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,18): Error RZ1026: Encountered end tag "strong" with no matching start tag. Are your start/end tags properly balanced? +(1,18): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData10.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData10.stree.txt new file mode 100644 index 0000000000..ac9f4cfbdb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData10.stree.txt @@ -0,0 +1,38 @@ +RazorDocument - [0..25)::25 - [@{}] + MarkupBlock - [0..25)::25 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..25)::25 + CSharpStatement - [0..25)::25 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..25)::24 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..24)::22 + MarkupBlock - [2..15)::13 + MarkupTagHelperElement - [2..15)::13 - strong[StartTagAndEndTag] - strongtaghelper + MarkupTagHelperStartTag - [2..10)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupElement - [10..15)::5 + MarkupEndTag - [10..15)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupBlock - [15..24)::9 + MarkupElement - [15..24)::9 + MarkupEndTag - [15..24)::9 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + CSharpStatementLiteral - [24..24)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [24..25)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [25..25)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData10.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData10.tspans.txt new file mode 100644 index 0000000000..b716a36b7f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData10.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [13] ) - strongtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData11.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData11.cspans.txt new file mode 100644 index 0000000000..a52c9fcb71 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData11.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +Markup span at (19:0,19 [1] ) (Accepts:Any) - Parent: Tag block at (19:0,19 [4] ) +MetaCode span at (20:0,20 [1] ) (Accepts:None) - Parent: Tag block at (19:0,19 [4] ) +Markup span at (21:0,21 [2] ) (Accepts:None) - Parent: Tag block at (19:0,19 [4] ) +Markup span at (23:0,23 [2] ) (Accepts:Any) - Parent: Tag block at (23:0,23 [5] ) +MetaCode span at (25:0,25 [1] ) (Accepts:None) - Parent: Tag block at (23:0,23 [5] ) +Markup span at (26:0,26 [2] ) (Accepts:None) - Parent: Tag block at (23:0,23 [5] ) +Code span at (28:0,28 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [29] ) +MetaCode span at (28:0,28 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [29] ) +Markup span at (29:0,29 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData11.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData11.stree.txt new file mode 100644 index 0000000000..c671926a25 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData11.stree.txt @@ -0,0 +1,42 @@ +RazorDocument - [0..29)::29 - [@{}] + MarkupBlock - [0..29)::29 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..29)::29 + CSharpStatement - [0..29)::29 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..29)::28 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..28)::26 + MarkupBlock - [2..19)::17 + MarkupTagHelperElement - [2..19)::17 - strong[StartTagAndEndTag] - strongtaghelper + MarkupTagHelperStartTag - [2..10)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [10..19)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupBlock - [19..28)::9 + MarkupElement - [19..28)::9 + MarkupStartTag - [19..23)::4 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [23..28)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [28..28)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [28..29)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [29..29)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData11.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData11.tspans.txt new file mode 100644 index 0000000000..92502ed333 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData11.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [17] ) - strongtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData12.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData12.cspans.txt new file mode 100644 index 0000000000..54f4240fc7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData12.cspans.txt @@ -0,0 +1,16 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +Markup span at (13:0,13 [2] ) (Accepts:Any) - Parent: Tag block at (13:0,13 [10] ) +MetaCode span at (15:0,15 [1] ) (Accepts:None) - Parent: Tag block at (13:0,13 [10] ) +Markup span at (16:0,16 [7] ) (Accepts:None) - Parent: Tag block at (13:0,13 [10] ) +Markup span at (23:0,23 [1] ) (Accepts:Any) - Parent: Tag block at (23:0,23 [4] ) +MetaCode span at (24:0,24 [1] ) (Accepts:None) - Parent: Tag block at (23:0,23 [4] ) +Markup span at (25:0,25 [2] ) (Accepts:None) - Parent: Tag block at (23:0,23 [4] ) +Markup span at (27:0,27 [9] ) (Accepts:None) - Parent: Tag block at (27:0,27 [9] ) +Markup span at (36:0,36 [2] ) (Accepts:Any) - Parent: Tag block at (36:0,36 [5] ) +MetaCode span at (38:0,38 [1] ) (Accepts:None) - Parent: Tag block at (36:0,36 [5] ) +Markup span at (39:0,39 [2] ) (Accepts:None) - Parent: Tag block at (36:0,36 [5] ) +Code span at (41:0,41 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [42] ) +MetaCode span at (41:0,41 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [42] ) +Markup span at (42:0,42 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [42] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData12.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData12.diag.txt new file mode 100644 index 0000000000..689fbedb41 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData12.diag.txt @@ -0,0 +1,6 @@ +(1,4): Error RZ1025: The "p" element was not closed. All elements must be either self-closing or have a matching end tag. +(1,4): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,7): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,25): Error RZ1025: The "!p" element was not closed. All elements must be either self-closing or have a matching end tag. +(1,30): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,39): Error RZ1026: Encountered end tag "!p" with no matching start tag. Are your start/end tags properly balanced? diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData12.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData12.stree.txt new file mode 100644 index 0000000000..f727a4a496 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData12.stree.txt @@ -0,0 +1,57 @@ +RazorDocument - [0..42)::42 - [@{

                        }] + MarkupBlock - [0..42)::42 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..42)::42 + CSharpStatement - [0..42)::42 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..42)::41 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..41)::39 + MarkupBlock - [2..23)::21 + MarkupTagHelperElement - [2..23)::21 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [2..5)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [5..23)::18 - strong[StartTagAndEndTag] - strongtaghelper + MarkupTagHelperStartTag - [5..13)::8 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupElement - [13..23)::10 + MarkupEndTag - [13..23)::10 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[strong]; + CloseAngle;[>]; + MarkupBlock - [23..36)::13 + MarkupElement - [23..36)::13 + MarkupStartTag - [23..27)::4 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [27..36)::9 + MarkupEndTag - [27..36)::9 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupBlock - [36..41)::5 + MarkupElement - [36..41)::5 + MarkupEndTag - [36..41)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [41..41)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [41..42)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [42..42)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData12.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData12.tspans.txt new file mode 100644 index 0000000000..0357429d3d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData12.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (2:0,2 [21] ) - ptaghelper +TagHelper span at (5:0,5 [18] ) - strongtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData2.cspans.txt new file mode 100644 index 0000000000..5841f5eb8b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData2.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [8] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [8] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [8] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [5] ) +MetaCode span at (4:0,4 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Markup span at (5:0,5 [2] ) (Accepts:None) - Parent: Tag block at (2:0,2 [5] ) +Code span at (7:0,7 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [8] ) +MetaCode span at (7:0,7 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [8] ) +Markup span at (8:0,8 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [8] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData2.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData2.diag.txt new file mode 100644 index 0000000000..16ad86d5a6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData2.diag.txt @@ -0,0 +1 @@ +(1,5): Error RZ1026: Encountered end tag "!p" with no matching start tag. Are your start/end tags properly balanced? diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData2.stree.txt new file mode 100644 index 0000000000..5115d2c63a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData2.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..8)::8 - [@{}] + MarkupBlock - [0..8)::8 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..8)::8 + CSharpStatement - [0..8)::8 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..8)::7 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..7)::5 + MarkupBlock - [2..7)::5 + MarkupElement - [2..7)::5 + MarkupEndTag - [2..7)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [7..7)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [7..8)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [8..8)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData3.cspans.txt new file mode 100644 index 0000000000..87859bb82c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData3.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [12] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [12] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [12] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [4] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [4] ) +Markup span at (4:0,4 [2] ) (Accepts:None) - Parent: Tag block at (2:0,2 [4] ) +Markup span at (6:0,6 [2] ) (Accepts:Any) - Parent: Tag block at (6:0,6 [5] ) +MetaCode span at (8:0,8 [1] ) (Accepts:None) - Parent: Tag block at (6:0,6 [5] ) +Markup span at (9:0,9 [2] ) (Accepts:None) - Parent: Tag block at (6:0,6 [5] ) +Code span at (11:0,11 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [12] ) +MetaCode span at (11:0,11 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [12] ) +Markup span at (12:0,12 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [12] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData3.stree.txt new file mode 100644 index 0000000000..cf036dfe25 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData3.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..12)::12 - [@{}] + MarkupBlock - [0..12)::12 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..12)::12 + CSharpStatement - [0..12)::12 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..12)::11 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..11)::9 + MarkupBlock - [2..11)::9 + MarkupElement - [2..11)::9 + MarkupStartTag - [2..6)::4 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [6..11)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [11..11)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [11..12)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [12..12)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData4.cspans.txt new file mode 100644 index 0000000000..d09cd360c0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData4.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [28] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [28] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [4] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [4] ) +Markup span at (4:0,4 [2] ) (Accepts:None) - Parent: Tag block at (2:0,2 [4] ) +Markup span at (6:0,6 [16] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [25] ) +Markup span at (22:0,22 [2] ) (Accepts:Any) - Parent: Tag block at (22:0,22 [5] ) +MetaCode span at (24:0,24 [1] ) (Accepts:None) - Parent: Tag block at (22:0,22 [5] ) +Markup span at (25:0,25 [2] ) (Accepts:None) - Parent: Tag block at (22:0,22 [5] ) +Code span at (27:0,27 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [28] ) +MetaCode span at (27:0,27 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [28] ) +Markup span at (28:0,28 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [28] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData4.stree.txt new file mode 100644 index 0000000000..f7e5009478 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData4.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..28)::28 - [@{words and spaces}] + MarkupBlock - [0..28)::28 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..28)::28 + CSharpStatement - [0..28)::28 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..28)::27 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..27)::25 + MarkupBlock - [2..27)::25 + MarkupElement - [2..27)::25 + MarkupStartTag - [2..6)::4 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [6..22)::16 - [words and spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[and]; + Whitespace;[ ]; + Text;[spaces]; + MarkupEndTag - [22..27)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [27..27)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [27..28)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [28..28)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData5.cspans.txt new file mode 100644 index 0000000000..bde99188a2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData5.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [11] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [4] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [4] ) +Markup span at (4:0,4 [2] ) (Accepts:None) - Parent: Tag block at (2:0,2 [4] ) +Markup span at (6:0,6 [4] ) (Accepts:None) - Parent: Tag block at (6:0,6 [4] ) +Code span at (10:0,10 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [11] ) +MetaCode span at (10:0,10 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +Markup span at (11:0,11 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [11] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData5.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData5.diag.txt new file mode 100644 index 0000000000..4e9f9e044a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData5.diag.txt @@ -0,0 +1,2 @@ +(1,4): Error RZ1025: The "!p" element was not closed. All elements must be either self-closing or have a matching end tag. +(1,9): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData5.stree.txt new file mode 100644 index 0000000000..423490c99b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData5.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..11)::11 - [@{

                        }] + MarkupBlock - [0..11)::11 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..11)::11 + CSharpStatement - [0..11)::11 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..11)::10 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..10)::8 + MarkupBlock - [2..10)::8 + MarkupElement - [2..10)::8 + MarkupStartTag - [2..6)::4 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [6..10)::4 + MarkupEndTag - [6..10)::4 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [10..10)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [10..11)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [11..11)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData6.cspans.txt new file mode 100644 index 0000000000..894887f157 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData6.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [11] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +Markup span at (5:0,5 [2] ) (Accepts:Any) - Parent: Tag block at (5:0,5 [5] ) +MetaCode span at (7:0,7 [1] ) (Accepts:None) - Parent: Tag block at (5:0,5 [5] ) +Markup span at (8:0,8 [2] ) (Accepts:None) - Parent: Tag block at (5:0,5 [5] ) +Code span at (10:0,10 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [11] ) +MetaCode span at (10:0,10 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [11] ) +Markup span at (11:0,11 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [11] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData6.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData6.diag.txt new file mode 100644 index 0000000000..9245068ef6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData6.diag.txt @@ -0,0 +1,2 @@ +(1,4): Error RZ1025: The "p" element was not closed. All elements must be either self-closing or have a matching end tag. +(1,4): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData6.stree.txt new file mode 100644 index 0000000000..ac047895b3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData6.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..11)::11 - [@{

                        }] + MarkupBlock - [0..11)::11 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..11)::11 + CSharpStatement - [0..11)::11 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..11)::10 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..10)::8 + MarkupBlock - [2..10)::8 + MarkupTagHelperElement - [2..10)::8 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [2..5)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [5..10)::5 + MarkupEndTag - [5..10)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [10..10)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [10..11)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [11..11)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData6.tspans.txt new file mode 100644 index 0000000000..c896ab151f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData6.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [8] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData7.cspans.txt new file mode 100644 index 0000000000..6e8f3d69b4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData7.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +Markup span at (5:0,5 [1] ) (Accepts:Any) - Parent: Tag block at (5:0,5 [4] ) +MetaCode span at (6:0,6 [1] ) (Accepts:None) - Parent: Tag block at (5:0,5 [4] ) +Markup span at (7:0,7 [2] ) (Accepts:None) - Parent: Tag block at (5:0,5 [4] ) +Markup span at (9:0,9 [2] ) (Accepts:Any) - Parent: Tag block at (9:0,9 [5] ) +MetaCode span at (11:0,11 [1] ) (Accepts:None) - Parent: Tag block at (9:0,9 [5] ) +Markup span at (12:0,12 [2] ) (Accepts:None) - Parent: Tag block at (9:0,9 [5] ) +Code span at (18:0,18 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [19] ) +MetaCode span at (18:0,18 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [19] ) +Markup span at (19:0,19 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData7.stree.txt new file mode 100644 index 0000000000..2320bcb8db --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData7.stree.txt @@ -0,0 +1,41 @@ +RazorDocument - [0..19)::19 - [@{

                        }] + MarkupBlock - [0..19)::19 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..19)::19 + CSharpStatement - [0..19)::19 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..19)::18 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..18)::16 + MarkupBlock - [2..18)::16 + MarkupTagHelperElement - [2..18)::16 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [2..5)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [5..14)::9 + MarkupStartTag - [5..9)::4 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [9..14)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [14..18)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [18..18)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [18..19)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [19..19)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData7.tspans.txt new file mode 100644 index 0000000000..9ac9825e33 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [16] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData8.cspans.txt new file mode 100644 index 0000000000..761b9a637b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData8.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [15] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [15] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [15] ) +Markup span at (5:0,5 [1] ) (Accepts:Any) - Parent: Tag block at (5:0,5 [4] ) +MetaCode span at (6:0,6 [1] ) (Accepts:None) - Parent: Tag block at (5:0,5 [4] ) +Markup span at (7:0,7 [2] ) (Accepts:None) - Parent: Tag block at (5:0,5 [4] ) +Markup span at (9:0,9 [2] ) (Accepts:Any) - Parent: Tag block at (9:0,9 [5] ) +MetaCode span at (11:0,11 [1] ) (Accepts:None) - Parent: Tag block at (9:0,9 [5] ) +Markup span at (12:0,12 [2] ) (Accepts:None) - Parent: Tag block at (9:0,9 [5] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData8.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData8.diag.txt new file mode 100644 index 0000000000..0ef166cfd0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData8.diag.txt @@ -0,0 +1,3 @@ +(1,2): Error RZ1006: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. +(1,4): Error RZ1025: The "p" element was not closed. All elements must be either self-closing or have a matching end tag. +(1,4): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData8.stree.txt new file mode 100644 index 0000000000..ae602bff26 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData8.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..15)::15 - [@{

                        }] + MarkupBlock - [0..15)::15 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..15)::15 + CSharpStatement - [0..15)::15 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..15)::14 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..15)::13 + MarkupBlock - [2..15)::13 + MarkupTagHelperElement - [2..15)::13 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [2..5)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [5..14)::9 + MarkupStartTag - [5..9)::4 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [9..14)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [14..15)::1 - [}] - Gen - SpanEditHandler;Accepts:Any + Text;[}]; + RazorMetaCode - [15..15)::0 - Gen - SpanEditHandler;Accepts:Any + RightBrace;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData8.tspans.txt new file mode 100644 index 0000000000..c2ab529dc8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData8.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (2:0,2 [13] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData9.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData9.cspans.txt new file mode 100644 index 0000000000..3c85657a46 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData9.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [16] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [16] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (2:0,2 [4] ) +MetaCode span at (3:0,3 [1] ) (Accepts:None) - Parent: Tag block at (2:0,2 [4] ) +Markup span at (4:0,4 [2] ) (Accepts:None) - Parent: Tag block at (2:0,2 [4] ) +Markup span at (6:0,6 [2] ) (Accepts:Any) - Parent: Tag block at (6:0,6 [5] ) +MetaCode span at (8:0,8 [1] ) (Accepts:None) - Parent: Tag block at (6:0,6 [5] ) +Markup span at (9:0,9 [2] ) (Accepts:None) - Parent: Tag block at (6:0,6 [5] ) +Markup span at (11:0,11 [4] ) (Accepts:None) - Parent: Tag block at (11:0,11 [4] ) +Code span at (15:0,15 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [16] ) +MetaCode span at (15:0,15 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [16] ) +Markup span at (16:0,16 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [16] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData9.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData9.diag.txt new file mode 100644 index 0000000000..76963aab62 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData9.diag.txt @@ -0,0 +1,2 @@ +(1,14): Error RZ1026: Encountered end tag "p" with no matching start tag. Are your start/end tags properly balanced? +(1,14): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData9.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData9.stree.txt new file mode 100644 index 0000000000..c6f74a99c9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutCSharp_WithBlockData9.stree.txt @@ -0,0 +1,38 @@ +RazorDocument - [0..16)::16 - [@{

                        }] + MarkupBlock - [0..16)::16 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..16)::16 + CSharpStatement - [0..16)::16 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..16)::15 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..15)::13 + MarkupBlock - [2..11)::9 + MarkupElement - [2..11)::9 + MarkupStartTag - [2..6)::4 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [6..11)::5 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupBlock - [11..15)::4 + MarkupElement - [11..15)::4 + MarkupEndTag - [11..15)::4 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [15..15)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [15..16)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [16..16)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData1.cspans.txt new file mode 100644 index 0000000000..db11a2b53b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData1.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [16] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [16] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [16] ) +Markup span at (3:0,3 [8] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [12] ) +Markup span at (11:0,11 [3] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [12] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [12] ) +Markup span at (15:0,15 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [16] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData1.stree.txt new file mode 100644 index 0000000000..caed17da76 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData1.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..16)::16 - [] + MarkupBlock - [0..16)::16 + MarkupElement - [0..16)::16 + MarkupStartTag - [0..16)::16 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [3..15)::12 - [ class="btn"] + MarkupTextLiteral - [3..4)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [4..9)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [10..11)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [11..14)::3 + MarkupLiteralAttributeValue - [11..14)::3 - [btn] + MarkupTextLiteral - [11..14)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [14..15)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData2.cspans.txt new file mode 100644 index 0000000000..f63db8ffa0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData2.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [16] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [16] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [16] ) +Markup span at (3:0,3 [8] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [12] ) +Markup span at (11:0,11 [3] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [12] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [12] ) +Markup span at (15:0,15 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [16] ) +Markup span at (16:0,16 [2] ) (Accepts:Any) - Parent: Tag block at (16:0,16 [5] ) +MetaCode span at (18:0,18 [1] ) (Accepts:None) - Parent: Tag block at (16:0,16 [5] ) +Markup span at (19:0,19 [2] ) (Accepts:Any) - Parent: Tag block at (16:0,16 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData2.stree.txt new file mode 100644 index 0000000000..77641949ad --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData2.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..21)::21 - [] + MarkupBlock - [0..21)::21 + MarkupElement - [0..21)::21 + MarkupStartTag - [0..16)::16 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [3..15)::12 - [ class="btn"] + MarkupTextLiteral - [3..4)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [4..9)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [10..11)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [11..14)::3 + MarkupLiteralAttributeValue - [11..14)::3 - [btn] + MarkupTextLiteral - [11..14)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [14..15)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupEndTag - [16..21)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData3.cspans.txt new file mode 100644 index 0000000000..581430192a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData3.cspans.txt @@ -0,0 +1,11 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [16] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [16] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [16] ) +Markup span at (3:0,3 [8] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [12] ) +Markup span at (11:0,11 [3] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [12] ) +Markup span at (14:0,14 [1] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [12] ) +Markup span at (15:0,15 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [16] ) +Markup span at (16:0,16 [16] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [37] ) +Markup span at (32:0,32 [2] ) (Accepts:Any) - Parent: Tag block at (32:0,32 [5] ) +MetaCode span at (34:0,34 [1] ) (Accepts:None) - Parent: Tag block at (32:0,32 [5] ) +Markup span at (35:0,35 [2] ) (Accepts:Any) - Parent: Tag block at (32:0,32 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData3.stree.txt new file mode 100644 index 0000000000..6128928f8c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData3.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..37)::37 - [words and spaces] + MarkupBlock - [0..37)::37 + MarkupElement - [0..37)::37 + MarkupStartTag - [0..16)::16 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [3..15)::12 - [ class="btn"] + MarkupTextLiteral - [3..4)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [4..9)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [10..11)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [11..14)::3 + MarkupLiteralAttributeValue - [11..14)::3 - [btn] + MarkupTextLiteral - [11..14)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [14..15)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [16..32)::16 - [words and spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[and]; + Whitespace;[ ]; + Text;[spaces]; + MarkupEndTag - [32..37)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData4.cspans.txt new file mode 100644 index 0000000000..019a92647a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData4.cspans.txt @@ -0,0 +1,13 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [33] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [33] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [33] ) +Markup span at (3:0,3 [8] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [18] ) +Markup span at (11:0,11 [4] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [18] ) +Markup span at (15:0,15 [5] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [18] ) +Markup span at (20:0,20 [1] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [18] ) +Markup span at (21:0,21 [8] ) (Accepts:Any) - Parent: Markup block at (21:0,21 [11] ) +Markup span at (29:0,29 [3] ) (Accepts:Any) - Parent: Markup block at (21:0,21 [11] ) +Markup span at (32:0,32 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [33] ) +Markup span at (33:0,33 [2] ) (Accepts:Any) - Parent: Tag block at (33:0,33 [5] ) +MetaCode span at (35:0,35 [1] ) (Accepts:None) - Parent: Tag block at (33:0,33 [5] ) +Markup span at (36:0,36 [2] ) (Accepts:Any) - Parent: Tag block at (33:0,33 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData4.stree.txt new file mode 100644 index 0000000000..07f0f249d0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData4.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..38)::38 - [] + MarkupBlock - [0..38)::38 + MarkupElement - [0..38)::38 + MarkupStartTag - [0..33)::33 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [3..21)::18 - [ class='btn1 btn2'] + MarkupTextLiteral - [3..4)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [4..9)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [10..11)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [11..20)::9 + MarkupLiteralAttributeValue - [11..15)::4 - [btn1] + MarkupTextLiteral - [11..15)::4 - [btn1] - Gen - SpanEditHandler;Accepts:Any + Text;[btn1]; + MarkupLiteralAttributeValue - [15..20)::5 - [ btn2] + MarkupTextLiteral - [15..16)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [16..20)::4 - [btn2] - Gen - SpanEditHandler;Accepts:Any + Text;[btn2]; + MarkupTextLiteral - [20..21)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + MarkupAttributeBlock - [21..32)::11 - [ class2=btn] + MarkupTextLiteral - [21..22)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [22..28)::6 - [class2] - Gen - SpanEditHandler;Accepts:Any + Text;[class2]; + Equals;[=]; + GenericBlock - [29..32)::3 + MarkupLiteralAttributeValue - [29..32)::3 - [btn] + MarkupTextLiteral - [29..32)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + CloseAngle;[>]; + MarkupEndTag - [33..38)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData5.cspans.txt new file mode 100644 index 0000000000..08163d8b85 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData5.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [36] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [36] ) +Markup span at (2:0,2 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [36] ) +Markup span at (3:0,3 [8] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [32] ) +Markup span at (11:0,11 [4] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [32] ) +Markup span at (15:0,15 [1] ) (Accepts:Any) - Parent: Markup block at (15:0,15 [14] ) +Transition span at (16:0,16 [1] ) (Accepts:None) - Parent: Expression block at (16:0,16 [13] ) +Code span at (17:0,17 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (16:0,16 [13] ) +Markup span at (29:0,29 [5] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [32] ) +Markup span at (34:0,34 [1] ) (Accepts:Any) - Parent: Markup block at (3:0,3 [32] ) +Markup span at (35:0,35 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [36] ) +Markup span at (36:0,36 [2] ) (Accepts:Any) - Parent: Tag block at (36:0,36 [5] ) +MetaCode span at (38:0,38 [1] ) (Accepts:None) - Parent: Tag block at (36:0,36 [5] ) +Markup span at (39:0,39 [2] ) (Accepts:Any) - Parent: Tag block at (36:0,36 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData5.stree.txt new file mode 100644 index 0000000000..5a44b0a363 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithAttributeData5.stree.txt @@ -0,0 +1,47 @@ +RazorDocument - [0..41)::41 - [] + MarkupBlock - [0..41)::41 + MarkupElement - [0..41)::41 + MarkupStartTag - [0..36)::36 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + MarkupAttributeBlock - [3..35)::32 - [ class='btn1 @DateTime.Now btn2'] + MarkupTextLiteral - [3..4)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [4..9)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [10..11)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + GenericBlock - [11..34)::23 + MarkupLiteralAttributeValue - [11..15)::4 - [btn1] + MarkupTextLiteral - [11..15)::4 - [btn1] - Gen - SpanEditHandler;Accepts:Any + Text;[btn1]; + MarkupDynamicAttributeValue - [15..29)::14 - [ @DateTime.Now] + MarkupTextLiteral - [15..16)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + GenericBlock - [16..29)::13 + CSharpCodeBlock - [16..29)::13 + CSharpImplicitExpression - [16..29)::13 + CSharpTransition - [16..17)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [17..29)::12 + CSharpCodeBlock - [17..29)::12 + CSharpExpressionLiteral - [17..29)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupLiteralAttributeValue - [29..34)::5 - [ btn2] + MarkupTextLiteral - [29..30)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [30..34)::4 - [btn2] - Gen - SpanEditHandler;Accepts:Any + Text;[btn2]; + MarkupTextLiteral - [34..35)::1 - ['] - Gen - SpanEditHandler;Accepts:Any + SingleQuote;[']; + CloseAngle;[>]; + MarkupEndTag - [36..41)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData1.cspans.txt new file mode 100644 index 0000000000..a5d0c98f58 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData1.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [4] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [4] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData1.stree.txt new file mode 100644 index 0000000000..f1200dcf89 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData1.stree.txt @@ -0,0 +1,8 @@ +RazorDocument - [0..4)::4 - [] + MarkupBlock - [0..4)::4 + MarkupElement - [0..4)::4 + MarkupStartTag - [0..4)::4 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData10.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData10.cspans.txt new file mode 100644 index 0000000000..7c1acf2f61 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData10.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (8:0,8 [2] ) (Accepts:Any) - Parent: Tag block at (8:0,8 [5] ) +MetaCode span at (10:0,10 [1] ) (Accepts:None) - Parent: Tag block at (8:0,8 [5] ) +Markup span at (11:0,11 [2] ) (Accepts:Any) - Parent: Tag block at (8:0,8 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData10.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData10.stree.txt new file mode 100644 index 0000000000..fcea222085 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData10.stree.txt @@ -0,0 +1,19 @@ +RazorDocument - [0..22)::22 - [] + MarkupBlock - [0..22)::22 + MarkupTagHelperElement - [0..22)::22 - strong[StartTagAndEndTag] - strongtaghelper + MarkupTagHelperStartTag - [0..8)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupElement - [8..13)::5 + MarkupEndTag - [8..13)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [13..22)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData10.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData10.tspans.txt new file mode 100644 index 0000000000..ba6ff19ad3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData10.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [22] ) - strongtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData11.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData11.cspans.txt new file mode 100644 index 0000000000..6ca585931a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData11.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (17:0,17 [1] ) (Accepts:Any) - Parent: Tag block at (17:0,17 [4] ) +MetaCode span at (18:0,18 [1] ) (Accepts:None) - Parent: Tag block at (17:0,17 [4] ) +Markup span at (19:0,19 [2] ) (Accepts:Any) - Parent: Tag block at (17:0,17 [4] ) +Markup span at (21:0,21 [2] ) (Accepts:Any) - Parent: Tag block at (21:0,21 [5] ) +MetaCode span at (23:0,23 [1] ) (Accepts:None) - Parent: Tag block at (21:0,21 [5] ) +Markup span at (24:0,24 [2] ) (Accepts:Any) - Parent: Tag block at (21:0,21 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData11.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData11.stree.txt new file mode 100644 index 0000000000..ceb36af825 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData11.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..26)::26 - [] + MarkupBlock - [0..26)::26 + MarkupTagHelperElement - [0..17)::17 - strong[StartTagAndEndTag] - strongtaghelper + MarkupTagHelperStartTag - [0..8)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [8..17)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupElement - [17..26)::9 + MarkupStartTag - [17..21)::4 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [21..26)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData11.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData11.tspans.txt new file mode 100644 index 0000000000..e9b9c4563b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData11.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [17] ) - strongtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData12.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData12.cspans.txt new file mode 100644 index 0000000000..09633f5839 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData12.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (11:0,11 [2] ) (Accepts:Any) - Parent: Tag block at (11:0,11 [10] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Tag block at (11:0,11 [10] ) +Markup span at (14:0,14 [7] ) (Accepts:Any) - Parent: Tag block at (11:0,11 [10] ) +Markup span at (21:0,21 [1] ) (Accepts:Any) - Parent: Tag block at (21:0,21 [4] ) +MetaCode span at (22:0,22 [1] ) (Accepts:None) - Parent: Tag block at (21:0,21 [4] ) +Markup span at (23:0,23 [2] ) (Accepts:Any) - Parent: Tag block at (21:0,21 [4] ) +Markup span at (34:0,34 [2] ) (Accepts:Any) - Parent: Tag block at (34:0,34 [5] ) +MetaCode span at (36:0,36 [1] ) (Accepts:None) - Parent: Tag block at (34:0,34 [5] ) +Markup span at (37:0,37 [2] ) (Accepts:Any) - Parent: Tag block at (34:0,34 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData12.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData12.diag.txt new file mode 100644 index 0000000000..d177eb6df7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData12.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData12.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData12.stree.txt new file mode 100644 index 0000000000..3d7d4984bc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData12.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..39)::39 - [

                        ] + MarkupBlock - [0..39)::39 + MarkupTagHelperElement - [0..39)::39 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..34)::31 - strong[StartTagAndEndTag] - strongtaghelper + MarkupTagHelperStartTag - [3..11)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupElement - [11..21)::10 + MarkupEndTag - [11..21)::10 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[strong]; + CloseAngle;[>]; + MarkupElement - [21..25)::4 + MarkupStartTag - [21..25)::4 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [25..34)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupElement - [34..39)::5 + MarkupEndTag - [34..39)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData12.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData12.tspans.txt new file mode 100644 index 0000000000..cfe3d3fa3b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData12.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [39] ) - ptaghelper +TagHelper span at (3:0,3 [31] ) - strongtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData2.cspans.txt new file mode 100644 index 0000000000..8fa95e872f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData2.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +MetaCode span at (2:0,2 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (3:0,3 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData2.stree.txt new file mode 100644 index 0000000000..708ea901d7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData2.stree.txt @@ -0,0 +1,9 @@ +RazorDocument - [0..5)::5 - [] + MarkupBlock - [0..5)::5 + MarkupElement - [0..5)::5 + MarkupEndTag - [0..5)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData3.cspans.txt new file mode 100644 index 0000000000..4c275ff050 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData3.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [4] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [4] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [4] ) +Markup span at (4:0,4 [2] ) (Accepts:Any) - Parent: Tag block at (4:0,4 [5] ) +MetaCode span at (6:0,6 [1] ) (Accepts:None) - Parent: Tag block at (4:0,4 [5] ) +Markup span at (7:0,7 [2] ) (Accepts:Any) - Parent: Tag block at (4:0,4 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData3.stree.txt new file mode 100644 index 0000000000..fae760c817 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData3.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..9)::9 - [] + MarkupBlock - [0..9)::9 + MarkupElement - [0..9)::9 + MarkupStartTag - [0..4)::4 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [4..9)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData4.cspans.txt new file mode 100644 index 0000000000..3997b127d2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData4.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [4] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [4] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [4] ) +Markup span at (4:0,4 [16] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [25] ) +Markup span at (20:0,20 [2] ) (Accepts:Any) - Parent: Tag block at (20:0,20 [5] ) +MetaCode span at (22:0,22 [1] ) (Accepts:None) - Parent: Tag block at (20:0,20 [5] ) +Markup span at (23:0,23 [2] ) (Accepts:Any) - Parent: Tag block at (20:0,20 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData4.stree.txt new file mode 100644 index 0000000000..1f1d9262f9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData4.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..25)::25 - [words and spaces] + MarkupBlock - [0..25)::25 + MarkupElement - [0..25)::25 + MarkupStartTag - [0..4)::4 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [4..20)::16 - [words and spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[and]; + Whitespace;[ ]; + Text;[spaces]; + MarkupEndTag - [20..25)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData5.cspans.txt new file mode 100644 index 0000000000..ccea3d9b24 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData5.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [4] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [4] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [4] ) +Markup span at (4:0,4 [4] ) (Accepts:Any) - Parent: Tag block at (4:0,4 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData5.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData5.diag.txt new file mode 100644 index 0000000000..b1d7d8700f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData5.diag.txt @@ -0,0 +1 @@ +(1,7): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData5.stree.txt new file mode 100644 index 0000000000..cdd918aa0b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData5.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..8)::8 - [

                        ] + MarkupBlock - [0..8)::8 + MarkupElement - [0..8)::8 + MarkupStartTag - [0..4)::4 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [4..8)::4 + MarkupEndTag - [4..8)::4 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData6.cspans.txt new file mode 100644 index 0000000000..d7c40f6239 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData6.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (3:0,3 [2] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [5] ) +MetaCode span at (5:0,5 [1] ) (Accepts:None) - Parent: Tag block at (3:0,3 [5] ) +Markup span at (6:0,6 [2] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData6.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData6.diag.txt new file mode 100644 index 0000000000..d177eb6df7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData6.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData6.stree.txt new file mode 100644 index 0000000000..62b283ee73 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData6.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..8)::8 - [

                        ] + MarkupBlock - [0..8)::8 + MarkupTagHelperElement - [0..8)::8 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [3..8)::5 + MarkupEndTag - [3..8)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData6.tspans.txt new file mode 100644 index 0000000000..7b15d972a8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData6.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [8] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData7.cspans.txt new file mode 100644 index 0000000000..5f18fc72f8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData7.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (3:0,3 [1] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [4] ) +MetaCode span at (4:0,4 [1] ) (Accepts:None) - Parent: Tag block at (3:0,3 [4] ) +Markup span at (5:0,5 [2] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [4] ) +Markup span at (7:0,7 [2] ) (Accepts:Any) - Parent: Tag block at (7:0,7 [5] ) +MetaCode span at (9:0,9 [1] ) (Accepts:None) - Parent: Tag block at (7:0,7 [5] ) +Markup span at (10:0,10 [2] ) (Accepts:Any) - Parent: Tag block at (7:0,7 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData7.stree.txt new file mode 100644 index 0000000000..c59a98b7cf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData7.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..16)::16 - [

                        ] + MarkupBlock - [0..16)::16 + MarkupTagHelperElement - [0..16)::16 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [3..12)::9 + MarkupStartTag - [3..7)::4 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [7..12)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [12..16)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData7.tspans.txt new file mode 100644 index 0000000000..52dba16922 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [16] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData8.cspans.txt new file mode 100644 index 0000000000..5f18fc72f8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData8.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (3:0,3 [1] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [4] ) +MetaCode span at (4:0,4 [1] ) (Accepts:None) - Parent: Tag block at (3:0,3 [4] ) +Markup span at (5:0,5 [2] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [4] ) +Markup span at (7:0,7 [2] ) (Accepts:Any) - Parent: Tag block at (7:0,7 [5] ) +MetaCode span at (9:0,9 [1] ) (Accepts:None) - Parent: Tag block at (7:0,7 [5] ) +Markup span at (10:0,10 [2] ) (Accepts:Any) - Parent: Tag block at (7:0,7 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData8.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData8.diag.txt new file mode 100644 index 0000000000..d177eb6df7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData8.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData8.stree.txt new file mode 100644 index 0000000000..0222b2cb17 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData8.stree.txt @@ -0,0 +1,19 @@ +RazorDocument - [0..12)::12 - [

                        ] + MarkupBlock - [0..12)::12 + MarkupTagHelperElement - [0..12)::12 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [3..12)::9 + MarkupStartTag - [3..7)::4 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [7..12)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData8.tspans.txt new file mode 100644 index 0000000000..7cc635f45e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData8.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [12] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData9.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData9.cspans.txt new file mode 100644 index 0000000000..bd0517f735 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData9.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [4] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Tag block at (0:0,0 [4] ) +Markup span at (2:0,2 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [4] ) +Markup span at (4:0,4 [2] ) (Accepts:Any) - Parent: Tag block at (4:0,4 [5] ) +MetaCode span at (6:0,6 [1] ) (Accepts:None) - Parent: Tag block at (4:0,4 [5] ) +Markup span at (7:0,7 [2] ) (Accepts:Any) - Parent: Tag block at (4:0,4 [5] ) +Markup span at (9:0,9 [4] ) (Accepts:Any) - Parent: Tag block at (9:0,9 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData9.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData9.diag.txt new file mode 100644 index 0000000000..08a69712ee --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData9.diag.txt @@ -0,0 +1 @@ +(1,12): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData9.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData9.stree.txt new file mode 100644 index 0000000000..eca9695a25 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/AllowsTagHelperElementOptOutHTML_WithBlockData9.stree.txt @@ -0,0 +1,20 @@ +RazorDocument - [0..13)::13 - [

                        ] + MarkupBlock - [0..13)::13 + MarkupElement - [0..9)::9 + MarkupStartTag - [0..4)::4 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [4..9)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Bang;[!]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [9..13)::4 + MarkupEndTag - [9..13)::4 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleInvalidChildrenWithWhitespace.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleInvalidChildrenWithWhitespace.cspans.txt new file mode 100644 index 0000000000..6b69df9374 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleInvalidChildrenWithWhitespace.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (3:0,3 [6] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [53] ) +Markup span at (9:1,4 [8] ) (Accepts:Any) - Parent: Tag block at (9:1,4 [8] ) +Markup span at (17:1,12 [21] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [53] ) +Markup span at (38:3,4 [9] ) (Accepts:Any) - Parent: Tag block at (38:3,4 [9] ) +Markup span at (47:3,13 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [53] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleInvalidChildrenWithWhitespace.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleInvalidChildrenWithWhitespace.diag.txt new file mode 100644 index 0000000000..4c1f5923fe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleInvalidChildrenWithWhitespace.diag.txt @@ -0,0 +1 @@ +(2,6): Error RZ2010: The tag is not allowed by parent

                        tag helper. Only child tags with name(s) 'br' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleInvalidChildrenWithWhitespace.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleInvalidChildrenWithWhitespace.stree.txt new file mode 100644 index 0000000000..3a091ff8d7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleInvalidChildrenWithWhitespace.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..53)::53 - [

                        LF LF HelloLF LF

                        ] + MarkupBlock - [0..53)::53 + MarkupTagHelperElement - [0..53)::53 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..9)::6 - [LF ] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + MarkupElement - [9..47)::38 + MarkupStartTag - [9..17)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [17..38)::21 - [LF HelloLF ] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + Whitespace;[ ]; + Text;[Hello]; + NewLine;[LF]; + Whitespace;[ ]; + MarkupEndTag - [38..47)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [47..49)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupTagHelperEndTag - [49..53)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleInvalidChildrenWithWhitespace.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleInvalidChildrenWithWhitespace.tspans.txt new file mode 100644 index 0000000000..05765431e3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleInvalidChildrenWithWhitespace.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [53] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren.cspans.txt new file mode 100644 index 0000000000..a9c65f2e8f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren.cspans.txt @@ -0,0 +1 @@ +Markup span at (11:0,11 [11] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [28] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren.stree.txt new file mode 100644 index 0000000000..c28e528a9f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..39)::39 - [

                        Hello World

                        ] + MarkupBlock - [0..39)::39 + MarkupTagHelperElement - [0..39)::39 - p[StartTagAndEndTag] - PTagHelper1 - PTagHelper2 + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..31)::28 - strong[StartTagAndEndTag] - StrongTagHelper + MarkupTagHelperStartTag - [3..11)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [11..22)::11 - [Hello World] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + MarkupTagHelperEndTag - [22..31)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperElement - [31..35)::4 - br[StartTagOnly] - BRTagHelper + MarkupTagHelperStartTag - [31..35)::4 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [35..39)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren.tspans.txt new file mode 100644 index 0000000000..5b5143529f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren.tspans.txt @@ -0,0 +1,3 @@ +TagHelper span at (0:0,0 [39] ) - PTagHelper1 - PTagHelper2 +TagHelper span at (3:0,3 [28] ) - StrongTagHelper +TagHelper span at (31:0,31 [4] ) - BRTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren_OneNull.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren_OneNull.cspans.txt new file mode 100644 index 0000000000..a9c65f2e8f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren_OneNull.cspans.txt @@ -0,0 +1 @@ +Markup span at (11:0,11 [11] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [28] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren_OneNull.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren_OneNull.stree.txt new file mode 100644 index 0000000000..c28e528a9f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren_OneNull.stree.txt @@ -0,0 +1,31 @@ +RazorDocument - [0..39)::39 - [

                        Hello World

                        ] + MarkupBlock - [0..39)::39 + MarkupTagHelperElement - [0..39)::39 - p[StartTagAndEndTag] - PTagHelper1 - PTagHelper2 + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..31)::28 - strong[StartTagAndEndTag] - StrongTagHelper + MarkupTagHelperStartTag - [3..11)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [11..22)::11 - [Hello World] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + MarkupTagHelperEndTag - [22..31)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperElement - [31..35)::4 - br[StartTagOnly] - BRTagHelper + MarkupTagHelperStartTag - [31..35)::4 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [35..39)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren_OneNull.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren_OneNull.tspans.txt new file mode 100644 index 0000000000..5b5143529f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleMultipleTagHelpersWithAllowedChildren_OneNull.tspans.txt @@ -0,0 +1,3 @@ +TagHelper span at (0:0,0 [39] ) - PTagHelper1 - PTagHelper2 +TagHelper span at (3:0,3 [28] ) - StrongTagHelper +TagHelper span at (31:0,31 [4] ) - BRTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleStartTagOnlyTagTagMode.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleStartTagOnlyTagTagMode.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleStartTagOnlyTagTagMode.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleStartTagOnlyTagTagMode.stree.txt new file mode 100644 index 0000000000..5a61ddfab0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleStartTagOnlyTagTagMode.stree.txt @@ -0,0 +1,7 @@ +RazorDocument - [0..7)::7 - [] + MarkupBlock - [0..7)::7 + MarkupTagHelperElement - [0..7)::7 - input[StartTagOnly] - InputTagHelper + MarkupTagHelperStartTag - [0..7)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleStartTagOnlyTagTagMode.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleStartTagOnlyTagTagMode.tspans.txt new file mode 100644 index 0000000000..507d5a1ed9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CanHandleStartTagOnlyTagTagMode.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [7] ) - InputTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForInconsistentTagStructures.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForInconsistentTagStructures.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForInconsistentTagStructures.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForInconsistentTagStructures.diag.txt new file mode 100644 index 0000000000..6668a36e1c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForInconsistentTagStructures.diag.txt @@ -0,0 +1 @@ +(1,1): Error RZ2011: Tag helpers 'InputTagHelper1' and 'InputTagHelper2' targeting element 'input' must not expect different TagStructure values. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForInconsistentTagStructures.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForInconsistentTagStructures.stree.txt new file mode 100644 index 0000000000..0db5f5e70a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForInconsistentTagStructures.stree.txt @@ -0,0 +1,7 @@ +RazorDocument - [0..7)::7 - [] + MarkupBlock - [0..7)::7 + MarkupTagHelperElement - [0..7)::7 - input[StartTagOnly] - InputTagHelper1 - InputTagHelper2 + MarkupTagHelperStartTag - [0..7)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForInconsistentTagStructures.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForInconsistentTagStructures.tspans.txt new file mode 100644 index 0000000000..aa95134310 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForInconsistentTagStructures.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [7] ) - InputTagHelper1 - InputTagHelper2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForWithoutEndTagTagStructureForEndTags.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForWithoutEndTagTagStructureForEndTags.cspans.txt new file mode 100644 index 0000000000..da5af92309 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForWithoutEndTagTagStructureForEndTags.cspans.txt @@ -0,0 +1 @@ +Markup span at (0:0,0 [8] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [8] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForWithoutEndTagTagStructureForEndTags.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForWithoutEndTagTagStructureForEndTags.diag.txt new file mode 100644 index 0000000000..2991a49bbc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForWithoutEndTagTagStructureForEndTags.diag.txt @@ -0,0 +1 @@ +(1,3): Error RZ1033: Found an end tag () for tag helper 'InputTagHelper' with tag structure that disallows an end tag ('WithoutEndTag'). diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForWithoutEndTagTagStructureForEndTags.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForWithoutEndTagTagStructureForEndTags.stree.txt new file mode 100644 index 0000000000..51d05bcd79 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/CreatesErrorForWithoutEndTagTagStructureForEndTags.stree.txt @@ -0,0 +1,8 @@ +RazorDocument - [0..8)::8 - [] + MarkupBlock - [0..8)::8 + MarkupElement - [0..8)::8 + MarkupEndTag - [0..8)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[input]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers1.cspans.txt new file mode 100644 index 0000000000..cc2e136b18 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers1.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (5:0,5 [4] ) (Accepts:None) - Parent: HtmlComment block at (5:0,5 [20] ) +Markup span at (9:0,9 [13] ) (Accepts:Whitespace) - Parent: HtmlComment block at (5:0,5 [20] ) +Markup span at (22:0,22 [3] ) (Accepts:None) - Parent: HtmlComment block at (5:0,5 [20] ) +Markup span at (25:0,25 [6] ) (Accepts:Any) - Parent: Tag block at (25:0,25 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers1.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers1.diag.txt new file mode 100644 index 0000000000..67536937c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers1.diag.txt @@ -0,0 +1,5 @@ +(0,0): Error RZ3008: Tag helpers cannot target tag name '!--' because it contains a '!' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '?xml' because it contains a '?' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '![CDATA[' because it contains a '!' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '![CDATA[' because it contains a '[' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '!DOCTYPE' because it contains a '!' character. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers1.stree.txt new file mode 100644 index 0000000000..892a5074bd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers1.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..31)::31 - [] + MarkupBlock - [0..31)::31 + MarkupElement - [0..31)::31 + MarkupStartTag - [0..5)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupCommentBlock - [5..25)::20 + MarkupTextLiteral - [5..9)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupEndTag - [25..31)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers2.cspans.txt new file mode 100644 index 0000000000..60e78976ec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers2.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (5:0,5 [4] ) (Accepts:None) - Parent: HtmlComment block at (5:0,5 [13] ) +Markup span at (9:0,9 [1] ) (Accepts:Whitespace) - Parent: HtmlComment block at (5:0,5 [13] ) +Transition span at (10:0,10 [1] ) (Accepts:None) - Parent: Expression block at (10:0,10 [4] ) +Code span at (11:0,11 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (10:0,10 [4] ) +Markup span at (14:0,14 [1] ) (Accepts:Whitespace) - Parent: HtmlComment block at (5:0,5 [13] ) +Markup span at (15:0,15 [3] ) (Accepts:None) - Parent: HtmlComment block at (5:0,5 [13] ) +Markup span at (18:0,18 [6] ) (Accepts:Any) - Parent: Tag block at (18:0,18 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers2.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers2.diag.txt new file mode 100644 index 0000000000..67536937c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers2.diag.txt @@ -0,0 +1,5 @@ +(0,0): Error RZ3008: Tag helpers cannot target tag name '!--' because it contains a '!' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '?xml' because it contains a '?' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '![CDATA[' because it contains a '!' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '![CDATA[' because it contains a '[' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '!DOCTYPE' because it contains a '!' character. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers2.stree.txt new file mode 100644 index 0000000000..1efdfee552 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers2.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..24)::24 - [] + MarkupBlock - [0..24)::24 + MarkupElement - [0..24)::24 + MarkupStartTag - [0..5)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupCommentBlock - [5..18)::13 + MarkupTextLiteral - [5..9)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupEndTag - [18..24)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers3.cspans.txt new file mode 100644 index 0000000000..c4ecccfbcc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers3.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (5:0,5 [20] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) +Markup span at (25:0,25 [6] ) (Accepts:Any) - Parent: Tag block at (25:0,25 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers3.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers3.diag.txt new file mode 100644 index 0000000000..67536937c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers3.diag.txt @@ -0,0 +1,5 @@ +(0,0): Error RZ3008: Tag helpers cannot target tag name '!--' because it contains a '!' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '?xml' because it contains a '?' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '![CDATA[' because it contains a '!' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '![CDATA[' because it contains a '[' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '!DOCTYPE' because it contains a '!' character. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers3.stree.txt new file mode 100644 index 0000000000..3d12db4002 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers3.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..31)::31 - [] + MarkupBlock - [0..31)::31 + MarkupElement - [0..31)::31 + MarkupStartTag - [0..5)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [5..25)::20 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + QuestionMark;[?]; + Text;[xml]; + Whitespace;[ ]; + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + Whitespace;[ ]; + QuestionMark;[?]; + CloseAngle;[>]; + MarkupEndTag - [25..31)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers4.cspans.txt new file mode 100644 index 0000000000..8abca4d638 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers4.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (5:0,5 [6] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) +Transition span at (11:0,11 [1] ) (Accepts:None) - Parent: Expression block at (11:0,11 [4] ) +Code span at (12:0,12 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (11:0,11 [4] ) +Markup span at (15:0,15 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [24] ) +Markup span at (18:0,18 [6] ) (Accepts:Any) - Parent: Tag block at (18:0,18 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers4.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers4.diag.txt new file mode 100644 index 0000000000..67536937c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers4.diag.txt @@ -0,0 +1,5 @@ +(0,0): Error RZ3008: Tag helpers cannot target tag name '!--' because it contains a '!' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '?xml' because it contains a '?' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '![CDATA[' because it contains a '!' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '![CDATA[' because it contains a '[' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '!DOCTYPE' because it contains a '!' character. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers4.stree.txt new file mode 100644 index 0000000000..ac72886d06 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers4.stree.txt @@ -0,0 +1,29 @@ +RazorDocument - [0..24)::24 - [] + MarkupBlock - [0..24)::24 + MarkupElement - [0..24)::24 + MarkupStartTag - [0..5)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [5..11)::6 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + QuestionMark;[?]; + Text;[xml]; + Whitespace;[ ]; + CSharpCodeBlock - [11..15)::4 + CSharpImplicitExpression - [11..15)::4 + CSharpTransition - [11..12)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [12..15)::3 + CSharpCodeBlock - [12..15)::3 + CSharpExpressionLiteral - [12..15)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupTextLiteral - [15..18)::3 - [ ?>] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + QuestionMark;[?]; + CloseAngle;[>]; + MarkupEndTag - [18..24)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers5.cspans.txt new file mode 100644 index 0000000000..a6fb41162b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers5.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (5:0,5 [10] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Transition span at (15:0,15 [1] ) (Accepts:None) - Parent: Expression block at (15:0,15 [4] ) +Code span at (16:0,16 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (15:0,15 [4] ) +Markup span at (19:0,19 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Markup span at (21:0,21 [6] ) (Accepts:Any) - Parent: Tag block at (21:0,21 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers5.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers5.diag.txt new file mode 100644 index 0000000000..67536937c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers5.diag.txt @@ -0,0 +1,5 @@ +(0,0): Error RZ3008: Tag helpers cannot target tag name '!--' because it contains a '!' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '?xml' because it contains a '?' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '![CDATA[' because it contains a '!' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '![CDATA[' because it contains a '[' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '!DOCTYPE' because it contains a '!' character. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers5.stree.txt new file mode 100644 index 0000000000..6dd9386d40 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers5.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..27)::27 - [] + MarkupBlock - [0..27)::27 + MarkupElement - [0..27)::27 + MarkupStartTag - [0..5)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [5..15)::10 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[DOCTYPE]; + Whitespace;[ ]; + CSharpCodeBlock - [15..19)::4 + CSharpImplicitExpression - [15..19)::4 + CSharpTransition - [15..16)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [16..19)::3 + CSharpCodeBlock - [16..19)::3 + CSharpExpressionLiteral - [16..19)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupTextLiteral - [19..21)::2 - [ >] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[>]; + MarkupEndTag - [21..27)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers6.cspans.txt new file mode 100644 index 0000000000..c59f0f1953 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers6.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (5:0,5 [25] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) +Markup span at (30:0,30 [6] ) (Accepts:Any) - Parent: Tag block at (30:0,30 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers6.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers6.diag.txt new file mode 100644 index 0000000000..67536937c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers6.diag.txt @@ -0,0 +1,5 @@ +(0,0): Error RZ3008: Tag helpers cannot target tag name '!--' because it contains a '!' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '?xml' because it contains a '?' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '![CDATA[' because it contains a '!' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '![CDATA[' because it contains a '[' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '!DOCTYPE' because it contains a '!' character. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers6.stree.txt new file mode 100644 index 0000000000..b255eda476 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers6.stree.txt @@ -0,0 +1,24 @@ +RazorDocument - [0..36)::36 - [] + MarkupBlock - [0..36)::36 + MarkupElement - [0..36)::36 + MarkupStartTag - [0..5)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [5..30)::25 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + Text;[DOCTYPE]; + Whitespace;[ ]; + Text;[hello]; + Equals;[=]; + DoubleQuote;["]; + Text;[world]; + DoubleQuote;["]; + Whitespace;[ ]; + CloseAngle;[>]; + MarkupEndTag - [30..36)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers7.cspans.txt new file mode 100644 index 0000000000..c59f0f1953 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers7.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (5:0,5 [25] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [36] ) +Markup span at (30:0,30 [6] ) (Accepts:Any) - Parent: Tag block at (30:0,30 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers7.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers7.diag.txt new file mode 100644 index 0000000000..67536937c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers7.diag.txt @@ -0,0 +1,5 @@ +(0,0): Error RZ3008: Tag helpers cannot target tag name '!--' because it contains a '!' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '?xml' because it contains a '?' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '![CDATA[' because it contains a '!' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '![CDATA[' because it contains a '[' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '!DOCTYPE' because it contains a '!' character. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers7.stree.txt new file mode 100644 index 0000000000..1b43d94ac9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers7.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..36)::36 - [] + MarkupBlock - [0..36)::36 + MarkupElement - [0..36)::36 + MarkupStartTag - [0..5)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [5..30)::25 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + LeftBracket;[[]; + Text;[CDATA]; + LeftBracket;[[]; + Whitespace;[ ]; + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + Whitespace;[ ]; + RightBracket;[]]; + RightBracket;[]]; + CloseAngle;[>]; + MarkupEndTag - [30..36)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers8.cspans.txt new file mode 100644 index 0000000000..4024585ede --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers8.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (5:0,5 [10] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) +Transition span at (15:0,15 [1] ) (Accepts:None) - Parent: Expression block at (15:0,15 [4] ) +Code span at (16:0,16 [3] ) (Accepts:NonWhitespace) - Parent: Expression block at (15:0,15 [4] ) +Markup span at (19:0,19 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [29] ) +Markup span at (23:0,23 [6] ) (Accepts:Any) - Parent: Tag block at (23:0,23 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers8.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers8.diag.txt new file mode 100644 index 0000000000..67536937c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers8.diag.txt @@ -0,0 +1,5 @@ +(0,0): Error RZ3008: Tag helpers cannot target tag name '!--' because it contains a '!' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '?xml' because it contains a '?' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '![CDATA[' because it contains a '!' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '![CDATA[' because it contains a '[' character. +(0,0): Error RZ3008: Tag helpers cannot target tag name '!DOCTYPE' because it contains a '!' character. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers8.stree.txt new file mode 100644 index 0000000000..e9c3a9037e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteSpecialTagTagHelpers8.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..29)::29 - [] + MarkupBlock - [0..29)::29 + MarkupElement - [0..29)::29 + MarkupStartTag - [0..5)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[foo]; + CloseAngle;[>]; + MarkupTextLiteral - [5..15)::10 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Bang;[!]; + LeftBracket;[[]; + Text;[CDATA]; + LeftBracket;[[]; + Whitespace;[ ]; + CSharpCodeBlock - [15..19)::4 + CSharpImplicitExpression - [15..19)::4 + CSharpTransition - [15..16)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [16..19)::3 + CSharpCodeBlock - [16..19)::3 + CSharpExpressionLiteral - [16..19)::3 - [foo] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[foo]; + MarkupTextLiteral - [19..23)::4 - [ ]]>] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + RightBracket;[]]; + RightBracket;[]]; + CloseAngle;[>]; + MarkupEndTag - [23..29)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[foo]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers1.cspans.txt new file mode 100644 index 0000000000..45f2b8a0d2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers1.cspans.txt @@ -0,0 +1 @@ +Markup span at (6:0,6 [11] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [24] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers1.stree.txt new file mode 100644 index 0000000000..543bc32b48 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers1.stree.txt @@ -0,0 +1,16 @@ +RazorDocument - [0..24)::24 - [Hello World] + MarkupBlock - [0..24)::24 + MarkupTagHelperElement - [0..24)::24 - text[StartTagAndEndTag] - texttaghelper + MarkupTagHelperStartTag - [0..6)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [6..17)::11 - [Hello World] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + MarkupTagHelperEndTag - [17..24)::7 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers1.tspans.txt new file mode 100644 index 0000000000..0e0421beb4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [24] ) - texttaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers2.cspans.txt new file mode 100644 index 0000000000..120838d1aa --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers2.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Transition span at (2:0,2 [6] ) (Accepts:None) - Parent: Tag block at (2:0,2 [6] ) +Markup span at (8:0,8 [11] ) (Accepts:Any) - Parent: Markup block at (2:0,2 [24] ) +Transition span at (19:0,19 [7] ) (Accepts:None) - Parent: Tag block at (19:0,19 [7] ) +Code span at (26:0,26 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [27] ) +MetaCode span at (26:0,26 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [27] ) +Markup span at (27:0,27 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [27] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers2.stree.txt new file mode 100644 index 0000000000..30549d1f5a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers2.stree.txt @@ -0,0 +1,33 @@ +RazorDocument - [0..27)::27 - [@{Hello World}] + MarkupBlock - [0..27)::27 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..27)::27 + CSharpStatement - [0..27)::27 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..27)::26 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..26)::24 + MarkupBlock - [2..26)::24 + MarkupElement - [2..26)::24 + MarkupStartTag - [2..8)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [8..19)::11 - [Hello World] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + MarkupEndTag - [19..26)::7 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [26..26)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [26..27)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [27..27)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers3.cspans.txt new file mode 100644 index 0000000000..5422f86fe0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers3.cspans.txt @@ -0,0 +1,9 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Transition span at (2:0,2 [6] ) (Accepts:None) - Parent: Tag block at (2:0,2 [6] ) +Markup span at (11:0,11 [11] ) (Accepts:Any) - Parent: Tag block at (8:0,8 [18] ) +Transition span at (26:0,26 [7] ) (Accepts:None) - Parent: Tag block at (26:0,26 [7] ) +Code span at (33:0,33 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (33:0,33 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (34:0,34 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers3.stree.txt new file mode 100644 index 0000000000..275d4367c4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers3.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..34)::34 - [@{

                        Hello World

                        }] + MarkupBlock - [0..34)::34 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..34)::34 + CSharpStatement - [0..34)::34 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..34)::33 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..33)::31 + MarkupBlock - [2..33)::31 + MarkupElement - [2..33)::31 + MarkupStartTag - [2..8)::6 - MarkupTransition - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTagHelperElement - [8..26)::18 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [8..11)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [11..22)::11 - [Hello World] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + MarkupTagHelperEndTag - [22..26)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [26..33)::7 - MarkupTransition - [
                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + CSharpStatementLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [33..34)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [34..34)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers3.tspans.txt new file mode 100644 index 0000000000..ccb04ff0a4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (8:0,8 [18] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers4.cspans.txt new file mode 100644 index 0000000000..ca3438cacd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers4.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) +Transition span at (0:0,0 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (1:0,1 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (11:0,11 [11] ) (Accepts:Any) - Parent: Tag block at (5:0,5 [24] ) +Code span at (33:0,33 [0] ) (Accepts:Any) - Parent: Statement block at (0:0,0 [34] ) +MetaCode span at (33:0,33 [1] ) (Accepts:None) - Parent: Statement block at (0:0,0 [34] ) +Markup span at (34:0,34 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [34] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers4.stree.txt new file mode 100644 index 0000000000..55d1bc3bc9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers4.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..34)::34 - [@{

                        Hello World

                        }] + MarkupBlock - [0..34)::34 + MarkupTextLiteral - [0..0)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + CSharpCodeBlock - [0..34)::34 + CSharpStatement - [0..34)::34 + CSharpTransition - [0..1)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [1..34)::33 + RazorMetaCode - [1..2)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [2..33)::31 + MarkupBlock - [2..33)::31 + MarkupTagHelperElement - [2..33)::31 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [2..5)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [5..29)::24 - text[StartTagAndEndTag] - texttaghelper + MarkupTagHelperStartTag - [5..11)::6 - [] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + Text;[text]; + CloseAngle;[>]; + MarkupTextLiteral - [11..22)::11 - [Hello World] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + MarkupTagHelperEndTag - [22..29)::7 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[text]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [29..33)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + CSharpStatementLiteral - [33..33)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [33..34)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [34..34)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers4.tspans.txt new file mode 100644 index 0000000000..0e58e331ab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotRewriteTextTagTransitionTagHelpers4.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (2:0,2 [31] ) - ptaghelper +TagHelper span at (5:0,5 [24] ) - texttaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags1.cspans.txt new file mode 100644 index 0000000000..49c8ba186f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags1.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [7] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [13] ) +Markup span at (7:0,7 [5] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [5] ) +Markup span at (12:0,12 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [13] ) +Markup span at (13:0,13 [9] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [31] ) +Markup span at (22:0,22 [9] ) (Accepts:Any) - Parent: Tag block at (22:0,22 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags1.stree.txt new file mode 100644 index 0000000000..e55e0ca85c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags1.stree.txt @@ -0,0 +1,23 @@ +RazorDocument - [0..31)::31 - [] + MarkupBlock - [0..31)::31 + MarkupElement - [0..31)::31 + MarkupStartTag - [0..13)::13 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags2.cspans.txt new file mode 100644 index 0000000000..2c17954aab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags2.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [7] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [26] ) +Markup span at (7:0,7 [8] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [18] ) +Markup span at (15:0,15 [9] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [18] ) +Markup span at (24:0,24 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [18] ) +Markup span at (25:0,25 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [26] ) +Markup span at (26:0,26 [9] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [44] ) +Markup span at (35:0,35 [9] ) (Accepts:Any) - Parent: Tag block at (35:0,35 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags2.stree.txt new file mode 100644 index 0000000000..bf424f1f0b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags2.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..44)::44 - [] + MarkupBlock - [0..44)::44 + MarkupElement - [0..44)::44 + MarkupStartTag - [0..26)::26 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags3.cspans.txt new file mode 100644 index 0000000000..955ace03ef --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags3.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (0:0,0 [7] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [33] ) +Markup span at (7:0,7 [7] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [25] ) +Markup span at (14:0,14 [9] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [25] ) +Markup span at (23:0,23 [8] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [25] ) +Markup span at (31:0,31 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [25] ) +Markup span at (32:0,32 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [33] ) +Markup span at (33:0,33 [9] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [51] ) +Markup span at (42:0,42 [9] ) (Accepts:Any) - Parent: Tag block at (42:0,42 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags3.stree.txt new file mode 100644 index 0000000000..d5505e8178 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags3.stree.txt @@ -0,0 +1,39 @@ +RazorDocument - [0..51)::51 - [] + MarkupBlock - [0..51)::51 + MarkupElement - [0..51)::51 + MarkupStartTag - [0..33)::33 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags4.cspans.txt new file mode 100644 index 0000000000..a41c0eb271 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags4.cspans.txt @@ -0,0 +1,10 @@ +Markup span at (0:0,0 [7] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [42] ) +Markup span at (7:0,7 [7] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [17] ) +Markup span at (14:0,14 [9] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [17] ) +Markup span at (23:0,23 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [17] ) +Markup span at (24:0,24 [7] ) (Accepts:Any) - Parent: Markup block at (24:0,24 [17] ) +Markup span at (31:0,31 [9] ) (Accepts:Any) - Parent: Markup block at (24:0,24 [17] ) +Markup span at (40:0,40 [1] ) (Accepts:Any) - Parent: Markup block at (24:0,24 [17] ) +Markup span at (41:0,41 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [42] ) +Markup span at (42:0,42 [9] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [60] ) +Markup span at (51:0,51 [9] ) (Accepts:Any) - Parent: Tag block at (51:0,51 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags4.stree.txt new file mode 100644 index 0000000000..5102001848 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesNotUnderstandTagHelpersInInvalidHtmlTypedScriptTags4.stree.txt @@ -0,0 +1,50 @@ +RazorDocument - [0..60)::60 - [] + MarkupBlock - [0..60)::60 + MarkupElement - [0..60)::60 + MarkupStartTag - [0..42)::42 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesntAllowSimpleHtmlCommentsAsChildrenWhenFeatureFlagIsOff.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesntAllowSimpleHtmlCommentsAsChildrenWhenFeatureFlagIsOff.cspans.txt new file mode 100644 index 0000000000..9c63d02543 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesntAllowSimpleHtmlCommentsAsChildrenWhenFeatureFlagIsOff.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (3:0,3 [4] ) (Accepts:None) - Parent: HtmlComment block at (3:0,3 [12] ) +Markup span at (7:0,7 [5] ) (Accepts:Whitespace) - Parent: HtmlComment block at (3:0,3 [12] ) +Markup span at (12:0,12 [3] ) (Accepts:None) - Parent: HtmlComment block at (3:0,3 [12] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesntAllowSimpleHtmlCommentsAsChildrenWhenFeatureFlagIsOff.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesntAllowSimpleHtmlCommentsAsChildrenWhenFeatureFlagIsOff.diag.txt new file mode 100644 index 0000000000..79250ce2c8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesntAllowSimpleHtmlCommentsAsChildrenWhenFeatureFlagIsOff.diag.txt @@ -0,0 +1,3 @@ +(1,4): Error RZ2009: The parent

                        tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'b' are allowed. +(1,8): Error RZ2009: The parent

                        tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'b' are allowed. +(1,13): Error RZ2009: The parent

                        tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'b' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesntAllowSimpleHtmlCommentsAsChildrenWhenFeatureFlagIsOff.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesntAllowSimpleHtmlCommentsAsChildrenWhenFeatureFlagIsOff.stree.txt new file mode 100644 index 0000000000..9eda1dc0cb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesntAllowSimpleHtmlCommentsAsChildrenWhenFeatureFlagIsOff.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..19)::19 - [

                        ] + MarkupBlock - [0..19)::19 + MarkupTagHelperElement - [0..19)::19 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupCommentBlock - [3..15)::12 + MarkupTextLiteral - [3..7)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [15..19)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesntAllowSimpleHtmlCommentsAsChildrenWhenFeatureFlagIsOff.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesntAllowSimpleHtmlCommentsAsChildrenWhenFeatureFlagIsOff.tspans.txt new file mode 100644 index 0000000000..8cb202b9d6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/DoesntAllowSimpleHtmlCommentsAsChildrenWhenFeatureFlagIsOff.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [19] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/FailsForContentWithCommentsAsChildren.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/FailsForContentWithCommentsAsChildren.cspans.txt new file mode 100644 index 0000000000..fe9f0e011c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/FailsForContentWithCommentsAsChildren.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (3:0,3 [4] ) (Accepts:None) - Parent: HtmlComment block at (3:0,3 [12] ) +Markup span at (7:0,7 [5] ) (Accepts:Whitespace) - Parent: HtmlComment block at (3:0,3 [12] ) +Markup span at (12:0,12 [3] ) (Accepts:None) - Parent: HtmlComment block at (3:0,3 [12] ) +Markup span at (15:0,15 [4] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [35] ) +Markup span at (19:0,19 [4] ) (Accepts:None) - Parent: HtmlComment block at (19:0,19 [12] ) +Markup span at (23:0,23 [5] ) (Accepts:Whitespace) - Parent: HtmlComment block at (19:0,19 [12] ) +Markup span at (28:0,28 [3] ) (Accepts:None) - Parent: HtmlComment block at (19:0,19 [12] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/FailsForContentWithCommentsAsChildren.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/FailsForContentWithCommentsAsChildren.diag.txt new file mode 100644 index 0000000000..2388259b98 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/FailsForContentWithCommentsAsChildren.diag.txt @@ -0,0 +1 @@ +(1,16): Error RZ2009: The parent

                        tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'b' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/FailsForContentWithCommentsAsChildren.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/FailsForContentWithCommentsAsChildren.stree.txt new file mode 100644 index 0000000000..383b82ba4a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/FailsForContentWithCommentsAsChildren.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..35)::35 - [

                        asdf

                        ] + MarkupBlock - [0..35)::35 + MarkupTagHelperElement - [0..35)::35 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupCommentBlock - [3..15)::12 + MarkupTextLiteral - [3..7)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupTextLiteral - [15..19)::4 - [asdf] - Gen - SpanEditHandler;Accepts:Any + Text;[asdf]; + MarkupCommentBlock - [19..31)::12 + MarkupTextLiteral - [19..23)::4 - [] - Gen - SpanEditHandler;Accepts:None + DoubleHyphen;[--]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [31..35)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/FailsForContentWithCommentsAsChildren.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/FailsForContentWithCommentsAsChildren.tspans.txt new file mode 100644 index 0000000000..548e779815 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/FailsForContentWithCommentsAsChildren.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [35] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesMalformedNestedNonTagHelperTags_Correctly.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesMalformedNestedNonTagHelperTags_Correctly.cspans.txt new file mode 100644 index 0000000000..d99115005b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesMalformedNestedNonTagHelperTags_Correctly.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Transition span at (5:0,5 [1] ) (Accepts:None) - Parent: Statement block at (5:0,5 [9] ) +MetaCode span at (6:0,6 [1] ) (Accepts:None) - Parent: Statement block at (5:0,5 [9] ) +Markup span at (7:0,7 [6] ) (Accepts:None) - Parent: Tag block at (7:0,7 [6] ) +Code span at (13:0,13 [0] ) (Accepts:Any) - Parent: Statement block at (5:0,5 [9] ) +MetaCode span at (13:0,13 [1] ) (Accepts:None) - Parent: Statement block at (5:0,5 [9] ) +Markup span at (14:0,14 [0] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [14] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesMalformedNestedNonTagHelperTags_Correctly.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesMalformedNestedNonTagHelperTags_Correctly.diag.txt new file mode 100644 index 0000000000..2d09355f58 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesMalformedNestedNonTagHelperTags_Correctly.diag.txt @@ -0,0 +1 @@ +(1,10): Error RZ1026: Encountered end tag "div" with no matching start tag. Are your start/end tags properly balanced? diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesMalformedNestedNonTagHelperTags_Correctly.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesMalformedNestedNonTagHelperTags_Correctly.stree.txt new file mode 100644 index 0000000000..798255fcf8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesMalformedNestedNonTagHelperTags_Correctly.stree.txt @@ -0,0 +1,28 @@ +RazorDocument - [0..14)::14 - [
                        @{
                        }] + MarkupBlock - [0..14)::14 + MarkupElement - [0..14)::14 + MarkupStartTag - [0..5)::5 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + CSharpCodeBlock - [5..14)::9 + CSharpStatement - [5..14)::9 + CSharpTransition - [5..6)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpStatementBody - [6..14)::8 + RazorMetaCode - [6..7)::1 - Gen - SpanEditHandler;Accepts:None + LeftBrace;[{]; + CSharpCodeBlock - [7..13)::6 + MarkupBlock - [7..13)::6 + MarkupElement - [7..13)::6 + MarkupEndTag - [7..13)::6 - [
                        ] - Gen - SpanEditHandler;Accepts:None + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + CSharpStatementLiteral - [13..13)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; + RazorMetaCode - [13..14)::1 - Gen - SpanEditHandler;Accepts:None + RightBrace;[}]; + MarkupTextLiteral - [14..14)::0 - [] - Gen - SpanEditHandler;Accepts:Any + Marker;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesNonTagHelperStartAndEndVoidTags_Correctly.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesNonTagHelperStartAndEndVoidTags_Correctly.cspans.txt new file mode 100644 index 0000000000..d7bd4e3d71 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesNonTagHelperStartAndEndVoidTags_Correctly.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (0:0,0 [7] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [7] ) +Markup span at (7:0,7 [3] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [18] ) +Markup span at (10:0,10 [8] ) (Accepts:Any) - Parent: Tag block at (10:0,10 [8] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesNonTagHelperStartAndEndVoidTags_Correctly.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesNonTagHelperStartAndEndVoidTags_Correctly.stree.txt new file mode 100644 index 0000000000..55f62a7731 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/HandlesNonTagHelperStartAndEndVoidTags_Correctly.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..18)::18 - [Foo] + MarkupBlock - [0..18)::18 + MarkupElement - [0..18)::18 + MarkupStartTag - [0..7)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + MarkupTextLiteral - [7..10)::3 - [Foo] - Gen - SpanEditHandler;Accepts:Any + Text;[Foo]; + MarkupEndTag - [10..18)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[input]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/InvalidStructure_UnderstandsTHPrefixAndAllowedChildrenAndRequireParent.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/InvalidStructure_UnderstandsTHPrefixAndAllowedChildrenAndRequireParent.cspans.txt new file mode 100644 index 0000000000..67ad7c62e2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/InvalidStructure_UnderstandsTHPrefixAndAllowedChildrenAndRequireParent.cspans.txt @@ -0,0 +1 @@ +Markup span at (6:0,6 [12] ) (Accepts:Any) - Parent: Tag block at (6:0,6 [12] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/InvalidStructure_UnderstandsTHPrefixAndAllowedChildrenAndRequireParent.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/InvalidStructure_UnderstandsTHPrefixAndAllowedChildrenAndRequireParent.diag.txt new file mode 100644 index 0000000000..28629d2c01 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/InvalidStructure_UnderstandsTHPrefixAndAllowedChildrenAndRequireParent.diag.txt @@ -0,0 +1 @@ +(1,9): Error RZ1034: Found a malformed 'th:strong' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/InvalidStructure_UnderstandsTHPrefixAndAllowedChildrenAndRequireParent.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/InvalidStructure_UnderstandsTHPrefixAndAllowedChildrenAndRequireParent.stree.txt new file mode 100644 index 0000000000..2dded2ecc6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/InvalidStructure_UnderstandsTHPrefixAndAllowedChildrenAndRequireParent.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..25)::25 - [] + MarkupBlock - [0..25)::25 + MarkupTagHelperElement - [0..25)::25 - th:p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..6)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[th:p]; + CloseAngle;[>]; + MarkupElement - [6..18)::12 + MarkupEndTag - [6..18)::12 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[th:strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [18..25)::7 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[th:p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/InvalidStructure_UnderstandsTHPrefixAndAllowedChildrenAndRequireParent.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/InvalidStructure_UnderstandsTHPrefixAndAllowedChildrenAndRequireParent.tspans.txt new file mode 100644 index 0000000000..e3e08d013c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/InvalidStructure_UnderstandsTHPrefixAndAllowedChildrenAndRequireParent.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [25] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.cspans.txt new file mode 100644 index 0000000000..4e29c0cde5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [26] ) +Markup span at (15:0,15 [3] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [3] ) +Markup span at (18:0,18 [4] ) (Accepts:Any) - Parent: Tag block at (18:0,18 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.stree.txt new file mode 100644 index 0000000000..ec8ccca336 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.stree.txt @@ -0,0 +1,36 @@ +RazorDocument - [0..26)::26 - [

                        ] + MarkupBlock - [0..26)::26 + MarkupTagHelperElement - [0..26)::26 - p[StartTagAndEndTag] - pTagHelper + MarkupTagHelperStartTag - [0..15)::15 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupElement - [15..22)::7 + MarkupStartTag - [15..18)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [18..22)::4 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [22..26)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.tspans.txt new file mode 100644 index 0000000000..b037dceaab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [26] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.cspans.txt new file mode 100644 index 0000000000..e59c771002 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (18:0,18 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [113] ) +Markup span at (22:0,22 [8] ) (Accepts:Any) - Parent: Tag block at (22:0,22 [8] ) +Markup span at (30:0,30 [8] ) (Accepts:Any) - Parent: Tag block at (30:0,30 [8] ) +Markup span at (56:0,56 [2] ) (Accepts:Any) - Parent: Tag block at (38:0,38 [48] ) +Markup span at (60:0,60 [8] ) (Accepts:Any) - Parent: Tag block at (60:0,60 [8] ) +Markup span at (68:0,68 [9] ) (Accepts:Any) - Parent: Tag block at (68:0,68 [9] ) +Markup span at (86:0,86 [9] ) (Accepts:Any) - Parent: Tag block at (86:0,86 [9] ) +Markup span at (95:0,95 [9] ) (Accepts:Any) - Parent: Tag block at (95:0,95 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.stree.txt new file mode 100644 index 0000000000..608d1e1450 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.stree.txt @@ -0,0 +1,80 @@ +RazorDocument - [0..113)::113 - [] + MarkupBlock - [0..113)::113 + MarkupTagHelperElement - [0..113)::113 - strong[StartTagAndEndTag] - catchAllTagHelper + MarkupTagHelperStartTag - [0..22)::22 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupTagHelperAttribute - [7..21)::14 - catchAll - DoubleQuotes - Unbound - [ catchAll="hi"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..16)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [17..18)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [18..20)::2 + MarkupLiteralAttributeValue - [18..20)::2 - [hi] + MarkupTextLiteral - [18..20)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [20..21)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupElement - [22..104)::82 + MarkupStartTag - [22..30)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupElement - [30..95)::65 + MarkupStartTag - [30..38)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperElement - [38..86)::48 - strong[StartTagAndEndTag] - catchAllTagHelper + MarkupTagHelperStartTag - [38..60)::22 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupTagHelperAttribute - [45..59)::14 - catchAll - DoubleQuotes - Unbound - [ catchAll="hi"] + MarkupTextLiteral - [45..46)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [46..54)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [55..56)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [56..58)::2 + MarkupLiteralAttributeValue - [56..58)::2 - [hi] + MarkupTextLiteral - [56..58)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [58..59)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupElement - [60..77)::17 + MarkupStartTag - [60..68)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [68..77)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [77..86)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [86..95)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [95..104)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [104..113)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.tspans.txt new file mode 100644 index 0000000000..8ea9fb13a5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [113] ) - catchAllTagHelper +TagHelper span at (38:0,38 [48] ) - catchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.cspans.txt new file mode 100644 index 0000000000..f9e18638d4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (18:0,18 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [48] ) +Markup span at (22:0,22 [8] ) (Accepts:Any) - Parent: Tag block at (22:0,22 [8] ) +Markup span at (30:0,30 [9] ) (Accepts:Any) - Parent: Tag block at (30:0,30 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.stree.txt new file mode 100644 index 0000000000..3e3493b6db --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.stree.txt @@ -0,0 +1,36 @@ +RazorDocument - [0..48)::48 - [] + MarkupBlock - [0..48)::48 + MarkupTagHelperElement - [0..48)::48 - strong[StartTagAndEndTag] - catchAllTagHelper + MarkupTagHelperStartTag - [0..22)::22 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupTagHelperAttribute - [7..21)::14 - catchAll - DoubleQuotes - Unbound - [ catchAll="hi"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..16)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [17..18)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [18..20)::2 + MarkupLiteralAttributeValue - [18..20)::2 - [hi] + MarkupTextLiteral - [18..20)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [20..21)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupElement - [22..39)::17 + MarkupStartTag - [22..30)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [30..39)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [39..48)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.tspans.txt new file mode 100644 index 0000000000..f20c5948bd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [48] ) - catchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.cspans.txt new file mode 100644 index 0000000000..285c8a6c09 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [43] ) +Markup span at (15:0,15 [8] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [8] ) +Markup span at (23:0,23 [3] ) (Accepts:Any) - Parent: Tag block at (23:0,23 [3] ) +Markup span at (26:0,26 [4] ) (Accepts:Any) - Parent: Tag block at (26:0,26 [4] ) +Markup span at (30:0,30 [9] ) (Accepts:Any) - Parent: Tag block at (30:0,30 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.stree.txt new file mode 100644 index 0000000000..29d3350aa5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.stree.txt @@ -0,0 +1,46 @@ +RazorDocument - [0..43)::43 - [

                        ] + MarkupBlock - [0..43)::43 + MarkupTagHelperElement - [0..43)::43 - p[StartTagAndEndTag] - pTagHelper + MarkupTagHelperStartTag - [0..15)::15 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupElement - [15..39)::24 + MarkupStartTag - [15..23)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupElement - [23..30)::7 + MarkupStartTag - [23..26)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [26..30)::4 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [30..39)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [39..43)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.tspans.txt new file mode 100644 index 0000000000..9980ee41c6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [43] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.cspans.txt new file mode 100644 index 0000000000..b1ebc6b375 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (18:0,18 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [55] ) +Markup span at (22:0,22 [3] ) (Accepts:Any) - Parent: Tag block at (22:0,22 [3] ) +Markup span at (25:0,25 [8] ) (Accepts:Any) - Parent: Tag block at (25:0,25 [8] ) +Markup span at (33:0,33 [9] ) (Accepts:Any) - Parent: Tag block at (33:0,33 [9] ) +Markup span at (42:0,42 [4] ) (Accepts:Any) - Parent: Tag block at (42:0,42 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.stree.txt new file mode 100644 index 0000000000..6b86720e7a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.stree.txt @@ -0,0 +1,46 @@ +RazorDocument - [0..55)::55 - [

                        ] + MarkupBlock - [0..55)::55 + MarkupTagHelperElement - [0..55)::55 - strong[StartTagAndEndTag] - catchAllTagHelper + MarkupTagHelperStartTag - [0..22)::22 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupTagHelperAttribute - [7..21)::14 - catchAll - DoubleQuotes - Unbound - [ catchAll="hi"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..16)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [17..18)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [18..20)::2 + MarkupLiteralAttributeValue - [18..20)::2 - [hi] + MarkupTextLiteral - [18..20)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [20..21)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupElement - [22..46)::24 + MarkupStartTag - [22..25)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [25..42)::17 + MarkupStartTag - [25..33)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [33..42)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [42..46)::4 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [46..55)::9 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.tspans.txt new file mode 100644 index 0000000000..14ff8ee19f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [55] ) - catchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.cspans.txt new file mode 100644 index 0000000000..40bebc3bdc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [57] ) +Markup span at (33:0,33 [2] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [38] ) +Markup span at (37:0,37 [3] ) (Accepts:Any) - Parent: Tag block at (37:0,37 [3] ) +Markup span at (40:0,40 [4] ) (Accepts:Any) - Parent: Tag block at (40:0,40 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.stree.txt new file mode 100644 index 0000000000..8405d2eef7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.stree.txt @@ -0,0 +1,60 @@ +RazorDocument - [0..57)::57 - [

                        ] + MarkupBlock - [0..57)::57 + MarkupTagHelperElement - [0..57)::57 - p[StartTagAndEndTag] - pTagHelper + MarkupTagHelperStartTag - [0..15)::15 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTagHelperElement - [15..53)::38 - strong[StartTagAndEndTag] - catchAllTagHelper + MarkupTagHelperStartTag - [15..37)::22 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupTagHelperAttribute - [22..36)::14 - catchAll - DoubleQuotes - Unbound - [ catchAll="hi"] + MarkupTextLiteral - [22..23)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [23..31)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [32..33)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [33..35)::2 + MarkupLiteralAttributeValue - [33..35)::2 - [hi] + MarkupTextLiteral - [33..35)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [35..36)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupElement - [37..44)::7 + MarkupStartTag - [37..40)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [40..44)::4 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [44..53)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [53..57)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.tspans.txt new file mode 100644 index 0000000000..2075b5b276 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [57] ) - pTagHelper +TagHelper span at (15:0,15 [38] ) - catchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.cspans.txt new file mode 100644 index 0000000000..0de746f4eb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (18:0,18 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [67] ) +Markup span at (32:0,32 [3] ) (Accepts:Any) - Parent: Tag block at (22:0,22 [36] ) +Markup span at (37:0,37 [8] ) (Accepts:Any) - Parent: Tag block at (37:0,37 [8] ) +Markup span at (45:0,45 [9] ) (Accepts:Any) - Parent: Tag block at (45:0,45 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.stree.txt new file mode 100644 index 0000000000..23c2e444d6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.stree.txt @@ -0,0 +1,60 @@ +RazorDocument - [0..67)::67 - [

                        ] + MarkupBlock - [0..67)::67 + MarkupTagHelperElement - [0..67)::67 - strong[StartTagAndEndTag] - catchAllTagHelper + MarkupTagHelperStartTag - [0..22)::22 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupTagHelperAttribute - [7..21)::14 - catchAll - DoubleQuotes - Unbound - [ catchAll="hi"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..16)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [17..18)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [18..20)::2 + MarkupLiteralAttributeValue - [18..20)::2 - [hi] + MarkupTextLiteral - [18..20)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [20..21)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTagHelperElement - [22..58)::36 - p[StartTagAndEndTag] - pTagHelper + MarkupTagHelperStartTag - [22..37)::15 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [24..36)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [24..25)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [25..30)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [31..32)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [32..35)::3 + MarkupLiteralAttributeValue - [32..35)::3 - [btn] + MarkupTextLiteral - [32..35)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [35..36)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupElement - [37..54)::17 + MarkupStartTag - [37..45)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [45..54)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [54..58)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [58..67)::9 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.tspans.txt new file mode 100644 index 0000000000..5986b90415 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [67] ) - catchAllTagHelper +TagHelper span at (22:0,22 [36] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.cspans.txt new file mode 100644 index 0000000000..e964e23037 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [45] ) +Markup span at (25:0,25 [3] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [26] ) +Markup span at (30:0,30 [3] ) (Accepts:Any) - Parent: Tag block at (30:0,30 [3] ) +Markup span at (33:0,33 [4] ) (Accepts:Any) - Parent: Tag block at (33:0,33 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.stree.txt new file mode 100644 index 0000000000..dd9fea20e4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.stree.txt @@ -0,0 +1,60 @@ +RazorDocument - [0..45)::45 - [

                        ] + MarkupBlock - [0..45)::45 + MarkupTagHelperElement - [0..45)::45 - p[StartTagAndEndTag] - pTagHelper + MarkupTagHelperStartTag - [0..15)::15 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTagHelperElement - [15..41)::26 - p[StartTagAndEndTag] - pTagHelper + MarkupTagHelperStartTag - [15..30)::15 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [17..29)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [17..18)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [18..23)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [24..25)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [25..28)::3 + MarkupLiteralAttributeValue - [25..28)::3 - [btn] + MarkupTextLiteral - [25..28)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [28..29)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupElement - [30..37)::7 + MarkupStartTag - [30..33)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [33..37)::4 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [37..41)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [41..45)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.tspans.txt new file mode 100644 index 0000000000..cf6b225441 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [45] ) - pTagHelper +TagHelper span at (15:0,15 [26] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.cspans.txt new file mode 100644 index 0000000000..76cf67d320 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (18:0,18 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [79] ) +Markup span at (40:0,40 [2] ) (Accepts:Any) - Parent: Tag block at (22:0,22 [48] ) +Markup span at (44:0,44 [8] ) (Accepts:Any) - Parent: Tag block at (44:0,44 [8] ) +Markup span at (52:0,52 [9] ) (Accepts:Any) - Parent: Tag block at (52:0,52 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.stree.txt new file mode 100644 index 0000000000..21526f8fe0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.stree.txt @@ -0,0 +1,60 @@ +RazorDocument - [0..79)::79 - [] + MarkupBlock - [0..79)::79 + MarkupTagHelperElement - [0..79)::79 - strong[StartTagAndEndTag] - catchAllTagHelper + MarkupTagHelperStartTag - [0..22)::22 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupTagHelperAttribute - [7..21)::14 - catchAll - DoubleQuotes - Unbound - [ catchAll="hi"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..16)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [17..18)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [18..20)::2 + MarkupLiteralAttributeValue - [18..20)::2 - [hi] + MarkupTextLiteral - [18..20)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [20..21)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTagHelperElement - [22..70)::48 - strong[StartTagAndEndTag] - catchAllTagHelper + MarkupTagHelperStartTag - [22..44)::22 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupTagHelperAttribute - [29..43)::14 - catchAll - DoubleQuotes - Unbound - [ catchAll="hi"] + MarkupTextLiteral - [29..30)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [30..38)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [39..40)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [40..42)::2 + MarkupLiteralAttributeValue - [40..42)::2 - [hi] + MarkupTextLiteral - [40..42)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [42..43)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupElement - [44..61)::17 + MarkupStartTag - [44..52)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [52..61)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [61..70)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [70..79)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.tspans.txt new file mode 100644 index 0000000000..fbb7dffddd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [79] ) - catchAllTagHelper +TagHelper span at (22:0,22 [48] ) - catchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.cspans.txt new file mode 100644 index 0000000000..0e3e22141f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [59] ) +Markup span at (15:0,15 [3] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [3] ) +Markup span at (18:0,18 [3] ) (Accepts:Any) - Parent: Tag block at (18:0,18 [3] ) +Markup span at (31:0,31 [3] ) (Accepts:Any) - Parent: Tag block at (21:0,21 [26] ) +Markup span at (36:0,36 [3] ) (Accepts:Any) - Parent: Tag block at (36:0,36 [3] ) +Markup span at (39:0,39 [4] ) (Accepts:Any) - Parent: Tag block at (39:0,39 [4] ) +Markup span at (47:0,47 [4] ) (Accepts:Any) - Parent: Tag block at (47:0,47 [4] ) +Markup span at (51:0,51 [4] ) (Accepts:Any) - Parent: Tag block at (51:0,51 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.stree.txt new file mode 100644 index 0000000000..f15b50d720 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.stree.txt @@ -0,0 +1,80 @@ +RazorDocument - [0..59)::59 - [

                        ] + MarkupBlock - [0..59)::59 + MarkupTagHelperElement - [0..59)::59 - p[StartTagAndEndTag] - pTagHelper + MarkupTagHelperStartTag - [0..15)::15 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupElement - [15..55)::40 + MarkupStartTag - [15..18)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [18..51)::33 + MarkupStartTag - [18..21)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [21..47)::26 - p[StartTagAndEndTag] - pTagHelper + MarkupTagHelperStartTag - [21..36)::15 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [23..35)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [24..29)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [30..31)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [31..34)::3 + MarkupLiteralAttributeValue - [31..34)::3 - [btn] + MarkupTextLiteral - [31..34)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [34..35)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupElement - [36..43)::7 + MarkupStartTag - [36..39)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [39..43)::4 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [43..47)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [47..51)::4 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [51..55)::4 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [55..59)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.tspans.txt new file mode 100644 index 0000000000..86c4e400c1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NestedRequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [59] ) - pTagHelper +TagHelper span at (21:0,21 [26] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NonTagHelperChild_UnderstandsTagHelperPrefixAndAllowedChildren.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NonTagHelperChild_UnderstandsTagHelperPrefixAndAllowedChildren.cspans.txt new file mode 100644 index 0000000000..bdb0fcc428 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NonTagHelperChild_UnderstandsTagHelperPrefixAndAllowedChildren.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (6:0,6 [8] ) (Accepts:Any) - Parent: Tag block at (6:0,6 [8] ) +Markup span at (14:0,14 [9] ) (Accepts:Any) - Parent: Tag block at (14:0,14 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NonTagHelperChild_UnderstandsTagHelperPrefixAndAllowedChildren.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NonTagHelperChild_UnderstandsTagHelperPrefixAndAllowedChildren.stree.txt new file mode 100644 index 0000000000..55159ceffb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NonTagHelperChild_UnderstandsTagHelperPrefixAndAllowedChildren.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..30)::30 - [] + MarkupBlock - [0..30)::30 + MarkupTagHelperElement - [0..30)::30 - th:p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..6)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[th:p]; + CloseAngle;[>]; + MarkupElement - [6..23)::17 + MarkupStartTag - [6..14)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [14..23)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [23..30)::7 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[th:p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NonTagHelperChild_UnderstandsTagHelperPrefixAndAllowedChildren.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NonTagHelperChild_UnderstandsTagHelperPrefixAndAllowedChildren.tspans.txt new file mode 100644 index 0000000000..2e5914e934 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/NonTagHelperChild_UnderstandsTagHelperPrefixAndAllowedChildren.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [30] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RecoversWhenRequiredAttributeMismatchAndRestrictedChildren.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RecoversWhenRequiredAttributeMismatchAndRestrictedChildren.cspans.txt new file mode 100644 index 0000000000..29554cdec9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RecoversWhenRequiredAttributeMismatchAndRestrictedChildren.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (17:0,17 [8] ) (Accepts:Any) - Parent: Tag block at (17:0,17 [8] ) +Markup span at (25:0,25 [9] ) (Accepts:Any) - Parent: Tag block at (25:0,25 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RecoversWhenRequiredAttributeMismatchAndRestrictedChildren.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RecoversWhenRequiredAttributeMismatchAndRestrictedChildren.diag.txt new file mode 100644 index 0000000000..b4a862c68a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RecoversWhenRequiredAttributeMismatchAndRestrictedChildren.diag.txt @@ -0,0 +1 @@ +(1,19): Error RZ2010: The tag is not allowed by parent tag helper. Only child tags with name(s) 'br' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RecoversWhenRequiredAttributeMismatchAndRestrictedChildren.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RecoversWhenRequiredAttributeMismatchAndRestrictedChildren.stree.txt new file mode 100644 index 0000000000..b0a4522426 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RecoversWhenRequiredAttributeMismatchAndRestrictedChildren.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..43)::43 - [] + MarkupBlock - [0..43)::43 + MarkupTagHelperElement - [0..43)::43 - strong[StartTagAndEndTag] - StrongTagHelper + MarkupTagHelperStartTag - [0..17)::17 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupMinimizedTagHelperAttribute - [7..16)::9 - required - Minimized - Unbound - [ required] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..16)::8 - [required] - Gen - SpanEditHandler;Accepts:Any + Text;[required]; + CloseAngle;[>]; + MarkupElement - [17..34)::17 + MarkupStartTag - [17..25)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [25..34)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [34..43)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RecoversWhenRequiredAttributeMismatchAndRestrictedChildren.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RecoversWhenRequiredAttributeMismatchAndRestrictedChildren.tspans.txt new file mode 100644 index 0000000000..43893fed53 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RecoversWhenRequiredAttributeMismatchAndRestrictedChildren.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [43] ) - StrongTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly1.cspans.txt new file mode 100644 index 0000000000..f2fa2a31e2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly1.cspans.txt @@ -0,0 +1 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [2] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly1.stree.txt new file mode 100644 index 0000000000..a530591f30 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly1.stree.txt @@ -0,0 +1,7 @@ +RazorDocument - [0..2)::2 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly10.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly10.cspans.txt new file mode 100644 index 0000000000..2a68a378d2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly10.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (16:0,16 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [35] ) +Markup span at (27:0,27 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [35] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly10.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly10.diag.txt new file mode 100644 index 0000000000..bcf9de93f5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly10.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,35): Error RZ1035: Missing close angle for tag helper 'p'. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly10.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly10.stree.txt new file mode 100644 index 0000000000..ad7c779ccd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly10.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..35)::35 - [

                        - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..19)::17 - notRequired - DoubleQuotes - Unbound - [ notRequired="hi"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..14)::11 - [notRequired] - Gen - SpanEditHandler;Accepts:Any + Text;[notRequired]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [16..18)::2 + MarkupLiteralAttributeValue - [16..18)::2 - [hi] + MarkupTextLiteral - [16..18)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [18..19)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [19..31)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [20..25)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [26..27)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [27..30)::3 + MarkupLiteralAttributeValue - [27..30)::3 - [btn] + MarkupTextLiteral - [27..30)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [30..31)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [31..32)::1 + MarkupTextLiteral - [31..32)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[]; + MarkupTagHelperEndTag - [32..35)::3 - []; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly10.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly10.tspans.txt new file mode 100644 index 0000000000..fcef603dfd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly10.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [35] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly2.cspans.txt new file mode 100644 index 0000000000..864bb27b43 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly2.cspans.txt @@ -0,0 +1 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [14] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly2.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly2.diag.txt new file mode 100644 index 0000000000..b0e5b255ec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly2.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly2.stree.txt new file mode 100644 index 0000000000..090ec992d5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly2.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..14)::14 - [

                        - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly2.tspans.txt new file mode 100644 index 0000000000..22abb2b118 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [14] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly3.cspans.txt new file mode 100644 index 0000000000..5835fa9258 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly3.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (16:0,16 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [31] ) +Markup span at (27:0,27 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [31] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly3.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly3.diag.txt new file mode 100644 index 0000000000..b0e5b255ec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly3.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly3.stree.txt new file mode 100644 index 0000000000..b1f9b84420 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly3.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..31)::31 - [

                        - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..19)::17 - notRequired - DoubleQuotes - Unbound - [ notRequired="hi"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..14)::11 - [notRequired] - Gen - SpanEditHandler;Accepts:Any + Text;[notRequired]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [16..18)::2 + MarkupLiteralAttributeValue - [16..18)::2 - [hi] + MarkupTextLiteral - [16..18)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [18..19)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [19..31)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [20..25)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [26..27)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [27..30)::3 + MarkupLiteralAttributeValue - [27..30)::3 - [btn] + MarkupTextLiteral - [27..30)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [30..31)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly3.tspans.txt new file mode 100644 index 0000000000..ea57174e6d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [31] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly4.cspans.txt new file mode 100644 index 0000000000..811b313443 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly4.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (0:0,0 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [3] ) +Markup span at (3:0,3 [3] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly4.stree.txt new file mode 100644 index 0000000000..f4d112be39 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly4.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..6)::6 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [3..6)::3 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly5.cspans.txt new file mode 100644 index 0000000000..4fcdd1af8c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly5.cspans.txt @@ -0,0 +1 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [18] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly5.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly5.diag.txt new file mode 100644 index 0000000000..d26f4a4078 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly5.diag.txt @@ -0,0 +1 @@ +(1,18): Error RZ1035: Missing close angle for tag helper 'p'. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly5.stree.txt new file mode 100644 index 0000000000..cac3cea9fe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly5.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..18)::18 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [15..18)::3 - []; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly5.tspans.txt new file mode 100644 index 0000000000..26aeee868e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [18] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly6.cspans.txt new file mode 100644 index 0000000000..2a68a378d2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly6.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (16:0,16 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [35] ) +Markup span at (27:0,27 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [35] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly6.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly6.diag.txt new file mode 100644 index 0000000000..fa993c1831 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly6.diag.txt @@ -0,0 +1 @@ +(1,35): Error RZ1035: Missing close angle for tag helper 'p'. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly6.stree.txt new file mode 100644 index 0000000000..b2b9d8c34b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly6.stree.txt @@ -0,0 +1,40 @@ +RazorDocument - [0..35)::35 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..19)::17 - notRequired - DoubleQuotes - Unbound - [ notRequired="hi"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..14)::11 - [notRequired] - Gen - SpanEditHandler;Accepts:Any + Text;[notRequired]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [16..18)::2 + MarkupLiteralAttributeValue - [16..18)::2 - [hi] + MarkupTextLiteral - [16..18)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [18..19)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [19..31)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [20..25)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [26..27)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [27..30)::3 + MarkupLiteralAttributeValue - [27..30)::3 - [btn] + MarkupTextLiteral - [27..30)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [30..31)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [32..35)::3 - []; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly6.tspans.txt new file mode 100644 index 0000000000..fcef603dfd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly6.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [35] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly7.cspans.txt new file mode 100644 index 0000000000..96cb7028ec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly7.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [18] ) +Markup span at (15:0,15 [3] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly7.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly7.diag.txt new file mode 100644 index 0000000000..b0e5b255ec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly7.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly7.stree.txt new file mode 100644 index 0000000000..ffc314935b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly7.stree.txt @@ -0,0 +1,29 @@ +RazorDocument - [0..18)::18 - [

                        ] + MarkupBlock - [0..18)::18 + MarkupTagHelperElement - [0..18)::18 - p[StartTagAndEndTag] - pTagHelper + MarkupTagHelperStartTag - [0..15)::15 - [

                        - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [14..15)::1 + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[]; + MarkupElement - [15..18)::3 + MarkupStartTag - [15..18)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly7.tspans.txt new file mode 100644 index 0000000000..26aeee868e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [18] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8.cspans.txt new file mode 100644 index 0000000000..3ca120d8ab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (16:0,16 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [35] ) +Markup span at (27:0,27 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [35] ) +Markup span at (32:0,32 [3] ) (Accepts:Any) - Parent: Tag block at (32:0,32 [3] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8.diag.txt new file mode 100644 index 0000000000..b0e5b255ec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8.stree.txt new file mode 100644 index 0000000000..95276cdab8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8.stree.txt @@ -0,0 +1,43 @@ +RazorDocument - [0..35)::35 - [

                        ] + MarkupBlock - [0..35)::35 + MarkupTagHelperElement - [0..35)::35 - p[StartTagAndEndTag] - pTagHelper + MarkupTagHelperStartTag - [0..32)::32 - [

                        - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..19)::17 - notRequired - DoubleQuotes - Unbound - [ notRequired="hi"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..14)::11 - [notRequired] - Gen - SpanEditHandler;Accepts:Any + Text;[notRequired]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [16..18)::2 + MarkupLiteralAttributeValue - [16..18)::2 - [hi] + MarkupTextLiteral - [16..18)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [18..19)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [19..31)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [20..25)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [26..27)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [27..30)::3 + MarkupLiteralAttributeValue - [27..30)::3 - [btn] + MarkupTextLiteral - [27..30)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [30..31)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [31..32)::1 + MarkupTextLiteral - [31..32)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[]; + MarkupElement - [32..35)::3 + MarkupStartTag - [32..35)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8.tspans.txt new file mode 100644 index 0000000000..fcef603dfd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly8.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [35] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9.cspans.txt new file mode 100644 index 0000000000..4fcdd1af8c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9.cspans.txt @@ -0,0 +1 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [18] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9.diag.txt new file mode 100644 index 0000000000..ad599e94e5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1035: Missing close angle for tag helper 'p'. +(1,18): Error RZ1035: Missing close angle for tag helper 'p'. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9.stree.txt new file mode 100644 index 0000000000..2f0937fa9e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9.stree.txt @@ -0,0 +1,29 @@ +RazorDocument - [0..18)::18 - [

                        - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [14..15)::1 + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[]; + MarkupTagHelperEndTag - [15..18)::3 - []; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9.tspans.txt new file mode 100644 index 0000000000..26aeee868e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateMalformedTagHelperBlocksCorrectly9.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [18] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.cspans.txt new file mode 100644 index 0000000000..c559127169 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.cspans.txt @@ -0,0 +1 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.stree.txt new file mode 100644 index 0000000000..054b8b4abb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly1.stree.txt @@ -0,0 +1,11 @@ +RazorDocument - [0..5)::5 - [

                        ] + MarkupBlock - [0..5)::5 + MarkupElement - [0..5)::5 + MarkupStartTag - [0..5)::5 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupMiscAttributeContent - [2..3)::1 + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.cspans.txt new file mode 100644 index 0000000000..ce7d4197ff --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.cspans.txt @@ -0,0 +1 @@ +Markup span at (18:0,18 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [24] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.stree.txt new file mode 100644 index 0000000000..fe16ad6ab9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..24)::24 - [] + MarkupBlock - [0..24)::24 + MarkupTagHelperElement - [0..24)::24 - strong[SelfClosing] - catchAllTagHelper + MarkupTagHelperStartTag - [0..24)::24 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupTagHelperAttribute - [7..21)::14 - catchAll - DoubleQuotes - Unbound - [ catchAll="hi"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..16)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [17..18)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [18..20)::2 + MarkupLiteralAttributeValue - [18..20)::2 - [hi] + MarkupTextLiteral - [18..20)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [20..21)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [21..22)::1 + MarkupTextLiteral - [21..22)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.tspans.txt new file mode 100644 index 0000000000..fdc44d87e1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly10.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [24] ) - catchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly11.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly11.cspans.txt new file mode 100644 index 0000000000..b5022db073 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly11.cspans.txt @@ -0,0 +1,2 @@ +Transition span at (18:0,18 [1] ) (Accepts:None) - Parent: Expression block at (18:0,18 [13] ) +Code span at (19:0,19 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (18:0,18 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly11.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly11.stree.txt new file mode 100644 index 0000000000..d6f75f2a9f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly11.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..35)::35 - [] + MarkupBlock - [0..35)::35 + MarkupTagHelperElement - [0..35)::35 - strong[SelfClosing] - catchAllTagHelper + MarkupTagHelperStartTag - [0..35)::35 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupTagHelperAttribute - [7..32)::25 - catchAll - DoubleQuotes - Unbound - [ catchAll="@DateTime.Now"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..16)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [17..18)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [18..31)::13 + MarkupDynamicAttributeValue - [18..31)::13 - [@DateTime.Now] + GenericBlock - [18..31)::13 + CSharpCodeBlock - [18..31)::13 + CSharpImplicitExpression - [18..31)::13 + CSharpTransition - [18..19)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [19..31)::12 + CSharpCodeBlock - [19..31)::12 + CSharpExpressionLiteral - [19..31)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [31..32)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [32..33)::1 + MarkupTextLiteral - [32..33)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly11.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly11.tspans.txt new file mode 100644 index 0000000000..c2c433f527 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly11.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [35] ) - catchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly12.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly12.cspans.txt new file mode 100644 index 0000000000..022c99d374 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly12.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (18:0,18 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [47] ) +Markup span at (22:0,22 [16] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [47] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly12.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly12.stree.txt new file mode 100644 index 0000000000..6bd5c9b475 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly12.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..47)::47 - [words and spaces] + MarkupBlock - [0..47)::47 + MarkupTagHelperElement - [0..47)::47 - strong[StartTagAndEndTag] - catchAllTagHelper + MarkupTagHelperStartTag - [0..22)::22 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupTagHelperAttribute - [7..21)::14 - catchAll - DoubleQuotes - Unbound - [ catchAll="hi"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..16)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [17..18)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [18..20)::2 + MarkupLiteralAttributeValue - [18..20)::2 - [hi] + MarkupTextLiteral - [18..20)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [20..21)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [22..38)::16 - [words and spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[and]; + Whitespace;[ ]; + Text;[spaces]; + MarkupTagHelperEndTag - [38..47)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly12.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly12.tspans.txt new file mode 100644 index 0000000000..3919132f79 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly12.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [47] ) - catchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly13.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly13.cspans.txt new file mode 100644 index 0000000000..65ac8fc060 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly13.cspans.txt @@ -0,0 +1,3 @@ +Transition span at (18:0,18 [1] ) (Accepts:None) - Parent: Expression block at (18:0,18 [13] ) +Code span at (19:0,19 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (18:0,18 [13] ) +Markup span at (33:0,33 [16] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [58] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly13.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly13.stree.txt new file mode 100644 index 0000000000..a0d04d2b2c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly13.stree.txt @@ -0,0 +1,41 @@ +RazorDocument - [0..58)::58 - [words and spaces] + MarkupBlock - [0..58)::58 + MarkupTagHelperElement - [0..58)::58 - strong[StartTagAndEndTag] - catchAllTagHelper + MarkupTagHelperStartTag - [0..33)::33 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupTagHelperAttribute - [7..32)::25 - catchAll - DoubleQuotes - Unbound - [ catchAll="@DateTime.Now"] + MarkupTextLiteral - [7..8)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [8..16)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [17..18)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [18..31)::13 + MarkupDynamicAttributeValue - [18..31)::13 - [@DateTime.Now] + GenericBlock - [18..31)::13 + CSharpCodeBlock - [18..31)::13 + CSharpImplicitExpression - [18..31)::13 + CSharpTransition - [18..19)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [19..31)::12 + CSharpCodeBlock - [19..31)::12 + CSharpExpressionLiteral - [19..31)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [31..32)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [33..49)::16 - [words and spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[and]; + Whitespace;[ ]; + Text;[spaces]; + MarkupTagHelperEndTag - [49..58)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly13.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly13.tspans.txt new file mode 100644 index 0000000000..5518b4559b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly13.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [58] ) - catchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly14.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly14.cspans.txt new file mode 100644 index 0000000000..b66dc822e5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly14.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [4] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [19] ) +Markup span at (4:0,4 [8] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [12] ) +Markup span at (12:0,12 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [12] ) +Markup span at (15:0,15 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [12] ) +Markup span at (16:0,16 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [19] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly14.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly14.stree.txt new file mode 100644 index 0000000000..b39cc67203 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly14.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..19)::19 - [

                        ] + MarkupBlock - [0..19)::19 + MarkupElement - [0..19)::19 + MarkupStartTag - [0..19)::19 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + MarkupAttributeBlock - [4..16)::12 - [ class="btn"] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..10)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [12..15)::3 + MarkupLiteralAttributeValue - [12..15)::3 - [btn] + MarkupTextLiteral - [12..15)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [16..17)::1 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly15.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly15.cspans.txt new file mode 100644 index 0000000000..01fd0f4301 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly15.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [4] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [17] ) +Markup span at (4:0,4 [8] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [12] ) +Markup span at (12:0,12 [3] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [12] ) +Markup span at (15:0,15 [1] ) (Accepts:Any) - Parent: Markup block at (4:0,4 [12] ) +Markup span at (16:0,16 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [17] ) +Markup span at (17:0,17 [6] ) (Accepts:Any) - Parent: Tag block at (17:0,17 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly15.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly15.stree.txt new file mode 100644 index 0000000000..a31cde472d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly15.stree.txt @@ -0,0 +1,26 @@ +RazorDocument - [0..23)::23 - [
                        ] + MarkupBlock - [0..23)::23 + MarkupElement - [0..23)::23 + MarkupStartTag - [0..17)::17 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + MarkupAttributeBlock - [4..16)::12 - [ class="btn"] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..10)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + GenericBlock - [12..15)::3 + MarkupLiteralAttributeValue - [12..15)::3 - [btn] + MarkupTextLiteral - [12..15)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupEndTag - [17..23)::6 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly16.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly16.cspans.txt new file mode 100644 index 0000000000..266c0f349a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly16.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (16:0,16 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [33] ) +Markup span at (26:0,26 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [33] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly16.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly16.stree.txt new file mode 100644 index 0000000000..56ec6f33fc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly16.stree.txt @@ -0,0 +1,39 @@ +RazorDocument - [0..33)::33 - [

                        ] + MarkupBlock - [0..33)::33 + MarkupTagHelperElement - [0..33)::33 - p[SelfClosing] - pTagHelper + MarkupTagHelperStartTag - [0..33)::33 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..18)::16 - notRequired - DoubleQuotes - Unbound - [ notRequired="a"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..14)::11 - [notRequired] - Gen - SpanEditHandler;Accepts:Any + Text;[notRequired]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [16..17)::1 + MarkupLiteralAttributeValue - [16..17)::1 - [a] + MarkupTextLiteral - [16..17)::1 - [a] - Gen - SpanEditHandler;Accepts:Any + Text;[a]; + MarkupTextLiteral - [17..18)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [18..30)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [18..19)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [19..24)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [25..26)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [26..29)::3 + MarkupLiteralAttributeValue - [26..29)::3 - [btn] + MarkupTextLiteral - [26..29)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [29..30)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [30..31)::1 + MarkupTextLiteral - [30..31)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly16.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly16.tspans.txt new file mode 100644 index 0000000000..523daac96f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly16.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [33] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly17.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly17.cspans.txt new file mode 100644 index 0000000000..494b62f7a4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly17.cspans.txt @@ -0,0 +1,3 @@ +Transition span at (16:0,16 [1] ) (Accepts:None) - Parent: Expression block at (16:0,16 [13] ) +Code span at (17:0,17 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (16:0,16 [13] ) +Markup span at (38:0,38 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [45] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly17.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly17.stree.txt new file mode 100644 index 0000000000..e7c49df6fb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly17.stree.txt @@ -0,0 +1,48 @@ +RazorDocument - [0..45)::45 - [

                        ] + MarkupBlock - [0..45)::45 + MarkupTagHelperElement - [0..45)::45 - p[SelfClosing] - pTagHelper + MarkupTagHelperStartTag - [0..45)::45 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..30)::28 - notRequired - DoubleQuotes - Unbound - [ notRequired="@DateTime.Now"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..14)::11 - [notRequired] - Gen - SpanEditHandler;Accepts:Any + Text;[notRequired]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [16..29)::13 + MarkupDynamicAttributeValue - [16..29)::13 - [@DateTime.Now] + GenericBlock - [16..29)::13 + CSharpCodeBlock - [16..29)::13 + CSharpImplicitExpression - [16..29)::13 + CSharpTransition - [16..17)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [17..29)::12 + CSharpCodeBlock - [17..29)::12 + CSharpExpressionLiteral - [17..29)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [29..30)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [30..42)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [30..31)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [31..36)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [37..38)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [38..41)::3 + MarkupLiteralAttributeValue - [38..41)::3 - [btn] + MarkupTextLiteral - [38..41)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [41..42)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [42..43)::1 + MarkupTextLiteral - [42..43)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly17.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly17.tspans.txt new file mode 100644 index 0000000000..0209fdf6c5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly17.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [45] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly18.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly18.cspans.txt new file mode 100644 index 0000000000..4962ba5ad6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly18.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (16:0,16 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [51] ) +Markup span at (26:0,26 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [51] ) +Markup span at (31:0,31 [16] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [51] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly18.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly18.stree.txt new file mode 100644 index 0000000000..c003750ce1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly18.stree.txt @@ -0,0 +1,46 @@ +RazorDocument - [0..51)::51 - [

                        words and spaces

                        ] + MarkupBlock - [0..51)::51 + MarkupTagHelperElement - [0..51)::51 - p[StartTagAndEndTag] - pTagHelper + MarkupTagHelperStartTag - [0..31)::31 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..18)::16 - notRequired - DoubleQuotes - Unbound - [ notRequired="a"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..14)::11 - [notRequired] - Gen - SpanEditHandler;Accepts:Any + Text;[notRequired]; + Equals;[=]; + MarkupTextLiteral - [15..16)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [16..17)::1 + MarkupLiteralAttributeValue - [16..17)::1 - [a] + MarkupTextLiteral - [16..17)::1 - [a] - Gen - SpanEditHandler;Accepts:Any + Text;[a]; + MarkupTextLiteral - [17..18)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [18..30)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [18..19)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [19..24)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [25..26)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [26..29)::3 + MarkupLiteralAttributeValue - [26..29)::3 - [btn] + MarkupTextLiteral - [26..29)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [29..30)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [31..47)::16 - [words and spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[and]; + Whitespace;[ ]; + Text;[spaces]; + MarkupTagHelperEndTag - [47..51)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly18.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly18.tspans.txt new file mode 100644 index 0000000000..5f0754439a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly18.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [51] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly19.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly19.cspans.txt new file mode 100644 index 0000000000..2930101dc1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly19.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (12:0,12 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [28] ) +Markup span at (21:0,21 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [28] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly19.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly19.stree.txt new file mode 100644 index 0000000000..06355bf233 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly19.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..28)::28 - [
                        ] + MarkupBlock - [0..28)::28 + MarkupTagHelperElement - [0..28)::28 - div[SelfClosing] - divTagHelper + MarkupTagHelperStartTag - [0..28)::28 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + MarkupTagHelperAttribute - [4..13)::9 - style - DoubleQuotes - Unbound - [ style=""] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..10)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [12..12)::0 + MarkupTextLiteral - [12..12)::0 - [] + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [13..25)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [14..19)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [20..21)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [21..24)::3 + MarkupLiteralAttributeValue - [21..24)::3 - [btn] + MarkupTextLiteral - [21..24)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [24..25)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [25..26)::1 + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly19.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly19.tspans.txt new file mode 100644 index 0000000000..15e7f93acc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly19.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [28] ) - divTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.cspans.txt new file mode 100644 index 0000000000..38768af66f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (0:0,0 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [3] ) +Markup span at (3:0,3 [4] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.stree.txt new file mode 100644 index 0000000000..946629e678 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly2.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..7)::7 - [

                        ] + MarkupBlock - [0..7)::7 + MarkupElement - [0..7)::7 + MarkupStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [3..7)::4 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly20.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly20.cspans.txt new file mode 100644 index 0000000000..1ff5028dc0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly20.cspans.txt @@ -0,0 +1,3 @@ +Transition span at (12:0,12 [1] ) (Accepts:None) - Parent: Expression block at (12:0,12 [13] ) +Code span at (13:0,13 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (12:0,12 [13] ) +Markup span at (34:0,34 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [41] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly20.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly20.stree.txt new file mode 100644 index 0000000000..b23c7746c2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly20.stree.txt @@ -0,0 +1,48 @@ +RazorDocument - [0..41)::41 - [
                        ] + MarkupBlock - [0..41)::41 + MarkupTagHelperElement - [0..41)::41 - div[SelfClosing] - divTagHelper + MarkupTagHelperStartTag - [0..41)::41 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + MarkupTagHelperAttribute - [4..26)::22 - style - DoubleQuotes - Unbound - [ style="@DateTime.Now"] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..10)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [12..25)::13 + MarkupDynamicAttributeValue - [12..25)::13 - [@DateTime.Now] + GenericBlock - [12..25)::13 + CSharpCodeBlock - [12..25)::13 + CSharpImplicitExpression - [12..25)::13 + CSharpTransition - [12..13)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [13..25)::12 + CSharpCodeBlock - [13..25)::12 + CSharpExpressionLiteral - [13..25)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [25..26)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [26..38)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [26..27)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [27..32)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [33..34)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [34..37)::3 + MarkupLiteralAttributeValue - [34..37)::3 - [btn] + MarkupTextLiteral - [34..37)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [37..38)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [38..39)::1 + MarkupTextLiteral - [38..39)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly20.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly20.tspans.txt new file mode 100644 index 0000000000..267c9ba9b4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly20.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [41] ) - divTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly21.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly21.cspans.txt new file mode 100644 index 0000000000..17da676f68 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly21.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (12:0,12 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [48] ) +Markup span at (21:0,21 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [48] ) +Markup span at (26:0,26 [16] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [48] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly21.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly21.stree.txt new file mode 100644 index 0000000000..a69b0bdd08 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly21.stree.txt @@ -0,0 +1,44 @@ +RazorDocument - [0..48)::48 - [
                        words and spaces
                        ] + MarkupBlock - [0..48)::48 + MarkupTagHelperElement - [0..48)::48 - div[StartTagAndEndTag] - divTagHelper + MarkupTagHelperStartTag - [0..26)::26 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + MarkupTagHelperAttribute - [4..13)::9 - style - DoubleQuotes - Unbound - [ style=""] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..10)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [12..12)::0 + MarkupTextLiteral - [12..12)::0 - [] + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [13..25)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [14..19)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [20..21)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [21..24)::3 + MarkupLiteralAttributeValue - [21..24)::3 - [btn] + MarkupTextLiteral - [21..24)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [24..25)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [26..42)::16 - [words and spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[and]; + Whitespace;[ ]; + Text;[spaces]; + MarkupTagHelperEndTag - [42..48)::6 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly21.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly21.tspans.txt new file mode 100644 index 0000000000..1fa759ade1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly21.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [48] ) - divTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly22.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly22.cspans.txt new file mode 100644 index 0000000000..b5ef904e18 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly22.cspans.txt @@ -0,0 +1,5 @@ +Transition span at (12:0,12 [1] ) (Accepts:None) - Parent: Expression block at (12:0,12 [13] ) +Code span at (13:0,13 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (12:0,12 [13] ) +Transition span at (34:0,34 [1] ) (Accepts:None) - Parent: Expression block at (34:0,34 [13] ) +Code span at (35:0,35 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (34:0,34 [13] ) +Markup span at (49:0,49 [16] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [71] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly22.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly22.stree.txt new file mode 100644 index 0000000000..9f939b4eea --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly22.stree.txt @@ -0,0 +1,64 @@ +RazorDocument - [0..71)::71 - [
                        words and spaces
                        ] + MarkupBlock - [0..71)::71 + MarkupTagHelperElement - [0..71)::71 - div[StartTagAndEndTag] - divTagHelper + MarkupTagHelperStartTag - [0..49)::49 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + MarkupTagHelperAttribute - [4..26)::22 - style - DoubleQuotes - Unbound - [ style="@DateTime.Now"] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..10)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [12..25)::13 + MarkupDynamicAttributeValue - [12..25)::13 - [@DateTime.Now] + GenericBlock - [12..25)::13 + CSharpCodeBlock - [12..25)::13 + CSharpImplicitExpression - [12..25)::13 + CSharpTransition - [12..13)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [13..25)::12 + CSharpCodeBlock - [13..25)::12 + CSharpExpressionLiteral - [13..25)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [25..26)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [26..48)::22 - class - DoubleQuotes - Unbound - [ class="@DateTime.Now"] + MarkupTextLiteral - [26..27)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [27..32)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [33..34)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [34..47)::13 + MarkupDynamicAttributeValue - [34..47)::13 - [@DateTime.Now] + GenericBlock - [34..47)::13 + CSharpCodeBlock - [34..47)::13 + CSharpImplicitExpression - [34..47)::13 + CSharpTransition - [34..35)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [35..47)::12 + CSharpCodeBlock - [35..47)::12 + CSharpExpressionLiteral - [35..47)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [47..48)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [49..65)::16 - [words and spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[and]; + Whitespace;[ ]; + Text;[spaces]; + MarkupTagHelperEndTag - [65..71)::6 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly22.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly22.tspans.txt new file mode 100644 index 0000000000..dffecb5c26 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly22.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [71] ) - divTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly23.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly23.cspans.txt new file mode 100644 index 0000000000..a788e1773e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly23.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (12:0,12 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [63] ) +Markup span at (21:0,21 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [63] ) +Markup span at (26:0,26 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [63] ) +Markup span at (31:0,31 [8] ) (Accepts:Any) - Parent: Tag block at (31:0,31 [8] ) +Markup span at (39:0,39 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [63] ) +Markup span at (42:0,42 [9] ) (Accepts:Any) - Parent: Tag block at (42:0,42 [9] ) +Markup span at (51:0,51 [6] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [63] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly23.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly23.stree.txt new file mode 100644 index 0000000000..95768527cf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly23.stree.txt @@ -0,0 +1,54 @@ +RazorDocument - [0..63)::63 - [
                        wordsandspaces
                        ] + MarkupBlock - [0..63)::63 + MarkupTagHelperElement - [0..63)::63 - div[StartTagAndEndTag] - divTagHelper + MarkupTagHelperStartTag - [0..26)::26 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + MarkupTagHelperAttribute - [4..13)::9 - style - DoubleQuotes - Unbound - [ style=""] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..10)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [12..12)::0 + MarkupTextLiteral - [12..12)::0 - [] + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [13..25)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [14..19)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [20..21)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [21..24)::3 + MarkupLiteralAttributeValue - [21..24)::3 - [btn] + MarkupTextLiteral - [21..24)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [24..25)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [26..31)::5 - [words] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + MarkupElement - [31..51)::20 + MarkupStartTag - [31..39)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [39..42)::3 - [and] - Gen - SpanEditHandler;Accepts:Any + Text;[and]; + MarkupEndTag - [42..51)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [51..57)::6 - [spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[spaces]; + MarkupTagHelperEndTag - [57..63)::6 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly23.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly23.tspans.txt new file mode 100644 index 0000000000..ed9fa4bce0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly23.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [63] ) - divTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly24.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly24.cspans.txt new file mode 100644 index 0000000000..0d58538fb8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly24.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [31] ) +Markup span at (25:0,25 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [31] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly24.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly24.stree.txt new file mode 100644 index 0000000000..bb831df610 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly24.stree.txt @@ -0,0 +1,39 @@ +RazorDocument - [0..31)::31 - [

                        ] + MarkupBlock - [0..31)::31 + MarkupTagHelperElement - [0..31)::31 - p[SelfClosing] - pTagHelper - catchAllTagHelper + MarkupTagHelperStartTag - [0..31)::31 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [14..28)::14 - catchAll - DoubleQuotes - Unbound - [ catchAll="hi"] + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [15..23)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [24..25)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [25..27)::2 + MarkupLiteralAttributeValue - [25..27)::2 - [hi] + MarkupTextLiteral - [25..27)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [27..28)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [28..29)::1 + MarkupTextLiteral - [28..29)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly24.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly24.tspans.txt new file mode 100644 index 0000000000..6fb86e9357 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly24.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [31] ) - pTagHelper - catchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly25.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly25.cspans.txt new file mode 100644 index 0000000000..4e62a5fb59 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly25.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [49] ) +Markup span at (25:0,25 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [49] ) +Markup span at (29:0,29 [16] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [49] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly25.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly25.stree.txt new file mode 100644 index 0000000000..3f8a72bb82 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly25.stree.txt @@ -0,0 +1,46 @@ +RazorDocument - [0..49)::49 - [

                        words and spaces

                        ] + MarkupBlock - [0..49)::49 + MarkupTagHelperElement - [0..49)::49 - p[StartTagAndEndTag] - pTagHelper - catchAllTagHelper + MarkupTagHelperStartTag - [0..29)::29 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [14..28)::14 - catchAll - DoubleQuotes - Unbound - [ catchAll="hi"] + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [15..23)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [24..25)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [25..27)::2 + MarkupLiteralAttributeValue - [25..27)::2 - [hi] + MarkupTextLiteral - [25..27)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [27..28)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [29..45)::16 - [words and spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[and]; + Whitespace;[ ]; + Text;[spaces]; + MarkupTagHelperEndTag - [45..49)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly25.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly25.tspans.txt new file mode 100644 index 0000000000..df0f66ba2b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly25.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [49] ) - pTagHelper - catchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly26.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly26.cspans.txt new file mode 100644 index 0000000000..4a50e7e4a8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly26.cspans.txt @@ -0,0 +1,3 @@ +Markup span at (12:0,12 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [42] ) +Markup span at (21:0,21 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [42] ) +Markup span at (36:0,36 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [42] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly26.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly26.stree.txt new file mode 100644 index 0000000000..a3036a1c45 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly26.stree.txt @@ -0,0 +1,51 @@ +RazorDocument - [0..42)::42 - [
                        ] + MarkupBlock - [0..42)::42 + MarkupTagHelperElement - [0..42)::42 - div[SelfClosing] - divTagHelper - catchAllTagHelper + MarkupTagHelperStartTag - [0..42)::42 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + MarkupTagHelperAttribute - [4..13)::9 - style - DoubleQuotes - Unbound - [ style=""] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..10)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [12..12)::0 + MarkupTextLiteral - [12..12)::0 - [] + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [13..25)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [14..19)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [20..21)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [21..24)::3 + MarkupLiteralAttributeValue - [21..24)::3 - [btn] + MarkupTextLiteral - [21..24)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [24..25)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [25..39)::14 - catchAll - DoubleQuotes - Unbound - [ catchAll="hi"] + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [26..34)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [35..36)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [36..38)::2 + MarkupLiteralAttributeValue - [36..38)::2 - [hi] + MarkupTextLiteral - [36..38)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [38..39)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [39..40)::1 + MarkupTextLiteral - [39..40)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly26.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly26.tspans.txt new file mode 100644 index 0000000000..4820770a5b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly26.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [42] ) - divTagHelper - catchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly27.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly27.cspans.txt new file mode 100644 index 0000000000..49b2350a05 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly27.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (12:0,12 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [63] ) +Markup span at (21:0,21 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [63] ) +Markup span at (36:0,36 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [63] ) +Markup span at (41:0,41 [16] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [63] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly27.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly27.stree.txt new file mode 100644 index 0000000000..9a603b3e4e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly27.stree.txt @@ -0,0 +1,61 @@ +RazorDocument - [0..63)::63 - [
                        words and spaces
                        ] + MarkupBlock - [0..63)::63 + MarkupTagHelperElement - [0..63)::63 - div[StartTagAndEndTag] - divTagHelper - catchAllTagHelper + MarkupTagHelperStartTag - [0..41)::41 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + MarkupTagHelperAttribute - [4..13)::9 - style - DoubleQuotes - Unbound - [ style=""] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..10)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [12..12)::0 + MarkupTextLiteral - [12..12)::0 - [] + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [13..25)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [14..19)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [20..21)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [21..24)::3 + MarkupLiteralAttributeValue - [21..24)::3 - [btn] + MarkupTextLiteral - [21..24)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [24..25)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [25..39)::14 - catchAll - DoubleQuotes - Unbound - [ catchAll="hi"] + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [26..34)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [35..36)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [36..38)::2 + MarkupLiteralAttributeValue - [36..38)::2 - [hi] + MarkupTextLiteral - [36..38)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [38..39)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [39..40)::1 + MarkupTextLiteral - [39..40)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[>]; + MarkupTextLiteral - [41..57)::16 - [words and spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[and]; + Whitespace;[ ]; + Text;[spaces]; + MarkupTagHelperEndTag - [57..63)::6 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly27.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly27.tspans.txt new file mode 100644 index 0000000000..107a34c817 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly27.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [63] ) - divTagHelper - catchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly28.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly28.cspans.txt new file mode 100644 index 0000000000..b76fbd29f0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly28.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (12:0,12 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [65] ) +Markup span at (21:0,21 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [65] ) +Markup span at (36:0,36 [1] ) (Accepts:None) - Parent: Markup block at (36:0,36 [2] ) +Markup span at (37:0,37 [1] ) (Accepts:None) - Parent: Markup block at (36:0,36 [2] ) +Markup span at (38:0,38 [2] ) (Accepts:Any) - Parent: Markup block at (36:0,36 [4] ) +Markup span at (43:0,43 [16] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [65] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly28.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly28.stree.txt new file mode 100644 index 0000000000..ce933507e9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly28.stree.txt @@ -0,0 +1,66 @@ +RazorDocument - [0..65)::65 - [
                        words and spaces
                        ] + MarkupBlock - [0..65)::65 + MarkupTagHelperElement - [0..65)::65 - div[StartTagAndEndTag] - divTagHelper - catchAllTagHelper + MarkupTagHelperStartTag - [0..43)::43 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + MarkupTagHelperAttribute - [4..13)::9 - style - DoubleQuotes - Unbound - [ style=""] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..10)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [12..12)::0 + MarkupTextLiteral - [12..12)::0 - [] + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [13..25)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [14..19)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [20..21)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [21..24)::3 + MarkupLiteralAttributeValue - [21..24)::3 - [btn] + MarkupTextLiteral - [21..24)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [24..25)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [25..41)::16 - catchAll - DoubleQuotes - Unbound - [ catchAll="@@hi"] + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [26..34)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [35..36)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [36..40)::4 + MarkupBlock - [36..38)::2 + MarkupTextLiteral - [36..37)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupEphemeralTextLiteral - [37..38)::1 - [@] - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + MarkupLiteralAttributeValue - [38..40)::2 - [hi] + MarkupTextLiteral - [38..40)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [40..41)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [41..42)::1 + MarkupTextLiteral - [41..42)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[>]; + MarkupTextLiteral - [43..59)::16 - [words and spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[and]; + Whitespace;[ ]; + Text;[spaces]; + MarkupTagHelperEndTag - [59..65)::6 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly28.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly28.tspans.txt new file mode 100644 index 0000000000..c45dca540d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly28.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [65] ) - divTagHelper - catchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly29.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly29.cspans.txt new file mode 100644 index 0000000000..e1f21dcb28 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly29.cspans.txt @@ -0,0 +1,7 @@ +Transition span at (12:0,12 [1] ) (Accepts:None) - Parent: Expression block at (12:0,12 [13] ) +Code span at (13:0,13 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (12:0,12 [13] ) +Transition span at (34:0,34 [1] ) (Accepts:None) - Parent: Expression block at (34:0,34 [13] ) +Code span at (35:0,35 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (34:0,34 [13] ) +Transition span at (59:0,59 [1] ) (Accepts:None) - Parent: Expression block at (59:0,59 [13] ) +Code span at (60:0,60 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (59:0,59 [13] ) +Markup span at (75:0,75 [16] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [97] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly29.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly29.stree.txt new file mode 100644 index 0000000000..16f40ca649 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly29.stree.txt @@ -0,0 +1,90 @@ +RazorDocument - [0..97)::97 - [
                        words and spaces
                        ] + MarkupBlock - [0..97)::97 + MarkupTagHelperElement - [0..97)::97 - div[StartTagAndEndTag] - divTagHelper - catchAllTagHelper + MarkupTagHelperStartTag - [0..75)::75 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + MarkupTagHelperAttribute - [4..26)::22 - style - DoubleQuotes - Unbound - [ style="@DateTime.Now"] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..10)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [12..25)::13 + MarkupDynamicAttributeValue - [12..25)::13 - [@DateTime.Now] + GenericBlock - [12..25)::13 + CSharpCodeBlock - [12..25)::13 + CSharpImplicitExpression - [12..25)::13 + CSharpTransition - [12..13)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [13..25)::12 + CSharpCodeBlock - [13..25)::12 + CSharpExpressionLiteral - [13..25)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [25..26)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [26..48)::22 - class - DoubleQuotes - Unbound - [ class="@DateTime.Now"] + MarkupTextLiteral - [26..27)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [27..32)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [33..34)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [34..47)::13 + MarkupDynamicAttributeValue - [34..47)::13 - [@DateTime.Now] + GenericBlock - [34..47)::13 + CSharpCodeBlock - [34..47)::13 + CSharpImplicitExpression - [34..47)::13 + CSharpTransition - [34..35)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [35..47)::12 + CSharpCodeBlock - [35..47)::12 + CSharpExpressionLiteral - [35..47)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [47..48)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [48..73)::25 - catchAll - DoubleQuotes - Unbound - [ catchAll="@DateTime.Now"] + MarkupTextLiteral - [48..49)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [49..57)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [58..59)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [59..72)::13 + MarkupDynamicAttributeValue - [59..72)::13 - [@DateTime.Now] + GenericBlock - [59..72)::13 + CSharpCodeBlock - [59..72)::13 + CSharpImplicitExpression - [59..72)::13 + CSharpTransition - [59..60)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [60..72)::12 + CSharpCodeBlock - [60..72)::12 + CSharpExpressionLiteral - [60..72)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [72..73)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [73..74)::1 + MarkupTextLiteral - [73..74)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[>]; + MarkupTextLiteral - [75..91)::16 - [words and spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[and]; + Whitespace;[ ]; + Text;[spaces]; + MarkupTagHelperEndTag - [91..97)::6 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly29.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly29.tspans.txt new file mode 100644 index 0000000000..5b10442647 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly29.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [97] ) - divTagHelper - catchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.cspans.txt new file mode 100644 index 0000000000..4f69cb3f10 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.cspans.txt @@ -0,0 +1 @@ +Markup span at (0:0,0 [7] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.stree.txt new file mode 100644 index 0000000000..306fe73b84 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly3.stree.txt @@ -0,0 +1,11 @@ +RazorDocument - [0..7)::7 - [
                        ] + MarkupBlock - [0..7)::7 + MarkupElement - [0..7)::7 + MarkupStartTag - [0..7)::7 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + MarkupMiscAttributeContent - [4..5)::1 + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly30.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly30.cspans.txt new file mode 100644 index 0000000000..9fec06bb52 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly30.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (12:0,12 [0] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [78] ) +Markup span at (21:0,21 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [78] ) +Markup span at (36:0,36 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [78] ) +Markup span at (41:0,41 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [78] ) +Markup span at (46:0,46 [8] ) (Accepts:Any) - Parent: Tag block at (46:0,46 [8] ) +Markup span at (54:0,54 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [78] ) +Markup span at (57:0,57 [9] ) (Accepts:Any) - Parent: Tag block at (57:0,57 [9] ) +Markup span at (66:0,66 [6] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [78] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly30.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly30.stree.txt new file mode 100644 index 0000000000..e6389d0c59 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly30.stree.txt @@ -0,0 +1,71 @@ +RazorDocument - [0..78)::78 - [
                        wordsandspaces
                        ] + MarkupBlock - [0..78)::78 + MarkupTagHelperElement - [0..78)::78 - div[StartTagAndEndTag] - divTagHelper - catchAllTagHelper + MarkupTagHelperStartTag - [0..41)::41 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + MarkupTagHelperAttribute - [4..13)::9 - style - DoubleQuotes - Unbound - [ style=""] + MarkupTextLiteral - [4..5)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [5..10)::5 - [style] - Gen - SpanEditHandler;Accepts:Any + Text;[style]; + Equals;[=]; + MarkupTextLiteral - [11..12)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [12..12)::0 + MarkupTextLiteral - [12..12)::0 - [] + MarkupTextLiteral - [12..13)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [13..25)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [13..14)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [14..19)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [20..21)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [21..24)::3 + MarkupLiteralAttributeValue - [21..24)::3 - [btn] + MarkupTextLiteral - [21..24)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [24..25)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttribute - [25..39)::14 - catchAll - DoubleQuotes - Unbound - [ catchAll="hi"] + MarkupTextLiteral - [25..26)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [26..34)::8 - [catchAll] - Gen - SpanEditHandler;Accepts:Any + Text;[catchAll]; + Equals;[=]; + MarkupTextLiteral - [35..36)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [36..38)::2 + MarkupLiteralAttributeValue - [36..38)::2 - [hi] + MarkupTextLiteral - [36..38)::2 - [hi] - Gen - SpanEditHandler;Accepts:Any + Text;[hi]; + MarkupTextLiteral - [38..39)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [39..40)::1 + MarkupTextLiteral - [39..40)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + CloseAngle;[>]; + MarkupTextLiteral - [41..46)::5 - [words] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + MarkupElement - [46..66)::20 + MarkupStartTag - [46..54)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [54..57)::3 - [and] - Gen - SpanEditHandler;Accepts:Any + Text;[and]; + MarkupEndTag - [57..66)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [66..72)::6 - [spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[spaces]; + MarkupTagHelperEndTag - [72..78)::6 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly30.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly30.tspans.txt new file mode 100644 index 0000000000..e10503a044 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly30.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [78] ) - divTagHelper - catchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.cspans.txt new file mode 100644 index 0000000000..b02774d867 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (5:0,5 [6] ) (Accepts:Any) - Parent: Tag block at (5:0,5 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.stree.txt new file mode 100644 index 0000000000..251a137553 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly4.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..11)::11 - [
                        ] + MarkupBlock - [0..11)::11 + MarkupElement - [0..11)::11 + MarkupStartTag - [0..5)::5 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupEndTag - [5..11)::6 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.cspans.txt new file mode 100644 index 0000000000..7514a2b315 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.cspans.txt @@ -0,0 +1 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.stree.txt new file mode 100644 index 0000000000..ac9ad91046 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..17)::17 - [

                        ] + MarkupBlock - [0..17)::17 + MarkupTagHelperElement - [0..17)::17 - p[SelfClosing] - pTagHelper + MarkupTagHelperStartTag - [0..17)::17 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [14..15)::1 + MarkupTextLiteral - [14..15)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.tspans.txt new file mode 100644 index 0000000000..a46dc9658a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [17] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.cspans.txt new file mode 100644 index 0000000000..0dd5fb1015 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.cspans.txt @@ -0,0 +1,2 @@ +Transition span at (10:0,10 [1] ) (Accepts:None) - Parent: Expression block at (10:0,10 [13] ) +Code span at (11:0,11 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (10:0,10 [13] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.stree.txt new file mode 100644 index 0000000000..405623c7ca --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.stree.txt @@ -0,0 +1,34 @@ +RazorDocument - [0..27)::27 - [

                        ] + MarkupBlock - [0..27)::27 + MarkupTagHelperElement - [0..27)::27 - p[SelfClosing] - pTagHelper + MarkupTagHelperStartTag - [0..27)::27 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..24)::22 - class - DoubleQuotes - Unbound - [ class="@DateTime.Now"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..23)::13 + MarkupDynamicAttributeValue - [10..23)::13 - [@DateTime.Now] + GenericBlock - [10..23)::13 + CSharpCodeBlock - [10..23)::13 + CSharpImplicitExpression - [10..23)::13 + CSharpTransition - [10..11)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [11..23)::12 + CSharpCodeBlock - [11..23)::12 + CSharpExpressionLiteral - [11..23)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [23..24)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupMiscAttributeContent - [24..25)::1 + MarkupTextLiteral - [24..25)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.tspans.txt new file mode 100644 index 0000000000..13aba97ce9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly6.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [27] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.cspans.txt new file mode 100644 index 0000000000..82a1ccb4b3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [35] ) +Markup span at (15:0,15 [16] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [35] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.stree.txt new file mode 100644 index 0000000000..b0032b1097 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..35)::35 - [

                        words and spaces

                        ] + MarkupBlock - [0..35)::35 + MarkupTagHelperElement - [0..35)::35 - p[StartTagAndEndTag] - pTagHelper + MarkupTagHelperStartTag - [0..15)::15 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [15..31)::16 - [words and spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[and]; + Whitespace;[ ]; + Text;[spaces]; + MarkupTagHelperEndTag - [31..35)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.tspans.txt new file mode 100644 index 0000000000..fcef603dfd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly7.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [35] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.cspans.txt new file mode 100644 index 0000000000..57aac25125 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.cspans.txt @@ -0,0 +1,3 @@ +Transition span at (10:0,10 [1] ) (Accepts:None) - Parent: Expression block at (10:0,10 [13] ) +Code span at (11:0,11 [12] ) (Accepts:NonWhitespace) - Parent: Expression block at (10:0,10 [13] ) +Markup span at (25:0,25 [16] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [45] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.stree.txt new file mode 100644 index 0000000000..036d6ce433 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.stree.txt @@ -0,0 +1,41 @@ +RazorDocument - [0..45)::45 - [

                        words and spaces

                        ] + MarkupBlock - [0..45)::45 + MarkupTagHelperElement - [0..45)::45 - p[StartTagAndEndTag] - pTagHelper + MarkupTagHelperStartTag - [0..25)::25 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..24)::22 - class - DoubleQuotes - Unbound - [ class="@DateTime.Now"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..23)::13 + MarkupDynamicAttributeValue - [10..23)::13 - [@DateTime.Now] + GenericBlock - [10..23)::13 + CSharpCodeBlock - [10..23)::13 + CSharpImplicitExpression - [10..23)::13 + CSharpTransition - [10..11)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [11..23)::12 + CSharpCodeBlock - [11..23)::12 + CSharpExpressionLiteral - [11..23)::12 - [DateTime.Now] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[DateTime]; + Dot;[.]; + Identifier;[Now]; + MarkupTextLiteral - [23..24)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [25..41)::16 - [words and spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + Whitespace;[ ]; + Text;[and]; + Whitespace;[ ]; + Text;[spaces]; + MarkupTagHelperEndTag - [41..45)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.tspans.txt new file mode 100644 index 0000000000..0209fdf6c5 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly8.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [45] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.cspans.txt new file mode 100644 index 0000000000..aac0423123 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (10:0,10 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [50] ) +Markup span at (15:0,15 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [50] ) +Markup span at (20:0,20 [8] ) (Accepts:Any) - Parent: Tag block at (20:0,20 [8] ) +Markup span at (28:0,28 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [50] ) +Markup span at (31:0,31 [9] ) (Accepts:Any) - Parent: Tag block at (31:0,31 [9] ) +Markup span at (40:0,40 [6] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [50] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.stree.txt new file mode 100644 index 0000000000..44e66d59f3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.stree.txt @@ -0,0 +1,42 @@ +RazorDocument - [0..50)::50 - [

                        wordsandspaces

                        ] + MarkupBlock - [0..50)::50 + MarkupTagHelperElement - [0..50)::50 - p[StartTagAndEndTag] - pTagHelper + MarkupTagHelperStartTag - [0..15)::15 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + MarkupTagHelperAttribute - [2..14)::12 - class - DoubleQuotes - Unbound - [ class="btn"] + MarkupTextLiteral - [2..3)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTextLiteral - [3..8)::5 - [class] - Gen - SpanEditHandler;Accepts:Any + Text;[class]; + Equals;[=]; + MarkupTextLiteral - [9..10)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + MarkupTagHelperAttributeValue - [10..13)::3 + MarkupLiteralAttributeValue - [10..13)::3 - [btn] + MarkupTextLiteral - [10..13)::3 - [btn] - Gen - SpanEditHandler;Accepts:Any + Text;[btn]; + MarkupTextLiteral - [13..14)::1 - ["] - Gen - SpanEditHandler;Accepts:Any + DoubleQuote;["]; + CloseAngle;[>]; + MarkupTextLiteral - [15..20)::5 - [words] - Gen - SpanEditHandler;Accepts:Any + Text;[words]; + MarkupElement - [20..40)::20 + MarkupStartTag - [20..28)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [28..31)::3 - [and] - Gen - SpanEditHandler;Accepts:Any + Text;[and]; + MarkupEndTag - [31..40)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [40..46)::6 - [spaces] - Gen - SpanEditHandler;Accepts:Any + Text;[spaces]; + MarkupTagHelperEndTag - [46..50)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.tspans.txt new file mode 100644 index 0000000000..f26abbe016 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RequiredAttributeDescriptorsCreateTagHelperBlocksCorrectly9.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [50] ) - pTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks1.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks1.stree.txt new file mode 100644 index 0000000000..80fe4a7c6a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks1.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..18)::18 - [

                        ] + MarkupBlock - [0..18)::18 + MarkupTagHelperElement - [0..18)::18 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..14)::11 - div[StartTagAndEndTag] - divtaghelper + MarkupTagHelperStartTag - [3..8)::5 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [8..14)::6 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [14..18)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks1.tspans.txt new file mode 100644 index 0000000000..c6e74368cc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks1.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [18] ) - ptaghelper +TagHelper span at (3:0,3 [11] ) - divtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks2.cspans.txt new file mode 100644 index 0000000000..217baf9220 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks2.cspans.txt @@ -0,0 +1 @@ +Markup span at (3:0,3 [12] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [30] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks2.stree.txt new file mode 100644 index 0000000000..878ac67dcb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks2.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..30)::30 - [

                        Hello World

                        ] + MarkupBlock - [0..30)::30 + MarkupTagHelperElement - [0..30)::30 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..15)::12 - [Hello World ] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + Whitespace;[ ]; + Text;[World]; + Whitespace;[ ]; + MarkupTagHelperElement - [15..26)::11 - div[StartTagAndEndTag] - divtaghelper + MarkupTagHelperStartTag - [15..20)::5 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [20..26)::6 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [26..30)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks2.tspans.txt new file mode 100644 index 0000000000..a24b08ac0e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks2.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [30] ) - ptaghelper +TagHelper span at (15:0,15 [11] ) - divtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks3.cspans.txt new file mode 100644 index 0000000000..5eee6a7160 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks3.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (3:0,3 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [19] ) +Markup span at (9:0,9 [2] ) (Accepts:Any) - Parent: Tag block at (6:0,6 [9] ) +Markup span at (19:0,19 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [43] ) +Markup span at (28:0,28 [5] ) (Accepts:Any) - Parent: Tag block at (23:0,23 [16] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks3.stree.txt new file mode 100644 index 0000000000..1b8b0b8258 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks3.stree.txt @@ -0,0 +1,50 @@ +RazorDocument - [0..43)::43 - [

                        Hel

                        lo

                        World

                        ] + MarkupBlock - [0..43)::43 + MarkupTagHelperElement - [0..19)::19 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..6)::3 - [Hel] - Gen - SpanEditHandler;Accepts:Any + Text;[Hel]; + MarkupTagHelperElement - [6..15)::9 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [6..9)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [9..11)::2 - [lo] - Gen - SpanEditHandler;Accepts:Any + Text;[lo]; + MarkupTagHelperEndTag - [11..15)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [15..19)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [20..43)::23 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [20..23)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [23..39)::16 - div[StartTagAndEndTag] - divtaghelper + MarkupTagHelperStartTag - [23..28)::5 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [28..33)::5 - [World] - Gen - SpanEditHandler;Accepts:Any + Text;[World]; + MarkupTagHelperEndTag - [33..39)::6 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [39..43)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks3.tspans.txt new file mode 100644 index 0000000000..99e05e1570 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks3.tspans.txt @@ -0,0 +1,4 @@ +TagHelper span at (0:0,0 [19] ) - ptaghelper +TagHelper span at (6:0,6 [9] ) - ptaghelper +TagHelper span at (20:0,20 [23] ) - ptaghelper +TagHelper span at (23:0,23 [16] ) - divtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks4.cspans.txt new file mode 100644 index 0000000000..34608d7a1d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks4.cspans.txt @@ -0,0 +1,8 @@ +Markup span at (3:0,3 [3] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [29] ) +Markup span at (6:0,6 [8] ) (Accepts:Any) - Parent: Tag block at (6:0,6 [8] ) +Markup span at (14:0,14 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [29] ) +Markup span at (16:0,16 [9] ) (Accepts:Any) - Parent: Tag block at (16:0,16 [9] ) +Markup span at (29:0,29 [1] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [55] ) +Markup span at (33:0,33 [6] ) (Accepts:Any) - Parent: Tag block at (33:0,33 [6] ) +Markup span at (39:0,39 [5] ) (Accepts:Any) - Parent: Tag block at (30:0,30 [25] ) +Markup span at (44:0,44 [7] ) (Accepts:Any) - Parent: Tag block at (44:0,44 [7] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks4.stree.txt new file mode 100644 index 0000000000..23f1042fb1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks4.stree.txt @@ -0,0 +1,50 @@ +RazorDocument - [0..55)::55 - [

                        Hello

                        World

                        ] + MarkupBlock - [0..55)::55 + MarkupTagHelperElement - [0..29)::29 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..6)::3 - [Hel] - Gen - SpanEditHandler;Accepts:Any + Text;[Hel]; + MarkupElement - [6..25)::19 + MarkupStartTag - [6..14)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [14..16)::2 - [lo] - Gen - SpanEditHandler;Accepts:Any + Text;[lo]; + MarkupEndTag - [16..25)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [25..29)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [29..30)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [30..55)::25 - p[StartTagAndEndTag] - ptaghelper + MarkupTagHelperStartTag - [30..33)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [33..51)::18 + MarkupStartTag - [33..39)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[span]; + CloseAngle;[>]; + MarkupTextLiteral - [39..44)::5 - [World] - Gen - SpanEditHandler;Accepts:Any + Text;[World]; + MarkupEndTag - [44..51)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[span]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [51..55)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks4.tspans.txt new file mode 100644 index 0000000000..9ff63342bc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/RewritesNestedTagHelperTagBlocks4.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [29] ) - ptaghelper +TagHelper span at (30:0,30 [25] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren1.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren1.stree.txt new file mode 100644 index 0000000000..8d2006107c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren1.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..13)::13 - [


                        ] + MarkupBlock - [0..13)::13 + MarkupTagHelperElement - [0..13)::13 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..9)::6 - br[SelfClosing] - BRTagHelper + MarkupTagHelperStartTag - [3..9)::6 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + MarkupMiscAttributeContent - [6..7)::1 + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [9..13)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren1.tspans.txt new file mode 100644 index 0000000000..f1b18b4065 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren1.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [13] ) - PTagHelper +TagHelper span at (3:0,3 [6] ) - BRTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren10.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren10.cspans.txt new file mode 100644 index 0000000000..d2c5955635 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren10.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (11:0,11 [6] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [47] ) +Markup span at (21:0,21 [4] ) (Accepts:Any) - Parent: Tag block at (21:0,21 [4] ) +Markup span at (25:0,25 [11] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [47] ) +Markup span at (36:0,36 [5] ) (Accepts:Any) - Parent: Tag block at (36:0,36 [5] ) +Markup span at (56:0,56 [9] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [69] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren10.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren10.diag.txt new file mode 100644 index 0000000000..251fa1828e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren10.diag.txt @@ -0,0 +1,5 @@ +(1,12): Error RZ2009: The parent tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'strong' are allowed. +(1,19): Error RZ2010: The
                        tag is not allowed by parent tag helper. Only child tags with name(s) 'strong' are allowed. +(1,23): Error RZ2010: The tag is not allowed by parent tag helper. Only child tags with name(s) 'strong' are allowed. +(1,52): Error RZ2010: The
                        tag is not allowed by parent

                        tag helper. Only child tags with name(s) 'strong' are allowed. +(1,57): Error RZ2009: The parent

                        tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'strong' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren10.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren10.stree.txt new file mode 100644 index 0000000000..3bf30508ec --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren10.stree.txt @@ -0,0 +1,56 @@ +RazorDocument - [0..69)::69 - [

                        Title:
                        A Very Cool

                        Something

                        ] + MarkupBlock - [0..69)::69 + MarkupTagHelperElement - [0..69)::69 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..50)::47 - strong[StartTagAndEndTag] - StrongTagHelper + MarkupTagHelperStartTag - [3..11)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [11..17)::6 - [Title:] - Gen - SpanEditHandler;Accepts:Any + Text;[Title:]; + MarkupTagHelperElement - [17..21)::4 - br[StartTagOnly] - BRTagHelper + MarkupTagHelperStartTag - [17..21)::4 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + CloseAngle;[>]; + MarkupElement - [21..41)::20 + MarkupStartTag - [21..25)::4 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[em]; + CloseAngle;[>]; + MarkupTextLiteral - [25..36)::11 - [A Very Cool] - Gen - SpanEditHandler;Accepts:Any + Text;[A]; + Whitespace;[ ]; + Text;[Very]; + Whitespace;[ ]; + Text;[Cool]; + MarkupEndTag - [36..41)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[em]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [41..50)::9 - [
                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperElement - [50..56)::6 - br[SelfClosing] - BRTagHelper + MarkupTagHelperStartTag - [50..56)::6 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + MarkupMiscAttributeContent - [53..54)::1 + MarkupTextLiteral - [53..54)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTextLiteral - [56..65)::9 - [Something] - Gen - SpanEditHandler;Accepts:Any + Text;[Something]; + MarkupTagHelperEndTag - [65..69)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren10.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren10.tspans.txt new file mode 100644 index 0000000000..882c9f8332 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren10.tspans.txt @@ -0,0 +1,4 @@ +TagHelper span at (0:0,0 [69] ) - PTagHelper +TagHelper span at (3:0,3 [47] ) - StrongTagHelper +TagHelper span at (17:0,17 [4] ) - BRTagHelper +TagHelper span at (50:0,50 [6] ) - BRTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren11.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren11.cspans.txt new file mode 100644 index 0000000000..22b36ea704 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren11.cspans.txt @@ -0,0 +1,7 @@ +Markup span at (3:0,3 [8] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [8] ) +Markup span at (11:0,11 [6] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [69] ) +Markup span at (21:0,21 [4] ) (Accepts:Any) - Parent: Tag block at (21:0,21 [4] ) +Markup span at (25:0,25 [11] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [69] ) +Markup span at (36:0,36 [5] ) (Accepts:Any) - Parent: Tag block at (36:0,36 [5] ) +Markup span at (41:0,41 [9] ) (Accepts:Any) - Parent: Tag block at (41:0,41 [9] ) +Markup span at (56:0,56 [9] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [69] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren11.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren11.diag.txt new file mode 100644 index 0000000000..6589efa832 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren11.diag.txt @@ -0,0 +1,2 @@ +(1,52): Error RZ2010: The
                        tag is not allowed by parent

                        tag helper. Only child tags with name(s) 'custom' are allowed. +(1,57): Error RZ2009: The parent

                        tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'custom' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren11.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren11.stree.txt new file mode 100644 index 0000000000..3ff1ebec20 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren11.stree.txt @@ -0,0 +1,56 @@ +RazorDocument - [0..69)::69 - [

                        Title:
                        A Very Cool

                        Something

                        ] + MarkupBlock - [0..69)::69 + MarkupTagHelperElement - [0..69)::69 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [3..50)::47 + MarkupStartTag - [3..11)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[custom]; + CloseAngle;[>]; + MarkupTextLiteral - [11..17)::6 - [Title:] - Gen - SpanEditHandler;Accepts:Any + Text;[Title:]; + MarkupTagHelperElement - [17..21)::4 - br[StartTagOnly] - BRTagHelper + MarkupTagHelperStartTag - [17..21)::4 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + CloseAngle;[>]; + MarkupElement - [21..41)::20 + MarkupStartTag - [21..25)::4 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[em]; + CloseAngle;[>]; + MarkupTextLiteral - [25..36)::11 - [A Very Cool] - Gen - SpanEditHandler;Accepts:Any + Text;[A]; + Whitespace;[ ]; + Text;[Very]; + Whitespace;[ ]; + Text;[Cool]; + MarkupEndTag - [36..41)::5 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[em]; + CloseAngle;[>]; + MarkupEndTag - [41..50)::9 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[custom]; + CloseAngle;[>]; + MarkupTagHelperElement - [50..56)::6 - br[SelfClosing] - BRTagHelper + MarkupTagHelperStartTag - [50..56)::6 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + MarkupMiscAttributeContent - [53..54)::1 + MarkupTextLiteral - [53..54)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTextLiteral - [56..65)::9 - [Something] - Gen - SpanEditHandler;Accepts:Any + Text;[Something]; + MarkupTagHelperEndTag - [65..69)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren11.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren11.tspans.txt new file mode 100644 index 0000000000..9456a2bf5b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren11.tspans.txt @@ -0,0 +1,3 @@ +TagHelper span at (0:0,0 [69] ) - PTagHelper +TagHelper span at (17:0,17 [4] ) - BRTagHelper +TagHelper span at (50:0,50 [6] ) - BRTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren12.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren12.cspans.txt new file mode 100644 index 0000000000..b3958cf71b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren12.cspans.txt @@ -0,0 +1 @@ +Markup span at (3:0,3 [2] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [2] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren12.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren12.diag.txt new file mode 100644 index 0000000000..063da0eb5b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren12.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ2009: The parent

                        tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'custom' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren12.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren12.stree.txt new file mode 100644 index 0000000000..5a9413f6d9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren12.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..9)::9 - [

                        ] + MarkupBlock - [0..9)::9 + MarkupTagHelperElement - [0..9)::9 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [3..5)::2 + MarkupEndTag - [3..5)::2 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperEndTag - [5..9)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren12.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren12.tspans.txt new file mode 100644 index 0000000000..60f5356683 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren12.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [9] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren13.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren13.cspans.txt new file mode 100644 index 0000000000..31c8ea8ce8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren13.cspans.txt @@ -0,0 +1 @@ +Markup span at (3:0,3 [1] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [1] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren13.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren13.diag.txt new file mode 100644 index 0000000000..063da0eb5b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren13.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ2009: The parent

                        tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'custom' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren13.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren13.stree.txt new file mode 100644 index 0000000000..4ca6ee6ef6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren13.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..8)::8 - [

                        <

                        ] + MarkupBlock - [0..8)::8 + MarkupTagHelperElement - [0..8)::8 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [3..4)::1 + MarkupStartTag - [3..4)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperEndTag - [4..8)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren13.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren13.tspans.txt new file mode 100644 index 0000000000..b8f64937bf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren13.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [8] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren14.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren14.cspans.txt new file mode 100644 index 0000000000..92bc9cb1dc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren14.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (3:0,3 [8] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [8] ) +Markup span at (15:0,15 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [76] ) +Markup span at (32:0,32 [5] ) (Accepts:Any) - Parent: Tag block at (24:0,24 [22] ) +Markup span at (55:0,55 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [76] ) +Markup span at (56:0,56 [7] ) (Accepts:Any) - Parent: Tag block at (56:0,56 [7] ) +Markup span at (63:0,63 [9] ) (Accepts:Any) - Parent: Tag block at (63:0,63 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren14.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren14.diag.txt new file mode 100644 index 0000000000..dba76059c7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren14.diag.txt @@ -0,0 +1 @@ +(1,33): Error RZ2009: The parent tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'custom, strong' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren14.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren14.stree.txt new file mode 100644 index 0000000000..854aed8c29 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren14.stree.txt @@ -0,0 +1,58 @@ +RazorDocument - [0..76)::76 - [


                        :Hello:

                        ] + MarkupBlock - [0..76)::76 + MarkupTagHelperElement - [0..76)::76 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [3..72)::69 + MarkupStartTag - [3..11)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[custom]; + CloseAngle;[>]; + MarkupTagHelperElement - [11..15)::4 - br[StartTagOnly] - BRTagHelper + MarkupTagHelperStartTag - [11..15)::4 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + CloseAngle;[>]; + MarkupTextLiteral - [15..16)::1 - [:] - Gen - SpanEditHandler;Accepts:Any + Text;[:]; + MarkupTagHelperElement - [16..55)::39 - strong[StartTagAndEndTag] - StrongTagHelper + MarkupTagHelperStartTag - [16..24)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperElement - [24..46)::22 - strong[StartTagAndEndTag] - StrongTagHelper + MarkupTagHelperStartTag - [24..32)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [32..37)::5 - [Hello] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + MarkupTagHelperEndTag - [37..46)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [46..55)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [55..56)::1 - [:] - Gen - SpanEditHandler;Accepts:Any + Text;[:]; + MarkupElement - [56..63)::7 + MarkupStartTag - [56..63)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + MarkupEndTag - [63..72)::9 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[custom]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [72..76)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren14.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren14.tspans.txt new file mode 100644 index 0000000000..bcff6cc882 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren14.tspans.txt @@ -0,0 +1,4 @@ +TagHelper span at (0:0,0 [76] ) - PTagHelper +TagHelper span at (11:0,11 [4] ) - BRTagHelper +TagHelper span at (16:0,16 [39] ) - StrongTagHelper +TagHelper span at (24:0,24 [22] ) - StrongTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren2.cspans.txt new file mode 100644 index 0000000000..ed768b841c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren2.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (3:0,3 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [17] ) +Markup span at (11:1,6 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [17] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren2.stree.txt new file mode 100644 index 0000000000..e7698afb7f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren2.stree.txt @@ -0,0 +1,25 @@ +RazorDocument - [0..17)::17 - [

                        LF
                        LF

                        ] + MarkupBlock - [0..17)::17 + MarkupTagHelperElement - [0..17)::17 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..5)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupTagHelperElement - [5..11)::6 - br[SelfClosing] - BRTagHelper + MarkupTagHelperStartTag - [5..11)::6 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + MarkupMiscAttributeContent - [8..9)::1 + MarkupTextLiteral - [8..9)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTextLiteral - [11..13)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupTagHelperEndTag - [13..17)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren2.tspans.txt new file mode 100644 index 0000000000..e1f410f604 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren2.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [17] ) - PTagHelper +TagHelper span at (5:1,0 [6] ) - BRTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren3.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren3.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren3.diag.txt new file mode 100644 index 0000000000..a7c54ec3cd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren3.diag.txt @@ -0,0 +1 @@ +(1,5): Error RZ2010: The
                        tag is not allowed by parent

                        tag helper. Only child tags with name(s) 'strong' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren3.stree.txt new file mode 100644 index 0000000000..d0e1b59dd7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren3.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..11)::11 - [


                        ] + MarkupBlock - [0..11)::11 + MarkupTagHelperElement - [0..11)::11 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..7)::4 - br[StartTagOnly] - BRTagHelper + MarkupTagHelperStartTag - [3..7)::4 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [7..11)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren3.tspans.txt new file mode 100644 index 0000000000..ae1b0f8418 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren3.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [11] ) - PTagHelper +TagHelper span at (3:0,3 [4] ) - BRTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren4.cspans.txt new file mode 100644 index 0000000000..51162d34c3 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren4.cspans.txt @@ -0,0 +1 @@ +Markup span at (3:0,3 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [12] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren4.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren4.diag.txt new file mode 100644 index 0000000000..e4dbe01b43 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren4.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ2009: The parent

                        tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'strong' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren4.stree.txt new file mode 100644 index 0000000000..504b072dfb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren4.stree.txt @@ -0,0 +1,14 @@ +RazorDocument - [0..12)::12 - [

                        Hello

                        ] + MarkupBlock - [0..12)::12 + MarkupTagHelperElement - [0..12)::12 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..8)::5 - [Hello] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + MarkupTagHelperEndTag - [8..12)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren4.tspans.txt new file mode 100644 index 0000000000..5cd52523a9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [12] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren5.cspans.txt new file mode 100644 index 0000000000..85c1b5ca5d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren5.cspans.txt @@ -0,0 +1 @@ +Markup span at (3:0,3 [6] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren5.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren5.diag.txt new file mode 100644 index 0000000000..538e0bf30f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren5.diag.txt @@ -0,0 +1 @@ +(1,5): Error RZ2010: The
                        tag is not allowed by parent

                        tag helper. Only child tags with name(s) 'br, strong' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren5.stree.txt new file mode 100644 index 0000000000..e220712ca9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren5.stree.txt @@ -0,0 +1,21 @@ +RazorDocument - [0..13)::13 - [


                        ] + MarkupBlock - [0..13)::13 + MarkupTagHelperElement - [0..13)::13 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [3..9)::6 + MarkupStartTag - [3..9)::6 - [


                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[hr]; + MarkupMiscAttributeContent - [6..7)::1 + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [9..13)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren5.tspans.txt new file mode 100644 index 0000000000..a947feb3b1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [13] ) - PTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren6.cspans.txt new file mode 100644 index 0000000000..5e84b178d6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren6.cspans.txt @@ -0,0 +1 @@ +Markup span at (7:0,7 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [16] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren6.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren6.diag.txt new file mode 100644 index 0000000000..4206048463 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren6.diag.txt @@ -0,0 +1,2 @@ +(1,5): Error RZ2010: The
                        tag is not allowed by parent

                        tag helper. Only child tags with name(s) 'strong' are allowed. +(1,8): Error RZ2009: The parent

                        tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'strong' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren6.stree.txt new file mode 100644 index 0000000000..bbbaa92ea1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren6.stree.txt @@ -0,0 +1,19 @@ +RazorDocument - [0..16)::16 - [


                        Hello

                        ] + MarkupBlock - [0..16)::16 + MarkupTagHelperElement - [0..16)::16 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..7)::4 - br[StartTagOnly] - BRTagHelper + MarkupTagHelperStartTag - [3..7)::4 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + CloseAngle;[>]; + MarkupTextLiteral - [7..12)::5 - [Hello] - Gen - SpanEditHandler;Accepts:Any + Text;[Hello]; + MarkupTagHelperEndTag - [12..16)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren6.tspans.txt new file mode 100644 index 0000000000..43f281c42c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren6.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [16] ) - PTagHelper +TagHelper span at (3:0,3 [4] ) - BRTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren7.cspans.txt new file mode 100644 index 0000000000..7815c5f788 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren7.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (11:0,11 [6] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [23] ) +Markup span at (32:0,32 [9] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [45] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren7.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren7.diag.txt new file mode 100644 index 0000000000..5c40a3ac80 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren7.diag.txt @@ -0,0 +1,3 @@ +(1,12): Error RZ2009: The parent tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'strong' are allowed. +(1,28): Error RZ2010: The
                        tag is not allowed by parent

                        tag helper. Only child tags with name(s) 'strong' are allowed. +(1,33): Error RZ2009: The parent

                        tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'strong' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren7.stree.txt new file mode 100644 index 0000000000..a26f2202b7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren7.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..45)::45 - [

                        Title:
                        Something

                        ] + MarkupBlock - [0..45)::45 + MarkupTagHelperElement - [0..45)::45 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..26)::23 - strong[StartTagAndEndTag] - StrongTagHelper + MarkupTagHelperStartTag - [3..11)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [11..17)::6 - [Title:] - Gen - SpanEditHandler;Accepts:Any + Text;[Title:]; + MarkupTagHelperEndTag - [17..26)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperElement - [26..32)::6 - br[SelfClosing] - BRTagHelper + MarkupTagHelperStartTag - [26..32)::6 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + MarkupMiscAttributeContent - [29..30)::1 + MarkupTextLiteral - [29..30)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTextLiteral - [32..41)::9 - [Something] - Gen - SpanEditHandler;Accepts:Any + Text;[Something]; + MarkupTagHelperEndTag - [41..45)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren7.tspans.txt new file mode 100644 index 0000000000..c28f7d8242 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren7.tspans.txt @@ -0,0 +1,3 @@ +TagHelper span at (0:0,0 [45] ) - PTagHelper +TagHelper span at (3:0,3 [23] ) - StrongTagHelper +TagHelper span at (26:0,26 [6] ) - BRTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren8.cspans.txt new file mode 100644 index 0000000000..7815c5f788 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren8.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (11:0,11 [6] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [23] ) +Markup span at (32:0,32 [9] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [45] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren8.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren8.diag.txt new file mode 100644 index 0000000000..97cf99a535 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren8.diag.txt @@ -0,0 +1,2 @@ +(1,12): Error RZ2009: The parent tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'strong, br' are allowed. +(1,33): Error RZ2009: The parent

                        tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'strong, br' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren8.stree.txt new file mode 100644 index 0000000000..a26f2202b7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren8.stree.txt @@ -0,0 +1,35 @@ +RazorDocument - [0..45)::45 - [

                        Title:
                        Something

                        ] + MarkupBlock - [0..45)::45 + MarkupTagHelperElement - [0..45)::45 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..26)::23 - strong[StartTagAndEndTag] - StrongTagHelper + MarkupTagHelperStartTag - [3..11)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [11..17)::6 - [Title:] - Gen - SpanEditHandler;Accepts:Any + Text;[Title:]; + MarkupTagHelperEndTag - [17..26)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperElement - [26..32)::6 - br[SelfClosing] - BRTagHelper + MarkupTagHelperStartTag - [26..32)::6 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + MarkupMiscAttributeContent - [29..30)::1 + MarkupTextLiteral - [29..30)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTextLiteral - [32..41)::9 - [Something] - Gen - SpanEditHandler;Accepts:Any + Text;[Something]; + MarkupTagHelperEndTag - [41..45)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren8.tspans.txt new file mode 100644 index 0000000000..c28f7d8242 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren8.tspans.txt @@ -0,0 +1,3 @@ +TagHelper span at (0:0,0 [45] ) - PTagHelper +TagHelper span at (3:0,3 [23] ) - StrongTagHelper +TagHelper span at (26:0,26 [6] ) - BRTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren9.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren9.cspans.txt new file mode 100644 index 0000000000..5b996a5f72 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren9.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (3:0,3 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [51] ) +Markup span at (13:0,13 [6] ) (Accepts:Any) - Parent: Tag block at (5:0,5 [23] ) +Markup span at (28:0,28 [2] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [51] ) +Markup span at (36:0,36 [11] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [51] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren9.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren9.diag.txt new file mode 100644 index 0000000000..8209310bcf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren9.diag.txt @@ -0,0 +1,2 @@ +(1,14): Error RZ2009: The parent tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'strong, br' are allowed. +(1,39): Error RZ2009: The parent

                        tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'strong, br' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren9.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren9.stree.txt new file mode 100644 index 0000000000..604ea8b5e8 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren9.stree.txt @@ -0,0 +1,40 @@ +RazorDocument - [0..51)::51 - [

                        Title:
                        Something

                        ] + MarkupBlock - [0..51)::51 + MarkupTagHelperElement - [0..51)::51 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTextLiteral - [3..5)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [5..28)::23 - strong[StartTagAndEndTag] - StrongTagHelper + MarkupTagHelperStartTag - [5..13)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [13..19)::6 - [Title:] - Gen - SpanEditHandler;Accepts:Any + Text;[Title:]; + MarkupTagHelperEndTag - [19..28)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTextLiteral - [28..30)::2 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + MarkupTagHelperElement - [30..36)::6 - br[SelfClosing] - BRTagHelper + MarkupTagHelperStartTag - [30..36)::6 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + MarkupMiscAttributeContent - [33..34)::1 + MarkupTextLiteral - [33..34)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTextLiteral - [36..47)::11 - [ Something] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + Text;[Something]; + MarkupTagHelperEndTag - [47..51)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren9.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren9.tspans.txt new file mode 100644 index 0000000000..6b47d0c8f6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsAllowedChildren9.tspans.txt @@ -0,0 +1,3 @@ +TagHelper span at (0:0,0 [51] ) - PTagHelper +TagHelper span at (5:0,5 [23] ) - StrongTagHelper +TagHelper span at (30:0,30 [6] ) - BRTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent1.cspans.txt new file mode 100644 index 0000000000..5b82e351ee --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent1.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (0:0,0 [8] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [8] ) +Markup span at (8:0,8 [9] ) (Accepts:Any) - Parent: Tag block at (8:0,8 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent1.stree.txt new file mode 100644 index 0000000000..d0bebed030 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent1.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..17)::17 - [] + MarkupBlock - [0..17)::17 + MarkupElement - [0..17)::17 + MarkupStartTag - [0..8)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [8..17)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent2.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent2.stree.txt new file mode 100644 index 0000000000..585ba3a17c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent2.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..24)::24 - [

                        ] + MarkupBlock - [0..24)::24 + MarkupTagHelperElement - [0..24)::24 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..20)::17 - strong[StartTagAndEndTag] - StrongTagHelper + MarkupTagHelperStartTag - [3..11)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [11..20)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [20..24)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent2.tspans.txt new file mode 100644 index 0000000000..bc23211df6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent2.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [24] ) - PTagHelper +TagHelper span at (3:0,3 [17] ) - StrongTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent3.cspans.txt new file mode 100644 index 0000000000..55c7fac46e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent3.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (0:0,0 [5] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [5] ) +Markup span at (22:0,22 [6] ) (Accepts:Any) - Parent: Tag block at (22:0,22 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent3.stree.txt new file mode 100644 index 0000000000..540608c5a6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent3.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..28)::28 - [
                        ] + MarkupBlock - [0..28)::28 + MarkupElement - [0..28)::28 + MarkupStartTag - [0..5)::5 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTagHelperElement - [5..22)::17 - strong[StartTagAndEndTag] - StrongTagHelper + MarkupTagHelperStartTag - [5..13)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [13..22)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [22..28)::6 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent3.tspans.txt new file mode 100644 index 0000000000..fc33dac63f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent3.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (5:0,5 [17] ) - StrongTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent4.cspans.txt new file mode 100644 index 0000000000..730a1aeeb4 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent4.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [8] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [8] ) +Markup span at (8:0,8 [8] ) (Accepts:Any) - Parent: Tag block at (8:0,8 [8] ) +Markup span at (16:0,16 [9] ) (Accepts:Any) - Parent: Tag block at (16:0,16 [9] ) +Markup span at (25:0,25 [9] ) (Accepts:Any) - Parent: Tag block at (25:0,25 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent4.stree.txt new file mode 100644 index 0000000000..c4c7affb20 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent4.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..34)::34 - [] + MarkupBlock - [0..34)::34 + MarkupElement - [0..34)::34 + MarkupStartTag - [0..8)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupElement - [8..25)::17 + MarkupStartTag - [8..16)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [16..25)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [25..34)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent5.cspans.txt new file mode 100644 index 0000000000..87adb1fdcf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent5.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (11:0,11 [8] ) (Accepts:Any) - Parent: Tag block at (11:0,11 [8] ) +Markup span at (19:0,19 [9] ) (Accepts:Any) - Parent: Tag block at (19:0,19 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent5.stree.txt new file mode 100644 index 0000000000..af8b35de67 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent5.stree.txt @@ -0,0 +1,32 @@ +RazorDocument - [0..41)::41 - [

                        ] + MarkupBlock - [0..41)::41 + MarkupTagHelperElement - [0..41)::41 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..37)::34 - strong[StartTagAndEndTag] - StrongTagHelper + MarkupTagHelperStartTag - [3..11)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupElement - [11..28)::17 + MarkupStartTag - [11..19)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [19..28)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [28..37)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [37..41)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent5.tspans.txt new file mode 100644 index 0000000000..f75dd01918 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedRequiredParent5.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [41] ) - PTagHelper +TagHelper span at (3:0,3 [34] ) - StrongTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent1.cspans.txt new file mode 100644 index 0000000000..000e3e842a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent1.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (7:0,7 [8] ) (Accepts:Any) - Parent: Tag block at (7:0,7 [8] ) +Markup span at (15:0,15 [9] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent1.stree.txt new file mode 100644 index 0000000000..884fbc2bab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent1.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..24)::24 - [] + MarkupBlock - [0..24)::24 + MarkupTagHelperElement - [0..7)::7 - input[StartTagOnly] - InputTagHelper + MarkupTagHelperStartTag - [0..7)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + MarkupElement - [7..24)::17 + MarkupStartTag - [7..15)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [15..24)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent1.tspans.txt new file mode 100644 index 0000000000..507d5a1ed9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [7] ) - InputTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent2.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent2.stree.txt new file mode 100644 index 0000000000..e72021baa2 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent2.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..31)::31 - [

                        ] + MarkupBlock - [0..31)::31 + MarkupTagHelperElement - [0..31)::31 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..10)::7 - input[StartTagOnly] - InputTagHelper + MarkupTagHelperStartTag - [3..10)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + MarkupTagHelperElement - [10..27)::17 - strong[StartTagAndEndTag] - StrongTagHelper + MarkupTagHelperStartTag - [10..18)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [18..27)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [27..31)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent2.tspans.txt new file mode 100644 index 0000000000..d7fdf8d909 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent2.tspans.txt @@ -0,0 +1,3 @@ +TagHelper span at (0:0,0 [31] ) - PTagHelper +TagHelper span at (3:0,3 [7] ) - InputTagHelper +TagHelper span at (10:0,10 [17] ) - StrongTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent3.cspans.txt new file mode 100644 index 0000000000..fa4040f4e1 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent3.cspans.txt @@ -0,0 +1 @@ +Markup span at (3:0,3 [4] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent3.stree.txt new file mode 100644 index 0000000000..ab19150491 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent3.stree.txt @@ -0,0 +1,27 @@ +RazorDocument - [0..28)::28 - [


                        ] + MarkupBlock - [0..28)::28 + MarkupTagHelperElement - [0..28)::28 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [3..7)::4 + MarkupStartTag - [3..7)::4 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + CloseAngle;[>]; + MarkupTagHelperElement - [7..24)::17 - strong[StartTagAndEndTag] - StrongTagHelper + MarkupTagHelperStartTag - [7..15)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [15..24)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [24..28)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent3.tspans.txt new file mode 100644 index 0000000000..73e31cf725 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent3.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [28] ) - PTagHelper +TagHelper span at (7:0,7 [17] ) - StrongTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent4.cspans.txt new file mode 100644 index 0000000000..932e4c0847 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent4.cspans.txt @@ -0,0 +1 @@ +Markup span at (6:0,6 [4] ) (Accepts:Any) - Parent: Tag block at (6:0,6 [4] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent4.stree.txt new file mode 100644 index 0000000000..305e173046 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent4.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..35)::35 - [


                        ] + MarkupBlock - [0..35)::35 + MarkupTagHelperElement - [0..35)::35 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..14)::11 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [3..6)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [6..10)::4 + MarkupStartTag - [6..10)::4 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [10..14)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [14..31)::17 - strong[StartTagAndEndTag] - StrongTagHelper + MarkupTagHelperStartTag - [14..22)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [22..31)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [31..35)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent4.tspans.txt new file mode 100644 index 0000000000..0220afb1bc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent4.tspans.txt @@ -0,0 +1,3 @@ +TagHelper span at (0:0,0 [35] ) - PTagHelper +TagHelper span at (3:0,3 [11] ) - PTagHelper +TagHelper span at (14:0,14 [17] ) - StrongTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent5.cspans.txt new file mode 100644 index 0000000000..000e3e842a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent5.cspans.txt @@ -0,0 +1,2 @@ +Markup span at (7:0,7 [8] ) (Accepts:Any) - Parent: Tag block at (7:0,7 [8] ) +Markup span at (15:0,15 [9] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent5.stree.txt new file mode 100644 index 0000000000..884fbc2bab --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent5.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..24)::24 - [] + MarkupBlock - [0..24)::24 + MarkupTagHelperElement - [0..7)::7 - input[StartTagOnly] - InputTagHelper + MarkupTagHelperStartTag - [0..7)::7 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + CloseAngle;[>]; + MarkupElement - [7..24)::17 + MarkupStartTag - [7..15)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupEndTag - [15..24)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent5.tspans.txt new file mode 100644 index 0000000000..507d5a1ed9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent5.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [7] ) - InputTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent6.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent6.stree.txt new file mode 100644 index 0000000000..120d5d3b73 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent6.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..26)::26 - [

                        ] + MarkupBlock - [0..26)::26 + MarkupTagHelperElement - [0..26)::26 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..12)::9 - input[SelfClosing] - InputTagHelper + MarkupTagHelperStartTag - [3..12)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[input]; + MarkupMiscAttributeContent - [9..10)::1 + MarkupTextLiteral - [9..10)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTagHelperElement - [12..22)::10 - strong[SelfClosing] - StrongTagHelper + MarkupTagHelperStartTag - [12..22)::10 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupMiscAttributeContent - [19..20)::1 + MarkupTextLiteral - [19..20)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [22..26)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent6.tspans.txt new file mode 100644 index 0000000000..64d44d0707 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent6.tspans.txt @@ -0,0 +1,3 @@ +TagHelper span at (0:0,0 [26] ) - PTagHelper +TagHelper span at (3:0,3 [9] ) - InputTagHelper +TagHelper span at (12:0,12 [10] ) - StrongTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent7.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent7.cspans.txt new file mode 100644 index 0000000000..85c1b5ca5d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent7.cspans.txt @@ -0,0 +1 @@ +Markup span at (3:0,3 [6] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent7.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent7.stree.txt new file mode 100644 index 0000000000..ba2a0caa9a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent7.stree.txt @@ -0,0 +1,30 @@ +RazorDocument - [0..23)::23 - [


                        ] + MarkupBlock - [0..23)::23 + MarkupTagHelperElement - [0..23)::23 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [3..9)::6 + MarkupStartTag - [3..9)::6 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + MarkupMiscAttributeContent - [6..7)::1 + MarkupTextLiteral - [6..7)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTagHelperElement - [9..19)::10 - strong[SelfClosing] - StrongTagHelper + MarkupTagHelperStartTag - [9..19)::10 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupMiscAttributeContent - [16..17)::1 + MarkupTextLiteral - [16..17)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [19..23)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent7.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent7.tspans.txt new file mode 100644 index 0000000000..4148089e22 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent7.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [23] ) - PTagHelper +TagHelper span at (9:0,9 [10] ) - StrongTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent8.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent8.cspans.txt new file mode 100644 index 0000000000..42ce74cdcf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent8.cspans.txt @@ -0,0 +1 @@ +Markup span at (6:0,6 [6] ) (Accepts:Any) - Parent: Tag block at (6:0,6 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent8.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent8.stree.txt new file mode 100644 index 0000000000..eaf02a847a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent8.stree.txt @@ -0,0 +1,40 @@ +RazorDocument - [0..30)::30 - [


                        ] + MarkupBlock - [0..30)::30 + MarkupTagHelperElement - [0..30)::30 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..16)::13 - p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [3..6)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [6..12)::6 + MarkupStartTag - [6..12)::6 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[br]; + MarkupMiscAttributeContent - [9..10)::1 + MarkupTextLiteral - [9..10)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [12..16)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [16..26)::10 - strong[SelfClosing] - StrongTagHelper + MarkupTagHelperStartTag - [16..26)::10 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + MarkupMiscAttributeContent - [23..24)::1 + MarkupTextLiteral - [23..24)::1 - [ ] - Gen - SpanEditHandler;Accepts:Any + Whitespace;[ ]; + ForwardSlash;[/]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [26..30)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent8.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent8.tspans.txt new file mode 100644 index 0000000000..9e2ff7f56f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNestedVoidSelfClosingRequiredParent8.tspans.txt @@ -0,0 +1,3 @@ +TagHelper span at (0:0,0 [30] ) - PTagHelper +TagHelper span at (3:0,3 [13] ) - PTagHelper +TagHelper span at (16:0,16 [10] ) - StrongTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAll.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAll.cspans.txt new file mode 100644 index 0000000000..b3958cf71b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAll.cspans.txt @@ -0,0 +1 @@ +Markup span at (3:0,3 [2] ) (Accepts:Any) - Parent: Tag block at (3:0,3 [2] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAll.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAll.diag.txt new file mode 100644 index 0000000000..063da0eb5b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAll.diag.txt @@ -0,0 +1 @@ +(1,4): Error RZ2009: The parent

                        tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'custom' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAll.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAll.stree.txt new file mode 100644 index 0000000000..c3ce3b808e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAll.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..9)::9 - [

                        ] + MarkupBlock - [0..9)::9 + MarkupTagHelperElement - [0..9)::9 - p[StartTagAndEndTag] - PTagHelper - CatchAllTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [3..5)::2 + MarkupEndTag - [3..5)::2 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperEndTag - [5..9)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAll.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAll.tspans.txt new file mode 100644 index 0000000000..742c49e552 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAll.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [9] ) - PTagHelper - CatchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAllWithPrefix.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAllWithPrefix.cspans.txt new file mode 100644 index 0000000000..9f25e95db6 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAllWithPrefix.cspans.txt @@ -0,0 +1 @@ +Markup span at (6:0,6 [2] ) (Accepts:Any) - Parent: Tag block at (6:0,6 [2] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAllWithPrefix.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAllWithPrefix.diag.txt new file mode 100644 index 0000000000..ea784070ee --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAllWithPrefix.diag.txt @@ -0,0 +1 @@ +(1,7): Error RZ2009: The parent tag helper does not allow non-tag content. Only child tag helper(s) targeting tag name(s) 'custom' are allowed. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAllWithPrefix.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAllWithPrefix.stree.txt new file mode 100644 index 0000000000..96f4542570 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAllWithPrefix.stree.txt @@ -0,0 +1,18 @@ +RazorDocument - [0..15)::15 - [] + MarkupBlock - [0..15)::15 + MarkupTagHelperElement - [0..15)::15 - th:p[StartTagAndEndTag] - PTagHelper - CatchAllTagHelper + MarkupTagHelperStartTag - [0..6)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[th:p]; + CloseAngle;[>]; + MarkupElement - [6..8)::2 + MarkupEndTag - [6..8)::2 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperEndTag - [8..15)::7 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[th:p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAllWithPrefix.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAllWithPrefix.tspans.txt new file mode 100644 index 0000000000..9c88cfee63 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsNullTagNameWithAllowedChildrenForCatchAllWithPrefix.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (0:0,0 [15] ) - PTagHelper - CatchAllTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags1.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags1.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags1.diag.txt new file mode 100644 index 0000000000..66ca144635 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags1.diag.txt @@ -0,0 +1,2 @@ +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,5): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags1.stree.txt new file mode 100644 index 0000000000..7ceb2b793e --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags1.stree.txt @@ -0,0 +1,12 @@ +RazorDocument - [0..11)::11 - [

                        ] + MarkupBlock - [0..11)::11 + MarkupTagHelperElement - [0..11)::11 - p[StartTagAndEndTag] - PTagHelper - CatchALlTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..11)::8 - strong[StartTagAndEndTag] - StrongTagHelper - CatchALlTagHelper + MarkupTagHelperStartTag - [3..11)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags1.tspans.txt new file mode 100644 index 0000000000..90c108ed6f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags1.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [11] ) - PTagHelper - CatchALlTagHelper +TagHelper span at (3:0,3 [8] ) - StrongTagHelper - CatchALlTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags2.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags2.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags2.diag.txt new file mode 100644 index 0000000000..d177eb6df7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags2.diag.txt @@ -0,0 +1 @@ +(1,2): Error RZ1034: Found a malformed 'p' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags2.stree.txt new file mode 100644 index 0000000000..0fd6778b92 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags2.stree.txt @@ -0,0 +1,17 @@ +RazorDocument - [0..20)::20 - [

                        ] + MarkupBlock - [0..20)::20 + MarkupTagHelperElement - [0..20)::20 - p[StartTagAndEndTag] - PTagHelper - CatchALlTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..20)::17 - strong[StartTagAndEndTag] - StrongTagHelper - CatchALlTagHelper + MarkupTagHelperStartTag - [3..11)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [11..20)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags2.tspans.txt new file mode 100644 index 0000000000..c845290524 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags2.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [20] ) - PTagHelper - CatchALlTagHelper +TagHelper span at (3:0,3 [17] ) - StrongTagHelper - CatchALlTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags3.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags3.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags3.diag.txt new file mode 100644 index 0000000000..c430b77aba --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags3.diag.txt @@ -0,0 +1,2 @@ +(1,5): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. +(1,17): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags3.stree.txt new file mode 100644 index 0000000000..f398f7e621 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags3.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..23)::23 - [

                        ] + MarkupBlock - [0..23)::23 + MarkupTagHelperElement - [0..15)::15 - p[StartTagAndEndTag] - PTagHelper - CatchALlTagHelper + MarkupTagHelperStartTag - [0..3)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [3..11)::8 - strong[StartTagAndEndTag] - StrongTagHelper - CatchALlTagHelper + MarkupTagHelperStartTag - [3..11)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [11..15)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupTagHelperElement - [15..23)::8 - strong[StartTagAndEndTag] - StrongTagHelper - CatchALlTagHelper + MarkupTagHelperStartTag - [15..23)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags3.tspans.txt new file mode 100644 index 0000000000..15f95fc055 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags3.tspans.txt @@ -0,0 +1,3 @@ +TagHelper span at (0:0,0 [15] ) - PTagHelper - CatchALlTagHelper +TagHelper span at (3:0,3 [8] ) - StrongTagHelper - CatchALlTagHelper +TagHelper span at (15:0,15 [8] ) - StrongTagHelper - CatchALlTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags4.cspans.txt new file mode 100644 index 0000000000..0ddda3f56c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags4.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [1] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Tag block at (4:0,4 [1] ) +Markup span at (13:0,13 [2] ) (Accepts:Any) - Parent: Tag block at (13:0,13 [2] ) +Markup span at (23:0,23 [9] ) (Accepts:Any) - Parent: Tag block at (23:0,23 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags4.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags4.diag.txt new file mode 100644 index 0000000000..23376ed537 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags4.diag.txt @@ -0,0 +1,2 @@ +(1,18): Error RZ1035: Missing close angle for tag helper 'strong'. +(1,26): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags4.stree.txt new file mode 100644 index 0000000000..7f1b3852f7 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags4.stree.txt @@ -0,0 +1,44 @@ +RazorDocument - [0..36)::36 - [<

                        <

                        ] + MarkupBlock - [0..36)::36 + MarkupElement - [0..1)::1 + MarkupStartTag - [0..1)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperElement - [1..36)::35 - p[StartTagAndEndTag] - PTagHelper - CatchALlTagHelper + MarkupTagHelperStartTag - [1..4)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [4..5)::1 + MarkupStartTag - [4..5)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperElement - [5..23)::18 - strong[StartTagAndEndTag] - StrongTagHelper - CatchALlTagHelper + MarkupTagHelperStartTag - [5..13)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupElement - [13..15)::2 + MarkupEndTag - [13..15)::2 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperEndTag - [15..23)::8 - []; + MarkupElement - [23..32)::9 + MarkupEndTag - [23..32)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [32..36)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags4.tspans.txt new file mode 100644 index 0000000000..a2439ab80f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags4.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (1:0,1 [35] ) - PTagHelper - CatchALlTagHelper +TagHelper span at (5:0,5 [18] ) - StrongTagHelper - CatchALlTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags5.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags5.cspans.txt new file mode 100644 index 0000000000..6b5900843d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags5.cspans.txt @@ -0,0 +1,4 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [1] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Tag block at (4:0,4 [1] ) +Markup span at (13:0,13 [2] ) (Accepts:Any) - Parent: Tag block at (13:0,13 [2] ) +Markup span at (24:0,24 [9] ) (Accepts:Any) - Parent: Tag block at (24:0,24 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags5.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags5.diag.txt new file mode 100644 index 0000000000..2ec0cc5b46 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags5.diag.txt @@ -0,0 +1 @@ +(1,27): Error RZ1034: Found a malformed 'strong' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags5.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags5.stree.txt new file mode 100644 index 0000000000..de50b379ce --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags5.stree.txt @@ -0,0 +1,44 @@ +RazorDocument - [0..37)::37 - [<

                        <

                        ] + MarkupBlock - [0..37)::37 + MarkupElement - [0..1)::1 + MarkupStartTag - [0..1)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperElement - [1..37)::36 - p[StartTagAndEndTag] - PTagHelper - CatchALlTagHelper + MarkupTagHelperStartTag - [1..4)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [4..5)::1 + MarkupStartTag - [4..5)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperElement - [5..24)::19 - strong[StartTagAndEndTag] - StrongTagHelper - CatchALlTagHelper + MarkupTagHelperStartTag - [5..13)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[strong]; + CloseAngle;[>]; + MarkupElement - [13..15)::2 + MarkupEndTag - [13..15)::2 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperEndTag - [15..24)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupElement - [24..33)::9 + MarkupEndTag - [24..33)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [33..37)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags5.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags5.tspans.txt new file mode 100644 index 0000000000..4ba2086e2d --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags5.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (1:0,1 [36] ) - PTagHelper - CatchALlTagHelper +TagHelper span at (5:0,5 [19] ) - StrongTagHelper - CatchALlTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags6.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags6.cspans.txt new file mode 100644 index 0000000000..f84fc1d9eb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags6.cspans.txt @@ -0,0 +1,5 @@ +Markup span at (0:0,0 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [1] ) +Markup span at (4:0,4 [1] ) (Accepts:Any) - Parent: Tag block at (4:0,4 [1] ) +Markup span at (13:0,13 [2] ) (Accepts:Any) - Parent: Tag block at (13:0,13 [2] ) +Markup span at (15:0,15 [1] ) (Accepts:Any) - Parent: Tag block at (15:0,15 [1] ) +Markup span at (25:0,25 [9] ) (Accepts:Any) - Parent: Tag block at (25:0,25 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags6.diag.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags6.diag.txt new file mode 100644 index 0000000000..593733688c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags6.diag.txt @@ -0,0 +1 @@ +(1,28): Error RZ1034: Found a malformed 'custom' tag helper. Tag helpers must have a start and end tag or be self closing. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags6.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags6.stree.txt new file mode 100644 index 0000000000..22b0433adb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags6.stree.txt @@ -0,0 +1,49 @@ +RazorDocument - [0..38)::38 - [<

                        <

                        ] + MarkupBlock - [0..38)::38 + MarkupElement - [0..1)::1 + MarkupStartTag - [0..1)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperElement - [1..38)::37 - p[StartTagAndEndTag] - PTagHelper - CatchALlTagHelper + MarkupTagHelperStartTag - [1..4)::3 - [

                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[p]; + CloseAngle;[>]; + MarkupElement - [4..5)::1 + MarkupStartTag - [4..5)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperElement - [5..25)::20 - custom[StartTagAndEndTag] - CatchALlTagHelper + MarkupTagHelperStartTag - [5..13)::8 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[custom]; + CloseAngle;[>]; + MarkupElement - [13..15)::2 + MarkupEndTag - [13..15)::2 - [ - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[]; + CloseAngle;[]; + MarkupElement - [15..16)::1 + MarkupStartTag - [15..16)::1 - [<] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[]; + CloseAngle;[]; + MarkupTagHelperEndTag - [16..25)::9 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[custom]; + CloseAngle;[>]; + MarkupElement - [25..34)::9 + MarkupEndTag - [25..34)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[custom]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [34..38)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags6.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags6.tspans.txt new file mode 100644 index 0000000000..69e6d665e9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsPartialRequiredParentTags6.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (1:0,1 [37] ) - PTagHelper - CatchALlTagHelper +TagHelper span at (5:0,5 [20] ) - CatchALlTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildren.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildren.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildren.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildren.stree.txt new file mode 100644 index 0000000000..d4340fbaf9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildren.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..36)::36 - [] + MarkupBlock - [0..36)::36 + MarkupTagHelperElement - [0..36)::36 - th:p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..6)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[th:p]; + CloseAngle;[>]; + MarkupTagHelperElement - [6..29)::23 - th:strong[StartTagAndEndTag] - StrongTagHelper + MarkupTagHelperStartTag - [6..17)::11 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[th:strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [17..29)::12 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[th:strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [29..36)::7 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[th:p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildren.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildren.tspans.txt new file mode 100644 index 0000000000..3d7cf53630 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildren.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [36] ) - PTagHelper +TagHelper span at (6:0,6 [23] ) - StrongTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildrenAndRequireParent.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildrenAndRequireParent.cspans.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildrenAndRequireParent.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildrenAndRequireParent.stree.txt new file mode 100644 index 0000000000..d4340fbaf9 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildrenAndRequireParent.stree.txt @@ -0,0 +1,22 @@ +RazorDocument - [0..36)::36 - [] + MarkupBlock - [0..36)::36 + MarkupTagHelperElement - [0..36)::36 - th:p[StartTagAndEndTag] - PTagHelper + MarkupTagHelperStartTag - [0..6)::6 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[th:p]; + CloseAngle;[>]; + MarkupTagHelperElement - [6..29)::23 - th:strong[StartTagAndEndTag] - StrongTagHelper + MarkupTagHelperStartTag - [6..17)::11 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[th:strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [17..29)::12 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[th:strong]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [29..36)::7 - [] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[th:p]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildrenAndRequireParent.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildrenAndRequireParent.tspans.txt new file mode 100644 index 0000000000..3d7cf53630 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelperPrefixAndAllowedChildrenAndRequireParent.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (0:0,0 [36] ) - PTagHelper +TagHelper span at (6:0,6 [23] ) - StrongTagHelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags1.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags1.cspans.txt new file mode 100644 index 0000000000..b5c72f9c7c --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags1.cspans.txt @@ -0,0 +1,6 @@ +Markup span at (0:0,0 [7] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [25] ) +Markup span at (7:0,7 [7] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [17] ) +Markup span at (14:0,14 [9] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [17] ) +Markup span at (23:0,23 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [17] ) +Markup span at (24:0,24 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [25] ) +Markup span at (34:0,34 [9] ) (Accepts:Any) - Parent: Tag block at (34:0,34 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags1.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags1.stree.txt new file mode 100644 index 0000000000..ab41052e02 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags1.stree.txt @@ -0,0 +1,37 @@ +RazorDocument - [0..43)::43 - [] + MarkupBlock - [0..43)::43 + MarkupElement - [0..43)::43 + MarkupStartTag - [0..25)::25 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags1.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags1.tspans.txt new file mode 100644 index 0000000000..d4c27b6e7a --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags1.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (25:0,25 [9] ) - inputtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags2.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags2.cspans.txt new file mode 100644 index 0000000000..8bd8e1509f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags2.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [7] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [58] ) +Markup span at (7:0,7 [5] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [15] ) +Markup span at (12:0,12 [9] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [15] ) +Markup span at (21:0,21 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [15] ) +Markup span at (22:0,22 [7] ) (Accepts:Any) - Parent: Markup block at (22:0,22 [17] ) +Markup span at (29:0,29 [9] ) (Accepts:Any) - Parent: Markup block at (22:0,22 [17] ) +Markup span at (38:0,38 [1] ) (Accepts:Any) - Parent: Markup block at (22:0,22 [17] ) +Markup span at (39:0,39 [8] ) (Accepts:Any) - Parent: Markup block at (39:0,39 [18] ) +Markup span at (47:0,47 [9] ) (Accepts:Any) - Parent: Markup block at (39:0,39 [18] ) +Markup span at (56:0,56 [1] ) (Accepts:Any) - Parent: Markup block at (39:0,39 [18] ) +Markup span at (57:0,57 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [58] ) +Markup span at (67:0,67 [9] ) (Accepts:Any) - Parent: Tag block at (67:0,67 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags2.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags2.stree.txt new file mode 100644 index 0000000000..02f84b0a0b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags2.stree.txt @@ -0,0 +1,65 @@ +RazorDocument - [0..76)::76 - [] + MarkupBlock - [0..76)::76 + MarkupElement - [0..76)::76 + MarkupStartTag - [0..58)::58 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags2.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags2.tspans.txt new file mode 100644 index 0000000000..3621fc53bf --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags2.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (58:0,58 [9] ) - inputtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags3.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags3.cspans.txt new file mode 100644 index 0000000000..2d9ed79313 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags3.cspans.txt @@ -0,0 +1,12 @@ +Markup span at (0:0,0 [7] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [25] ) +Markup span at (7:0,7 [7] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [17] ) +Markup span at (14:0,14 [9] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [17] ) +Markup span at (23:0,23 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [17] ) +Markup span at (24:0,24 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [25] ) +Markup span at (28:0,28 [7] ) (Accepts:Any) - Parent: Tag block at (28:0,28 [25] ) +Markup span at (35:0,35 [7] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [17] ) +Markup span at (42:0,42 [9] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [17] ) +Markup span at (51:0,51 [1] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [17] ) +Markup span at (52:0,52 [1] ) (Accepts:Any) - Parent: Tag block at (28:0,28 [25] ) +Markup span at (62:0,62 [9] ) (Accepts:Any) - Parent: Tag block at (62:0,62 [9] ) +Markup span at (75:0,75 [9] ) (Accepts:Any) - Parent: Tag block at (75:0,75 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags3.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags3.stree.txt new file mode 100644 index 0000000000..4c82e8fa9f --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags3.stree.txt @@ -0,0 +1,73 @@ +RazorDocument - [0..84)::84 - [

                        ] + MarkupBlock - [0..84)::84 + MarkupElement - [0..84)::84 + MarkupStartTag - [0..25)::25 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [71..75)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [75..84)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags3.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags3.tspans.txt new file mode 100644 index 0000000000..5f9f687bee --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags3.tspans.txt @@ -0,0 +1,2 @@ +TagHelper span at (25:0,25 [50] ) - ptaghelper +TagHelper span at (53:0,53 [9] ) - inputtaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags4.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags4.cspans.txt new file mode 100644 index 0000000000..b8ce9ee314 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags4.cspans.txt @@ -0,0 +1,14 @@ +Markup span at (0:0,0 [7] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [25] ) +Markup span at (7:0,7 [7] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [17] ) +Markup span at (14:0,14 [9] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [17] ) +Markup span at (23:0,23 [1] ) (Accepts:Any) - Parent: Markup block at (7:0,7 [17] ) +Markup span at (24:0,24 [1] ) (Accepts:Any) - Parent: Tag block at (0:0,0 [25] ) +Markup span at (28:0,28 [7] ) (Accepts:Any) - Parent: Tag block at (28:0,28 [26] ) +Markup span at (35:0,35 [7] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [18] ) +Markup span at (42:0,42 [5] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [18] ) +Markup span at (47:0,47 [5] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [18] ) +Markup span at (52:0,52 [1] ) (Accepts:Any) - Parent: Markup block at (35:0,35 [18] ) +Markup span at (53:0,53 [1] ) (Accepts:Any) - Parent: Tag block at (28:0,28 [26] ) +Markup span at (54:0,54 [9] ) (Accepts:Any) - Parent: Tag block at (25:0,25 [51] ) +Markup span at (63:0,63 [9] ) (Accepts:Any) - Parent: Tag block at (63:0,63 [9] ) +Markup span at (76:0,76 [9] ) (Accepts:Any) - Parent: Tag block at (76:0,76 [9] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags4.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags4.stree.txt new file mode 100644 index 0000000000..9abd2f61a0 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags4.stree.txt @@ -0,0 +1,74 @@ +RazorDocument - [0..85)::85 - [

                        ] + MarkupBlock - [0..85)::85 + MarkupElement - [0..85)::85 + MarkupStartTag - [0..25)::25 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; + MarkupTagHelperEndTag - [72..76)::4 - [

                        ] + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[p]; + CloseAngle;[>]; + MarkupEndTag - [76..85)::9 - [] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[script]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags4.tspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags4.tspans.txt new file mode 100644 index 0000000000..31ab64ca0b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperParseTreeRewriterTest/UnderstandsTagHelpersInHtmlTypedScriptTags4.tspans.txt @@ -0,0 +1 @@ +TagHelper span at (25:0,25 [51] ) - ptaghelper diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/WhiteSpaceRewriterTest/Moves_Whitespace_Preceeding_ExpressionBlock_To_Parent_Block.cspans.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/WhiteSpaceRewriterTest/Moves_Whitespace_Preceeding_ExpressionBlock_To_Parent_Block.cspans.txt new file mode 100644 index 0000000000..64df8a7ddd --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/WhiteSpaceRewriterTest/Moves_Whitespace_Preceeding_ExpressionBlock_To_Parent_Block.cspans.txt @@ -0,0 +1,18 @@ +Markup span at (0:0,0 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [58] ) +Markup span at (2:1,0 [5] ) (Accepts:Any) - Parent: Tag block at (2:1,0 [5] ) +Markup span at (7:1,5 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [58] ) +Markup span at (9:2,0 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [58] ) +Transition span at (13:2,4 [1] ) (Accepts:None) - Parent: Expression block at (13:2,4 [7] ) +Code span at (14:2,5 [6] ) (Accepts:NonWhitespace) - Parent: Expression block at (13:2,4 [7] ) +Markup span at (20:2,11 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [58] ) +Markup span at (22:3,0 [6] ) (Accepts:Any) - Parent: Tag block at (22:3,0 [6] ) +Markup span at (28:3,6 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [58] ) +Markup span at (30:4,0 [5] ) (Accepts:Any) - Parent: Tag block at (30:4,0 [5] ) +Markup span at (35:4,5 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [58] ) +Markup span at (37:5,0 [4] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [58] ) +Transition span at (41:5,4 [1] ) (Accepts:None) - Parent: Expression block at (41:5,4 [9] ) +MetaCode span at (42:5,5 [1] ) (Accepts:None) - Parent: Expression block at (41:5,4 [9] ) +Code span at (43:5,6 [6] ) (Accepts:Any) - Parent: Expression block at (41:5,4 [9] ) +MetaCode span at (49:5,12 [1] ) (Accepts:None) - Parent: Expression block at (41:5,4 [9] ) +Markup span at (50:5,13 [2] ) (Accepts:Any) - Parent: Markup block at (0:0,0 [58] ) +Markup span at (52:6,0 [6] ) (Accepts:Any) - Parent: Tag block at (52:6,0 [6] ) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/WhiteSpaceRewriterTest/Moves_Whitespace_Preceeding_ExpressionBlock_To_Parent_Block.stree.txt b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/WhiteSpaceRewriterTest/Moves_Whitespace_Preceeding_ExpressionBlock_To_Parent_Block.stree.txt new file mode 100644 index 0000000000..6fc0095f30 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/WhiteSpaceRewriterTest/Moves_Whitespace_Preceeding_ExpressionBlock_To_Parent_Block.stree.txt @@ -0,0 +1,58 @@ +RazorDocument - [0..58)::58 - [LF
                        LF @resultLF
                        LF
                        LF @(result)LF
                        ] + MarkupBlock - [0..58)::58 + MarkupTextLiteral - [0..2)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [2..28)::26 + MarkupStartTag - [2..7)::5 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [7..9)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupTextLiteral - [9..13)::4 - [ ] + Whitespace;[ ]; + CSharpCodeBlock - [13..20)::7 + CSharpImplicitExpression - [13..20)::7 + CSharpTransition - [13..14)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpImplicitExpressionBody - [14..20)::6 + CSharpCodeBlock - [14..20)::6 + CSharpExpressionLiteral - [14..20)::6 - [result] - Gen - ImplicitExpressionEditHandler;Accepts:NonWhitespace;ImplicitExpression[RTD];K14 + Identifier;[result]; + MarkupTextLiteral - [20..22)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupEndTag - [22..28)::6 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [28..30)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupElement - [30..58)::28 + MarkupStartTag - [30..35)::5 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + Text;[div]; + CloseAngle;[>]; + MarkupTextLiteral - [35..37)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupTextLiteral - [37..41)::4 - [ ] + Whitespace;[ ]; + CSharpCodeBlock - [41..50)::9 + CSharpExplicitExpression - [41..50)::9 + CSharpTransition - [41..42)::1 - Gen - SpanEditHandler;Accepts:None + Transition;[@]; + CSharpExplicitExpressionBody - [42..50)::8 + RazorMetaCode - [42..43)::1 - Gen - SpanEditHandler;Accepts:None + LeftParenthesis;[(]; + CSharpCodeBlock - [43..49)::6 + CSharpExpressionLiteral - [43..49)::6 - [result] - Gen - SpanEditHandler;Accepts:Any + Identifier;[result]; + RazorMetaCode - [49..50)::1 - Gen - SpanEditHandler;Accepts:None + RightParenthesis;[)]; + MarkupTextLiteral - [50..52)::2 - [LF] - Gen - SpanEditHandler;Accepts:Any + NewLine;[LF]; + MarkupEndTag - [52..58)::6 - [
                        ] - Gen - SpanEditHandler;Accepts:Any + OpenAngle;[<]; + ForwardSlash;[/]; + Text;[div]; + CloseAngle;[>]; diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/Source/BasicMarkup.cshtml b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/Source/BasicMarkup.cshtml new file mode 100644 index 0000000000..384a7a6deb --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/Source/BasicMarkup.cshtml @@ -0,0 +1,8 @@ + + + This is the title. + + + Link to Contoso. + + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/nested-1000.html b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/nested-1000.html new file mode 100644 index 0000000000..3c35bdbcbe --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestFiles/nested-1000.html @@ -0,0 +1,2002 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestRazorProject.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestRazorProject.cs new file mode 100644 index 0000000000..1c4faa7b5b --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestRazorProject.cs @@ -0,0 +1,47 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class TestRazorProject : RazorProject + { + private readonly Dictionary _lookup; + + public TestRazorProject() + : this(new RazorProjectItem[0]) + { + } + + public TestRazorProject(IList items) + { + _lookup = items.ToDictionary(item => item.FilePath); + } + + public override IEnumerable EnumerateItems(string basePath) + { + throw new NotImplementedException(); + } + + [Obsolete("Use GetItem(string path, string fileKind) instead.")] + public override RazorProjectItem GetItem(string path) + { + return GetItem(path, fileKind: null); + } + + public override RazorProjectItem GetItem(string path, string fileKind) + { + if (!_lookup.TryGetValue(path, out var value)) + { + value = new NotFoundProjectItem("", path, fileKind); + } + + return value; + } + + public new string NormalizeAndEnsureValidPath(string path) => base.NormalizeAndEnsureValidPath(path); + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/VirtualRazorProjectFileSystemTest.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/VirtualRazorProjectFileSystemTest.cs new file mode 100644 index 0000000000..227ed02e07 --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/VirtualRazorProjectFileSystemTest.cs @@ -0,0 +1,400 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; +using DirectoryNode = Microsoft.AspNetCore.Razor.Language.VirtualRazorProjectFileSystem.DirectoryNode; +using FileNode = Microsoft.AspNetCore.Razor.Language.VirtualRazorProjectFileSystem.FileNode; + +namespace Microsoft.AspNetCore.Razor.Language +{ + public class VirtualRazorProjectFileSystemTest + { + [Fact] + public void GetItem_ReturnsNotFound_IfFileDoesNotExistInRoot() + { + // Arrange + var path = "/root-file.cshtml"; + var projectSystem = new VirtualRazorProjectFileSystem(); + + // Act + projectSystem.Add(new TestRazorProjectItem("/different-file.cshtml")); + var result = projectSystem.GetItem(path, fileKind: null); + + // Assert + Assert.False(result.Exists); + } + + [Fact] + public void GetItem_ReturnsItemAddedToRoot() + { + // Arrange + var path = "/root-file.cshtml"; + var projectSystem = new VirtualRazorProjectFileSystem(); + var projectItem = new TestRazorProjectItem(path); + + // Act + projectSystem.Add(projectItem); + var actual = projectSystem.GetItem(path, fileKind: null); + + // Assert + Assert.Same(projectItem, actual); + } + + [Theory] + [InlineData("/subDirectory/file.cshtml")] + [InlineData("/subDirectory/dir2/file.cshtml")] + [InlineData("/subDirectory/dir2/dir3/file.cshtml")] + public void GetItem_ReturnsItemAddedToNestedDirectory(string path) + { + // Arrange + var projectSystem = new VirtualRazorProjectFileSystem(); + var projectItem = new TestRazorProjectItem(path); + + // Act + projectSystem.Add(projectItem); + var actual = projectSystem.GetItem(path, fileKind: null); + + // Assert + Assert.Same(projectItem, actual); + } + + [Fact] + public void GetItem_ReturnsNotFound_WhenNestedDirectoryDoesNotExist() + { + // Arrange + var projectSystem = new VirtualRazorProjectFileSystem(); + + // Act + var actual = projectSystem.GetItem("/subDirectory/dir3/file.cshtml", fileKind: null); + + // Assert + Assert.False(actual.Exists); + } + + [Fact] + public void GetItem_ReturnsNotFound_WhenNestedDirectoryDoesNotExist_AndPeerDirectoryExists() + { + // Arrange + var projectSystem = new VirtualRazorProjectFileSystem(); + var projectItem = new TestRazorProjectItem("/subDirectory/dir2/file.cshtml"); + + // Act + projectSystem.Add(projectItem); + var actual = projectSystem.GetItem("/subDirectory/dir3/file.cshtml", fileKind: null); + + // Assert + Assert.False(actual.Exists); + } + + [Fact] + public void GetItem_ReturnsNotFound_WhenFileDoesNotExistInNestedDirectory() + { + // Arrange + var projectSystem = new VirtualRazorProjectFileSystem(); + var projectItem = new TestRazorProjectItem("/subDirectory/dir2/file.cshtml"); + + // Act + projectSystem.Add(projectItem); + var actual = projectSystem.GetItem("/subDirectory/dir2/file2.cshtml", fileKind: null); + + // Assert + Assert.False(actual.Exists); + } + + [Fact] + public void EnumerateItems_AtRoot_ReturnsAllFiles() + { + // Arrange + var projectSystem = new VirtualRazorProjectFileSystem(); + var file1 = new TestRazorProjectItem("/subDirectory/dir2/file1.cshtml"); + var file2 = new TestRazorProjectItem("/file2.cshtml"); + var file3 = new TestRazorProjectItem("/dir3/file3.cshtml"); + var file4 = new TestRazorProjectItem("/subDirectory/file4.cshtml"); + projectSystem.Add(file1); + projectSystem.Add(file2); + projectSystem.Add(file3); + projectSystem.Add(file4); + + // Act + var result = projectSystem.EnumerateItems("/"); + + // Assert + Assert.Equal(new[] { file2, file4, file1, file3 }, result); + } + + [Fact] + public void EnumerateItems_AtSubDirectory_ReturnsAllFilesUnderDirectoryHierarchy() + { + // Arrange + var projectSystem = new VirtualRazorProjectFileSystem(); + var file1 = new TestRazorProjectItem("/subDirectory/dir2/file1.cshtml"); + var file2 = new TestRazorProjectItem("/file2.cshtml"); + var file3 = new TestRazorProjectItem("/dir3/file3.cshtml"); + var file4 = new TestRazorProjectItem("/subDirectory/file4.cshtml"); + projectSystem.Add(file1); + projectSystem.Add(file2); + projectSystem.Add(file3); + projectSystem.Add(file4); + + // Act + var result = projectSystem.EnumerateItems("/subDirectory"); + + // Assert + Assert.Equal(new[] { file4, file1 }, result); + } + + [Fact] + public void EnumerateItems_WithNoFilesInRoot_ReturnsEmptySequence() + { + // Arrange + var projectSystem = new VirtualRazorProjectFileSystem(); + + // Act + var result = projectSystem.EnumerateItems("/"); + + // Assert + Assert.Empty(result); + } + + [Fact] + public void EnumerateItems_ForNonExistentDirectory_ReturnsEmptySequence() + { + // Arrange + var projectSystem = new VirtualRazorProjectFileSystem(); + projectSystem.Add(new TestRazorProjectItem("/subDirectory/dir2/file1.cshtml")); + projectSystem.Add(new TestRazorProjectItem("/file2.cshtml")); + + // Act + var result = projectSystem.EnumerateItems("/dir3"); + + // Assert + Assert.Empty(result); + } + + [Fact] + public void GetHierarchicalItems_Works() + { + // Arrange + var projectSystem = new VirtualRazorProjectFileSystem(); + var viewImport1 = new TestRazorProjectItem("/_ViewImports.cshtml"); + var viewImport2 = new TestRazorProjectItem("/Views/Home/_ViewImports.cshtml"); + projectSystem.Add(viewImport1); + projectSystem.Add(viewImport2); + + // Act + var items = projectSystem.FindHierarchicalItems("/", "/Views/Home/Index.cshtml", "_ViewImports.cshtml"); + + // Assert + Assert.Collection( + items, + item => Assert.Same(viewImport2, item), + item => Assert.False(item.Exists), + item => Assert.Same(viewImport1, item)); + } + + [Fact] + public void DirectoryNode_GetDirectory_ReturnsRoot() + { + // Arrange + var root = new DirectoryNode("/"); + + // Act + var result = root.GetDirectory("/"); + + // Assert + Assert.Same(root, result); + } + + [Fact] + public void DirectoryNode_GetDirectory_ReturnsNull_IfDirectoryDoesNotExist() + { + // Arrange + var root = new DirectoryNode("/"); + + // Act + var result = root.GetDirectory("/does-not/exist"); + + // Assert + Assert.Null(result); + } + + [Fact] + public void DirectoryNode_AddFile_CanAddToRoot() + { + // Arrange + var root = new DirectoryNode("/"); + var projectItem = new TestRazorProjectItem("/File.txt"); + + // Act + root.AddFile(new FileNode("/File.txt", projectItem)); + + // Assert + Assert.Empty(root.Directories); + Assert.Collection( + root.Files, + file => Assert.Same(projectItem, file.ProjectItem)); + } + + [Fact] + public void DirectoryNode_AddFile_CanAddToNestedDirectory() + { + // Arrange + var root = new DirectoryNode("/"); + var projectItem = new TestRazorProjectItem("/Pages/Shared/_Layout.cshtml"); + + // Act + root.AddFile(new FileNode("/Pages/Shared/_Layout.cshtml", projectItem)); + + // Assert + Assert.Collection( + root.Directories, + directory => + { + Assert.Equal("/Pages/", directory.Path); + Assert.Empty(directory.Files); + + Assert.Collection( + directory.Directories, + subDirectory => + { + Assert.Equal("/Pages/Shared/", subDirectory.Path); + Assert.Collection( + subDirectory.Files, + file => Assert.Same(projectItem, file.ProjectItem)); + }); + }); + } + + [Fact] + public void DirectoryNode_AddMultipleFiles_ToSameDirectory() + { + // Arrange + var root = new DirectoryNode("/"); + var projectItem1 = new TestRazorProjectItem("/Pages/Shared/_Layout.cshtml"); + var projectItem2 = new TestRazorProjectItem("/Pages/Shared/_Partial.cshtml"); + + // Act + root.AddFile(new FileNode(projectItem1.FilePath, projectItem1)); + root.AddFile(new FileNode(projectItem2.FilePath, projectItem2)); + + // Assert + Assert.Collection( + root.Directories, + directory => + { + Assert.Equal("/Pages/", directory.Path); + Assert.Empty(directory.Files); + + Assert.Collection( + directory.Directories, + subDirectory => + { + Assert.Equal("/Pages/Shared/", subDirectory.Path); + Assert.Collection( + subDirectory.Files, + file => Assert.Same(projectItem1, file.ProjectItem), + file => Assert.Same(projectItem2, file.ProjectItem)); + }); + }); + } + + [Fact] + public void DirectoryNode_AddsFiles_ToSiblingDirectories() + { + // Arrange + var root = new DirectoryNode("/"); + var projectItem1 = new TestRazorProjectItem("/Pages/Products/Index.cshtml"); + var projectItem2 = new TestRazorProjectItem("/Pages/Accounts/About.cshtml"); + + // Act + root.AddFile(new FileNode(projectItem1.FilePath, projectItem1)); + root.AddFile(new FileNode(projectItem2.FilePath, projectItem2)); + + // Assert + Assert.Collection( + root.Directories, + directory => + { + Assert.Equal("/Pages/", directory.Path); + Assert.Empty(directory.Files); + + Assert.Collection( + directory.Directories, + subDirectory => + { + Assert.Equal("/Pages/Products/", subDirectory.Path); + Assert.Collection( + subDirectory.Files, + file => Assert.Same(projectItem1, file.ProjectItem)); + }, + subDirectory => + { + Assert.Equal("/Pages/Accounts/", subDirectory.Path); + Assert.Collection( + subDirectory.Files, + file => Assert.Same(projectItem2, file.ProjectItem)); + }); + }); + } + + [Fact] + public void DirectoryNode_GetItem_ReturnsItemAtRoot() + { + // Arrange + var root = new DirectoryNode("/"); + var projectItem = new TestRazorProjectItem("/_ViewStart.cshtml"); + root.AddFile(new FileNode(projectItem.FilePath, projectItem)); + + // Act + var result = root.GetItem(projectItem.FilePath); + + // Assert + Assert.Same(result, projectItem); + } + + [Fact] + public void DirectoryNode_GetItem_WhenFilePathSharesSameNameAsSiblingDirectory() + { + // Arrange + var root = new DirectoryNode("/"); + var projectItem1 = new TestRazorProjectItem("/Home.cshtml"); + var projectItem2 = new TestRazorProjectItem("/Home/About.cshtml"); + root.AddFile(new FileNode(projectItem1.FilePath, projectItem1)); + root.AddFile(new FileNode(projectItem2.FilePath, projectItem2)); + + // Act + var result = root.GetItem(projectItem1.FilePath); + + // Assert + Assert.Same(result, projectItem1); + } + + [Fact] + public void DirectoryNode_GetItem_WhenFileNameIsSameAsDirectoryName() + { + // Arrange + var projectItem1 = new TestRazorProjectItem("/Home/Home.cshtml"); + var projectItem2 = new TestRazorProjectItem("/Home/About.cshtml"); + var root = new DirectoryNode("/") + { + Directories = + { + new DirectoryNode("/Home/") + { + Files = + { + new FileNode(projectItem1.FilePath, projectItem1), + new FileNode(projectItem2.FilePath, projectItem2), + } + } + }, + }; + + // Act + var result = root.GetItem(projectItem1.FilePath); + + // Assert + Assert.Same(result, projectItem1); + } + } +} diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/test/xunit.runner.json b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/xunit.runner.json new file mode 100644 index 0000000000..fcf172c8fc --- /dev/null +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/test/xunit.runner.json @@ -0,0 +1,4 @@ +{ + "methodDisplay": "method", + "shadowCopy": false +} \ No newline at end of file diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common/Language/TestProject.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common/Language/TestProject.cs index 1f0d079cb9..a36a57b983 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common/Language/TestProject.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common/Language/TestProject.cs @@ -13,9 +13,16 @@ namespace Microsoft.AspNetCore.Razor.Language var repoRoot = SearchUp(AppContext.BaseDirectory, "global.json"); var assemblyName = type.Assembly.GetName().Name; var projectDirectory = Path.Combine(repoRoot, "src", "Razor", "test", assemblyName); + if (!Directory.Exists(projectDirectory) && + string.Equals(assemblyName, "Microsoft.AspNetCore.Razor.Language.Test", StringComparison.Ordinal)) + { + projectDirectory = Path.Combine(repoRoot, "src", "Razor", "test", "RazorLanguage.Test"); + } + if (!Directory.Exists(projectDirectory)) { - throw new InvalidOperationException($@"Could not locate project directory for type {type.FullName}. Directory probe path: {projectDirectory}."); + throw new InvalidOperationException( + $@"Could not locate project directory for type {type.FullName}. Directory probe path: {projectDirectory}."); } return projectDirectory;