|
10 | 10 | "repository": { |
11 | 11 | "code": { |
12 | 12 | "patterns": [ |
13 | | - { "include": "block" }, |
| 13 | + { "include": "#block" }, |
14 | 14 | { "include": "#blockComment" }, |
| 15 | + { "include": "#class" }, |
15 | 16 | { "include": "#comment" }, |
16 | 17 | { "include": "#constant" }, |
17 | | - { "include": "function" }, |
18 | 18 | { "include": "#keyword" }, |
19 | 19 | { "include": "#library" }, |
20 | 20 | { "include": "#puncuation" }, |
21 | | - { "include": "#string" } |
| 21 | + { "include": "#string" }, |
| 22 | + { "include": "#variable" } |
22 | 23 | ] |
23 | 24 | }, |
24 | 25 |
|
|
50 | 51 | ] |
51 | 52 | }, |
52 | 53 |
|
| 54 | + "class": { |
| 55 | + "name": "meta.class", |
| 56 | + "begin": "(?:\\b(foreign)\\s+)?(\\bclass)\\s+(\\w+)\\s+(?:(\\bis)\\s+(\\w+))?", |
| 57 | + "beginCaptures": { |
| 58 | + "1": { "name": "storage.modifier.ghost" }, |
| 59 | + "2": { "name": "storage.modifier.ghost" }, |
| 60 | + "3": { "name": "entity.name.class.ghost" }, |
| 61 | + "4": { "name": "storage.modifier.ghost" }, |
| 62 | + "5": { "name": "entity.name.class.ghost" } |
| 63 | + }, |
| 64 | + "end": "}", |
| 65 | + "endCaptures": { |
| 66 | + "0": { "name": "punctuation.section.class.end.ghost" } |
| 67 | + }, |
| 68 | + "patterns": [ |
| 69 | + { |
| 70 | + "name": "meta.class.body.ghost", |
| 71 | + "begin": "{", |
| 72 | + "beginCaptures": { |
| 73 | + "0": { "name": "punctuation.section.class.begin.ghost" } |
| 74 | + }, |
| 75 | + "patterns": [ |
| 76 | + { "include": "#comment" }, |
| 77 | + { "include": "#blockComment" }, |
| 78 | + { "include": "#method" } |
| 79 | + ], |
| 80 | + "end": "(?=})" |
| 81 | + } |
| 82 | + ] |
| 83 | + }, |
| 84 | + |
53 | 85 | "comment": { |
54 | 86 | "name": "comment.line.ghost", |
55 | 87 | "match": "//.*" |
|
118 | 150 | ] |
119 | 151 | }, |
120 | 152 |
|
| 153 | + "method": { |
| 154 | + "name": "meta.method.ghost", |
| 155 | + "begin": "(?:\\b(construct|static)\\s+)?(\\w+=|\\w+|\\+|-|\\*|\\/|%|<=?|>=?|==|!=?|&|\\||~)", |
| 156 | + "beginCaptures": { |
| 157 | + "1": { "name": "storage.modifier.ghost" }, |
| 158 | + "2": { "name": "entity.name.function.ghost" } |
| 159 | + }, |
| 160 | + "end": "}", |
| 161 | + "patterns": [ |
| 162 | + { |
| 163 | + "name": "meta.method.identifier.ghost", |
| 164 | + "begin": "\\(", |
| 165 | + "end": "\\)", |
| 166 | + "patterns": [ |
| 167 | + { |
| 168 | + "name": "variable.parameter.function.ghost", |
| 169 | + "match": "\\w+" |
| 170 | + } |
| 171 | + ] |
| 172 | + }, |
| 173 | + { |
| 174 | + "name": "meta.method.body.ghost", |
| 175 | + "begin": "{", |
| 176 | + "end": "(?=})", |
| 177 | + "patterns": [ |
| 178 | + { "include": "#code" } |
| 179 | + ] |
| 180 | + } |
| 181 | + ] |
| 182 | + }, |
| 183 | + |
121 | 184 | "puncutation": { |
122 | 185 | "patterns": [ |
123 | 186 | { |
|
0 commit comments