diff --git a/src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/DesignTimeBasicWriter.cs b/src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/DesignTimeBasicWriter.cs index f0638ba6de..589fc4e97d 100644 --- a/src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/DesignTimeBasicWriter.cs +++ b/src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/DesignTimeBasicWriter.cs @@ -21,6 +21,11 @@ namespace Microsoft.AspNetCore.Razor.Evolution.CodeGeneration throw new ArgumentNullException(nameof(node)); } + if (node.Children.Count == 0) + { + return; + } + if (node.Source != null) { using (context.Writer.BuildLinePragma(node.Source.Value)) @@ -29,28 +34,18 @@ namespace Microsoft.AspNetCore.Razor.Evolution.CodeGeneration context.Writer.WritePadding(offset, node.Source, context); context.Writer.WriteStartAssignment(RazorDesignTimeIRPass.DesignTimeVariable); - if (node.Children.Count > 0) + for (var i = 0; i < node.Children.Count; i++) { - for (var i = 0; i < node.Children.Count; i++) + if (node.Children[i] is RazorIRToken token && token.IsCSharp) { - if (node.Children[i] is RazorIRToken token && token.IsCSharp) - { - context.AddLineMappingFor(token); - context.Writer.Write(token.Content); - } - else - { - // There may be something else inside the expression like a Template or another extension node. - context.RenderNode(node.Children[i]); - } + context.AddLineMappingFor(token); + context.Writer.Write(token.Content); + } + else + { + // There may be something else inside the expression like a Template or another extension node. + context.RenderNode(node.Children[i]); } - } - else - { - // When typing "@" / "@(" we still need to provide IntelliSense. This is taken care of by creating a 0 length - // line mapping. It's also important that this 0 length line mapping exists in a line pragma so when a user - // starts typing additional characters following their "@" they get appropriately located errors. - context.AddLineMappingFor(node); } context.Writer.WriteLine(";"); diff --git a/src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/DesignTimeCSharpRenderer.cs b/src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/DesignTimeCSharpRenderer.cs index 123f8d99ab..5645ae5aa7 100644 --- a/src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/DesignTimeCSharpRenderer.cs +++ b/src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/DesignTimeCSharpRenderer.cs @@ -19,6 +19,10 @@ namespace Microsoft.AspNetCore.Razor.Evolution.CodeGeneration public override void VisitCSharpExpression(CSharpExpressionIRNode node) { // We can't remove this yet, because it's still used recursively in a few places. + if (node.Children.Count == 0) + { + return; + } if (node.Source != null) { @@ -31,29 +35,19 @@ namespace Microsoft.AspNetCore.Razor.Evolution.CodeGeneration .Write(padding) .WriteStartAssignment(RazorDesignTimeIRPass.DesignTimeVariable); - if (node.Children.Count > 0) + for (var i = 0; i < node.Children.Count; i++) { - for (var i = 0; i < node.Children.Count; i++) - { var token = node.Children[i] as RazorIRToken; if (token != null && token.IsCSharp) - { - Context.AddLineMappingFor(token); - Context.Writer.Write(token.Content); - } - else - { - // There may be something else inside the expression like a Template or another extension node. - Visit(node.Children[i]); - } + { + Context.AddLineMappingFor(token); + Context.Writer.Write(token.Content); + } + else + { + // There may be something else inside the expression like a Template or another extension node. + Visit(node.Children[i]); } - } - else - { - // When typing "@" / "@(" we still need to provide IntelliSense. This is taken care of by creating a 0 length - // line mapping. It's also important that this 0 length line mapping exists in a line pragma so when a user - // starts typing additional characters following their "@" they get appropriately located errors. - Context.AddLineMappingFor(node); } Context.Writer.WriteLine(";"); diff --git a/src/Microsoft.AspNetCore.Razor.Evolution/DefaultRazorIRLoweringPhase.cs b/src/Microsoft.AspNetCore.Razor.Evolution/DefaultRazorIRLoweringPhase.cs index 50c90af872..f5c159b29a 100644 --- a/src/Microsoft.AspNetCore.Razor.Evolution/DefaultRazorIRLoweringPhase.cs +++ b/src/Microsoft.AspNetCore.Razor.Evolution/DefaultRazorIRLoweringPhase.cs @@ -344,7 +344,6 @@ namespace Microsoft.AspNetCore.Razor.Evolution _builder.Pop(); - var emptyExpression = true; if (expressionNode.Children.Count > 0) { var sourceRangeStart = expressionNode @@ -362,19 +361,8 @@ namespace Microsoft.AspNetCore.Razor.Evolution sourceRangeStart.Value.LineIndex, sourceRangeStart.Value.CharacterIndex, contentLength); - emptyExpression = false; } } - - if (emptyExpression) - { - expressionNode.Source = new SourceSpan( - block.Start.FilePath ?? FileName, - block.Start.AbsoluteIndex, - block.Start.LineIndex, - block.Start.CharacterIndex, - length: 0); - } } public override void VisitExpressionSpan(ExpressionChunkGenerator chunkGenerator, Span span) diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.codegen.cs index 773618c89c..3c6860c0da 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.codegen.cs @@ -13,11 +13,6 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles #pragma warning disable 1998 public async System.Threading.Tasks.Task ExecuteAsync() { -#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression.cshtml" -__o = ; - -#line default -#line hidden } #pragma warning restore 1998 } diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.ir.txt index 1b396c044f..925e948724 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.ir.txt +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.ir.txt @@ -17,4 +17,4 @@ Document - RazorIRToken - - CSharp - private static System.Object __o = null; RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync HtmlContent - (0:0,0 [18] EmptyExplicitExpression.cshtml) - This is markup\n\n - CSharpExpression - (18:2,0 [0] EmptyExplicitExpression.cshtml) + CSharpExpression - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.mappings.txt index 6602518d8d..e69de29bb2 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.mappings.txt @@ -1,5 +0,0 @@ -Source Location: (18:2,0 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression.cshtml) -|| -Generated Location: (678:16,6 [0] ) -|| - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.codegen.cs index cd82f1a76b..4a984ff0fc 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.codegen.cs @@ -10,11 +10,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles public async System.Threading.Tasks.Task ExecuteAsync() { WriteLiteral("This is markup\r\n\r\n"); -#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression.cshtml" -Write(); - -#line default -#line hidden + Write(); } #pragma warning restore 1998 } diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.ir.txt index 3dd0b1689a..1672d1a28c 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.ir.txt +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.ir.txt @@ -6,4 +6,4 @@ Document - ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyExplicitExpression_Runtime - - RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync HtmlContent - (0:0,0 [18] EmptyExplicitExpression.cshtml) - This is markup\n\n - CSharpExpression - (18:2,0 [0] EmptyExplicitExpression.cshtml) + CSharpExpression - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.codegen.cs index e120fcf4bd..81cf07a02b 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.codegen.cs @@ -15,11 +15,6 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles { -#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml" -__o = ; - -#line default -#line hidden } diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.ir.txt index 61a8dcc94b..2ea75162db 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.ir.txt +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.ir.txt @@ -18,6 +18,6 @@ Document - RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync CSharpStatement - (2:0,2 [6] EmptyImplicitExpressionInCode.cshtml) RazorIRToken - (2:0,2 [6] EmptyImplicitExpressionInCode.cshtml) - CSharp - \n - CSharpExpression - (8:1,4 [0] EmptyImplicitExpressionInCode.cshtml) + CSharpExpression - CSharpStatement - (9:1,5 [2] EmptyImplicitExpressionInCode.cshtml) RazorIRToken - (9:1,5 [2] EmptyImplicitExpressionInCode.cshtml) - CSharp - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.mappings.txt index 60153f956d..140241e479 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.mappings.txt @@ -5,15 +5,10 @@ Generated Location: (593:15,14 [6] ) | | -Source Location: (8:1,4 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml) -|| -Generated Location: (712:18,6 [0] ) -|| - Source Location: (9:1,5 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml) | | -Generated Location: (763:22,17 [2] ) +Generated Location: (618:17,17 [2] ) | | diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.codegen.cs index 63b6e1c6bd..80478506d0 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.codegen.cs @@ -9,11 +9,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles #pragma warning disable 1998 public async System.Threading.Tasks.Task ExecuteAsync() { -#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode.cshtml" -Write(); - -#line default -#line hidden + Write(); } #pragma warning restore 1998 } diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.ir.txt index e16d9e07d3..bc09e5ea09 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.ir.txt +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.ir.txt @@ -7,6 +7,6 @@ Document - RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync CSharpStatement - (2:0,2 [6] EmptyImplicitExpressionInCode.cshtml) RazorIRToken - (2:0,2 [6] EmptyImplicitExpressionInCode.cshtml) - CSharp - \n - CSharpExpression - (8:1,4 [0] EmptyImplicitExpressionInCode.cshtml) + CSharpExpression - CSharpStatement - (9:1,5 [2] EmptyImplicitExpressionInCode.cshtml) RazorIRToken - (9:1,5 [2] EmptyImplicitExpressionInCode.cshtml) - CSharp - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.codegen.cs index cad4262f4b..082f2d3dc1 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.codegen.cs @@ -13,11 +13,6 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles #pragma warning disable 1998 public async System.Threading.Tasks.Task ExecuteAsync() { -#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression.cshtml" -__o = ; - -#line default -#line hidden } #pragma warning restore 1998 } diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.ir.txt index 4f59166635..45f9461905 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.ir.txt +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.ir.txt @@ -17,5 +17,5 @@ Document - RazorIRToken - - CSharp - private static System.Object __o = null; RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync HtmlContent - (0:0,0 [18] EmptyImplicitExpression.cshtml) - This is markup\n\n - CSharpExpression - (18:2,0 [0] EmptyImplicitExpression.cshtml) + CSharpExpression - HtmlContent - (19:2,1 [1] EmptyImplicitExpression.cshtml) - ! diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.mappings.txt index 76c9a38517..e69de29bb2 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.mappings.txt @@ -1,5 +0,0 @@ -Source Location: (18:2,0 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression.cshtml) -|| -Generated Location: (678:16,6 [0] ) -|| - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.codegen.cs index 2e32e425e2..f9c0c03ea9 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.codegen.cs @@ -10,11 +10,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles public async System.Threading.Tasks.Task ExecuteAsync() { WriteLiteral("This is markup\r\n\r\n"); -#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression.cshtml" -Write(); - -#line default -#line hidden + Write(); WriteLiteral("!"); } #pragma warning restore 1998 diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.ir.txt index 123625eccd..b30f9e8e51 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.ir.txt +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.ir.txt @@ -6,5 +6,5 @@ Document - ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyImplicitExpression_Runtime - - RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync HtmlContent - (0:0,0 [18] EmptyImplicitExpression.cshtml) - This is markup\n\n - CSharpExpression - (18:2,0 [0] EmptyImplicitExpression.cshtml) + CSharpExpression - HtmlContent - (19:2,1 [1] EmptyImplicitExpression.cshtml) - ! diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.codegen.cs index 8f4ae0f904..a2946f3345 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.codegen.cs @@ -13,11 +13,6 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles #pragma warning disable 1998 public async System.Threading.Tasks.Task ExecuteAsync() { -#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF.cshtml" -__o = ; - -#line default -#line hidden } #pragma warning restore 1998 } diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.ir.txt index 5c63044269..ac0f573a83 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.ir.txt +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.ir.txt @@ -17,4 +17,4 @@ Document - RazorIRToken - - CSharp - private static System.Object __o = null; RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync HtmlContent - (0:0,0 [18] ExplicitExpressionAtEOF.cshtml) - This is markup\n\n - CSharpExpression - (18:2,0 [0] ExplicitExpressionAtEOF.cshtml) + CSharpExpression - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.mappings.txt index 61b61756f0..e69de29bb2 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.mappings.txt @@ -1,5 +0,0 @@ -Source Location: (18:2,0 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF.cshtml) -|| -Generated Location: (678:16,6 [0] ) -|| - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.codegen.cs index 8ce77390b3..b0ff36425a 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.codegen.cs @@ -10,11 +10,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles public async System.Threading.Tasks.Task ExecuteAsync() { WriteLiteral("This is markup\r\n\r\n"); -#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF.cshtml" -Write(); - -#line default -#line hidden + Write(); } #pragma warning restore 1998 } diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.ir.txt index 6dfdff3bd0..f186f40886 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.ir.txt +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.ir.txt @@ -6,4 +6,4 @@ Document - ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpressionAtEOF_Runtime - - RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync HtmlContent - (0:0,0 [18] ExplicitExpressionAtEOF.cshtml) - This is markup\n\n - CSharpExpression - (18:2,0 [0] ExplicitExpressionAtEOF.cshtml) + CSharpExpression - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.codegen.cs index 7535874d7f..ec82fe56ab 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.codegen.cs @@ -13,11 +13,6 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles #pragma warning disable 1998 public async System.Threading.Tasks.Task ExecuteAsync() { -#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF.cshtml" -__o = ; - -#line default -#line hidden } #pragma warning restore 1998 } diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.ir.txt index 9081a833b0..b19b703b54 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.ir.txt +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.ir.txt @@ -17,4 +17,4 @@ Document - RazorIRToken - - CSharp - private static System.Object __o = null; RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync HtmlContent - (0:0,0 [18] ImplicitExpressionAtEOF.cshtml) - This is markup\n\n - CSharpExpression - (18:2,0 [0] ImplicitExpressionAtEOF.cshtml) + CSharpExpression - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.mappings.txt index 5a4496890a..e69de29bb2 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.mappings.txt @@ -1,5 +0,0 @@ -Source Location: (18:2,0 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF.cshtml) -|| -Generated Location: (678:16,6 [0] ) -|| - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.codegen.cs index 86b3ba8bc5..5402342e93 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.codegen.cs @@ -10,11 +10,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles public async System.Threading.Tasks.Task ExecuteAsync() { WriteLiteral("This is markup\r\n\r\n"); -#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF.cshtml" -Write(); - -#line default -#line hidden + Write(); } #pragma warning restore 1998 } diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.ir.txt index 6ff391a2e4..dd5f61fc3c 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.ir.txt +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.ir.txt @@ -6,4 +6,4 @@ Document - ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ImplicitExpressionAtEOF_Runtime - - RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync HtmlContent - (0:0,0 [18] ImplicitExpressionAtEOF.cshtml) - This is markup\n\n - CSharpExpression - (18:2,0 [0] ImplicitExpressionAtEOF.cshtml) + CSharpExpression -