Mercurial > vim
annotate runtime/syntax/slice.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | fa4089df54bc |
children | 46763b01cd9a |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Slice (ZeroC's Specification Language for Ice) | |
574 | 3 " Maintainer: Morel Bodin <slice06@nym.hush.com> |
4 " Last Change: 2005 Dec 03 | |
7 | 5 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
6 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
7 if exists("b:current_syntax") |
7 | 8 finish |
9 endif | |
10 | |
11 " The Slice keywords | |
12 | |
13 syn keyword sliceType bool byte double float int long short string void | |
14 syn keyword sliceQualifier const extends idempotent implements local nonmutating out throws | |
574 | 15 syn keyword sliceConstruct class enum exception dictionary interface module LocalObject Object sequence struct |
7 | 16 syn keyword sliceQualifier const extends idempotent implements local nonmutating out throws |
17 syn keyword sliceBoolean false true | |
18 | |
19 " Include directives | |
4229 | 20 syn region sliceIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ |
7 | 21 syn match sliceIncluded display contained "<[^>]*>" |
22 syn match sliceInclude display "^\s*#\s*include\>\s*["<]" contains=sliceIncluded | |
23 | |
24 " Double-include guards | |
25 syn region sliceGuard start="^#\(define\|ifndef\|endif\)" end="$" | |
26 | |
27 " Strings and characters | |
28 syn region sliceString start=+"+ end=+"+ | |
29 | |
30 " Numbers (shamelessly ripped from c.vim, only slightly modified) | |
31 "integer number, or floating point number without a dot and with "f". | |
32 syn case ignore | |
33 syn match sliceNumbers display transparent "\<\d\|\.\d" contains=sliceNumber,sliceFloat,sliceOctal | |
34 syn match sliceNumber display contained "\d\+" | |
35 "hex number | |
36 syn match sliceNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" | |
37 " Flag the first zero of an octal number as something special | |
38 syn match sliceOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=sliceOctalZero | |
39 syn match sliceOctalZero display contained "\<0" | |
40 syn match sliceFloat display contained "\d\+f" | |
41 "floating point number, with dot, optional exponent | |
42 syn match sliceFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" | |
43 "floating point number, starting with a dot, optional exponent | |
44 syn match sliceFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" | |
45 "floating point number, without dot, with exponent | |
46 syn match sliceFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" | |
47 " flag an octal number with wrong digits | |
48 syn case match | |
49 | |
50 | |
51 " Comments | |
52 syn region sliceComment start="/\*" end="\*/" | |
53 syn match sliceComment "//.*" | |
54 | |
55 syn sync ccomment sliceComment | |
56 | |
57 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
58 " Only when an item doesn't have highlighting yet |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
59 command -nargs=+ HiLink hi def link <args> |
7 | 60 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
61 HiLink sliceComment Comment |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
62 HiLink sliceConstruct Keyword |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
63 HiLink sliceType Type |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
64 HiLink sliceString String |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
65 HiLink sliceIncluded String |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
66 HiLink sliceQualifier Keyword |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
67 HiLink sliceInclude Include |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
68 HiLink sliceGuard PreProc |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
69 HiLink sliceBoolean Boolean |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
70 HiLink sliceFloat Number |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
71 HiLink sliceNumber Number |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
72 HiLink sliceOctal Number |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
73 HiLink sliceOctalZero Special |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
74 HiLink sliceNumberError Special |
7 | 75 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
4229
diff
changeset
|
76 delcommand HiLink |
7 | 77 |
78 let b:current_syntax = "slice" | |
79 | |
80 " vim: ts=8 |