Open
Description
Describe the issue
The grammars for C and C++ do not yet include the latest C2y and C++26 features.
Additional context
This list is quite likely incomplete, but here are some of the changes:
- C++26 contracts (P2900) have been accepted (contextual keywords
pre
,post
, and true keywordcontract_assert
) #embed
is in C++, and on track to be added to C2y (add keyword in preprocessor mode)- C++26
delete("reason")
is possible, butdelete
is currently highlighted as a function name instead of a keyword in that situation - C2y is on track to add
defer
as a feature (add keyword) - C2y already supports
break label
and there are ongoing efforts to add this to C++; do we need dedicated label highlighting?
Additionally, the C23 type_BitInt
is also provided as a C++ compiler extension by clang, and it might even become a proper keyword in C++ (though that remains to be seen). Anyhow, it should be a keyword even if it's non-standard.
See also https://en.cppreference.com/w/cpp/26