Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added highlighting for C++23 size suffixes in integer literals #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions syntax/cpp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ if !exists("cpp_no_cpp20")
syn keyword cppModule import module export
endif

" C++ 23 extensions
if !exists("cpp_no_cpp23")
syn match cppNumber display contained "\<0\([Uu]\=[Zz]\|[Zz][Uu]\)\>"
syn match cppNumber display contained "\<[1-9]\('\=\d\+\)*\([Uu]\=[Zz]\|[Zz][Uu]\)\>"
syn match cppNumber display contained "\<0\o\+\([Uu]\=[Zz]\|[Zz][Uu]\)\>"
syn match cppNumber display contained "\<0b[01]\('\=[01]\+\)*\([Uu]\=[Zz]\|[Zz][Uu]\)\>"
syn match cppNumber display contained "\<0x\x\('\=\x\+\)*\([Uu]\=[Zz]\|[Zz][Uu]\)\>"
endif

" The minimum and maximum operators in GNU C++
syn match cppMinMax "[<>]?"

Expand Down