Skip to content

Commit 25e4733

Browse files
committed
Grammar: use string character escape regex from ts grammar
1 parent 74d1867 commit 25e4733

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: grammars/rescript.tmLanguage.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@
119119
}
120120
]
121121
},
122+
"string-character-escape": {
123+
"name": "constant.character.escape",
124+
"match": "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u{[0-9A-Fa-f]+}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
125+
},
122126
"string": {
123127
"patterns": [
124128
{
@@ -137,8 +141,7 @@
137141
},
138142
"patterns": [
139143
{
140-
"name": "constant.character.escape",
141-
"match": "\\\\."
144+
"include": "#string-character-escape"
142145
}
143146
]
144147
},
@@ -161,8 +164,7 @@
161164
},
162165
"patterns": [
163166
{
164-
"name": "constant.character.escape",
165-
"match": "\\\\."
167+
"include": "#string-character-escape"
166168
},
167169
{
168170
"name": "meta.template.expression",

0 commit comments

Comments
 (0)