How to define my language comments?

SyntaxEditor for Windows Forms Forum

Posted 20 years ago by Sandra - Portugal

How do I define multi-line comments starting with "comment {" and ending with "}"?

I tried the following syntax but from the comment start on all the text is marked as comment, but if instead of ending with "}" I end with another character it works...

<ExplicitPatternGroup Type="StartScope" Token="MultiLineCommentStartToken" Style="CommentDelimiterStyle" PatternValue="comment {" />
<ExplicitPatternGroup Type="EndScope" Token="MultiLineCommentEndToken" Style="CommentDelimiterStyle" PatternValue="}" />


Comments (1)

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Did you set up other tokens in the comment state? If so, some of those may be matching the }. You can tell if this is happening by running the test application and loading your language def. Then go to a } at the end of a comment and look in the status bar. If you see an asterisk next to the token name, that means the token is starting on that character which is what you want in your case. If you don't see the asterisk then something is wrong in your def that you'll have to change.

Actipro Software Support

The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.