annotate runtime/syntax/d.vim @ 980:e1efa991c2b6 v7.0.106

updated for version 7.0-106
author vimboss
date Thu, 14 Sep 2006 11:35:25 +0000
parents 8cd729851562
children 277085346a0d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
739
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
1 " Vim syntax file for the D programming language (version 0.149).
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 "
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
3 " Language: D
856
8cd729851562 updated for version 7.0g
vimboss
parents: 739
diff changeset
4 " Maintainer: Jason Mills<jmills@cs.mun.ca>
739
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
5 " When emailing me, please put the word vim somewhere in the subject
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
6 " to ensure the email does not get marked as spam.
856
8cd729851562 updated for version 7.0g
vimboss
parents: 739
diff changeset
7 " Last Change: 2006 Apr 30
739
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
8 " Version: 0.15
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " Options:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " d_comment_strings - set to highlight strings and numbers in comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " d_hl_operator_overload - set to highlight D's specially named functions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " that when overloaded implement unary and binary operators (e.g. cmp).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " Todo:
739
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
17 " - Must determine a better method of sync'ing than simply setting minlines
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
18 " to a large number for /+ +/.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " - Several keywords (namely, in and out) are both storage class and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " statements, depending on their context. Must use some matching to figure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " out which and highlight appropriately. For now I have made such keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " statements.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " - Mark contents of the asm statement body as special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 " Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 if exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " Keyword definitions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 "
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
35 syn keyword dExternal import package module extern
557
862863033fdd updated for version 7.0158
vimboss
parents: 199
diff changeset
36 syn keyword dConditional if else switch iftype
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
37 syn keyword dBranch goto break continue
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
38 syn keyword dRepeat while for do foreach
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
39 syn keyword dBoolean true false
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
40 syn keyword dConstant null
199
3b32f6b507fa updated for version 7.0059
vimboss
parents: 17
diff changeset
41 syn keyword dConstant __FILE__ __LINE__ __DATE__ __TIME__ __TIMESTAMP__
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
42 syn keyword dTypedef alias typedef
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
43 syn keyword dStructure template interface class enum struct union
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
44 syn keyword dOperator new delete typeof typeid cast align is
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
45 syn keyword dOperator this super
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 if exists("d_hl_operator_overload")
557
862863033fdd updated for version 7.0158
vimboss
parents: 199
diff changeset
47 syn keyword dOpOverload opNeg opCom opPostInc opPostDec opCast opAdd opSub opSub_r
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
48 syn keyword dOpOverload opMul opDiv opDiv_r opMod opMod_r opAnd opOr opXor
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
49 syn keyword dOpOverload opShl opShl_r opShr opShr_r opUShr opUShr_r opCat
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
50 syn keyword dOpOverload opCat_r opEquals opEquals opCmp opCmp opCmp opCmp
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
51 syn keyword dOpOverload opAddAssign opSubAssign opMulAssign opDivAssign
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
52 syn keyword dOpOverload opModAssign opAndAssign opOrAssign opXorAssign
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
53 syn keyword dOpOverload opShlAssign opShrAssign opUShrAssign opCatAssign
739
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
54 syn keyword dOpOverload opIndex opIndexAssign opCall opSlice opSliceAssign opPos
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
55 syn keyword dOpOverload opAdd_r opMul_r opAnd_r opOr_r opXor_r
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 endif
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
57 syn keyword dType ushort int uint long ulong float
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
58 syn keyword dType void byte ubyte double bit char wchar ucent cent
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
59 syn keyword dType short bool dchar
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
60 syn keyword dType real ireal ifloat idouble creal cfloat cdouble
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
61 syn keyword dDebug deprecated unittest
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
62 syn keyword dExceptions throw try catch finally
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
63 syn keyword dScopeDecl public protected private export
739
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
64 syn keyword dStatement version debug return with invariant body scope
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
65 syn keyword dStatement in out inout asm mixin
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
66 syn keyword dStatement function delegate
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
67 syn keyword dStorageClass auto static override final const abstract volatile
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
68 syn keyword dStorageClass synchronized
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
69 syn keyword dPragma pragma
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 " Assert is a statement and a module name.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn match dAssert "^assert\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match dAssert "[^.]\s*\<assert\>"ms=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " Marks contents of the asm statment body as special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 " TODO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 "syn match dAsmStatement "\<asm\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 "syn region dAsmBody start="asm[\n]*\s*{"hs=e+1 end="}"he=e-1 contains=dAsmStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 "hi def link dAsmBody dUnicode
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 "hi def link dAsmStatement dStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 " Labels
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 " We contain dScopeDecl so public: private: etc. are not highlighted like labels
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
88 syn match dUserLabel "^\s*[_$a-zA-Z][_$a-zA-Z0-9_]*\s*:"he=e-1 contains=dLabel,dScopeDecl
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
89 syn keyword dLabel case default
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 "
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
93 syn keyword dTodo contained TODO FIXME TEMP XXX
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
94 syn match dCommentStar contained "^\s*\*[^/]"me=e-1
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
95 syn match dCommentStar contained "^\s*\*$"
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
96 syn match dCommentPlus contained "^\s*+[^/]"me=e-1
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
97 syn match dCommentPlus contained "^\s*+$"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 if exists("d_comment_strings")
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
99 syn region dBlockCommentString contained start=+"+ end=+"+ end=+\*/+me=s-1,he=s-1 contains=dCommentStar,dUnicode,dEscSequence,@Spell
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
100 syn region dNestedCommentString contained start=+"+ end=+"+ end="+"me=s-1,he=s-1 contains=dCommentPlus,dUnicode,dEscSequence,@Spell
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
101 syn region dLineCommentString contained start=+"+ end=+$\|"+ contains=dUnicode,dEscSequence,@Spell
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
102 syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
103 syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
104 syn match dLineComment "//.*" contains=dLineCommentString,dTodo,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 else
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
106 syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
107 syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
108 syn match dLineComment "//.*" contains=dLineCommentString,dTodo,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
111 hi link dLineCommentString dBlockCommentString
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
112 hi link dBlockCommentString dString
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
113 hi link dNestedCommentString dString
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
114 hi link dCommentStar dBlockComment
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
115 hi link dCommentPlus dNestedComment
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116
739
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
117 " /+ +/ style comments and strings that span multiple lines can cause
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
118 " problems. To play it safe, set minlines to a large number.
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
119 syn sync minlines=200
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
120 " Use ccomment for /* */ style comments
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
121 syn sync ccomment dBlockComment
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 " Characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 syn match dSpecialCharError contained "[^']"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126
199
3b32f6b507fa updated for version 7.0059
vimboss
parents: 17
diff changeset
127 " Escape sequences (oct,specal char,hex,wchar, character entities \&xxx;)
3b32f6b507fa updated for version 7.0059
vimboss
parents: 17
diff changeset
128 " These are not contained because they are considered string litterals
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
129 syn match dEscSequence "\\\(\o\{1,3}\|[\"\\'\\?ntbrfva]\|u\x\{4}\|U\x\{8}\|x\x\x\)"
199
3b32f6b507fa updated for version 7.0059
vimboss
parents: 17
diff changeset
130 syn match dEscSequence "\\&[^;& \t]\+;"
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
131 syn match dCharacter "'[^']*'" contains=dEscSequence,dSpecialCharError
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
132 syn match dCharacter "'\\''" contains=dEscSequence
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
133 syn match dCharacter "'[^\\]'"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 " Unicode characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 "
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
137 syn match dUnicode "\\u\d\{4\}"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138
199
3b32f6b507fa updated for version 7.0059
vimboss
parents: 17
diff changeset
139
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 " String.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 "
739
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
142 syn region dString start=+"+ end=+"[cwd]\=+ contains=dEscSequence,@Spell
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
143 syn region dRawString start=+`+ skip=+\\`+ end=+`[cwd]\=+ contains=@Spell
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
144 syn region dRawString start=+r"+ skip=+\\"+ end=+"[cwd]\=+ contains=@Spell
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
145 syn region dHexString start=+x"+ skip=+\\"+ end=+"[cwd]\=+ contains=@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 " Numbers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 syn case ignore
739
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
150
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
151 syn match dDec display "\<\d[0-9_]*\(u\=l\=\|l\=u\=\)\>"
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
152
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 " Hex number
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
154 syn match dHex display "\<0x[0-9a-f_]\+\(u\=l\=\|l\=u\=\)\>"
739
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
155
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
156 syn match dOctal display "\<0[0-7_]\+\(u\=l\=\|l\=u\=\)\>"
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
157 " flag an octal number with wrong digits
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
158 syn match dOctalError display "\<0[0-7_]*[89][0-9_]*"
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
159
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
160 " binary numbers
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
161 syn match dBinary display "\<0b[01_]\+\(u\=l\=\|l\=u\=\)\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 "floating point without the dot
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
164 syn match dFloat display "\<\d[0-9_]*\(fi\=\|l\=i\)\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 "floating point number, with dot, optional exponent
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
166 syn match dFloat display "\<\d[0-9_]*\.[0-9_]*\(e[-+]\=[0-9_]\+\)\=[fl]\=i\="
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 "floating point number, starting with a dot, optional exponent
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
168 syn match dFloat display "\(\.[0-9_]\+\)\(e[-+]\=[0-9_]\+\)\=[fl]\=i\=\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 "floating point number, without dot, with exponent
17
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
170 "syn match dFloat display "\<\d\+e[-+]\=\d\+[fl]\=\>"
9be87deaeb52 updated for version 7.0009
vimboss
parents: 7
diff changeset
171 syn match dFloat display "\<\d[0-9_]*e[-+]\=[0-9_]\+[fl]\=\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 "floating point without the dot
739
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
174 syn match dHexFloat display "\<0x[0-9a-f_]\+\(fi\=\|l\=i\)\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 "floating point number, with dot, optional exponent
739
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
176 syn match dHexFloat display "\<0x[0-9a-f_]\+\.[0-9a-f_]*\(p[-+]\=[0-9_]\+\)\=[fl]\=i\="
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 "floating point number, without dot, with exponent
739
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
178 syn match dHexFloat display "\<0x[0-9a-f_]\+p[-+]\=[0-9_]\+[fl]\=i\=\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 " Pragma (preprocessor) support
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 " TODO: Highlight following Integer and optional Filespec.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 syn region dPragma start="#\s*\(line\>\)" skip="\\$" end="$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 " The default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 hi def link dBinary Number
739
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
190 hi def link dDec Number
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 hi def link dHex Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 hi def link dOctal Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 hi def link dFloat Float
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 hi def link dHexFloat Float
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 hi def link dDebug Debug
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 hi def link dBranch Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 hi def link dConditional Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 hi def link dLabel Label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 hi def link dUserLabel Label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 hi def link dRepeat Repeat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 hi def link dExceptions Exception
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 hi def link dAssert Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 hi def link dStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 hi def link dScopeDecl dStorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 hi def link dStorageClass StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 hi def link dBoolean Boolean
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 hi def link dUnicode Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 hi def link dRawString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 hi def link dString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 hi def link dHexString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 hi def link dCharacter Character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 hi def link dEscSequence SpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 hi def link dSpecialCharError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 hi def link dOctalError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 hi def link dOperator Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 hi def link dOpOverload Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 hi def link dConstant Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 hi def link dTypedef Typedef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 hi def link dStructure Structure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 hi def link dTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 hi def link dType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 hi def link dLineComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 hi def link dBlockComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 hi def link dNestedComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 hi def link dExternal Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 hi def link dPragma PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 let b:current_syntax = "d"
739
6e8086ed3b4b updated for version 7.0222
vimboss
parents: 557
diff changeset
229
557
862863033fdd updated for version 7.0158
vimboss
parents: 199
diff changeset
230 " vim: ts=8 noet