This commit is contained in:
csh
2025-06-30 17:33:52 +08:00
parent d9beeb82a6
commit b66c626310
6 changed files with 56 additions and 16 deletions
+46 -5
View File
@@ -2,7 +2,10 @@
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "TSL",
"scopeName": "source.tsl",
"fileTypes": ["tsl", "tsf"],
"fileTypes": [
"tsl",
"tsf"
],
"patterns": [
{
"include": "#comments"
@@ -189,7 +192,7 @@
},
"variable-declarations": {
"name": "meta.variable.declaration.tsl",
"match": "(?<!\\?\\s*)(\\w+)\\s*(:)(?!=)\\s*([^;?]*)(;)?",
"match": "(?<!\\?\\s*)(\\w+)\\s*(:)(?!=)\\s*((?:array\\s*(?:\\[[^\\]]*\\])?\\s+of\\s+)?[a-zA-Z_][a-zA-Z0-9_]*(?:\\.[a-zA-Z_][a-zA-Z0-9_]*)*)\\s*(;)?",
"captures": {
"1": {
"name": "variable.other.declaration.tsl"
@@ -318,22 +321,50 @@
{
"name": "string.quoted.single.tsl",
"begin": "[uU]?'",
"end": "'",
"end": "'|(?=\\s*$)",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.tsl"
}
},
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.tsl"
}
},
"patterns": [
{
"name": "constant.character.escape.tsl",
"match": "\\\\."
},
{
"name": "constant.character.escape.newline.tsl",
"match": "\\\\\\r?\\n"
}
]
},
{
"name": "string.quoted.double.tsl",
"begin": "[uU]?\"",
"end": "\"",
"end": "\"|(?=\\s*$)",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.tsl"
}
},
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.tsl"
}
},
"patterns": [
{
"name": "constant.character.escape.tsl",
"match": "\\\\."
},
{
"name": "constant.character.escape.newline.tsl",
"match": "\\\\\\r?\\n"
}
]
},
@@ -341,6 +372,16 @@
"name": "string.quoted.raw.tsl",
"begin": "[uU]?[rR](['\"])",
"end": "\\1",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.tsl"
}
},
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.tsl"
}
},
"patterns": [
{
"name": "constant.character.escape.tsl",
@@ -532,4 +573,4 @@
"match": "[()\\[\\]{},;:.@?]"
}
}
}
}