annotate runtime/syntax/xs.vim @ 1648:58cad056e608 v7.2a.00

updated for version 7.2a-00
author vimboss
date Wed, 25 Jun 2008 20:13:35 +0000
parents 3fc0f57ecb91
children b9e314fe473f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: XS (Perl extension interface language)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Michael W. Dodge <sarge@pobox.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2001 May 09
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " Read the C syntax to start with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 source <sfile>:p:h/c.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 runtime! syntax/c.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " XS extentions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " TODO: Figure out how to look for trailing '='.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword xsKeyword MODULE PACKAGE PREFIX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword xsKeyword OUTPUT: CODE: INIT: PREINIT: INPUT:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword xsKeyword PPCODE: REQUIRE: CLEANUP: BOOT:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword xsKeyword VERSIONCHECK: PROTOTYPES: PROTOTYPE:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword xsKeyword ALIAS: INCLUDE: CASE:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 " TODO: Figure out how to look for trailing '('.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword xsMacro SV EXTEND PUSHs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword xsVariable RETVAL NO_INIT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 "syn match xsCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 "syn match xsCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 if version >= 508 || !exists("did_xs_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 let did_xs_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 HiLink xsKeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 HiLink xsMacro Macro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 HiLink xsVariable Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 let b:current_syntax = "xs"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " vim: ts=8