Skip to content

Commit

Permalink
End incomplete statements in block
Browse files Browse the repository at this point in the history
  • Loading branch information
wise0704 committed Aug 7, 2023
1 parent 9d3c842 commit 42905eb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions grammars/csharp.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -2759,7 +2759,7 @@
</dict>
</dict>
<key>end</key>
<string>(?=;)</string>
<string>(?=[;}])</string>
<key>patterns</key>
<array>
<dict>
Expand Down Expand Up @@ -2816,7 +2816,7 @@
</dict>
</dict>
<key>end</key>
<string>(?=;)</string>
<string>(?=[;}])</string>
<key>patterns</key>
<array>
<dict>
Expand Down Expand Up @@ -2860,7 +2860,7 @@
</dict>
</dict>
<key>end</key>
<string>(?=;)</string>
<string>(?=[;}])</string>
<key>patterns</key>
<array>
<dict>
Expand Down Expand Up @@ -2901,7 +2901,7 @@
</dict>
</dict>
<key>end</key>
<string>(?=;)</string>
<string>(?=[;}])</string>
<key>patterns</key>
<array>
<dict>
Expand Down Expand Up @@ -2941,7 +2941,7 @@
</dict>
</dict>
<key>end</key>
<string>(?=;)</string>
<string>(?=[;}])</string>
<key>patterns</key>
<array>
<dict>
Expand Down
10 changes: 5 additions & 5 deletions grammars/csharp.tmLanguage.cson
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,7 @@ repository:
beginCaptures:
"1":
name: "keyword.control.goto.cs"
end: "(?=;)"
end: "(?=[;}])"
patterns: [
{
begin: "\\b(case)\\b"
Expand Down Expand Up @@ -1780,7 +1780,7 @@ repository:
beginCaptures:
"1":
name: "keyword.control.flow.return.cs"
end: "(?=;)"
end: "(?=[;}])"
patterns: [
{
include: "#ref-modifier"
Expand All @@ -1801,7 +1801,7 @@ repository:
beginCaptures:
"1":
name: "keyword.control.flow.throw.cs"
end: "(?=;)"
end: "(?=[;}])"
patterns: [
{
include: "#expression"
Expand All @@ -1823,7 +1823,7 @@ repository:
name: "keyword.control.flow.yield.cs"
"2":
name: "keyword.control.flow.return.cs"
end: "(?=;)"
end: "(?=[;}])"
patterns: [
{
include: "#expression"
Expand All @@ -1841,7 +1841,7 @@ repository:
beginCaptures:
"1":
name: "keyword.other.await.cs"
end: "(?=;)"
end: "(?=[;}])"
patterns: [
{
include: "#statement"
Expand Down
10 changes: 5 additions & 5 deletions src/csharp.tmLanguage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ repository:
begin: (?<!\.)\b(goto)\b
beginCaptures:
'1': { name: keyword.control.goto.cs }
end: (?=;)
end: (?=[;}])
patterns:
- begin: \b(case)\b
beginCaptures:
Expand All @@ -1050,7 +1050,7 @@ repository:
begin: (?<!\.)\b(return)\b
beginCaptures:
'1': { name: keyword.control.flow.return.cs }
end: (?=;)
end: (?=[;}])
patterns:
- include: '#ref-modifier'
- include: '#expression'
Expand All @@ -1065,7 +1065,7 @@ repository:
begin: (?<!\.)\b(throw)\b
beginCaptures:
'1': { name: keyword.control.flow.throw.cs }
end: (?=;)
end: (?=[;}])
patterns:
- include: '#expression'

Expand All @@ -1079,7 +1079,7 @@ repository:
beginCaptures:
'1': { name: keyword.control.flow.yield.cs }
'2': { name: keyword.control.flow.return.cs }
end: (?=;)
end: (?=[;}])
patterns:
- include: '#expression'

Expand All @@ -1095,7 +1095,7 @@ repository:
begin: (?<!\.)\b(await)\b
beginCaptures:
'1': { name: keyword.other.await.cs }
end: (?=;)
end: (?=[;}])
patterns:
- include: '#statement'

Expand Down

0 comments on commit 42905eb

Please sign in to comment.