如何在用户定义的语言中获取块注释以在notepad ++中正常工作?


1

我正在为使用c样式注释块的专有语言构建定义。

我设置了以下内容:

评论公开:/ *
评论关闭:* /
将关键字视为符号(在注释框架中):已选中

我没有 * 要么 / 设置为激活的运算符。

这导致以下格式:
(我评论了评论,以显示评论是否被记事本++的评论引擎视为评论)

/*comment*/   //comment
code          //comment (but should be code)
/* comment */ //comment
code          //code
/**/code/**/  //comment (but should be code)
code          //comment (but should be code)
/*comment     //comment
comment       //comment
comment*/     //comment
code          //code
/*            //comment
comment       //comment
*/            //comment

如果我取消选中将关键字视为符号,我会得到:

/*comment*/   //code (but should be comment)
code          //code
/* comment */ //comment
code          //code
/**/code/**/  //code (both /**/ show as code as well)
code          //code
/*comment     //code (but should be comment)
comment       //code (but should be comment)
comment*/     //code (but should be comment)
code          //code
/*            //comment
comment       //comment
*/            //comment

我还尝试将Treat关键字的每个组合作为符号并添加 */ 到运营商列表。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.