Skip to content

Commit

Permalink
Highlight body of C# 6 expression bodied members properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanz committed Aug 18, 2016
1 parent fe328c0 commit 5613797
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion syntaxes/csharp.json
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,21 @@
}
]
},
{
"begin": "=>(?!\\s*{)",
"beginCaptures": {
"0": {
"name": "punctuation.section.method.begin.cs"
}
},
"end": "(?=;)",
"name": "meta.method.body.cs",
"patterns": [
{
"include": "#code"
}
]
},
{
"begin": "{",
"beginCaptures": {
Expand All @@ -423,7 +438,7 @@
]
},
{
"begin": "(?!new)(?=[\\w<].*\\s+)(?=[^=]+\\{)",
"begin": "(?!new)(?=[\\w<].*\\s+)(?=[^=\\(]+\\{)",
"end": "}",
"endCaptures": {
"0": {
Expand Down Expand Up @@ -469,6 +484,21 @@
"include": "#code"
}
]
},
{
"begin": "=>(?!\\s*{)",
"beginCaptures": {
"0": {
"name": "punctuation.section.property.begin.cs"
}
},
"end": "(?=;)",
"name": "meta.method.body.cs",
"patterns": [
{
"include": "#code"
}
]
}
]
}
Expand Down

0 comments on commit 5613797

Please sign in to comment.