diff --git a/test/test.tsl b/test/test.tsl index 66b440b..3767c1c 100644 --- a/test/test.tsl +++ b/test/test.tsl @@ -54,8 +54,9 @@ a ? b : c; a ? b : c ? d : e; // select -select ["test"] from table end; +Select ["test"] from table end; vselect ["test"] from table end; +select distinct ["test"] from table where ['a'] = 1 end; // array a := array(1, 2); diff --git a/vscode/CHANGELOG.md b/vscode/CHANGELOG.md index 29e8e2c..2251b9f 100644 --- a/vscode/CHANGELOG.md +++ b/vscode/CHANGELOG.md @@ -2,6 +2,11 @@ Notable changes to the `TSL` extension will be documented in this file. +## [1.3.0]: 2025-06-17 + +- 支持关键字大小写不敏感 +- 调整和新增某些关键字的所属类型 + ## [1.2.0]: 2025-06-16 - 大量高亮调整 diff --git a/vscode/package.json b/vscode/package.json index a808bd5..2cad9b9 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -1,7 +1,7 @@ { "name": "tsl-devkit", "displayName": "TSL", - "version": "1.2.0", + "version": "1.3.0", "description": "TSL syntax highlighter support for VSCode.", "publisher": "csh", "homepage": "https://git.mytsl.cn/csh/tsl-devkit", diff --git a/vscode/syntaxes/tsl.tmLanguage.json b/vscode/syntaxes/tsl.tmLanguage.json index a0b0f03..52cae37 100644 --- a/vscode/syntaxes/tsl.tmLanguage.json +++ b/vscode/syntaxes/tsl.tmLanguage.json @@ -389,120 +389,116 @@ "keywords": { "patterns": [ { - "name": "keyword.control.header.tsl", - "match": "\\b(program|function|procedure)\\b" - }, - { - "name": "variable.language.builtin.tsl", - "match": "\\b(paramcount|realparamcount|params|system|thisfunction|tslassigning|likeeps|likeepsrate)\\b" - }, - { - "name": "keyword.control.conditional.tsl", - "match": "\\b(else|if)\\b" - }, - { - "name": "keyword.control.statement.tsl", - "match": "\\b(begin|end|then|this|with|exit|weakref|autoref|namespace)\\b" + "name": "keyword.control.program-structure.tsl", + "match": "(?i)\\b(program|function|procedure|unit|uses|implementation|interface|initalization|finalization)\\b" }, { "name": "keyword.control.interface.tsl", - "match": "\\b(unit|uses|implementation|interface|initalization|finalization)\\b" + "match": "(?i)\\b(unit|uses|implementation|interface|initalization|finalization)\\b" }, { - "name": "keyword.control.repeat.tsl", - "match": "\\b(for|while|do|downto|step|until|repeat|to)\\b" - }, - { - "name": "keyword.control.branch.tsl", - "match": "\\b(break|continue)\\b" - }, - { - "name": "keyword.control.return.tsl", - "match": "\\b(return|debugreturn|debugrunenv|debugrunenvdo)\\b" - }, - { - "name": "keyword.control.label.tsl", - "match": "\\b(case|of|goto|label)\\b" - }, - { - "name": "keyword.operator.io.tsl", - "match": "\\b(write|read)\\b" - }, - { - "name": "keyword.operator.set.tsl", - "match": "\\b(union|minus|union2)\\b" - }, - { - "name": "keyword.operator.shift.tsl", - "match": "\\b(ror|rol|shr|shl)\\b" - }, - { - "name": "keyword.operator.logical.tsl", - "match": "\\b(and|in|is|not|or)\\b" - }, - { - "name": "keyword.operator.arithmetic.tsl", - "match": "\\b(div|mod)\\b" - }, - { - "name": "keyword.control.exception.tsl", - "match": "\\b(except|raise|try|finally|exceptobject)\\b" - }, - { - "name": "constant.language.boolean.tsl", - "match": "\\b(false|true)\\b" - }, - { - "name": "constant.language.null.tsl", - "match": "\\bnil\\b" - }, - { - "name": "storage.type.tsl", - "match": "\\b(string|integer|boolean|int64|real|array)\\b" - }, - { - "name": "support.function.builtin.tsl", - "match": "\\b(echo|mtic|mtoc|this|inf|nan)\\b" - }, - { - "name": "storage.modifier.tsl", - "match": "\\b(external|const|out|var)\\b" - }, - { - "name": "keyword.other.sql.tsl", - "match": "\\b(select|vselect|sselect|update|delete|mselect|set)\\b" - }, - { - "name": "keyword.operator.sql.tsl", - "match": "\\b(sqlin|from|where|group|by|like|order)\\b" - }, - { - "name": "keyword.other.system.tsl", - "match": "\\b(setuid|sudo)\\b" - }, - { - "name": "keyword.other.calling-convention.tsl", - "match": "\\b(cdecl|pascal|stdcall|safecall|fastcall|register)\\b" - }, - { - "name": "storage.modifier.scope.tsl", - "match": "\\b(global|static)\\b" + "name": "storage.type.primitive.tsl", + "match": "(?i)\\b(string|integer|boolean|int64|real|array)\\b" }, { "name": "storage.type.class.tsl", - "match": "\\b(type|class|fakeclass|new)\\b" + "match": "(?i)\\b(type|class|fakeclass|new)\\b" }, { "name": "storage.modifier.class.tsl", - "match": "\\b(override|overload|virtual|property|self|inherited)\\b" - }, - { - "name": "keyword.other.constructor.tsl", - "match": "\\b(create|destroy|operator)\\b" + "match": "(?i)\\b(override|overload|virtual|property|self|inherited)\\b" }, { "name": "storage.modifier.access.tsl", - "match": "\\b(public|protected|private|published)\\b" + "match": "(?i)\\b(public|protected|private|published)\\b" + }, + { + "name": "keyword.other.constructor.tsl", + "match": "(?i)\\b(create|destroy|operator)\\b" + }, + { + "name": "storage.modifier.variable.tsl", + "match": "(?i)\\b(external|const|out|var|global|static)\\b" + }, + { + "name": "keyword.control.conditional.tsl", + "match": "(?i)\\b(if|else|then|case|of)\\b" + }, + { + "name": "keyword.control.loop.tsl", + "match": "(?i)\\b(for|while|do|downto|step|until|repeat|to)\\b" + }, + { + "name": "keyword.control.branch.tsl", + "match": "(?i)\\b(break|continue|goto|label|exit)\\b" + }, + { + "name": "keyword.control.return.tsl", + "match": "(?i)\\b(return|debugreturn|debugrunenv|debugrunenvdo)\\b" + }, + { + "name": "keyword.control.block.tsl", + "match": "(?i)\\b(begin|end|this|with|weakref|autoref|namespace)\\b" + }, + { + "name": "keyword.control.exception.tsl", + "match": "(?i)\\b(except|raise|try|finally|exceptobject)\\b" + }, + { + "name": "keyword.operator.logical.tsl", + "match": "(?i)\\b(and|in|is|not|or)\\b" + }, + { + "name": "keyword.operator.arithmetic.tsl", + "match": "(?i)\\b(div|mod)\\b" + }, + { + "name": "keyword.operator.bitwise.tsl", + "match": "(?i)\\b(ror|rol|shr|shl)\\b" + }, + { + "name": "keyword.operator.set.tsl", + "match": "(?i)\\b(union|minus|union2)\\b" + }, + { + "name": "keyword.operator.io.tsl", + "match": "(?i)\\b(write|read)\\b" + }, + { + "name": "keyword.control.sql.tsl", + "match": "(?i)\\b(select|vselect|sselect|update|delete|mselect)\\b" + }, + { + "name": "keyword.operator.sql.tsl", + "match": "(?i)\\b(on|like|in)\\b" + }, + { + "name": "keyword.other.sql.tsl", + "match": "(?i)\\b(sqlin|from|where|group|by|order|distinct|join)\\b" + }, + { + "name": "keyword.other.calling-convention.tsl", + "match": "(?i)\\b(cdecl|pascal|stdcall|safecall|fastcall|register)\\b" + }, + { + "name": "keyword.other.system.tsl", + "match": "(?i)\\b(setuid|sudo)\\b" + }, + { + "name": "variable.language.builtin.tsl", + "match": "(?i)\\b(paramcount|realparamcount|params|system|thisfunction|tslassigning|likeeps|likeepsrate)\\b" + }, + { + "name": "support.function.builtin.tsl", + "match": "(?i)\\b(echo|mtic|mtoc|this|inf|nan)\\b" + }, + { + "name": "constant.language.boolean.tsl", + "match": "(?i)\\b(false|true)\\b" + }, + { + "name": "constant.language.null.tsl", + "match": "(?i)\\bnil\\b" } ] }, diff --git a/vscode/tsl-devkit-1.2.0.vsix b/vscode/tsl-devkit-1.3.0.vsix similarity index 65% rename from vscode/tsl-devkit-1.2.0.vsix rename to vscode/tsl-devkit-1.3.0.vsix index d08883f..fbf2a85 100644 Binary files a/vscode/tsl-devkit-1.2.0.vsix and b/vscode/tsl-devkit-1.3.0.vsix differ