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
7 " Quit when a syntax file was already loaded
8 if exists("b:current_syntax")
12 " Read the C syntax to start with
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*$"
28 " Define the default highlighting, but only when an item doesn't have highlighting yet
29 command -nargs=+ HiLink hi def link <args>
31 HiLink xsKeyword Keyword
33 HiLink xsVariable Identifier
37 let b:current_syntax = "xs"