Mercurial > vim
annotate runtime/syntax/msidl.vim @ 23429:de278e062eb6
Added tag v8.2.2257 for changeset 5807e3958e3898e21dced2fae52a15c9aa00ef57
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 31 Dec 2020 21:30:04 +0100 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: MS IDL (Microsoft dialect of Interface Description Language) | |
3 " Maintainer: Vadim Zeitlin <vadim@wxwindows.org> | |
3356 | 4 " Last Change: 2012 Feb 12 by Thilo Six |
7 | 5 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3356
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:
3356
diff
changeset
|
7 if exists("b:current_syntax") |
7 | 8 finish |
9 endif | |
10 | |
3356 | 11 let s:cpo_save = &cpo |
12 set cpo&vim | |
13 | |
7 | 14 " Misc basic |
15 syn match msidlId "[a-zA-Z][a-zA-Z0-9_]*" | |
16 syn match msidlUUID "{\?[[:xdigit:]]\{8}-\([[:xdigit:]]\{4}-\)\{3}[[:xdigit:]]\{12}}\?" | |
17 syn region msidlString start=/"/ skip=/\\\(\\\\\)*"/ end=/"/ | |
18 syn match msidlLiteral "\d\+\(\.\d*\)\=" | |
19 syn match msidlLiteral "\.\d\+" | |
20 syn match msidlSpecial contained "[]\[{}:]" | |
21 | |
22 " Comments | |
23 syn keyword msidlTodo contained TODO FIXME XXX | |
24 syn region msidlComment start="/\*" end="\*/" contains=msidlTodo | |
25 syn match msidlComment "//.*" contains=msidlTodo | |
26 syn match msidlCommentError "\*/" | |
27 | |
28 " C style Preprocessor | |
29 syn region msidlIncluded contained start=+"+ skip=+\\\(\\\\\)*"+ end=+"+ | |
30 syn match msidlIncluded contained "<[^>]*>" | |
31 syn match msidlInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=msidlIncluded,msidlString | |
32 syn region msidlPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=msidlComment,msidlCommentError | |
33 syn region msidlDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=msidlLiteral, msidlString | |
34 | |
35 " Attributes | |
36 syn keyword msidlAttribute contained in out propget propput propputref retval | |
37 syn keyword msidlAttribute contained aggregatable appobject binadable coclass control custom default defaultbind defaultcollelem defaultvalue defaultvtable dispinterface displaybind dual entry helpcontext helpfile helpstring helpstringdll hidden id immediatebind lcid library licensed nonbrowsable noncreatable nonextensible oleautomation optional object public readonly requestedit restricted source string uidefault usesgetlasterror vararg version | |
38 syn match msidlAttribute /uuid(.*)/he=s+4 contains=msidlUUID | |
39 syn match msidlAttribute /helpstring(.*)/he=s+10 contains=msidlString | |
40 syn region msidlAttributes start="\[" end="]" keepend contains=msidlSpecial,msidlString,msidlAttribute,msidlComment,msidlCommentError | |
41 | |
42 " Keywords | |
43 syn keyword msidlEnum enum | |
44 syn keyword msidlImport import importlib | |
45 syn keyword msidlStruct interface library coclass | |
46 syn keyword msidlTypedef typedef | |
47 | |
48 " Types | |
49 syn keyword msidlStandardType byte char double float hyper int long short void wchar_t | |
50 syn keyword msidlStandardType BOOL BSTR HRESULT VARIANT VARIANT_BOOL | |
51 syn region msidlSafeArray start="SAFEARRAY(" end=")" contains=msidlStandardType | |
52 | |
53 syn sync lines=50 | |
54 | |
55 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3356
diff
changeset
|
56 " Only when an item doesn't have highlighting yet |
7 | 57 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
58 hi def link msidlInclude Include |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
59 hi def link msidlPreProc PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
60 hi def link msidlPreCondit PreCondit |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
61 hi def link msidlDefine Macro |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
62 hi def link msidlIncluded String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
63 hi def link msidlString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
64 hi def link msidlComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
65 hi def link msidlTodo Todo |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
66 hi def link msidlSpecial SpecialChar |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
67 hi def link msidlLiteral Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
68 hi def link msidlUUID Number |
7 | 69 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
70 hi def link msidlImport Include |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
71 hi def link msidlEnum StorageClass |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
72 hi def link msidlStruct Structure |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
73 hi def link msidlTypedef Typedef |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
74 hi def link msidlAttribute StorageClass |
7 | 75 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
76 hi def link msidlStandardType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
77 hi def link msidlSafeArray Type |
7 | 78 |
79 | |
80 let b:current_syntax = "msidl" | |
81 | |
3356 | 82 let &cpo = s:cpo_save |
83 unlet s:cpo_save | |
7 | 84 " vi: set ts=8 sw=4: |