annotate runtime/syntax/cpp.vim @ 2823:8bd38abda314 v7.3.187

updated for version 7.3.187 Problem: The RISC OS port has obvious errors and is not being maintained. Solution: Remove the RISC OS files and code.
author Bram Moolenaar <bram@vim.org>
date Tue, 10 May 2011 16:41:25 +0200
parents 3fc0f57ecb91
children fa4089df54bc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: C++
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Ken Shan <ccshan@post.harvard.edu>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2002 Jul 15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " Read the C syntax to start with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 so <sfile>:p:h/c.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 runtime! syntax/c.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " C++ extentions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword cppStatement new delete this friend using
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword cppAccess public protected private
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword cppType inline virtual explicit export bool wchar_t
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword cppExceptions throw try catch
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword cppOperator operator typeid
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword cppStorageClass mutable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword cppStructure class typename template namespace
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword cppNumber NPOS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword cppBoolean true false
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " The minimum and maximum operators in GNU C++
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match cppMinMax "[<>]?"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " Default highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 if version >= 508 || !exists("did_cpp_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 let did_cpp_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 HiLink cppAccess cppStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 HiLink cppCast cppStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 HiLink cppExceptions Exception
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 HiLink cppOperator Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 HiLink cppStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 HiLink cppType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 HiLink cppStorageClass StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 HiLink cppStructure Structure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 HiLink cppNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 HiLink cppBoolean Boolean
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 let b:current_syntax = "cpp"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 " vim: ts=8