Add support for raw C++ strings in c-family highlighting

This commit is contained in:
Maxime Coste 2017-05-25 06:51:39 +01:00
parent c4db46b58b
commit 3e4e4f6210

View File

@ -133,11 +133,12 @@ def -hidden c-family-insert-on-newline %[ eval -draft %[
fi
printf %s\\n '
add-highlighter -group / regions -default code FT \
string %{MAYBEAT(?<!QUOTE)"} %{(?<!\\)(\\\\)*"} "" \
add-highlighter -group / regions -default code -match-capture FT \
string %{MAYBEAT(?<!QUOTE)"} %{(?<!\\)(?:\\\\)*"} "" \
string %{R"([^(]*)\(} %{\)([^)]*)"} "" \
comment /\* \*/ "" \
comment // $ "" \
disabled ^\h*?#\h*if\h+(0|FALSE)\b "#\h*(else|elif|endif)" "#\h*if(def)?" \
disabled ^\h*?#\h*if\h+(?:0|FALSE)\b "#\h*(?:else|elif|endif)" "#\h*if(?:def)?" \
macro %{^\h*?\K#} %{(?<!\\)\n} ""
add-highlighter -group /FT/string fill string