7
|
1 " Vim syntax file
|
2152
|
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
|
6
|
2152
|
7 " Quit when a syntax file was already loaded
|
|
8 if exists("b:current_syntax")
|
|
9 finish
|
7
|
10 endif
|
|
11
|
|
12 " Read the C syntax to start with
|
2152
|
13 runtime! syntax/c.vim
|
7
|
14
|
|
15 " XS extentions
|
|
16 " TODO: Figure out how to look for trailing '='.
|
2152
|
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:
|
7
|
22 " TODO: Figure out how to look for trailing '('.
|
2152
|
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*$"
|
7
|
27
|
2152
|
28 " Define the default highlighting, but only when an item doesn't have highlighting yet
|
|
29 command -nargs=+ HiLink hi def link <args>
|
7
|
30
|
2152
|
31 HiLink xsKeyword Keyword
|
|
32 HiLink xsMacro Macro
|
|
33 HiLink xsVariable Identifier
|
7
|
34
|
2152
|
35 delcommand HiLink
|
7
|
36
|
|
37 let b:current_syntax = "xs"
|
|
38
|
|
39 " vim: ts=8
|