File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
examples/rescript-project/src Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change
1
+ let name = "Amirali"
2
+
3
+ let var = ` hello ${name} how you doin?`
4
+
5
+ let expr = ` 2 + 2 is ${Int.toString(2 + 2)}`
Original file line number Diff line number Diff line change @@ -82,9 +82,9 @@ syntax match resUnicodeChar "\v\\u[A-Fa-f0-9]\{4}" contained
82
82
syntax match resEscapedChar " \v\\ [\\ "'ntbrf]" contained
83
83
syntax region resString start =" \v\" " end =" \v\" " contains =resEscapedQuote,resEscapedChar,resUnicodeChar
84
84
85
- syntax match resInterpolationVariable " \v\$ [a-z_][A-Za-z0-0_'$]* " contained
86
- syntax region resString start =" \v `" end =" \v `" contains =resInterpolationVariable
87
- syntax region resString start =" \v [a-z]`" end =" \v `" contains =resInterpolationVariable
85
+ syntax region resInterpolationBlock matchgroup = resInterpolationDelimiters start = " \v\$\{ " end = " \v\} " contained contains = TOP
86
+ syntax region resString start =" \v `" end =" \v `" contains =resInterpolationBlock
87
+ syntax region resString start =" \v [a-z]`" end =" \v `" contains =resInterpolationBlock
88
88
89
89
" Polymorphic variants
90
90
syntax match resPolyVariant " \v #[A-za-z][A-Za-z0-9_'$]*"
@@ -109,7 +109,7 @@ highlight default link resModuleChain Macro
109
109
highlight default link resUnicodeChar Character
110
110
highlight default link resEscapedChar Character
111
111
highlight default link resString String
112
- highlight default link resInterpolationVariable Macro
112
+ highlight default link resInterpolationDelimiters Macro
113
113
highlight default link resAttribute PreProc
114
114
115
115
let b: current_syntax = " rescript"
You can’t perform that action at this time.
0 commit comments