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 / runtime / dos / syntax / xs.vim < prev    next >
Encoding:
Text File  |  2010-08-14  |  1.3 KB  |  40 lines

  1. " Vim syntax file
  2. " Language:     XS (Perl extension interface language)
  3. " Maintainer:   Andy Lester <andy@petdance.com>
  4. " URL:          http://github.com/petdance/vim-perl
  5. " Last Change:  2009-08-14
  6.  
  7. " Quit when a syntax file was already loaded
  8. if exists("b:current_syntax")
  9.     finish
  10. endif
  11.  
  12. " Read the C syntax to start with
  13. runtime! syntax/c.vim
  14.  
  15. " XS extentions
  16. " TODO: Figure out how to look for trailing '='.
  17. syn keyword xsKeyword   MODULE PACKAGE PREFIX
  18. syn keyword xsKeyword   OUTPUT: CODE: INIT: PREINIT: INPUT:
  19. syn keyword xsKeyword   PPCODE: REQUIRE: CLEANUP: BOOT:
  20. syn keyword xsKeyword   VERSIONCHECK: PROTOTYPES: PROTOTYPE:
  21. syn keyword xsKeyword   ALIAS: INCLUDE: CASE:
  22. " TODO: Figure out how to look for trailing '('.
  23. syn keyword xsMacro     SV EXTEND PUSHs
  24. syn keyword xsVariable  RETVAL NO_INIT
  25. "syn match xsCast       "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1
  26. "syn match xsCast       "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
  27.  
  28. " Define the default highlighting, but only when an item doesn't have highlighting yet
  29. command -nargs=+ HiLink hi def link <args>
  30.  
  31. HiLink xsKeyword    Keyword
  32. HiLink xsMacro      Macro
  33. HiLink xsVariable   Identifier
  34.  
  35. delcommand HiLink
  36.  
  37. let b:current_syntax = "xs"
  38.  
  39. " vim: ts=8
  40.