PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.27.4
Code Block Pro – Beautiful Syntax Highlighting v1.27.4
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 / smalltalk.tmLanguage.json

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

240 lines 6.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "information_for_contributors": [
3 "This file has been converted from https://github.com/textmate/smalltalk.tmbundle/blob/master/Syntaxes/SmallTalk.tmLanguage",
4 "If you want to provide a fix or improvement, please create a pull request against the original repository.",
5 "Once accepted there, we are happy to receive an update request."
6 ],
7 "name": "smalltalk",
8 "foldingStartMarker": "\\[",
9 "foldingStopMarker": "^\\s*\\]|^\\s\\]",
10 "keyEquivalent": "^~S",
11 "fileTypes": ["st"],
12 "patterns": [
13 {
14 "match": "\\$.",
15 "name": "constant.character.smalltalk"
16 },
17 {
18 "match": "\\b(class)\\b",
19 "name": "storage.type.$1.smalltalk"
20 },
21 {
22 "match": "\\b(extend|super|self)\\b",
23 "name": "storage.modifier.$1.smalltalk"
24 },
25 {
26 "match": "\\b(yourself|new|Smalltalk)\\b",
27 "name": "keyword.control.$1.smalltalk"
28 },
29 {
30 "match": ":=",
31 "name": "keyword.operator.assignment.smalltalk"
32 },
33 {
34 "comment": "Parse the variable declaration like: |a b c|",
35 "match": "/^:\\w*\\s*\\|/",
36 "name": "constant.other.block.smalltalk"
37 },
38 {
39 "captures": {
40 "1": {
41 "name": "punctuation.definition.instance-variables.begin.smalltalk"
42 },
43 "2": {
44 "patterns": [
45 {
46 "match": "\\w+",
47 "name": "support.type.variable.declaration.smalltalk"
48 }
49 ]
50 },
51 "3": {
52 "name": "punctuation.definition.instance-variables.end.smalltalk"
53 }
54 },
55 "match": "(\\|)(\\s*\\w[\\w ]*)(\\|)"
56 },
57 {
58 "captures": {
59 "1": {
60 "patterns": [
61 {
62 "match": ":\\w+",
63 "name": "entity.name.function.block.smalltalk"
64 }
65 ]
66 }
67 },
68 "comment": "Parse the blocks like: [ :a :b | ...... ]",
69 "match": "\\[((\\s+|:\\w+)*)\\|"
70 },
71 {
72 "include": "#numeric"
73 },
74 {
75 "match": "<(?!<|=)|>(?!<|=|>)|<=|>=|=|==|~=|~~|>>|\\^",
76 "name": "keyword.operator.comparison.smalltalk"
77 },
78 {
79 "match": "(\\*|\\+|\\-|/|\\\\)",
80 "name": "keyword.operator.arithmetic.smalltalk"
81 },
82 {
83 "match": "(?<=[ \\t])!+|\\bnot\\b|&|\\band\\b|\\||\\bor\\b",
84 "name": "keyword.operator.logical.smalltalk"
85 },
86 {
87 "comment": "Fake reserved word -> main Smalltalk messages",
88 "match": "(?<!\\.)\\b(ensure|resume|retry|signal)\\b(?![?!])",
89 "name": "keyword.control.smalltalk"
90 },
91 {
92 "comment": "Fake conditionals. Smalltalk Methods.",
93 "match": "ifCurtailed:|ifTrue:|ifFalse:|whileFalse:|whileTrue:",
94 "name": "keyword.control.conditionals.smalltalk"
95 },
96 {
97 "captures": {
98 "1": {
99 "name": "entity.other.inherited-class.smalltalk"
100 },
101 "3": {
102 "name": "keyword.control.smalltalk"
103 },
104 "4": {
105 "name": "entity.name.type.class.smalltalk"
106 }
107 },
108 "match": "(\\w+)(\\s+(subclass:))\\s*(\\w*)",
109 "name": "meta.class.smalltalk"
110 },
111 {
112 "begin": "\"",
113 "beginCaptures": [
114 {
115 "name": "punctuation.definition.comment.begin.smalltalk"
116 }
117 ],
118 "end": "\"",
119 "endCaptures": [
120 {
121 "name": "punctuation.definition.comment.end.smalltalk"
122 }
123 ],
124 "name": "comment.block.smalltalk"
125 },
126 {
127 "match": "\\b(true|false)\\b",
128 "name": "constant.language.boolean.smalltalk"
129 },
130 {
131 "match": "\\b(nil)\\b",
132 "name": "constant.language.nil.smalltalk"
133 },
134 {
135 "captures": {
136 "1": {
137 "name": "punctuation.definition.constant.smalltalk"
138 }
139 },
140 "comment": "messages/methods",
141 "match": "(?>[a-zA-Z_]\\w*(?>[?!])?)(:)(?!:)",
142 "name": "constant.other.messages.smalltalk"
143 },
144 {
145 "captures": {
146 "1": {
147 "name": "punctuation.definition.constant.smalltalk"
148 }
149 },
150 "comment": "symbols",
151 "match": "(#)[a-zA-Z_][a-zA-Z0-9_:]*",
152 "name": "constant.other.symbol.smalltalk"
153 },
154 {
155 "begin": "#\\[",
156 "beginCaptures": [
157 {
158 "name": "punctuation.definition.constant.begin.smalltalk"
159 }
160 ],
161 "end": "\\]",
162 "endCaptures": [
163 {
164 "name": "punctuation.definition.constant.end.smalltalk"
165 }
166 ],
167 "name": "meta.array.byte.smalltalk",
168 "patterns": [
169 {
170 "match": "[0-9]+(r[a-zA-Z0-9]+)?",
171 "name": "constant.numeric.integer.smalltalk"
172 },
173 {
174 "match": "[^\\s\\]]+",
175 "name": "invalid.illegal.character-not-allowed-here.smalltalk"
176 }
177 ]
178 },
179 {
180 "begin": "#\\(",
181 "beginCaptures": [
182 {
183 "name": "punctuation.definition.constant.begin.smalltalk"
184 }
185 ],
186 "comment": "Array Constructor",
187 "end": "\\)",
188 "endCaptures": [
189 {
190 "name": "punctuation.definition.constant.end.smalltalk"
191 }
192 ],
193 "name": "constant.other.array.smalltalk"
194 },
195 {
196 "begin": "'",
197 "beginCaptures": [
198 {
199 "name": "punctuation.definition.string.begin.smalltalk"
200 }
201 ],
202 "end": "'",
203 "endCaptures": [
204 {
205 "name": "punctuation.definition.string.end.smalltalk"
206 }
207 ],
208 "name": "string.quoted.single.smalltalk"
209 },
210 {
211 "match": "\\b[A-Z]\\w*\\b",
212 "name": "variable.other.constant.smalltalk"
213 }
214 ],
215 "repository": {
216 "numeric": {
217 "patterns": [
218 {
219 "match": "(?<!\\w)[0-9]+\\.[0-9]+s[0-9]*",
220 "name": "constant.numeric.float.scaled.smalltalk"
221 },
222 {
223 "match": "(?<!\\w)[0-9]+\\.[0-9]+([edq]-?[0-9]+)?",
224 "name": "constant.numeric.float.smalltalk"
225 },
226 {
227 "match": "(?<!\\w)-?[0-9]+r[a-zA-Z0-9]+",
228 "name": "constant.numeric.integer.radix.smalltalk"
229 },
230 {
231 "match": "(?<!\\w)-?[0-9]+([edq]-?[0-9]+)?",
232 "name": "constant.numeric.integer.smalltalk"
233 }
234 ]
235 }
236 },
237 "scopeName": "source.smalltalk",
238 "uuid": "1ED64A34-BCB1-44E1-A0FE-84053003E232"
239 }
240