2019-10-28 17:06:14 +00:00
|
|
|
{
|
|
|
|
"scopeName": "source.spirv",
|
|
|
|
"name": "SPIR-V",
|
|
|
|
"comment": "Generated by {{GenerateArguments}}. Do not modify this file directly.",
|
|
|
|
"patterns": [
|
2020-02-04 16:21:10 +00:00
|
|
|
{{range $o := .All.OperandKinds}}{{if len $o.Enumerants}} { "include": "#{{$o.Category}}_{{$o.Kind}}" },
|
2019-10-28 17:06:14 +00:00
|
|
|
{{end}}{{end}} { "include": "#opcode" },
|
2020-02-04 16:21:10 +00:00
|
|
|
{ "include": "#extopcode" },
|
2019-10-28 17:06:14 +00:00
|
|
|
{ "include": "#identifier" },
|
|
|
|
{ "include": "#number" },
|
|
|
|
{ "include": "#string" },
|
|
|
|
{ "include": "#comment" },
|
|
|
|
{ "include": "#operator" }
|
|
|
|
],
|
2020-02-04 16:21:10 +00:00
|
|
|
"repository": { {{range $o := .All.OperandKinds}}{{if len $o.Enumerants}}
|
2019-10-28 17:06:14 +00:00
|
|
|
"{{$o.Category}}_{{$o.Kind}}": {
|
|
|
|
"match": "\\b({{OperandKindsMatch $o}})\\b",
|
|
|
|
"name": "keyword.spirv"
|
|
|
|
},{{end}}{{end}}
|
|
|
|
"opcode": {
|
|
|
|
"match": "(Op[a-zA-Z]+)",
|
|
|
|
"name": "entity.name.function.spirv"
|
|
|
|
},
|
2020-02-04 16:21:10 +00:00
|
|
|
"extopcode": {
|
|
|
|
"match": "({{AllExtOpcodes}})",
|
|
|
|
"name": "entity.name.function.ext"
|
|
|
|
},
|
2019-10-28 17:06:14 +00:00
|
|
|
"identifier": {
|
|
|
|
"match": "%[a-zA-Z0-9_]+",
|
|
|
|
"name": "variable.spirv"
|
|
|
|
},
|
|
|
|
"number": {
|
|
|
|
"match": "\\b[0-9]+.?[0-9]*\\b",
|
|
|
|
"name": "constant.numeric.spirv"
|
|
|
|
},
|
|
|
|
"comment": {
|
|
|
|
"match": ";[^\n]*",
|
|
|
|
"name": "comment.line.spirv"
|
|
|
|
},
|
|
|
|
"operator": {
|
|
|
|
"match": "=",
|
|
|
|
"name": "keyword.operator.spirv"
|
|
|
|
},
|
|
|
|
"string": {
|
|
|
|
"begin": "\"",
|
|
|
|
"beginCaptures": {
|
|
|
|
"0": {
|
|
|
|
"name": "punctuation.definition.string.begin.spirv"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"end": "\"",
|
|
|
|
"endCaptures": {
|
|
|
|
"0": {
|
|
|
|
"name": "punctuation.definition.string.end.spirv"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"name": "string.quoted.double.spirv",
|
|
|
|
"patterns": [ { "include": "#string_escaped_char" } ]
|
|
|
|
},
|
|
|
|
"string_escaped_char": {
|
|
|
|
"patterns": [
|
|
|
|
{
|
|
|
|
"match": "\\\\([0-7]{3}|[abfnrtv\\\\'\"]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})",
|
|
|
|
"name": "constant.character.escape.spirv"
|
|
|
|
}, {
|
|
|
|
"match": "\\\\[^0-7xuUabfnrtv\\'\"]",
|
|
|
|
"name": "invalid.illegal.unknown-escape.spirv"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|