Skip to content

C++: use "dsOperator" as default style for UDL Numeric & String Suffix

Friedrich W. H. Kossebau requested to merge work/kossebau/udlsuffixstyle into master

While the themes Dracula & Monokai as well as the Tokyo Night variants have some custom rule for "ISO C++"s "UDL Numeric Suffix" & "UDL String Suffix", the others themes do not. Which results in expressions like u"text"_s all in the same color, being harder to parse by the eye.

Which also is a bit in contrast with "Standard Suffix", which is set to "dsBuiltIn" style, so by default styled different from the literal text/number.

Open question: is a bump of the version attribute value needed in the xml header?

Follow-up question: Is there a good idea for a dedicated default style for "String Literal Prefix" & ""Char Literal Prefix""? Those ideally would be visually apart from the actual string as well, to help the eye parse the prefix and string separately, and is done like that in other highlighting systems (starting with docs on https://en.cppreference.com/w/cpp/language/string_literal)

Merge request reports