Skip to content

Commit 7bf5709

Browse files
committed
Match any single character escape sequence
1 parent 7044af6 commit 7bf5709

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

grammars/csharp.tmLanguage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6156,7 +6156,7 @@
61566156
<key>name</key>
61576157
<string>constant.character.escape.cs</string>
61586158
<key>match</key>
6159-
<string>\\(['"\\0abefnrtv]|x[0-9a-fA-F]{1,4}|u[0-9a-fA-F]{4})</string>
6159+
<string>\\(x[0-9a-fA-F]{1,4}|u[0-9a-fA-F]{4}|.)</string>
61606160
</dict>
61616161
<key>string-literal</key>
61626162
<dict>
@@ -6200,7 +6200,7 @@
62006200
<key>name</key>
62016201
<string>constant.character.escape.cs</string>
62026202
<key>match</key>
6203-
<string>\\(['"\\0abefnrtv]|x[0-9a-fA-F]{1,4}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4})</string>
6203+
<string>\\(x[0-9a-fA-F]{1,4}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|.)</string>
62046204
</dict>
62056205
<key>verbatim-string-literal</key>
62066206
<dict>

grammars/csharp.tmLanguage.cson

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3705,7 +3705,7 @@ repository:
37053705
]
37063706
"char-character-escape":
37073707
name: "constant.character.escape.cs"
3708-
match: "\\\\(['\"\\\\0abefnrtv]|x[0-9a-fA-F]{1,4}|u[0-9a-fA-F]{4})"
3708+
match: "\\\\(x[0-9a-fA-F]{1,4}|u[0-9a-fA-F]{4}|.)"
37093709
"string-literal":
37103710
name: "string.quoted.double.cs"
37113711
begin: "(?<!@)\""
@@ -3725,7 +3725,7 @@ repository:
37253725
]
37263726
"string-character-escape":
37273727
name: "constant.character.escape.cs"
3728-
match: "\\\\(['\"\\\\0abefnrtv]|x[0-9a-fA-F]{1,4}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4})"
3728+
match: "\\\\(x[0-9a-fA-F]{1,4}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|.)"
37293729
"verbatim-string-literal":
37303730
name: "string.quoted.double.cs"
37313731
begin: "@\""

src/csharp.tmLanguage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2314,7 +2314,7 @@ repository:
23142314

23152315
char-character-escape:
23162316
name: constant.character.escape.cs
2317-
match: \\(['"\\0abefnrtv]|x[0-9a-fA-F]{1,4}|u[0-9a-fA-F]{4})
2317+
match: \\(x[0-9a-fA-F]{1,4}|u[0-9a-fA-F]{4}|.)
23182318

23192319
string-literal:
23202320
name: string.quoted.double.cs
@@ -2330,7 +2330,7 @@ repository:
23302330

23312331
string-character-escape:
23322332
name: constant.character.escape.cs
2333-
match: \\(['"\\0abefnrtv]|x[0-9a-fA-F]{1,4}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4})
2333+
match: \\(x[0-9a-fA-F]{1,4}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|.)
23342334

23352335
verbatim-string-literal:
23362336
name: string.quoted.double.cs

0 commit comments

Comments
 (0)