2013-05-01 12 views
2

我正在为使用c样式注释块的propriatery语言构建定义。如何获得用户定义语言块注释在记事本++中正常工作?

我已经设置了以下内容:

评论开:/ *
评论关闭:*/
款待关键字作为符号(在注释块帧):经过

我没有*/设置为激活的运营商。

这将导致以下格式:
(我评论的评论显示,如果在评论得到了记事本的评论发动机++作为注释处理),如果我取消款待关键字作为符号

/*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 

我也曾尝试款待关键字的每commbination作为符号和添加*/运算符列表。

回答

2

对我来说它正常工作(N ++ 6.5.5),请看结果。

以黄色突出显示的是我创造新的语言后触及的唯一的事情:

enter image description here

评论折叠工作过,使用复选框上的截图可见。

+0

它看起来就像是一个老版本的N个错误++ 。现在它工作正常。 – Cemafor 2015-04-08 23:37:06

2

您的文本文件中很可能有unix或混合样式行结尾。你需要改变这windows风格的行结束符:

在记事本++菜单:编辑 - > EOL转换 - > Windows格式

+0

我是否正确地理解您所说的行结尾设置会影响块注释语法识别? – miroxlav 2017-05-10 09:08:36

相关问题