@@ -69,6 +69,20 @@ if !exists("cpp_no_cpp17")
69
69
syn match cppCast " \< reinterpret_pointer_cast\s *$"
70
70
syn match cppFloat display contained " \< 0x\x *\.\x\+ p[-+]\=\d\+\( [FfLl]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
71
71
syn match cppFloat display contained " \< 0x\x\+\.\= p[-+]\=\d\+\( [FfLl]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
72
+
73
+ " TODO: push this up to c.vim if/when supported in C23
74
+ syn match cppCharacter " u8'[^\\ ]'"
75
+ syn match cppCharacter " u8'[^']*'" contains =cSpecial
76
+ if exists (" c_gnu" )
77
+ syn match cppSpecialError " u8'\\ [^'\" ?\\ abefnrtv]'"
78
+ syn match cppSpecialCharacter " u8'\\ ['\" ?\\ abefnrtv]'"
79
+ else
80
+ syn match cppSpecialError " u8'\\ [^'\" ?\\ abfnrtv]'"
81
+ syn match cppSpecialCharacter " u8'\\ ['\" ?\\ abfnrtv]'"
82
+ endif
83
+ syn match cppSpecialCharacter display " u8'\\\o\{ 1,3}'"
84
+ syn match cppSpecialCharacter display " u8'\\ x\x\+ '"
85
+
72
86
endif
73
87
74
88
" C++ 20 extensions
@@ -99,6 +113,9 @@ hi def link cppType Type
99
113
hi def link cppStorageClass StorageClass
100
114
hi def link cppStructure Structure
101
115
hi def link cppBoolean Boolean
116
+ hi def link cppCharacter cCharacter
117
+ hi def link cppSpecialCharacter cSpecialCharacter
118
+ hi def link cppSpecialError cSpecialError
102
119
hi def link cppConstant Constant
103
120
hi def link cppRawStringDelimiter Delimiter
104
121
hi def link cppRawString String
0 commit comments