Closed jschwe closed 1 year ago
When writing a CMake regex such as
string(REGEX MATCH "^([a-z0-9_\.]+)-somethingelse$" outvar "${input}" )
The highlighting stops at \ character, with the following message:
\
Unclosed character class <literal>, VARIABLE_REFERENCE_START or literal expected, got '\'
My suggestion would to just allow \ in the character class, without checking if it is a valid escape or not, since:
Escaping a non-special character is unnecessary but allowed, e.g. \a matches a. (CMake documentation)
Thanks for reporting! It's CLion parser bug (try with CMake Plus plugin disabled). Also seems to be related to CPP-30556 which is marked as solved in upcoming CLion 2023.2 EAP
When writing a CMake regex such as
The highlighting stops at
\
character, with the following message:My suggestion would to just allow
\
in the character class, without checking if it is a valid escape or not, since: