Merge pull request #717 from ivanz/ivan-highlight-field-variable-types

Highlight variable and field types.
This commit is contained in:
Dustin Campbell 2016-08-26 10:33:31 -07:00 коммит произвёл GitHub
Родитель 6a939871dc ac079ffee7
Коммит 2d4b7ae003
1 изменённых файлов: 24 добавлений и 5 удалений

Просмотреть файл

@ -71,6 +71,26 @@
}
]
},
"variable": {
"patterns": [
{
"match": "\\b(var)\\s+(.*?)(?=(=|;))",
"captures": {
"1": {
"name": "keyword.other.var.cs"
}
}
},
{
"match": "\\b(?!var|return|yield|throw)([\\w<>*?\\[\\]]+)\\s+([\\w]+)\\s*(?=(=(?!=)|;))",
"captures": {
"1": {
"name": "storage.type.variable.cs"
}
}
}
]
},
"block": {
"patterns": [
{
@ -176,6 +196,9 @@
{
"include": "#class"
},
{
"include": "#variable"
},
{
"include": "#constants"
},
@ -316,13 +339,9 @@
"name": "keyword.operator.cs"
},
{
"match": "\\b(event|delegate|fixed|add|remove|set|get|value)\\b",
"match": "\\b(event|delegate|fixed|add|remove|set|get|value|var)\\b",
"name": "keyword.other.cs"
},
{
"match": "\\b(var)\\b",
"name": "storage.type.var.cs"
},
{
"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",
"name": "meta.class.body.cs"