82 | | "begin" : "(?<=\\)|\\])\\s*(\\[)", |
83 | | "patterns" : [ |
84 | | { |
85 | | "include" : "$self" |
86 | | } |
87 | | ], |
88 | | "name" : "meta.item-access.cobra", |
89 | | "contentName" : "meta.item-access.arguments.cobra", |
90 | | "endCaptures" : { |
91 | | "1" : { |
92 | | "name" : "punctuation.definition.arguments.end.cobra" |
93 | | } |
94 | | }, |
95 | | "end" : "(\\])", |
96 | | "beginCaptures" : { |
97 | | "1" : { |
98 | | "name" : "punctuation.definition.arguments.begin.cobra" |
99 | | } |
100 | | } |
101 | | }, |
102 | | { |
103 | | "name" : "storage.type.class.cobra", |
104 | | "match" : "\\b(class)\\b" |
105 | | }, |
106 | | { |
116 | | "begin" : "(\\()", |
117 | | "patterns" : [ |
118 | | { |
119 | | "include" : "$self" |
120 | | } |
121 | | ], |
122 | | "end" : "(\\))" |
123 | | }, |
124 | | { |
125 | | "match" : "(\\[)(\\s*(\\]))\\b", |
126 | | "captures" : { |
127 | | "3" : { |
128 | | "name" : "punctuation.definition.list.end.cobra" |
129 | | }, |
130 | | "1" : { |
131 | | "name" : "punctuation.definition.list.begin.cobra" |
132 | | }, |
133 | | "2" : { |
134 | | "name" : "meta.empty-list.cobra" |
135 | | } |
136 | | } |
137 | | }, |
138 | | { |
139 | | "begin" : "(\\[)", |
140 | | "patterns" : [ |
141 | | { |
142 | | "begin" : "(?<=\\[|\\,)\\s*(?![\\],])", |
143 | | "patterns" : [ |
144 | | { |
145 | | "include" : "$self" |
146 | | } |
147 | | ], |
148 | | "contentName" : "meta.structure.list.item.cobra", |
149 | | "endCaptures" : { |
150 | | "1" : { |
151 | | "name" : "punctuation.separator.list.cobra" |
152 | | } |
153 | | }, |
154 | | "end" : "\\s*(?:(,)|(?=\\]))" |
155 | | } |
156 | | ], |
157 | | "name" : "meta.structure.list.cobra", |
158 | | "endCaptures" : { |
159 | | "1" : { |
160 | | "name" : "punctuation.definition.list.end.cobra" |
161 | | } |
162 | | }, |
163 | | "end" : "(\\])", |
164 | | "beginCaptures" : { |
165 | | "1" : { |
166 | | "name" : "punctuation.definition.list.begin.cobra" |
167 | | } |
168 | | } |
169 | | }, |
170 | | { |
171 | | "name" : "meta.structure.tuple.cobra", |
172 | | "match" : "(\\()(\\s*(\\)))", |
173 | | "captures" : { |
174 | | "3" : { |
175 | | "name" : "punctuation.definition.tuple.end.cobra" |
176 | | }, |
177 | | "1" : { |
178 | | "name" : "punctuation.definition.tuple.begin.cobra" |
179 | | }, |
180 | | "2" : { |
181 | | "name" : "meta.empty-tuple.cobra" |
182 | | } |
183 | | } |
184 | | }, |
185 | | { |
186 | | "name" : "meta.structure.dictionary.cobra", |
187 | | "match" : "(\\{)(\\s*(\\}))", |
188 | | "captures" : { |
189 | | "3" : { |
190 | | "name" : "punctuation.definition.dictionary.end.cobra" |
191 | | }, |
192 | | "1" : { |
193 | | "name" : "punctuation.definition.dictionary.begin.cobra" |
194 | | }, |
195 | | "2" : { |
196 | | "name" : "meta.empty-dictionary.cobra" |
197 | | } |
198 | | } |
199 | | }, |
200 | | { |
201 | | "begin" : "(\\{)", |
202 | | "patterns" : [ |
203 | | { |
204 | | "begin" : "(?<=\\{|\\,|^)\\s*(?![\\},])", |
205 | | "patterns" : [ |
206 | | { |
207 | | "include" : "$self" |
208 | | } |
209 | | ], |
210 | | "contentName" : "meta.structure.dictionary.key.cobra", |
211 | | "endCaptures" : { |
212 | | "1" : { |
213 | | "name" : "punctuation.separator.valuepair.dictionary.cobra" |
214 | | } |
215 | | }, |
216 | | "end" : "\\s*(?:(?=\\})|(\\:))" |
217 | | }, |
218 | | { |
219 | | "begin" : "(?<=\\:|^)\\s*", |
220 | | "patterns" : [ |
221 | | { |
222 | | "include" : "$self" |
223 | | } |
224 | | ], |
225 | | "contentName" : "meta.structure.dictionary.value.cobra", |
226 | | "endCaptures" : { |
227 | | "1" : { |
228 | | "name" : "punctuation.separator.dictionary.cobra" |
229 | | } |
230 | | }, |
231 | | "end" : "\\s*(?:(?=\\})|(,))" |
232 | | } |
233 | | ], |
234 | | "name" : "meta.structure.dictionary.cobra", |
235 | | "endCaptures" : { |
236 | | "1" : { |
237 | | "name" : "punctuation.definition.dictionary.end.cobra" |
238 | | } |
239 | | }, |
240 | | "end" : "(\\})", |
241 | | "beginCaptures" : { |
242 | | "1" : { |
243 | | "name" : "punctuation.definition.dictionary.begin.cobra" |
244 | | } |
245 | | } |
246 | | }, |
247 | | { |
| 129 | }, |
| 130 | { |
| 131 | "begin" : "\\b(?:class)\\s*([a-zA-Z0-9_]+)", |
| 132 | "patterns" : [ |
| 133 | { |
| 134 | "name" : "keyword.operator.cobra", |
| 135 | "match" : "(inherits|implements)" |
| 136 | }, |
| 137 | { |
| 138 | "name" : "entity.name.type.cobra", |
| 139 | "match" : "[a-zA-Z0-9_]+" |
| 140 | }, |
| 141 | { |
| 142 | "name" : "support.name.generic.cobra", |
| 143 | "match" : "<\\s*of\\s+[a-zA-Z0-9]+>" |
| 144 | } |
| 145 | ], |
| 146 | "name" : "storage.type.class.cobra", |
| 147 | "end" : "$", |
| 148 | "beginCaptures" : { |
| 149 | "1" : { |
| 150 | "name" : "entity.name.type.cobra" |
| 151 | } |
| 152 | } |
| 153 | }, |
| 154 | { |
| 155 | "begin" : "^\\s*(?:def)\\s*([a-zA-Z0-9_]+)", |
| 156 | "patterns" : [ |
| 157 | { |
| 158 | "include" : "#argument-list" |
| 159 | } |
| 160 | ], |
| 161 | "name" : "meta.type.method.cobra", |
| 162 | "end" : "$", |
| 163 | "beginCaptures" : { |
| 164 | "1" : { |
| 165 | "name" : "entity.name.type.cobra" |
| 166 | } |
| 167 | } |