annotate runtime/syntax/slice.vim @ 754:3a779b47f235 v7.0223

updated for version 7.0223
author vimboss
date Mon, 13 Mar 2006 22:18:45 +0000
parents 25a70b1cd2da
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: Slice (ZeroC's Specification Language for Ice)
574
25a70b1cd2da updated for version 7.0163
vimboss
parents: 7
diff changeset
3 " Maintainer: Morel Bodin <slice06@nym.hush.com>
25a70b1cd2da updated for version 7.0163
vimboss
parents: 7
diff changeset
4 " Last Change: 2005 Dec 03
7
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 " The Slice keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn keyword sliceType bool byte double float int long short string void
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn keyword sliceQualifier const extends idempotent implements local nonmutating out throws
574
25a70b1cd2da updated for version 7.0163
vimboss
parents: 7
diff changeset
18 syn keyword sliceConstruct class enum exception dictionary interface module LocalObject Object sequence struct
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword sliceQualifier const extends idempotent implements local nonmutating out throws
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword sliceBoolean false true
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " Include directives
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match sliceIncluded display contained "<[^>]*>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match sliceInclude display "^\s*#\s*include\>\s*["<]" contains=sliceIncluded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " Double-include guards
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn region sliceGuard start="^#\(define\|ifndef\|endif\)" end="$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " Strings and characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn region sliceString start=+"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " Numbers (shamelessly ripped from c.vim, only slightly modified)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 "integer number, or floating point number without a dot and with "f".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match sliceNumbers display transparent "\<\d\|\.\d" contains=sliceNumber,sliceFloat,sliceOctal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match sliceNumber display contained "\d\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 "hex number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match sliceNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " Flag the first zero of an octal number as something special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match sliceOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=sliceOctalZero
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match sliceOctalZero display contained "\<0"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match sliceFloat display contained "\d\+f"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 "floating point number, with dot, optional exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match sliceFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 "floating point number, starting with a dot, optional exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match sliceFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 "floating point number, without dot, with exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match sliceFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 " flag an octal number with wrong digits
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn region sliceComment start="/\*" end="\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match sliceComment "//.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn sync ccomment sliceComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 if version >= 508 || !exists("did_slice_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 let did_slice_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink sliceComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink sliceConstruct Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink sliceType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink sliceString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink sliceIncluded String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 HiLink sliceQualifier Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 HiLink sliceInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 HiLink sliceGuard PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 HiLink sliceBoolean Boolean
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 HiLink sliceFloat Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 HiLink sliceNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 HiLink sliceOctal Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 HiLink sliceOctalZero Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 HiLink sliceNumberError Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 let b:current_syntax = "slice"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 " vim: ts=8