2013-05-01 13 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

相關問題