annotate runtime/syntax/aap.vim @ 17439:8be5444ee2cb

Added tag v8.1.1717 for changeset 967e2ee9b656206e39b33e6d10aab417f930b1b0
author Bram Moolenaar <Bram@vim.org>
date Sat, 20 Jul 2019 15:15:07 +0200
parents 3fc0f57ecb91
children 4027cefc2aab
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: A-A-P recipe
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Bram Moolenaar <Bram@vim.org>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2004 Jun 13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 if exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 let s:cpo_save = &cpo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 set cpo&vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syn include @aapPythonScript syntax/python.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn match aapVariable /$[-+?*="'\\!]*[a-zA-Z0-9_.]*/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn match aapVariable /$[-+?*="'\\!]*([a-zA-Z0-9_.]*)/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword aapTodo contained TODO Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn match aapString +'[^']\{-}'+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn match aapString +"[^"]\{-}"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match aapCommand '^\s*:action\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match aapCommand '^\s*:add\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match aapCommand '^\s*:addall\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match aapCommand '^\s*:asroot\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match aapCommand '^\s*:assertpkg\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match aapCommand '^\s*:attr\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match aapCommand '^\s*:attribute\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match aapCommand '^\s*:autodepend\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match aapCommand '^\s*:buildcheck\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match aapCommand '^\s*:cd\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match aapCommand '^\s*:chdir\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match aapCommand '^\s*:checkin\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match aapCommand '^\s*:checkout\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match aapCommand '^\s*:child\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match aapCommand '^\s*:chmod\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match aapCommand '^\s*:commit\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match aapCommand '^\s*:commitall\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match aapCommand '^\s*:conf\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match aapCommand '^\s*:copy\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match aapCommand '^\s*:del\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match aapCommand '^\s*:deldir\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match aapCommand '^\s*:delete\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match aapCommand '^\s*:delrule\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match aapCommand '^\s*:dll\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match aapCommand '^\s*:do\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match aapCommand '^\s*:error\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match aapCommand '^\s*:execute\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match aapCommand '^\s*:exit\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match aapCommand '^\s*:export\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match aapCommand '^\s*:fetch\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match aapCommand '^\s*:fetchall\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn match aapCommand '^\s*:filetype\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn match aapCommand '^\s*:finish\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match aapCommand '^\s*:global\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn match aapCommand '^\s*:import\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn match aapCommand '^\s*:include\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn match aapCommand '^\s*:installpkg\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn match aapCommand '^\s*:lib\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match aapCommand '^\s*:local\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn match aapCommand '^\s*:log\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn match aapCommand '^\s*:ltlib\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match aapCommand '^\s*:mkdir\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn match aapCommand '^\s*:mkdownload\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match aapCommand '^\s*:move\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match aapCommand '^\s*:pass\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn match aapCommand '^\s*:popdir\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn match aapCommand '^\s*:produce\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn match aapCommand '^\s*:program\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn match aapCommand '^\s*:progsearch\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn match aapCommand '^\s*:publish\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn match aapCommand '^\s*:publishall\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn match aapCommand '^\s*:pushdir\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match aapCommand '^\s*:quit\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn match aapCommand '^\s*:recipe\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn match aapCommand '^\s*:refresh\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn match aapCommand '^\s*:remove\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn match aapCommand '^\s*:removeall\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn match aapCommand '^\s*:require\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match aapCommand '^\s*:revise\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn match aapCommand '^\s*:reviseall\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn match aapCommand '^\s*:route\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn match aapCommand '^\s*:rule\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn match aapCommand '^\s*:start\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match aapCommand '^\s*:symlink\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn match aapCommand '^\s*:sys\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn match aapCommand '^\s*:sysdepend\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn match aapCommand '^\s*:syspath\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match aapCommand '^\s*:system\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn match aapCommand '^\s*:tag\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn match aapCommand '^\s*:tagall\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match aapCommand '^\s*:toolsearch\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn match aapCommand '^\s*:totype\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn match aapCommand '^\s*:touch\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn match aapCommand '^\s*:tree\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn match aapCommand '^\s*:unlock\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn match aapCommand '^\s*:update\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn match aapCommand '^\s*:usetool\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn match aapCommand '^\s*:variant\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn match aapCommand '^\s*:verscont\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn match aapCommand '^\s*:print\>' nextgroup=aapPipeEnd
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn match aapPipeCmd '\s*:print\>' nextgroup=aapPipeEnd contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn match aapCommand '^\s*:cat\>' nextgroup=aapPipeEnd
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn match aapPipeCmd '\s*:cat\>' nextgroup=aapPipeEnd contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn match aapCommand '^\s*:syseval\>' nextgroup=aapPipeEnd
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn match aapPipeCmd '\s*:syseval\>' nextgroup=aapPipeEnd contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn match aapPipeCmd '\s*:assign\>' contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn match aapCommand '^\s*:eval\>' nextgroup=aapPipeEnd
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn match aapPipeCmd '\s*:eval\>' nextgroup=aapPipeEndPy contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn match aapPipeCmd '\s*:tee\>' nextgroup=aapPipeEnd contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn match aapPipeCmd '\s*:log\>' nextgroup=aapPipeEnd contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 syn match aapPipeEnd '[^|]*|' nextgroup=aapPipeCmd contained skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 syn match aapPipeEndPy '[^|]*|' nextgroup=aapPipeCmd contained skipnl contains=@aapPythonScript
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 syn match aapPipeStart '^\s*|' nextgroup=aapPipeCmd
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 " A Python line starts with @. Can be continued with a trailing backslash.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn region aapPythonRegion start="\s*@" skip='\\$' end=+$+ contains=@aapPythonScript keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 " A Python block starts with ":python" and continues so long as the indent is
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 " bigger.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 syn region aapPythonRegion matchgroup=aapCommand start="\z(\s*\):python" skip='\n\z1\s\|\n\s*\n' end=+$+ contains=@aapPythonScript
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 " A Python expression is enclosed in backticks.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 syn region aapPythonRegion start="`" skip="``" end="`" contains=@aapPythonScript
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 " TODO: There is something wrong with line continuation.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 syn match aapComment '#.*' contains=aapTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 syn match aapComment '#.*\(\\\n.*\)' contains=aapTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 syn match aapSpecial '$#'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 syn match aapSpecial '$\$'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 syn match aapSpecial '$(.)'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 " A heredoc assignment.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 syn region aapHeredoc start="^\s*\k\+\s*$\=+\=?\=<<\s*\z(\S*\)"hs=e+1 end="^\s*\z1\s*$"he=s-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 " Syncing is needed for ":python" and "VAR << EOF". Don't use Python syncing
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 syn sync clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 syn sync fromstart
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 " The default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 hi def link aapTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 hi def link aapString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 hi def link aapComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 hi def link aapSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 hi def link aapVariable Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 hi def link aapPipeCmd aapCommand
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 hi def link aapCommand Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 hi def link aapHeredoc Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 let b:current_syntax = "aap"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 let &cpo = s:cpo_save
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 unlet s:cpo_save
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 " vim: ts=8