annotate runtime/syntax/msidl.vim @ 2620:5fbc411a611d v7.3.042

updated for version 7.3.042 Problem: No spell highlighting when re-using an empty buffer. Solution: Clear the spell checking info only when clearing the options for a buffer. (James Vega)
author Bram Moolenaar <bram@vim.org>
date Wed, 27 Oct 2010 16:18:00 +0200
parents 3fc0f57ecb91
children b37888de599c
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>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2003 May 11
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 " Misc basic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn match msidlId "[a-zA-Z][a-zA-Z0-9_]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn match msidlUUID "{\?[[:xdigit:]]\{8}-\([[:xdigit:]]\{4}-\)\{3}[[:xdigit:]]\{12}}\?"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn region msidlString start=/"/ skip=/\\\(\\\\\)*"/ end=/"/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn match msidlLiteral "\d\+\(\.\d*\)\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn match msidlLiteral "\.\d\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn match msidlSpecial contained "[]\[{}:]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword msidlTodo contained TODO FIXME XXX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn region msidlComment start="/\*" end="\*/" contains=msidlTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match msidlComment "//.*" contains=msidlTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match msidlCommentError "\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 " C style Preprocessor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn region msidlIncluded contained start=+"+ skip=+\\\(\\\\\)*"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match msidlIncluded contained "<[^>]*>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match msidlInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=msidlIncluded,msidlString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 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
33 syn region msidlDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=msidlLiteral, msidlString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " Attributes
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword msidlAttribute contained in out propget propput propputref retval
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match msidlAttribute /uuid(.*)/he=s+4 contains=msidlUUID
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match msidlAttribute /helpstring(.*)/he=s+10 contains=msidlString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn region msidlAttributes start="\[" end="]" keepend contains=msidlSpecial,msidlString,msidlAttribute,msidlComment,msidlCommentError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " Keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword msidlEnum enum
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword msidlImport import importlib
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword msidlStruct interface library coclass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword msidlTypedef typedef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " Types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword msidlStandardType byte char double float hyper int long short void wchar_t
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword msidlStandardType BOOL BSTR HRESULT VARIANT VARIANT_BOOL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn region msidlSafeArray start="SAFEARRAY(" end=")" contains=msidlStandardType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn sync lines=50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 " 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
58 if version >= 508 || !exists("did_msidl_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 let did_msidl_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 HiLink msidlInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 HiLink msidlPreProc PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink msidlPreCondit PreCondit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink msidlDefine Macro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink msidlIncluded String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink msidlString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink msidlComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink msidlTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink msidlSpecial SpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 HiLink msidlLiteral Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 HiLink msidlUUID Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 HiLink msidlImport Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 HiLink msidlEnum StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 HiLink msidlStruct Structure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 HiLink msidlTypedef Typedef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 HiLink msidlAttribute StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 HiLink msidlStandardType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 HiLink msidlSafeArray Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 let b:current_syntax = "msidl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 " vi: set ts=8 sw=4: