我需要使用语法文件突出显示对 mcedit 的注释。一行注释以“--”开头,可以以“\n”或“--”结尾。我负责注释的语法文件内容如下:
context -- \n brown
spellcheck
context /\* \*/ brown
spellcheck
单行注释的示例如下:
-- This line starts with comment
this is code -- This is another comment, which ends with '\n'
this is another code -- This is another comment, which ends with '--' -- this is another code after comment
如何突出显示可能以“\n”或“--”结尾的一行注释?