-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Razor Support ; after @typeparam
#37148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| { | ||
| while (!At(SyntaxKind.NewLine)) | ||
| { | ||
| if (At(SyntaxKind.Semicolon)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Support ; after @typeparam Something where Something : SomethingElse
| } | ||
| } | ||
| } | ||
| else if (At(SyntaxKind.Semicolon)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Support ; after @typeparam Something
pranavkm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Thanks for getting this sorted so quickly!
|
Manual validation via SDK on 6.0 successful. |
Fixes: #33602
diff -br ComponentWithTypeParameters/ ComponentWithTypeParameters_WithSemicolon/
Details
diff -br ComponentWithConstrainedTypeParameters/ ComponentWithConstrainedTypeParameters_WithSemicolon/
Details
``` diff -br ComponentWithConstrainedTypeParameters/TestComponent.codegen.cs ComponentWithConstrainedTypeParameters_WithSemicolon/TestComponent.codegen.cs 111c111 < #line 7 "x:\dir\subdir\Test\TestComponent.cshtml" --- > #line 6 "x:\dir\subdir\Test\TestComponent.cshtml" diff -br ComponentWithConstrainedTypeParameters/TestComponent.ir.txt ComponentWithConstrainedTypeParameters_WithSemicolon/TestComponent.ir.txt 12,15c12,15 < DirectiveToken - (92:2,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) - TItem2 < DirectiveToken - (99:2,18 [19] x:\dir\subdir\Test\TestComponent.cshtml) - where TItem2 : ITag < DirectiveToken - (131:3,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) - TItem3 < DirectiveToken - (138:3,18 [27] x:\dir\subdir\Test\TestComponent.cshtml) - where TItem3 : Image, new() --- > DirectiveToken - (92:2,10 [6] x:\dir\subdir\Test\TestComponent.cshtml) - TItem2 > DirectiveToken - (99:2,17 [19] x:\dir\subdir\Test\TestComponent.cshtml) - where TItem2 : ITag > DirectiveToken - (131:3,9 [6] x:\dir\subdir\Test\TestComponent.cshtml) - TItem3 > DirectiveToken - (138:3,16 [27] x:\dir\subdir\Test\TestComponent.cshtml) - where TItem3 : Image, new() 25,51c25,51 < HtmlContent - (167:4,0 [2] x:\dir\subdir\Test\TestComponent.cshtml) < LazyIntermediateToken - (167:4,0 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n < MarkupElement - (169:5,0 [14] x:\dir\subdir\Test\TestComponent.cshtml) - h1 < HtmlContent - (173:5,4 [5] x:\dir\subdir\Test\TestComponent.cshtml) < LazyIntermediateToken - (173:5,4 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Item1 < HtmlContent - (183:5,14 [2] x:\dir\subdir\Test\TestComponent.cshtml) < LazyIntermediateToken - (183:5,14 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n < CSharpCode - (186:6,1 [38] x:\dir\subdir\Test\TestComponent.cshtml) < LazyIntermediateToken - (186:6,1 [38] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - foreach (var item2 in Items2)\n{\n < MarkupElement - (224:8,4 [40] x:\dir\subdir\Test\TestComponent.cshtml) - p < HtmlContent - (227:8,7 [6] x:\dir\subdir\Test\TestComponent.cshtml) < LazyIntermediateToken - (227:8,7 [6] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n < CSharpExpression - (234:9,5 [19] x:\dir\subdir\Test\TestComponent.cshtml) < LazyIntermediateToken - (234:9,5 [19] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ChildContent(item2) < HtmlContent - (253:9,24 [7] x:\dir\subdir\Test\TestComponent.cshtml) < LazyIntermediateToken - (253:9,24 [7] x:\dir\subdir\Test\TestComponent.cshtml) - Html - ;\n < CSharpCode - (264:10,8 [3] x:\dir\subdir\Test\TestComponent.cshtml) < LazyIntermediateToken - (264:10,8 [3] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n} < HtmlContent - (267:11,1 [4] x:\dir\subdir\Test\TestComponent.cshtml) < LazyIntermediateToken - (267:11,1 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n < MarkupElement - (271:13,0 [12] x:\dir\subdir\Test\TestComponent.cshtml) - p < HtmlContent - (274:13,3 [5] x:\dir\subdir\Test\TestComponent.cshtml) < LazyIntermediateToken - (274:13,3 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Item3 < HtmlContent - (283:13,12 [4] x:\dir\subdir\Test\TestComponent.cshtml) < LazyIntermediateToken - (283:13,12 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n < CSharpCode - (294:15,7 [236] x:\dir\subdir\Test\TestComponent.cshtml) < LazyIntermediateToken - (294:15,7 [236] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n [Parameter] public TItem1 Item1 { get; set; }\n [Parameter] public List Items2 { get; set; }\n [Parameter] public TItem3 Item3 { get; set; }\n [Parameter] public RenderFragment ChildContent { get; set; }\n --- > HtmlContent - (167:3,45 [2] x:\dir\subdir\Test\TestComponent.cshtml) > LazyIntermediateToken - (167:3,45 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n > MarkupElement - (169:3,47 [14] x:\dir\subdir\Test\TestComponent.cshtml) - h1 > HtmlContent - (173:5,1 [5] x:\dir\subdir\Test\TestComponent.cshtml) > LazyIntermediateToken - (173:5,1 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Item1 > HtmlContent - (183:5,11 [2] x:\dir\subdir\Test\TestComponent.cshtml) > LazyIntermediateToken - (183:5,11 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n > CSharpCode - (186:5,14 [38] x:\dir\subdir\Test\TestComponent.cshtml) > LazyIntermediateToken - (186:5,14 [38] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - foreach (var item2 in Items2)\n{\n > MarkupElement - (224:8,1 [40] x:\dir\subdir\Test\TestComponent.cshtml) - p > HtmlContent - (227:8,4 [6] x:\dir\subdir\Test\TestComponent.cshtml) > LazyIntermediateToken - (227:8,4 [6] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n > CSharpExpression - (234:9,2 [19] x:\dir\subdir\Test\TestComponent.cshtml) > LazyIntermediateToken - (234:9,2 [19] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ChildContent(item2) > HtmlContent - (253:9,21 [7] x:\dir\subdir\Test\TestComponent.cshtml) > LazyIntermediateToken - (253:9,21 [7] x:\dir\subdir\Test\TestComponent.cshtml) - Html - ;\n > CSharpCode - (264:10,5 [3] x:\dir\subdir\Test\TestComponent.cshtml) > LazyIntermediateToken - (264:10,5 [3] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n} > HtmlContent - (267:10,8 [4] x:\dir\subdir\Test\TestComponent.cshtml) > LazyIntermediateToken - (267:10,8 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n > MarkupElement - (271:11,2 [12] x:\dir\subdir\Test\TestComponent.cshtml) - p > HtmlContent - (274:13,0 [5] x:\dir\subdir\Test\TestComponent.cshtml) > LazyIntermediateToken - (274:13,0 [5] x:\dir\subdir\Test\TestComponent.cshtml) - Html - Item3 > HtmlContent - (283:13,9 [4] x:\dir\subdir\Test\TestComponent.cshtml) > LazyIntermediateToken - (283:13,9 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n > CSharpCode - (294:15,4 [236] x:\dir\subdir\Test\TestComponent.cshtml) > LazyIntermediateToken - (294:15,4 [236] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n [Parameter] public TItem1 Item1 { get; set; }\n [Parameter] public List Items2 { get; set; }\n [Parameter] public TItem3 Item3 { get; set; }\n [Parameter] public RenderFragment ChildContent { get; set; }\n diff -br ComponentWithConstrainedTypeParameters/TestComponent.mappings.txt ComponentWithConstrainedTypeParameters_WithSemicolon/TestComponent.mappings.txt 16,17c16,17 < Source Location: (92:2,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) < |TItem2| --- > Source Location: (92:2,10 [6] x:\dir\subdir\Test\TestComponent.cshtml) > | TItem| 21,22c21,22 < Source Location: (99:2,18 [19] x:\dir\subdir\Test\TestComponent.cshtml) < |where TItem2 : ITag| --- > Source Location: (99:2,17 [19] x:\dir\subdir\Test\TestComponent.cshtml) > | where TItem2 : ITa| 26,27c26,27 < Source Location: (131:3,11 [6] x:\dir\subdir\Test\TestComponent.cshtml) < |TItem3| --- > Source Location: (131:3,9 [6] x:\dir\subdir\Test\TestComponent.cshtml) > |m TIte| 31,32c31,32 < Source Location: (138:3,18 [27] x:\dir\subdir\Test\TestComponent.cshtml) < |where TItem3 : Image, new()| --- > Source Location: (138:3,16 [27] x:\dir\subdir\Test\TestComponent.cshtml) > |3 where TItem3 : Image, new| 36,37c36,38 < Source Location: (186:6,1 [38] x:\dir\subdir\Test\TestComponent.cshtml) < |foreach (var item2 in Items2) --- > Source Location: (186:5,14 [38] x:\dir\subdir\Test\TestComponent.cshtml) > | > @foreach (var item2 in Items2) 40c41 < Generated Location: (2868:111,1 [38] ) --- > Generated Location: (2881:111,14 [38] ) 45,47c46,48 < Source Location: (234:9,5 [19] x:\dir\subdir\Test\TestComponent.cshtml) < |ChildContent(item2)| < Generated Location: (3035:120,6 [19] ) --- > Source Location: (234:9,2 [19] x:\dir\subdir\Test\TestComponent.cshtml) > | @ChildContent(ite| > Generated Location: (3048:120,6 [19] ) 50,53c51,53 < Source Location: (264:10,8 [3] x:\dir\subdir\Test\TestComponent.cshtml) < | < }| < Generated Location: (3186:127,8 [3] ) --- > Source Location: (264:10,5 [3] x:\dir\subdir\Test\TestComponent.cshtml) > |/p>| > Generated Location: (3196:127,5 [3] ) 57,58c57,58 < Source Location: (294:15,7 [236] x:\dir\subdir\Test\TestComponent.cshtml) < | --- > Source Location: (294:15,4 [236] x:\dir\subdir\Test\TestComponent.cshtml) > |e { 62,64c62,63 < [Parameter] public RenderFragment ChildContent { get; set; } < | < Generated Location: (3368:137,7 [236] ) --- > [Parameter] public RenderFragment ChildContent { get; set; | > Generated Location: (3375:137,4 [236] ) ```