Skip to content

Commit 387b108

Browse files
Grammar: Add pattern for single line ffi
1 parent 3110b2e commit 387b108

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

grammars/rescript.tmLanguage.json

+28
Original file line numberDiff line numberDiff line change
@@ -508,12 +508,40 @@
508508
"include": "source.js"
509509
}
510510
]
511+
},
512+
"ffi-single": {
513+
"name": "source.embedded.javascript.single",
514+
"match": "(%|%%)(raw|ffi)(\\()(`)(.*?)(`)(\\))",
515+
"captures": {
516+
"1": {
517+
"name": "punctuation.decorator"
518+
},
519+
"2": {
520+
"name": "entity.name.function"
521+
},
522+
"4": {
523+
"name": "punctuation.definition.string.template.begin.embedded-js"
524+
},
525+
"5": {
526+
"patterns": [
527+
{
528+
"include": "source.js"
529+
}
530+
]
531+
},
532+
"6": {
533+
"name": "punctuation.definition.string.template.end.embedded-js"
534+
}
535+
}
511536
}
512537
},
513538
"patterns": [
514539
{
515540
"include": "#storage"
516541
},
542+
{
543+
"include": "#ffi-single"
544+
},
517545
{
518546
"include": "#ffi"
519547
},

0 commit comments

Comments
 (0)