home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unix / vim-6.2.tar.bz2 / vim-6.2.tar / vim62 / runtime / syntax / msidl.vim < prev    next >
Encoding:
Text File  |  2003-05-11  |  3.7 KB  |  93 lines

  1. " Vim syntax file
  2. " Language:     MS IDL (Microsoft dialect of Interface Description Language)
  3. " Maintainer:   Vadim Zeitlin <vadim@wxwindows.org>
  4. " Last Change:  2003 May 11
  5.  
  6. " For version 5.x: Clear all syntax items
  7. " For version 6.x: Quit when a syntax file was already loaded
  8. if version < 600
  9.   syntax clear
  10. elseif exists("b:current_syntax")
  11.   finish
  12. endif
  13.  
  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.
  56. " For version 5.7 and earlier: only when not done already
  57. " For version 5.8 and later: only when an item doesn't have highlighting yet
  58. if version >= 508 || !exists("did_msidl_syntax_inits")
  59.   if version < 508
  60.     let did_msidl_syntax_inits = 1
  61.     command -nargs=+ HiLink hi link <args>
  62.   else
  63.     command -nargs=+ HiLink hi def link <args>
  64.   endif
  65.  
  66.   HiLink msidlInclude        Include
  67.   HiLink msidlPreProc        PreProc
  68.   HiLink msidlPreCondit        PreCondit
  69.   HiLink msidlDefine        Macro
  70.   HiLink msidlIncluded        String
  71.   HiLink msidlString        String
  72.   HiLink msidlComment        Comment
  73.   HiLink msidlTodo        Todo
  74.   HiLink msidlSpecial        SpecialChar
  75.   HiLink msidlLiteral        Number
  76.   HiLink msidlUUID        Number
  77.  
  78.   HiLink msidlImport        Include
  79.   HiLink msidlEnum        StorageClass
  80.   HiLink msidlStruct        Structure
  81.   HiLink msidlTypedef        Typedef
  82.   HiLink msidlAttribute        StorageClass
  83.  
  84.   HiLink msidlStandardType    Type
  85.   HiLink msidlSafeArray        Type
  86.  
  87.   delcommand HiLink
  88. endif
  89.  
  90. let b:current_syntax = "msidl"
  91.  
  92. " vi: set ts=8 sw=4:
  93.