annotate runtime/syntax/pyrex.vim @ 30718:118268e20251

Added tag v9.0.0693 for changeset aa0f7c66653ce0404f9bed1b7c62dd18335305a0
author Bram Moolenaar <Bram@vim.org>
date Sat, 08 Oct 2022 14:00:04 +0200
parents 46763b01cd9a
children
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: Pyrex
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Marco Barisione <marco.bari@people.it>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://marcobari.altervista.org/pyrex_vim.html
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
5 " Last Change: 2009 Nov 09
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
7 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
8 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " Read the Python syntax to start with
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
13 runtime! syntax/python.vim
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
14 unlet b:current_syntax
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " Pyrex extentions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn keyword pyrexStatement cdef typedef ctypedef sizeof
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword pyrexType int long short float double char object void
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword pyrexType signed unsigned
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword pyrexStructure struct union enum
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
21 syn keyword pyrexInclude include cimport
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword pyrexAccess public private property readonly extern
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " If someome wants Python's built-ins highlighted probably he
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 " also wants Pyrex's built-ins highlighted
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword pyrexBuiltin NULL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " This deletes "from" from the keywords and re-adds it as a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " match with lower priority than pyrexForFrom
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
31 syn clear pythonInclude
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
32 syn keyword pythonInclude import
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
33 syn match pythonInclude "from"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " With "for[^:]*\zsfrom" VIM does not match "for" anymore, so
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " I used the slower "\@<=" form
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match pyrexForFrom "\(for[^:]*\)\@<=from"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " Default highlighting
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
40 hi def link pyrexStatement Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
41 hi def link pyrexType Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
42 hi def link pyrexStructure Structure
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
43 hi def link pyrexInclude PreCondit
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
44 hi def link pyrexAccess pyrexStatement
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
45 if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins")
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
46 hi def link pyrexBuiltin Function
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
47 endif
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
48 hi def link pyrexForFrom Statement
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 let b:current_syntax = "pyrex"