Mercurial > vim
annotate runtime/syntax/ppwiz.vim @ 27749:73293bbd1e5c
Added tag v8.2.4400 for changeset 49b667252942ca1af2c023067330e4b2f58ba79d
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 16 Feb 2022 19:00:05 +0100 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: PPWizard (preprocessor by Dennis Bareis) | |
3 " Maintainer: Stefan Schwarzer <s.schwarzer@ndh.net> | |
4 " URL: http://www.ndh.net/home/sschwarzer/download/ppwiz.vim | |
5 " Last Change: 2003 May 11 | |
6 " Filename: ppwiz.vim | |
7 | |
8 " Remove old syntax stuff | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
9 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
10 if exists("b:current_syntax") |
7 | 11 finish |
12 endif | |
13 | |
14 syn case ignore | |
15 | |
16 if !exists("ppwiz_highlight_defs") | |
17 let ppwiz_highlight_defs = 1 | |
18 endif | |
19 | |
20 if !exists("ppwiz_with_html") | |
21 let ppwiz_with_html = 1 | |
22 endif | |
23 | |
24 " comments | |
25 syn match ppwizComment "^;.*$" | |
26 syn match ppwizComment ";;.*$" | |
27 " HTML | |
28 if ppwiz_with_html > 0 | |
29 syn region ppwizHTML start="<" end=">" contains=ppwizArg,ppwizMacro | |
30 syn match ppwizHTML "\&\w\+;" | |
31 endif | |
32 " define, evaluate etc. | |
33 if ppwiz_highlight_defs == 1 | |
34 syn match ppwizDef "^\s*\#\S\+\s\+\S\+" contains=ALL | |
35 syn match ppwizDef "^\s*\#\(if\|else\|endif\)" contains=ALL | |
36 syn match ppwizDef "^\s*\#\({\|break\|continue\|}\)" contains=ALL | |
37 " elseif ppwiz_highlight_defs == 2 | |
38 " syn region ppwizDef start="^\s*\#" end="[^\\]$" end="^$" keepend contains=ALL | |
39 else | |
40 syn region ppwizDef start="^\s*\#" end="[^\\]$" end="^$" keepend contains=ppwizCont | |
41 endif | |
42 syn match ppwizError "\s.\\$" | |
43 syn match ppwizCont "\s\([+\-%]\|\)\\$" | |
44 " macros to execute | |
45 syn region ppwizMacro start="<\$" end=">" contains=@ppwizArgVal,ppwizCont | |
46 " macro arguments | |
47 syn region ppwizArg start="{" end="}" contains=ppwizEqual,ppwizString | |
48 syn match ppwizEqual "=" contained | |
49 syn match ppwizOperator "<>\|=\|<\|>" contained | |
50 " standard variables (builtin) | |
51 syn region ppwizStdVar start="<?[^?]" end=">" contains=@ppwizArgVal | |
52 " Rexx variables | |
53 syn region ppwizRexxVar start="<??" end=">" contains=@ppwizArgVal | |
54 " Constants | |
55 syn region ppwizString start=+"+ end=+"+ contained contains=ppwizMacro,ppwizArg,ppwizHTML,ppwizCont,ppwizStdVar,ppwizRexxVar | |
56 syn region ppwizString start=+'+ end=+'+ contained contains=ppwizMacro,ppwizArg,ppwizHTML,ppwizCont,ppwizStdVar,ppwizRexxVar | |
57 syn match ppwizInteger "\d\+" contained | |
58 | |
59 " Clusters | |
60 syn cluster ppwizArgVal add=ppwizString,ppwizInteger | |
61 | |
62 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
63 " Only when an item doesn't have highlighting yet |
7 | 64 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
65 hi def link ppwizSpecial Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
66 hi def link ppwizEqual ppwizSpecial |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
67 hi def link ppwizOperator ppwizSpecial |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
68 hi def link ppwizComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
69 hi def link ppwizDef PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
70 hi def link ppwizMacro Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
71 hi def link ppwizArg Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
72 hi def link ppwizStdVar Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
73 hi def link ppwizRexxVar Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
74 hi def link ppwizString Constant |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
75 hi def link ppwizInteger Constant |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
76 hi def link ppwizCont ppwizSpecial |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
77 hi def link ppwizError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
78 hi def link ppwizHTML Type |
7 | 79 |
80 | |
81 let b:current_syntax = "ppwiz" | |
82 | |
83 " vim: ts=4 | |
84 |