C# Language Syntax Error

SyntaxEditor for Windows Forms Forum

Posted 18 years ago by Boyd - Sr. Software Developer, Patterson Consulting, LLC
Avatar
I found a small error with the C# Language Syntax. The XMLComment is not properly terminated when a blank line is inserted. The Visual Studio editor does not allow blank lines in the middle of XML Comments.

The following code appears as a complete XML Comment block in Syntax Editor.

/// <summary>
/// This is the first line of my summary.

/// This line should NOT be part of the XML comments
/// due to the blank link.  
/// </summary>
I haven't fully investigated this, but it appears the problem is that the XMLCommentLineTerminatorToken is using the "{LineTerminatorWhitespaceMacro}* ///" lookahead pattern which allows it to match on blank lines. Should probably be changed to "{WhitespaceMacro}* ///"

Comments (2)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I'm not sure which way is better on this. If you do make the switch as you said, then the outlining makes two groups but the state is correct on the blank line. So which do you think is better?


Actipro Software Support

Posted 18 years ago by Boyd - Sr. Software Developer, Patterson Consulting, LLC
Avatar
Good catch on the outlining. Probably best to leave it as is and let people change it if they want.
The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.