Skip to content

Commit 72d0348

Browse files
Merge pull request #192 from DustinCampbell/jamesqo-fix-cs6-keywords
Add support for C# 6 keywords
2 parents 0f89ee4 + e254c16 commit 72d0348

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

syntaxes/csharp.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,15 +293,15 @@
293293
"keywords": {
294294
"patterns": [
295295
{
296-
"match": "\\b(if|else|while|for|foreach|in|do|return|continue|break|switch|case|default|goto|throw|try|catch|finally|lock|yield|await)\\b",
296+
"match": "\\b(if|else|while|for|foreach|in|do|return|continue|break|switch|case|default|goto|throw|try|catch|finally|lock|yield|await|when)\\b",
297297
"name": "keyword.control.cs"
298298
},
299299
{
300300
"match": "\\b(from|where|select|group|into|orderby|join|let|on|equals|by|ascending|descending)\\b",
301301
"name": "keyword.linq.cs"
302302
},
303303
{
304-
"match": "\\b(new|is|as|using|checked|unchecked|typeof|sizeof|override|readonly|stackalloc)\\b",
304+
"match": "\\b(new|is|as|using|checked|unchecked|typeof|sizeof|override|readonly|stackalloc|nameof)\\b",
305305
"name": "keyword.operator.cs"
306306
},
307307
{
@@ -313,7 +313,7 @@
313313
"name": "storage.type.var.cs"
314314
},
315315
{
316-
"match": "[@]\\b(var|event|delegate|add|remove|set|get|value|new|is|as|using|checked|unchecked|typeof|sizeof |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)\\b",
316+
"match": "[@]\\b(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)\\b",
317317
"name": "meta.class.body.cs"
318318
}
319319
]
@@ -563,4 +563,4 @@
563563
"name": "storage.modifier.cs"
564564
}
565565
}
566-
}
566+
}

0 commit comments

Comments
 (0)