1

我正在尝试为客户语言编写一个 vscode 语法文件

我正在使用 Photoshop 绘制自定义语言的示例语法。

语法-wxml

tmLanguage 的语法怎么写?

评估代码规则

{
    "begin": "\\{\\{",
    "beginCaptures": {
        "0": {
            "name": "punctuation.definition.brace.curly.start"
        }
    },
    "end": "\\}\\}",
    "endCaptures": {
        "0": {
            "name": "punctuation.definition.brace.curly.end"
        }
    },
    "patterns": [
        {
            "include": "source.js#expression"
        }
    ]
}

将其用于子字符串实体模式但环绕字符串无法匹配

标签属性的双引号内容规则

{
    "begin": "\"",
    "beginCaptures": {
        "0": {
            "name": "punctuation.definition.string.begin.wxml"
        }
    },
    "end": "\"",
    "endCaptures": {
        "0": {
            "name": "punctuation.definition.string.end.wxml"
        }
    },
    "name": "string.quoted.double  <===============********||||",
    "patterns": [
        {
            "include": " the up pattern  ↑"
        }
    ]
}

如果 name存在,所有双引号内容都是字符串的颜色

否则环绕字符串是纯文本颜色。

4

0 回答 0