Skip to content

Commit 8113017

Browse files
committed
Highlight type param
This is one of the few remaining unambiguous things in our syntax (uuugh), so let's at least highlight this first. Fixes part of #89
1 parent 37e3f4f commit 8113017

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

grammars/rescript.tmLanguage.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,14 @@
188188
}
189189
]
190190
},
191+
"typeParameter": {
192+
"patterns": [
193+
{
194+
"match": "'[A-Za-z][A-Za-z0-9_]*",
195+
"name": "support.type"
196+
}
197+
]
198+
},
191199
"number": {
192200
"patterns": [
193201
{
@@ -431,6 +439,9 @@
431439
{
432440
"include": "#character"
433441
},
442+
{
443+
"include": "#typeParameter"
444+
},
434445
{
435446
"include": "#string"
436447
},

0 commit comments

Comments
 (0)