3 " Maintainer: Ken Shan <ccshan@post.harvard.edu>
4 " Last Change: 2002 Jul 15
6 " For version 5.x: Clear all syntax items
7 " For version 6.x: Quit when a syntax file was already loaded
10 elseif exists("b:current_syntax")
14 " Read the C syntax to start with
19 unlet b:current_syntax
23 syn keyword cppStatement new delete this friend using
24 syn keyword cppAccess public protected private
25 syn keyword cppType inline virtual explicit export bool wchar_t
26 syn keyword cppExceptions throw try catch
27 syn keyword cppOperator operator typeid
28 syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq
29 syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1
30 syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
31 syn keyword cppStorageClass mutable
32 syn keyword cppStructure class typename template namespace
33 syn keyword cppNumber NPOS
34 syn keyword cppBoolean true false
36 " The minimum and maximum operators in GNU C++
37 syn match cppMinMax "[<>]?"
39 " Default highlighting
40 if version >= 508 || !exists("did_cpp_syntax_inits")
42 let did_cpp_syntax_inits = 1
43 command -nargs=+ HiLink hi link <args>
45 command -nargs=+ HiLink hi def link <args>
47 HiLink cppAccess cppStatement
48 HiLink cppCast cppStatement
49 HiLink cppExceptions Exception
50 HiLink cppOperator Operator
51 HiLink cppStatement Statement
53 HiLink cppStorageClass StorageClass
54 HiLink cppStructure Structure
55 HiLink cppNumber Number
56 HiLink cppBoolean Boolean
60 let b:current_syntax = "cpp"