summaryrefslogtreecommitdiffstats
path: root/syntax/cpp.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2019-12-31 14:05:09 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2019-12-31 14:05:09 +0100
commitb8a5504021e0d21310bc603855ac8107828b5759 (patch)
tree2f2bf182b686597e7cc4c4f1b7d35881f9993f55 /syntax/cpp.vim
parentcea0d08a062478503814e51aa21c6486a0dd1b21 (diff)
downloadvim-polyglot-b8a5504021e0d21310bc603855ac8107828b5759.tar.gz
vim-polyglot-b8a5504021e0d21310bc603855ac8107828b5759.zip
Update
Diffstat (limited to 'syntax/cpp.vim')
-rw-r--r--syntax/cpp.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/syntax/cpp.vim b/syntax/cpp.vim
index c224a013..5ccc7d3d 100644
--- a/syntax/cpp.vim
+++ b/syntax/cpp.vim
@@ -4,6 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c/c++') == -1
" Language: C++
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
+" Last Change: 2017 Jun 05
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -43,6 +44,8 @@ if !exists("cpp_no_cpp11")
syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
+ syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*<"me=e-1
+ syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*$"
endif
" C++ 14 extensions
@@ -54,6 +57,21 @@ if !exists("cpp_no_cpp14")
syn case match
endif
+" C++ 17 extensions
+if !exists("cpp_no_cpp17")
+ syn match cppCast "\<reinterpret_pointer_cast\s*<"me=e-1
+ syn match cppCast "\<reinterpret_pointer_cast\s*$"
+endif
+
+" C++ 20 extensions
+if !exists("cpp_no_cpp20")
+ syn keyword cppStatement co_await co_return co_yield requires
+ syn keyword cppStorageClass consteval constinit
+ syn keyword cppStructure concept
+ syn keyword cppType char8_t
+ syn keyword cppModule import module export
+endif
+
" The minimum and maximum operators in GNU C++
syn match cppMinMax "[<>]?"
@@ -72,6 +90,7 @@ hi def link cppConstant Constant
hi def link cppRawStringDelimiter Delimiter
hi def link cppRawString String
hi def link cppNumber Number
+hi def link cppModule Include
let b:current_syntax = "cpp"