PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.27.5
Code Block Pro – Beautiful Syntax Highlighting v1.27.5
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / tcl.tmLanguage.json

tcl.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.27.5, at build/shiki/languages/tcl.tmLanguage.json

291 lines 7.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "fileTypes": ["tcl"],
3 "foldingStartMarker": "\\{\\s*$",
4 "foldingStopMarker": "^\\s*\\}",
5 "keyEquivalent": "^~T",
6 "name": "tcl",
7 "patterns": [
8 {
9 "begin": "(?<=^|;)\\s*((#))",
10 "beginCaptures": {
11 "1": {
12 "name": "comment.line.number-sign.tcl"
13 },
14 "2": {
15 "name": "punctuation.definition.comment.tcl"
16 }
17 },
18 "contentName": "comment.line.number-sign.tcl",
19 "end": "\\n",
20 "patterns": [
21 {
22 "match": "(\\\\\\\\|\\\\\\n)"
23 }
24 ]
25 },
26 {
27 "captures": {
28 "1": {
29 "name": "keyword.control.tcl"
30 }
31 },
32 "match": "(?<=^|[\\[{;])\\s*(if|while|for|catch|default|return|break|continue|switch|exit|foreach|try|throw)\\b"
33 },
34 {
35 "captures": {
36 "1": {
37 "name": "keyword.control.tcl"
38 }
39 },
40 "match": "(?<=^|})\\s*(then|elseif|else)\\b"
41 },
42 {
43 "captures": {
44 "1": {
45 "name": "keyword.other.tcl"
46 },
47 "2": {
48 "name": "entity.name.function.tcl"
49 }
50 },
51 "match": "(?<=^|{)\\s*(proc)\\s+([^\\s]+)"
52 },
53 {
54 "captures": {
55 "1": {
56 "name": "keyword.other.tcl"
57 }
58 },
59 "match": "(?<=^|[\\[{;])\\s*(after|append|array|auto_execok|auto_import|auto_load|auto_mkindex|auto_mkindex_old|auto_qualify|auto_reset|bgerror|binary|cd|clock|close|concat|dde|encoding|eof|error|eval|exec|expr|fblocked|fconfigure|fcopy|file|fileevent|filename|flush|format|gets|glob|global|history|http|incr|info|interp|join|lappend|library|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort|memory|msgcat|namespace|open|package|parray|pid|pkg::create|pkg_mkIndex|proc|puts|pwd|re_syntax|read|registry|rename|resource|scan|seek|set|socket|SafeBase|source|split|string|subst|Tcl|tcl_endOfWord|tcl_findLibrary|tcl_startOfNextWord|tcl_startOfPreviousWord|tcl_wordBreakAfter|tcl_wordBreakBefore|tcltest|tclvars|tell|time|trace|unknown|unset|update|uplevel|upvar|variable|vwait)\\b"
60 },
61 {
62 "begin": "(?<=^|[\\[{;])\\s*(regexp|regsub)\\b\\s*",
63 "beginCaptures": {
64 "1": {
65 "name": "keyword.other.tcl"
66 }
67 },
68 "comment": "special-case regexp/regsub keyword in order to handle the expression",
69 "end": "[\\n;\\]]",
70 "patterns": [
71 {
72 "match": "\\\\(?:.|\\n)",
73 "name": "constant.character.escape.tcl"
74 },
75 {
76 "comment": "switch for regexp",
77 "match": "-\\w+\\s*"
78 },
79 {
80 "applyEndPatternLast": 1,
81 "begin": "--\\s*",
82 "comment": "end of switches",
83 "end": "",
84 "patterns": [
85 {
86 "include": "#regexp"
87 }
88 ]
89 },
90 {
91 "include": "#regexp"
92 }
93 ]
94 },
95 {
96 "include": "#escape"
97 },
98 {
99 "include": "#variable"
100 },
101 {
102 "include": "#operator"
103 },
104 {
105 "include": "#numeric"
106 },
107 {
108 "begin": "\"",
109 "beginCaptures": {
110 "0": {
111 "name": "punctuation.definition.string.begin.tcl"
112 }
113 },
114 "end": "\"",
115 "endCaptures": {
116 "0": {
117 "name": "punctuation.definition.string.end.tcl"
118 }
119 },
120 "name": "string.quoted.double.tcl",
121 "patterns": [
122 {
123 "include": "#escape"
124 },
125 {
126 "include": "#variable"
127 },
128 {
129 "include": "#embedded"
130 }
131 ]
132 }
133 ],
134 "repository": {
135 "bare-string": {
136 "begin": "(?:^|(?<=\\s))\"",
137 "comment": "matches a single quote-enclosed word without scoping",
138 "end": "\"([^\\s\\]]*)",
139 "endCaptures": {
140 "1": {
141 "name": "invalid.illegal.tcl"
142 }
143 },
144 "patterns": [
145 {
146 "include": "#escape"
147 },
148 {
149 "include": "#variable"
150 }
151 ]
152 },
153 "braces": {
154 "begin": "(?:^|(?<=\\s))\\{",
155 "comment": "matches a single brace-enclosed word",
156 "end": "\\}([^\\s\\]]*)",
157 "endCaptures": {
158 "1": {
159 "name": "invalid.illegal.tcl"
160 }
161 },
162 "patterns": [
163 {
164 "match": "\\\\[{}\\n]",
165 "name": "constant.character.escape.tcl"
166 },
167 {
168 "include": "#inner-braces"
169 }
170 ]
171 },
172 "embedded": {
173 "begin": "\\[",
174 "beginCaptures": {
175 "0": {
176 "name": "punctuation.section.embedded.begin.tcl"
177 }
178 },
179 "end": "\\]",
180 "endCaptures": {
181 "0": {
182 "name": "punctuation.section.embedded.end.tcl"
183 }
184 },
185 "name": "source.tcl.embedded",
186 "patterns": [
187 {
188 "include": "source.tcl"
189 }
190 ]
191 },
192 "escape": {
193 "match": "\\\\(\\d{1,3}|x[a-fA-F0-9]+|u[a-fA-F0-9]{1,4}|.|\\n)",
194 "name": "constant.character.escape.tcl"
195 },
196 "inner-braces": {
197 "begin": "\\{",
198 "comment": "matches a nested brace in a brace-enclosed word",
199 "end": "\\}",
200 "patterns": [
201 {
202 "match": "\\\\[{}\\n]",
203 "name": "constant.character.escape.tcl"
204 },
205 {
206 "include": "#inner-braces"
207 }
208 ]
209 },
210 "regexp": {
211 "begin": "(?=\\S)(?![\\n;\\]])",
212 "comment": "matches a single word, named as a regexp, then swallows the rest of the command",
213 "end": "(?=[\\n;\\]])",
214 "patterns": [
215 {
216 "begin": "(?=[^ \\t\\n;])",
217 "end": "(?=[ \\t\\n;])",
218 "name": "string.regexp.tcl",
219 "patterns": [
220 {
221 "include": "#braces"
222 },
223 {
224 "include": "#bare-string"
225 },
226 {
227 "include": "#escape"
228 },
229 {
230 "include": "#variable"
231 }
232 ]
233 },
234 {
235 "begin": "[ \\t]",
236 "comment": "swallow the rest of the command",
237 "end": "(?=[\\n;\\]])",
238 "patterns": [
239 {
240 "include": "#variable"
241 },
242 {
243 "include": "#embedded"
244 },
245 {
246 "include": "#escape"
247 },
248 {
249 "include": "#braces"
250 },
251 {
252 "include": "#string"
253 }
254 ]
255 }
256 ]
257 },
258 "string": {
259 "applyEndPatternLast": 1,
260 "begin": "(?:^|(?<=\\s))(?=\")",
261 "comment": "matches a single quote-enclosed word with scoping",
262 "end": "",
263 "name": "string.quoted.double.tcl",
264 "patterns": [
265 {
266 "include": "#bare-string"
267 }
268 ]
269 },
270 "variable": {
271 "captures": {
272 "1": {
273 "name": "punctuation.definition.variable.tcl"
274 }
275 },
276 "match": "(\\$)((?:[a-zA-Z0-9_]|::)+(\\([^\\)]+\\))?|\\{[^\\}]*\\})",
277 "name": "support.function.tcl"
278 },
279 "numeric": {
280 "match": "(?<![a-zA-Z])([+-]?([0-9]*[.])?[0-9]+f?)(?![\\.a-zA-Z])",
281 "name": "constant.numeric.tcl"
282 },
283 "operator": {
284 "match": "(?<= |\\d)(-|\\+|~|&{1,2}|\\|{1,2}|<{1,2}|>{1,2}|\\*{1,2}|!|%|\\/|<=|>=|={1,2}|!=|\\^)(?= |\\d)",
285 "name": "keyword.operator.tcl"
286 }
287 },
288 "scopeName": "source.tcl",
289 "uuid": "62E11136-D9E5-461C-BE98-54E3A2A9E5E3"
290 }
291