|
10 | 10 | { "include": "#keywords" },
|
11 | 11 | { "include": "#function-declarations" },
|
12 | 12 | { "include": "#struct-declarations" },
|
| 13 | + { "include": "#variable-declarations" }, |
13 | 14 | { "include": "#types" },
|
14 | 15 | { "include": "#strings" },
|
15 | 16 | { "include": "#numbers" },
|
|
118 | 119 | }
|
119 | 120 | ]
|
120 | 121 | },
|
| 122 | + "variable-declarations": { |
| 123 | + "patterns": [ |
| 124 | + { |
| 125 | + "name": "meta.variable.declaration.cesium", |
| 126 | + "match": "\\b([~#]?[a-zA-Z_][a-zA-Z0-9_]*(?:\\[[^\\]]*\\])?)\\s+([a-zA-Z_][a-zA-Z0-9_]*)(?=\\s*[=,;])", |
| 127 | + "captures": { |
| 128 | + "1": { "name": "storage.type.cesium" }, |
| 129 | + "2": { "name": "variable.other.readwrite.cesium" } |
| 130 | + } |
| 131 | + }, |
| 132 | + { |
| 133 | + "name": "meta.variable.assignment.cesium", |
| 134 | + "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(?=\\s*=)", |
| 135 | + "captures": { |
| 136 | + "1": { "name": "variable.other.readwrite.cesium" } |
| 137 | + } |
| 138 | + } |
| 139 | + ] |
| 140 | + }, |
121 | 141 | "struct-methods": {
|
122 | 142 | "patterns": [
|
123 | 143 | {
|
|
245 | 265 | "patterns": [
|
246 | 266 | {
|
247 | 267 | "name": "support.function.builtin.cesium",
|
248 |
| - "match": "\\b(alloc|free|realloc|printf|debugf|assert|floor|ceil|trunc|round|trueround|abs|min|max|mean|norm)\\b" |
| 268 | + "match": "\\b(alloc|free|realloc|printf|debugf|assert|floor|ceil|trunc|round|trueround|abs|min|max|mean|norm)(?=\\s*\\()" |
| 269 | + }, |
| 270 | + { |
| 271 | + "name": "support.function.method.cesium", |
| 272 | + "match": "(?<=\\.)[a-zA-Z_][a-zA-Z0-9_]*(?=\\s*\\()" |
249 | 273 | },
|
250 | 274 | {
|
251 |
| - "name": "entity.name.function.cesium", |
| 275 | + "name": "entity.name.function.call.cesium", |
252 | 276 | "match": "\\b[a-zA-Z_][a-zA-Z0-9_]*(?=\\s*\\()"
|
253 | 277 | },
|
254 | 278 | {
|
|
261 | 285 | },
|
262 | 286 | {
|
263 | 287 | "name": "variable.other.property.cesium",
|
264 |
| - "match": "\\b[a-zA-Z_][a-zA-Z0-9_]*(?=\\s*\\.[a-zA-Z_])" |
265 |
| - }, |
266 |
| - { |
267 |
| - "name": "variable.other.property.cesium", |
268 |
| - "match": "(?<=\\.)[a-zA-Z_][a-zA-Z0-9_]*" |
| 288 | + "match": "(?<=\\.)[a-zA-Z_][a-zA-Z0-9_]*(?!\\s*\\()" |
269 | 289 | },
|
270 | 290 | {
|
271 | 291 | "name": "variable.other.readwrite.cesium",
|
|
0 commit comments