annotate runtime/syntax/msidl.vim @ 4916:ba328b4a990e v7.3.1203

updated for version 7.3.1203 Problem: Matches from matchadd() might be highlighted incorrectly when they are at a fixed position and inserting lines. (John Szakmeister) Solution: Redraw all lines below a change if there are highlighted matches. (idea by Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Sat, 15 Jun 2013 23:00:30 +0200
parents b37888de599c
children 43efa4f5a8ea
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: MS IDL (Microsoft dialect of Interface Description Language)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Vadim Zeitlin <vadim@wxwindows.org>
3356
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 " Last Change: 2012 Feb 12 by Thilo Six
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
3356
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
14 let s:cpo_save = &cpo
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
15 set cpo&vim
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
16
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " Misc basic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn match msidlId "[a-zA-Z][a-zA-Z0-9_]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn match msidlUUID "{\?[[:xdigit:]]\{8}-\([[:xdigit:]]\{4}-\)\{3}[[:xdigit:]]\{12}}\?"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn region msidlString start=/"/ skip=/\\\(\\\\\)*"/ end=/"/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match msidlLiteral "\d\+\(\.\d*\)\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match msidlLiteral "\.\d\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match msidlSpecial contained "[]\[{}:]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword msidlTodo contained TODO FIXME XXX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn region msidlComment start="/\*" end="\*/" contains=msidlTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match msidlComment "//.*" contains=msidlTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match msidlCommentError "\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " C style Preprocessor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn region msidlIncluded contained start=+"+ skip=+\\\(\\\\\)*"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match msidlIncluded contained "<[^>]*>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match msidlInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=msidlIncluded,msidlString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn region msidlPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=msidlComment,msidlCommentError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn region msidlDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=msidlLiteral, msidlString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " Attributes
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword msidlAttribute contained in out propget propput propputref retval
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match msidlAttribute /uuid(.*)/he=s+4 contains=msidlUUID
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match msidlAttribute /helpstring(.*)/he=s+10 contains=msidlString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn region msidlAttributes start="\[" end="]" keepend contains=msidlSpecial,msidlString,msidlAttribute,msidlComment,msidlCommentError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " Keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword msidlEnum enum
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword msidlImport import importlib
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword msidlStruct interface library coclass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword msidlTypedef typedef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " Types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword msidlStandardType byte char double float hyper int long short void wchar_t
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword msidlStandardType BOOL BSTR HRESULT VARIANT VARIANT_BOOL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn region msidlSafeArray start="SAFEARRAY(" end=")" contains=msidlStandardType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn sync lines=50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " 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
61 if version >= 508 || !exists("did_msidl_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 let did_msidl_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink msidlInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink msidlPreProc PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink msidlPreCondit PreCondit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink msidlDefine Macro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink msidlIncluded String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink msidlString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 HiLink msidlComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 HiLink msidlTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 HiLink msidlSpecial SpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 HiLink msidlLiteral Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 HiLink msidlUUID Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 HiLink msidlImport Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 HiLink msidlEnum StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 HiLink msidlStruct Structure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 HiLink msidlTypedef Typedef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 HiLink msidlAttribute StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 HiLink msidlStandardType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 HiLink msidlSafeArray Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 let b:current_syntax = "msidl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3356
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
95 let &cpo = s:cpo_save
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
96 unlet s:cpo_save
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 " vi: set ts=8 sw=4: