@@ -55,20 +55,20 @@ if !exists("cpp_no_cpp14")
55
55
syn match cppNumber display contained " \< 0\( [Uu]\=\( [Ll]\| LL\| ll\)\|\( [Ll]\| LL\| ll\)\= [Uu]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
56
56
syn match cppNumber display contained " \< [1-9]\( '\=\d\+\) *\( [Uu]\=\( [Ll]\| LL\| ll\)\|\( [Ll]\| LL\| ll\)\= [Uu]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
57
57
syn match cppNumber display contained " \< 0\o\+\( [Uu]\=\( [Ll]\| LL\| ll\)\|\( [Ll]\| LL\| ll\)\= [Uu]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
58
- syn match cppNumber display contained " \< 0b [01]\( '\= [01]\+\) *\( [Uu]\=\( [Ll]\| LL\| ll\)\|\( [Ll]\| LL\| ll\)\= [Uu]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
59
- syn match cppNumber display contained " \< 0x \x\( '\=\x\+\) *\( [Uu]\=\( [Ll]\| LL\| ll\)\|\( [Ll]\| LL\| ll\)\= [Uu]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
60
- syn match cppFloat display contained " \<\d\+\.\d *\( e [-+]\=\d\+\)\=\( [FfLl]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
61
- syn match cppFloat display contained " \<\.\d\+\( e [-+]\=\d\+\)\=\( [FfLl]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
62
- syn match cppFloat display contained " \<\d\+ e [-+]\=\d\+\( [FfLl]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
58
+ syn match cppNumber display contained " \< 0[bB] [01]\( '\= [01]\+\) *\( [Uu]\=\( [Ll]\| LL\| ll\)\|\( [Ll]\| LL\| ll\)\= [Uu]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
59
+ syn match cppNumber display contained " \< 0[xX] \x\( '\=\x\+\) *\( [Uu]\=\( [Ll]\| LL\| ll\)\|\( [Ll]\| LL\| ll\)\= [Uu]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
60
+ syn match cppFloat display contained " \<\d\+\.\d *\( [eE] [-+]\=\d\+\)\=\( [FfLl]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
61
+ syn match cppFloat display contained " \<\.\d\+\( [eE] [-+]\=\d\+\)\=\( [FfLl]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
62
+ syn match cppFloat display contained " \<\d\+ [eE] [-+]\=\d\+\( [FfLl]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
63
63
syn region cppString start =+ \( L\| u\| u8\| U\)\= "+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "\( sv\| s\| _\i *\)\= + end =' $' contains =cSpecial,cFormat,@Spell
64
64
endif
65
65
66
66
" C++ 17 extensions
67
67
if ! exists (" cpp_no_cpp17" )
68
68
syn match cppCast " \< reinterpret_pointer_cast\s *<" me =e - 1
69
69
syn match cppCast " \< reinterpret_pointer_cast\s *$"
70
- syn match cppFloat display contained " \< 0x \x *\.\x\+ p[-+]\=\d\+\( [FfLl]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
71
- syn match cppFloat display contained " \< 0x \x\+\.\= p[-+]\=\d\+\( [FfLl]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
70
+ syn match cppFloat display contained " \< 0[xX] \x *\.\x\+ p[-+]\=\d\+\( [FfLl]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
71
+ syn match cppFloat display contained " \< 0[xX] \x\+\.\= p[-+]\=\d\+\( [FfLl]\| i[fl]\=\| h\| min\| s\| ms\| us\| ns\| _\i *\)\=\> "
72
72
73
73
" TODO: push this up to c.vim if/when supported in C23
74
74
syn match cppCharacter " u8'[^\\ ]'"
@@ -82,16 +82,15 @@ if !exists("cpp_no_cpp17")
82
82
endif
83
83
syn match cppSpecialCharacter display " u8'\\\o\{ 1,3}'"
84
84
syn match cppSpecialCharacter display " u8'\\ x\x\+ '"
85
-
86
85
endif
87
86
88
87
" C++ 20 extensions
89
88
if ! exists (" cpp_no_cpp20" )
90
89
syn match cppNumber display contained " \< 0\( y\| d\)\> "
91
90
syn match cppNumber display contained " \< [1-9]\( '\=\d\+\) *\( y\| d\)\> "
92
91
syn match cppNumber display contained " \< 0\o\+\( y\| d\)\> "
93
- syn match cppNumber display contained " \< 0b [01]\( '\= [01]\+\) *\( y\| d\)\> "
94
- syn match cppNumber display contained " \< 0x \x\( '\=\x\+\) *\( y\| d\)\> "
92
+ syn match cppNumber display contained " \< 0[bB] [01]\( '\= [01]\+\) *\( y\| d\)\> "
93
+ syn match cppNumber display contained " \< 0[xX] \x\( '\=\x\+\) *\( y\| d\)\> "
95
94
syn keyword cppStatement co_await co_return co_yield requires
96
95
syn keyword cppStorageClass consteval constinit
97
96
syn keyword cppStructure concept
0 commit comments