简体   繁体   English

VSCode语言扩展

[英]VSCode Language Extension

I am building a custom language extension, and am having issues with lineComment in language-configuration.json. 我正在构建自定义语言扩展,并且在language-configuration.json中的lineComment存在问题。 My language, oddly, uses "@@" as a line Comment, and I cannot get this to work. 奇怪的是,我的语言使用“ @@”作为注释行,但我无法使用它。

I have tried @@, \\@\\@, and so on. 我尝试了@@,\\ @ \\ @等。

Any tips? 有小费吗?

This is very similar to the traditional C++ line comment. 这与传统的C ++行注释非常相似。 Here's what I use in my syntax repository: 这是我在语法存储库中使用的:

    {
      "name": "comment.line.double-slash",
      "match": "\/\/.*"
    }

I guess you tried already: 我想您已经尝试过了:

    {
      "name": "comment.line.double-at",
      "match": "\@\@.*"
    }

? I'm not sure if you even need to escape the @ sign, since it has no special meaning in JS regular expressions AFAIK. 我不确定您是否需要转义@符号,因为它在JS正则表达式AFAIK中没有特殊含义。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM