1" Vim syntax file 2" Language: XS (Perl extension interface language) 3" Maintainer: Andy Lester <[email protected]> 4" URL: http://github.com/petdance/vim-perl 5" Last Change: 2009-08-14 6 7" Quit when a syntax file was already loaded 8if exists("b:current_syntax") 9 finish 10endif 11 12" Read the C syntax to start with 13runtime! syntax/c.vim 14 15" XS extentions 16" TODO: Figure out how to look for trailing '='. 17syn keyword xsKeyword MODULE PACKAGE PREFIX 18syn keyword xsKeyword OUTPUT: CODE: INIT: PREINIT: INPUT: 19syn keyword xsKeyword PPCODE: REQUIRE: CLEANUP: BOOT: 20syn keyword xsKeyword VERSIONCHECK: PROTOTYPES: PROTOTYPE: 21syn keyword xsKeyword ALIAS: INCLUDE: CASE: 22" TODO: Figure out how to look for trailing '('. 23syn keyword xsMacro SV EXTEND PUSHs 24syn 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 29command -nargs=+ HiLink hi def link <args> 30 31HiLink xsKeyword Keyword 32HiLink xsMacro Macro 33HiLink xsVariable Identifier 34 35delcommand HiLink 36 37let b:current_syntax = "xs" 38 39" vim: ts=8 40