Files
nx_post_support/syntaxes/cdl.tmLanguage.json
T
2025-01-07 10:22:59 +01:00

95 lines
1.7 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "CDL Support",
"patterns": [
{
"include": "#comment"
},
{
"include": "#variables"
},
{
"include": "#types"
},
{
"include": "#keywords"
},
{
"include": "#strings"
}
],
"repository": {
"keywords": {
"patterns": [
{
"name": "keyword.control.cdl",
"match": "\\b(UI_LABEL|PARAM|EVENT|POST_EVENT|DEFVAL|CATEGORY|TYPE|OPTIONS|UI_HELP|MACHINE|TOGGLE)\\b"
}
]
},
"strings": {
"name": "string.quoted.double.cdl",
"begin": "\"",
"end": "\"",
"patterns": [
{
"name": "constant.character.escape.cdl",
"match": "\\\\."
}
]
},
"types": {
"patterns": [
{
"name": "keyword.control.cdl",
"match": "TYPE\\s+(o|g|i|d|b|s)\\b",
"captures": {
"1": {
"name": "storage.type.cs"
}
}
}
]
},
"variables": {
"patterns": [
{
"name": "keyword.control.cdl",
"match": "\\b(PARAM|EVENT)\\s+([a-zA-Z_]\\w*)\\b",
"captures": {
"2": {
"name": "variable.other.cdl"
}
}
},
{
"name": "keyword.control.cdl",
"match": "\\bMACHINE\\s+([a-zA-Z_]\\w*)\\b",
"captures": {
"1": {
"name": "variable.other.cdl"
}
}
},
{
"name": "keyword.control.cdl",
"match": "\\bCATEGORY\\s+((MILL|LATHE|DRILL)(\\s+(MILL|LATHE|DRILL))*)\\b",
"captures": {
"1": {
"name": "variable.language.cdl"
}
}
}
]
},
"comment": {
"patterns": [
{
"name": "comment.line.cdl",
"match": "#.*"
}
]
}
},
"scopeName": "source.cdl"
}