comparison runtime/syntax/cpp.vim @ 18928:180a1c5175f6

Update runtime files. Commit: https://github.com/vim/vim/commit/95a9dd1efc5ae3221865f4970053a5708557e682 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Dec 19 22:12:03 2019 +0100 Update runtime files.
author Bram Moolenaar <Bram@vim.org>
date Thu, 19 Dec 2019 22:15:04 +0100
parents bd6ff5246c71
children 96206643bd9f
comparison
equal deleted inserted replaced
18927:9152417d4265 18928:180a1c5175f6
1 " Vim syntax file 1 " Vim syntax file
2 " Language: C++ 2 " Language: C++
3 " Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp) 3 " Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
4 " Previous Maintainer: Ken Shan <ccshan@post.harvard.edu> 4 " Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
5 " Last Change: 2017 Jun 05 5 " Last Change: 2019 Dec 18
6 6
7 " quit when a syntax file was already loaded 7 " quit when a syntax file was already loaded
8 if exists("b:current_syntax") 8 if exists("b:current_syntax")
9 finish 9 finish
10 endif 10 endif
40 syn keyword cppConstant ATOMIC_CHAR16_T_LOCK_FREE ATOMIC_CHAR32_T_LOCK_FREE 40 syn keyword cppConstant ATOMIC_CHAR16_T_LOCK_FREE ATOMIC_CHAR32_T_LOCK_FREE
41 syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE 41 syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE
42 syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE 42 syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
43 syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE 43 syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
44 syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell 44 syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
45 syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*<"me=e-1
46 syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*$"
45 endif 47 endif
46 48
47 " C++ 14 extensions 49 " C++ 14 extensions
48 if !exists("cpp_no_cpp14") 50 if !exists("cpp_no_cpp14")
49 syn case ignore 51 syn case ignore
50 syn match cppNumber display "\<0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>" 52 syn match cppNumber display "\<0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
51 syn match cppNumber display "\<[1-9]\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>" contains=cFloat 53 syn match cppNumber display "\<[1-9]\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>" contains=cFloat
52 syn match cppNumber display "\<0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>" 54 syn match cppNumber display "\<0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
53 syn case match 55 syn case match
56 endif
57
58 " C++ 20 extensions
59 if !exists("cpp_no_cpp20")
60 syn keyword cppStatement co_await co_return co_yield requires
61 syn keyword cppStorageClass consteval constinit
62 syn keyword cppStructure concept
63 syn keyword cppType char8_t
64 syn keyword cppModule import module export
65 endif
66
67 " C++ 17 extensions
68 if !exists("cpp_no_cpp17")
69 syn match cppCast "\<reinterpret_pointer_cast\s*<"me=e-1
70 syn match cppCast "\<reinterpret_pointer_cast\s*$"
54 endif 71 endif
55 72
56 " The minimum and maximum operators in GNU C++ 73 " The minimum and maximum operators in GNU C++
57 syn match cppMinMax "[<>]?" 74 syn match cppMinMax "[<>]?"
58 75
69 hi def link cppBoolean Boolean 86 hi def link cppBoolean Boolean
70 hi def link cppConstant Constant 87 hi def link cppConstant Constant
71 hi def link cppRawStringDelimiter Delimiter 88 hi def link cppRawStringDelimiter Delimiter
72 hi def link cppRawString String 89 hi def link cppRawString String
73 hi def link cppNumber Number 90 hi def link cppNumber Number
91 hi def link cppModule Include
74 92
75 let b:current_syntax = "cpp" 93 let b:current_syntax = "cpp"
76 94
77 " vim: ts=8 95 " vim: ts=8