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
8282syntax match resEscapedChar " \v\\ [\\ "'ntbrf]" contained
8383syntax region resString start =" \v\" " end =" \v\" " contains =resEscapedQuote,resEscapedChar,resUnicodeChar
8484
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
8888
8989" Polymorphic variants
9090syntax match resPolyVariant " \v #[A-za-z][A-Za-z0-9_'$]*"
@@ -109,7 +109,7 @@ highlight default link resModuleChain Macro
109109highlight default link resUnicodeChar Character
110110highlight default link resEscapedChar Character
111111highlight default link resString String
112- highlight default link resInterpolationVariable Macro
112+ highlight default link resInterpolationDelimiters Macro
113113highlight default link resAttribute PreProc
114114
115115let b: current_syntax = " rescript"
You can’t perform that action at this time.
0 commit comments