" Previous Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
" Ken Shan <ccshan@post.harvard.edu>
" Last Change: 2024 May 04
-" 2024 May 04 by Vim Project (fix digit separator in octals and floats)
-" 2026 Jan 06 by Vim Project (announce adoption)
+" 2024 May 04 by Vim Project fix digit separator in octals and floats
+" 2026 Jan 06 by Vim Project orphaning announcement
+" 2026 Jan 08 by Vim Project highlight capital letter prefixes for numbers
" quit when a syntax file was already loaded
if exists("b:current_syntax")
syn match cppNumber display contained "\<0\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
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*\)\=\>"
syn match cppNumber display contained "\<0\('\=\o\+\)\+\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
- 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*\)\=\>"
- 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*\)\=\>"
- syn match cppFloat display contained "\<\d\('\=\d\+\)*\.\(\d\('\=\d\+\)*\)\=\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
- syn match cppFloat display contained "\.\d\('\=\d\+\)*\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
- syn match cppFloat display contained "\<\d\+e[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
+ 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*\)\=\>"
+ 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*\)\=\>"
+ syn match cppFloat display contained "\<\d\('\=\d\+\)*\.\(\d\('\=\d\+\)*\)\=\([Ee][-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
+ syn match cppFloat display contained "\.\d\('\=\d\+\)*\([Ee][-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
+ syn match cppFloat display contained "\<\d\+[Ee][-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
syn region cppString start=+\(L\|u\|u8\|U\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"\(sv\|s\|_\i*\)\=+ end='$' contains=cSpecial,cFormat,@Spell
endif
if !exists("cpp_no_cpp17")
syn match cppCast "\<reinterpret_pointer_cast\s*<"me=e-1
syn match cppCast "\<reinterpret_pointer_cast\s*$"
- syn match cppFloat display contained "\<0x\x*\.\x\+p[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
- syn match cppFloat display contained "\<0x\x\+\.\=p[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
+ syn match cppFloat display contained "\<0[Xx]\x*\.\x\+p[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
+ syn match cppFloat display contained "\<0[Xx]\x\+\.\=p[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
" TODO: push this up to c.vim if/when supported in C23
syn match cppCharacter "u8'[^\\]'"
syn match cppNumber display contained "\<0\(y\|d\)\>"
syn match cppNumber display contained "\<[1-9]\('\=\d\+\)*\(y\|d\)\>"
syn match cppNumber display contained "\<0\o\+\(y\|d\)\>"
- syn match cppNumber display contained "\<0b[01]\('\=[01]\+\)*\(y\|d\)\>"
- syn match cppNumber display contained "\<0x\x\('\=\x\+\)*\(y\|d\)\>"
+ syn match cppNumber display contained "\<0[Bb][01]\('\=[01]\+\)*\(y\|d\)\>"
+ syn match cppNumber display contained "\<0[Xx]\x\('\=\x\+\)*\(y\|d\)\>"
syn keyword cppStatement co_await co_return co_yield requires
syn keyword cppStorageClass consteval constinit
syn keyword cppStructure concept
--- /dev/null
+>v+0#00e0003#ffffff0|o|i|d| +0#0000000&|f|o@1|(|)| @64
+|{| @73
+@4|{| @69
+@8|/+0#0000e05&@1| |S|e@1| |h|t@1|p|s|:|/@1|e|n|.|c|p@1|r|e|f|e|r|e|n|c|e|.|c|o|m|/|w|/|c|p@1|/|l|a|n|g|u|a|g|e|/|f|l|o|a|t|i|n|g|_|l|i|t|e|r|a|l| +0#0000000&
+@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|a| |=| |1+0#e000002&|.|0|E|2|;+0#0000000&| @49
+@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|b| |=| |1+0#e000002&|.|0|e|2|;+0#0000000&| @49
+@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|c| |=| |1+0#e000002&|E|2|;+0#0000000&| @51
+@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|d| |=| |1+0#e000002&|e|2|;+0#0000000&| @51
+@75
+@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|e| |=| |0+0#e000002&|X|1|f@1|p|1|0|;+0#0000000&| @46
+@8|d+0#00e0003&|o|u|b|l|e| +0#0000000&|f| |=| |0+0#e000002&|x|1|f@1|p|1|0|;+0#0000000&| @46
+@4|}| @69
+@75
+@4|/+0#0000e05&@1| |S|e@1|:| |h|t@1|p|s|:|/@1|e|n|.|c|p@1|r|e|f|e|r|e|n|c|e|.|c|o|m|/|w|/|c|p@1|/|l|a|n|g|u|a|g|e|/|i|n|t|e|g|e|r|_|l|i|t|e|r|a|l| +0#0000000&@4
+@4|i+0#00e0003&|n|t| +0#0000000&|a| |=| |0+0#e000002&|X|1|2|3|;+0#0000000&| @56
+@4|i+0#00e0003&|n|t| +0#0000000&|b| |=| |0+0#e000002&|x|1|2|3|;+0#0000000&| @56
+@75
+@4|i+0#00e0003&|n|t| +0#0000000&|c| |=| |0+0#e000002&|B|1|0|1|;+0#0000000&| @56
+@4|i+0#00e0003&|n|t| +0#0000000&|d| |=| |0+0#e000002&|b|1|0|1|;+0#0000000&| @56
+@57|1|,|1| @10|T|o|p|