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

View File

@ -67,3 +67,6 @@ select distinct ["test"] from table where ['a'] = 1 end;
a := array(1, 2); a := array(1, 2);
b := array((1, 2), (3, 4)); b := array((1, 2), (3, 4));
sql += "update ts_xbcheck result set isvalid = "$status$remark$" where checkid in ('"$array2str
(checkid[(i-1)*len:], "','")$"');\r\n"
sql +=

View File

@ -2,6 +2,10 @@
Notable changes to the `TSL` extension will be documented in this file. Notable changes to the `TSL` extension will be documented in this file.
## [2.0.1]: 2025-06-30
- 修复:变量类型声明误匹配问题,如`len:], "','")$"');`
## [2.0.0]: 2025-06-22 ## [2.0.0]: 2025-06-22
- 初步支持`LSP`--关键字补全 - 初步支持`LSP`--关键字补全

View File

@ -1,12 +1,12 @@
{ {
"name": "tsl-devkit", "name": "tsl-devkit",
"version": "1.4.0", "version": "2.0.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "tsl-devkit", "name": "tsl-devkit",
"version": "1.4.0", "version": "2.0.0",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"dependencies": { "dependencies": {
"vscode-languageclient": "^9.0.1" "vscode-languageclient": "^9.0.1"
@ -15,7 +15,6 @@
"@types/node": "^24.0.3", "@types/node": "^24.0.3",
"@types/vscode": "^1.101.0", "@types/vscode": "^1.101.0",
"@vscode/vsce": "^3.5.0", "@vscode/vsce": "^3.5.0",
"cp": "^0.2.0",
"prettier": "^3.5.3", "prettier": "^3.5.3",
"typescript": "^5.8.3" "typescript": "^5.8.3"
}, },
@ -1298,13 +1297,6 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/cp": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/cp/-/cp-0.2.0.tgz",
"integrity": "sha512-4ftCvShHjIZG/zzomHyunNpBof3sOFTTmU6s6q9DdqAL/ANqrKV3pr6Z6kVfBI4hjn59DFLImrBqn7GuuMqSZA==",
"dev": true,
"license": "MIT"
},
"node_modules/cross-spawn": { "node_modules/cross-spawn": {
"version": "7.0.6", "version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",

View File

@ -1,7 +1,7 @@
{ {
"name": "tsl-devkit", "name": "tsl-devkit",
"displayName": "TSL", "displayName": "TSL",
"version": "2.0.0", "version": "2.0.1",
"description": "TSL syntax highlighter support for VSCode.", "description": "TSL syntax highlighter support for VSCode.",
"publisher": "csh", "publisher": "csh",
"homepage": "https://git.mytsl.cn/csh/tsl-devkit", "homepage": "https://git.mytsl.cn/csh/tsl-devkit",

View File

@ -2,7 +2,10 @@
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "TSL", "name": "TSL",
"scopeName": "source.tsl", "scopeName": "source.tsl",
"fileTypes": ["tsl", "tsf"], "fileTypes": [
"tsl",
"tsf"
],
"patterns": [ "patterns": [
{ {
"include": "#comments" "include": "#comments"
@ -189,7 +192,7 @@
}, },
"variable-declarations": { "variable-declarations": {
"name": "meta.variable.declaration.tsl", "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": { "captures": {
"1": { "1": {
"name": "variable.other.declaration.tsl" "name": "variable.other.declaration.tsl"
@ -318,22 +321,50 @@
{ {
"name": "string.quoted.single.tsl", "name": "string.quoted.single.tsl",
"begin": "[uU]?'", "begin": "[uU]?'",
"end": "'", "end": "'|(?=\\s*$)",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.tsl"
}
},
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.tsl"
}
},
"patterns": [ "patterns": [
{ {
"name": "constant.character.escape.tsl", "name": "constant.character.escape.tsl",
"match": "\\\\." "match": "\\\\."
},
{
"name": "constant.character.escape.newline.tsl",
"match": "\\\\\\r?\\n"
} }
] ]
}, },
{ {
"name": "string.quoted.double.tsl", "name": "string.quoted.double.tsl",
"begin": "[uU]?\"", "begin": "[uU]?\"",
"end": "\"", "end": "\"|(?=\\s*$)",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.tsl"
}
},
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.tsl"
}
},
"patterns": [ "patterns": [
{ {
"name": "constant.character.escape.tsl", "name": "constant.character.escape.tsl",
"match": "\\\\." "match": "\\\\."
},
{
"name": "constant.character.escape.newline.tsl",
"match": "\\\\\\r?\\n"
} }
] ]
}, },
@ -341,6 +372,16 @@
"name": "string.quoted.raw.tsl", "name": "string.quoted.raw.tsl",
"begin": "[uU]?[rR](['\"])", "begin": "[uU]?[rR](['\"])",
"end": "\\1", "end": "\\1",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.tsl"
}
},
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.tsl"
}
},
"patterns": [ "patterns": [
{ {
"name": "constant.character.escape.tsl", "name": "constant.character.escape.tsl",
@ -532,4 +573,4 @@
"match": "[()\\[\\]{},;:.@?]" "match": "[()\\[\\]{},;:.@?]"
} }
} }
} }