89 | | "name" : "support.function.cobra", |
90 | | "match" : "\\b(base|(?<!is\\s)shared)\\b" |
91 | | }, |
92 | | { |
93 | | "name" : "support.type.cobra", |
94 | | "match" : "\\b(bool|char|int|uint|float|decimal|number|dynamic|int8|int16|int32|int64|uint8|uint16|uint32|uint64)\\b" |
| 89 | "name" : "support.type.primitive.cobra", |
| 90 | "match" : "\\b(nil|bool|char|int|uint|float|decimal|number|dynamic|int8|int16|int32|int64|uint8|uint16|uint32|uint64)\\b(\\?)?", |
| 91 | "captures" : { |
| 92 | "2" : { |
| 93 | "name" : "support.type.nillible-marker.cobra" |
| 94 | } |
| 95 | } |
112 | | "begin" : "^\\s*(?:class)\\s+(?=[a-zA-Z_][a-zA-Z0-9_]*)", |
113 | | "patterns" : [ |
114 | | { |
115 | | "name" : "keyword.operator.cobra", |
116 | | "match" : "(inherits|implements|is|partial)" |
117 | | }, |
118 | | { |
119 | | "name" : "entity.name.type.cobra", |
120 | | "match" : "[a-zA-Z0-9_]+" |
121 | | }, |
122 | | { |
123 | | "include" : "#types" |
124 | | } |
125 | | ], |
126 | | "name" : "storage.type.class.cobra", |
127 | | "end" : "$", |
128 | | "beginCaptures" : { |
129 | | "1" : { |
| 110 | "match" : "^\\s+(var)\\s+(_[\\w_]+)\\s+(as)?(\\s+[\\w_<>\\s?]+)", |
| 111 | "captures" : { |
| 112 | "3" : { |
| 113 | "name" : "keyword.operator.specifier.cobra" |
| 114 | }, |
| 115 | "1" : { |
| 116 | "name" : "keyword.operator.declaration.cobra" |
| 117 | }, |
| 118 | "4" : { |
| 119 | "name" : "support.other.type.cobra" |
| 120 | }, |
| 121 | "2" : { |
| 122 | "name" : "support.private-variable.cobra" |
| 123 | } |
| 124 | } |
| 125 | }, |
| 126 | { |
| 127 | "name" : "keyword.operator.enumeration.cobra", |
| 128 | "match" : "\\s*(?:enum|interface|struct|mixin)\\s+([\\w_]+)", |
| 129 | "captures" : { |
| 130 | "1" : { |
| 131 | "name" : "entity.name.enumeration.cobras" |
| 132 | } |
| 133 | } |
| 134 | }, |
| 135 | { |
| 136 | "name" : "keyword.operator.enumeration.cobra", |
| 137 | "match" : "\\s*(is|has)\\s+(shared|partial)\\s*", |
| 138 | "captures" : { |
| 139 | "1" : { |
| 140 | "name" : "operator.name.is.cobra" |
| 141 | }, |
| 142 | "2" : { |
| 143 | "name" : "constant.other.modifier.cobra" |
| 144 | } |
| 145 | } |
| 146 | }, |
| 147 | { |
| 148 | "name" : "keyword.operator.enumeration.cobra", |
| 149 | "match" : "\\s*(implements|inherits)\\s+([a-zA-Z_][\\w_]*)\\s*", |
| 150 | "captures" : { |
| 151 | "1" : { |
| 152 | "name" : "operator.name.is.cobra" |
| 153 | }, |
| 154 | "2" : { |
| 155 | "name" : "constant.other.interface.cobra" |
| 156 | } |
| 157 | } |
| 158 | }, |
| 159 | { |
| 160 | "name" : "meta.type.method.cobra", |
| 161 | "match" : "^\\s+(def|cue|get|pro|sig)\\s+([a-zA-Z_]\\w+)", |
| 162 | "captures" : { |
| 163 | "1" : { |
| 164 | "name" : "keyword.operator.method.cobra" |
| 165 | }, |
| 166 | "2" : { |
135 | | "match" : "^\\s+(var|def|cue|get|pro|sig)\\s+([a-zA-Z_]\\w+)", |
136 | | "name" : "meta.type.method.cobra", |
137 | | "captures" : { |
138 | | "1" : { |
139 | | "name" : "keyword.operator.method.cobra" |
140 | | }, |
141 | | "2" : { |
142 | | "name" : "entity.name.type.cobra" |
| 172 | "match" : "^\\s*(class)\\s+([a-zA-Z_][\\w_]*)\\s*", |
| 173 | "captures" : { |
| 174 | "1" : { |
| 175 | "name" : "keyword.operator.class-definition.cobra" |
| 176 | }, |
| 177 | "2" : { |
| 178 | "name" : "entity.name.user-defined-type.cobra" |