comparison runtime/syntax/xs.vim @ 39:c16898406ff2

synchorinize version 7.3.081
author one@zeus.cr.ie.u-ryukyu.ac.jp
date Fri, 17 Dec 2010 17:43:06 +0900
parents 76efa0be13f1
children
comparison
equal deleted inserted replaced
38:e06a1cd7230d 39:c16898406ff2
1 " Vim syntax file 1 " Vim syntax file
2 " Language: XS (Perl extension interface language) 2 " Language: XS (Perl extension interface language)
3 " Maintainer: Michael W. Dodge <sarge@pobox.com> 3 " Maintainer: Andy Lester <andy@petdance.com>
4 " Last Change: 2001 May 09 4 " URL: http://github.com/petdance/vim-perl
5 " Last Change: 2009-08-14
5 6
6 " For version 5.x: Clear all syntax items 7 " Quit when a syntax file was already loaded
7 " For version 6.x: Quit when a syntax file was already loaded 8 if exists("b:current_syntax")
8 if version < 600 9 finish
9 syntax clear
10 elseif exists("b:current_syntax")
11 finish
12 endif 10 endif
13 11
14 " Read the C syntax to start with 12 " Read the C syntax to start with
15 if version < 600 13 runtime! syntax/c.vim
16 source <sfile>:p:h/c.vim
17 else
18 runtime! syntax/c.vim
19 endif
20 14
21 " XS extentions 15 " XS extentions
22 " TODO: Figure out how to look for trailing '='. 16 " TODO: Figure out how to look for trailing '='.
23 syn keyword xsKeyword MODULE PACKAGE PREFIX 17 syn keyword xsKeyword MODULE PACKAGE PREFIX
24 syn keyword xsKeyword OUTPUT: CODE: INIT: PREINIT: INPUT: 18 syn keyword xsKeyword OUTPUT: CODE: INIT: PREINIT: INPUT:
25 syn keyword xsKeyword PPCODE: REQUIRE: CLEANUP: BOOT: 19 syn keyword xsKeyword PPCODE: REQUIRE: CLEANUP: BOOT:
26 syn keyword xsKeyword VERSIONCHECK: PROTOTYPES: PROTOTYPE: 20 syn keyword xsKeyword VERSIONCHECK: PROTOTYPES: PROTOTYPE:
27 syn keyword xsKeyword ALIAS: INCLUDE: CASE: 21 syn keyword xsKeyword ALIAS: INCLUDE: CASE:
28 " TODO: Figure out how to look for trailing '('. 22 " TODO: Figure out how to look for trailing '('.
29 syn keyword xsMacro SV EXTEND PUSHs 23 syn keyword xsMacro SV EXTEND PUSHs
30 syn keyword xsVariable RETVAL NO_INIT 24 syn keyword xsVariable RETVAL NO_INIT
31 "syn match xsCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1 25 "syn match xsCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1
32 "syn match xsCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$" 26 "syn match xsCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
33 27
34 " Define the default highlighting. 28 " Define the default highlighting, but only when an item doesn't have highlighting yet
35 " For version 5.7 and earlier: only when not done already 29 command -nargs=+ HiLink hi def link <args>
36 " For version 5.8 and later: only when an item doesn't have highlighting yet
37 if version >= 508 || !exists("did_xs_syntax_inits")
38 if version < 508
39 let did_xs_syntax_inits = 1
40 command -nargs=+ HiLink hi link <args>
41 else
42 command -nargs=+ HiLink hi def link <args>
43 endif
44 30
45 HiLink xsKeyword Keyword 31 HiLink xsKeyword Keyword
46 HiLink xsMacro Macro 32 HiLink xsMacro Macro
47 HiLink xsVariable Identifier 33 HiLink xsVariable Identifier
48 34
49 delcommand HiLink 35 delcommand HiLink
50 endif
51 36
52 let b:current_syntax = "xs" 37 let b:current_syntax = "xs"
53 38
54 " vim: ts=8 39 " vim: ts=8