Skip to content

Commit 543d79f

Browse files
Update to latest C# TextMate grammar
1 parent a017fde commit 543d79f

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

extensions/csharp/syntaxes/csharp.tmLanguage.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,9 @@
566566
},
567567
"end": "(?=\\{)",
568568
"patterns": [
569+
{
570+
"include": "#comment"
571+
},
569572
{
570573
"include": "#type-parameter-list"
571574
},
@@ -649,6 +652,9 @@
649652
"begin": "(?=enum)",
650653
"end": "(?=\\{)",
651654
"patterns": [
655+
{
656+
"include": "#comment"
657+
},
652658
{
653659
"match": "(enum)\\s+([_[:alpha:]][_[:alnum:]]*)",
654660
"captures": {
@@ -745,6 +751,9 @@
745751
},
746752
"end": "(?=\\{)",
747753
"patterns": [
754+
{
755+
"include": "#comment"
756+
},
748757
{
749758
"include": "#type-parameter-list"
750759
},
@@ -799,6 +808,9 @@
799808
},
800809
"end": "(?=\\{)",
801810
"patterns": [
811+
{
812+
"include": "#comment"
813+
},
802814
{
803815
"include": "#type-parameter-list"
804816
},
@@ -2809,7 +2821,7 @@
28092821
]
28102822
},
28112823
"element-access-expression": {
2812-
"begin": "(?x)\n(?:(\\?)\\s*)? # preceding null-conditional operator?\n(?:(\\.)\\s*)? # preceding dot?\n([_[:alpha:]][_[:alnum:]]*)\\s* # property name\n(?:(\\?)\\s*)? # null-conditional operator?\n(?=\\[) # open bracket of argument list",
2824+
"begin": "(?x)\n(?:(\\?)\\s*)? # preceding null-conditional operator?\n(?:(\\.)\\s*)? # preceding dot?\n(?:([_[:alpha:]][_[:alnum:]]*)\\s*)? # property name\n(?:(\\?)\\s*)? # null-conditional operator?\n(?=\\[) # open bracket of argument list",
28132825
"beginCaptures": {
28142826
"1": {
28152827
"name": "keyword.operator.null-conditional.cs"
@@ -2824,7 +2836,7 @@
28242836
"name": "keyword.operator.null-conditional.cs"
28252837
}
28262838
},
2827-
"end": "(?<=\\])",
2839+
"end": "(?<=\\])(?!\\s*\\[)",
28282840
"patterns": [
28292841
{
28302842
"include": "#bracketed-argument-list"
@@ -2949,7 +2961,7 @@
29492961
"name": "keyword.other.new.cs"
29502962
}
29512963
},
2952-
"end": "(?=;|\\))",
2964+
"end": "(?=\\)|;|})",
29532965
"patterns": [
29542966
{
29552967
"include": "#initializer-expression"
@@ -4163,5 +4175,5 @@
41634175
}
41644176
}
41654177
},
4166-
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/edf7cdf5073db593691a110efa8cdc10c34c3d1e"
4178+
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/c6def572109a0c7323ea1d1ca66e5af020ab070e"
41674179
}

0 commit comments

Comments
 (0)