Skip to content

Commit

Permalink
Merge pull request #51 from Smattr/785fdee6-4c40-4ebc-9c75-1855a9e1b550
Browse files Browse the repository at this point in the history
add support for shared_ptr casts
  • Loading branch information
mattn committed Dec 18, 2019
2 parents 8cb68fe + 48302b2 commit 1c9c604
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions syntax/cpp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,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
Expand All @@ -53,6 +55,12 @@ 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
Expand Down

0 comments on commit 1c9c604

Please sign in to comment.