You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It isn't clear from §D.2 (Documentation comments / Introduction) whether a comment that starts with four slashes //// is a documentation comment. The text talks about comments "that start with three slashes" and, well, if there are four slashes, then three of those are at the start. The expository Single_Line_Doc_Comment grammar rule matches this syntax too, as a slash / can be an Input_Character.
Likewise /*** and Delimited_Doc_Comment.
However, Roslyn does not parse e.g. //// <hello> as a documentation comment, and "Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.9149 for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727" doesn't either. The quadruple-slash syntax has been used for commenting out code, but I forget where I saw that recommendation.
Example
//// <not a doc comment>classC{/*** <not a doc comment> */inti;}
Expected behavior
Declare that a Single_Line_Comment that starts with four or more slashes is not a documentation comment. In text and also in the Single_Line_Doc_Comment grammar rule.
Likewise, declare that a Delimited_Comment that starts with a slash and three or more asterisks is not a documentation comment.
Describe the bug
It isn't clear from §D.2 (Documentation comments / Introduction) whether a comment that starts with four slashes
////
is a documentation comment. The text talks about comments "that start with three slashes" and, well, if there are four slashes, then three of those are at the start. The expository Single_Line_Doc_Comment grammar rule matches this syntax too, as a slash/
can be an Input_Character.Likewise
/***
and Delimited_Doc_Comment.However, Roslyn does not parse e.g.
//// <hello>
as a documentation comment, and "Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.9149 for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727" doesn't either. The quadruple-slash syntax has been used for commenting out code, but I forget where I saw that recommendation.Example
Expected behavior
Declare that a Single_Line_Comment that starts with four or more slashes is not a documentation comment. In text and also in the Single_Line_Doc_Comment grammar rule.
Likewise, declare that a Delimited_Comment that starts with a slash and three or more asterisks is not a documentation comment.
Additional context
Roslyn excludes those here:
////
at https://github.com/dotnet/roslyn/blob/version-2.9.0/src/Compilers/CSharp/Portable/Parser/Lexer.cs#L2238-L2241/***
(and/**/
) at https://github.com/dotnet/roslyn/blob/version-2.9.0/src/Compilers/CSharp/Portable/Parser/Lexer.cs#L2261-L2264The text was updated successfully, but these errors were encountered: