From 1c47ef3b17a8d269b31f2b6cf5f561cbc65fa499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20E=2E=20Cruz=20Serrall=C3=A9s?= Date: Wed, 27 Mar 2024 12:38:46 -0400 Subject: [PATCH] Added support for C++23 size suffixes in integer literals --- syntax/cpp.vim | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/syntax/cpp.vim b/syntax/cpp.vim index ee3b86f..74b9c6a 100644 --- a/syntax/cpp.vim +++ b/syntax/cpp.vim @@ -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 "[<>]?"