File tree 1 file changed +24
-5
lines changed
1 file changed +24
-5
lines changed Original file line number Diff line number Diff line change 71
71
}
72
72
]
73
73
},
74
+ "variable" : {
75
+ "patterns" : [
76
+ {
77
+ "match" : " \\ b(var)\\ s+(.*?)(?=(=|;))" ,
78
+ "captures" : {
79
+ "1" : {
80
+ "name" : " keyword.other.var.cs"
81
+ }
82
+ }
83
+ },
84
+ {
85
+ "match" : " \\ b(?!var|return|yield|throw)([\\ w<>*?\\ [\\ ]]+)\\ s+([\\ w]+)\\ s*(?=(=(?!=)|;))" ,
86
+ "captures" : {
87
+ "1" : {
88
+ "name" : " storage.type.variable.cs"
89
+ }
90
+ }
91
+ }
92
+ ]
93
+ },
74
94
"block" : {
75
95
"patterns" : [
76
96
{
176
196
{
177
197
"include" : " #class"
178
198
},
199
+ {
200
+ "include" : " #variable"
201
+ },
179
202
{
180
203
"include" : " #constants"
181
204
},
316
339
"name" : " keyword.operator.cs"
317
340
},
318
341
{
319
- "match" : " \\ b(event|delegate|fixed|add|remove|set|get|value)\\ b" ,
342
+ "match" : " \\ b(event|delegate|fixed|add|remove|set|get|value|var )\\ b" ,
320
343
"name" : " keyword.other.cs"
321
344
},
322
- {
323
- "match" : " \\ b(var)\\ b" ,
324
- "name" : " storage.type.var.cs"
325
- },
326
345
{
327
346
"match" : " [@]\\ b(namespace|class|var|event|delegate|add|remove|set|get|value|new|is|as|using|checked|unchecked|typeof|sizeof|nameof|when|override|readonly|stackalloc|from|where|select|group|into|orderby|join|let|on|equals|by|ascending|descending|if|else|while|for|foreach|in|do|return|continue|break|switch|case|default|goto|throw|try|catch|finally|lock|yield|await|internal|public|protected|private|static|const|sealed|abstract|virtual|extern|unsafe|volatile|implicit|explicit|operator|async|partial|bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|struct|enum|interface)\\ b" ,
328
347
"name" : " meta.class.body.cs"
You can’t perform that action at this time.
0 commit comments