annotate runtime/syntax/webmacro.vim @ 809:4f1b94b51e99 v7.0b02

updated for version 7.0b02
author vimboss
date Sun, 26 Mar 2006 21:06:50 +0000
parents 3fc0f57ecb91
children 43efa4f5a8ea
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 " WebMacro syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: WebMacro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Claudio Fleiner <claudio@fleiner.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://www.fleiner.com/vim/syntax/webmacro.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Last Change: 2003 May 11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " webmacro is a nice little language that you should
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " check out if you use java servlets.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " webmacro: http://www.webmacro.org
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 if !exists("main_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 let main_syntax = 'webmacro'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 source <sfile>:p:h/html.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 runtime! syntax/html.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn cluster htmlPreProc add=webmacroIf,webmacroUse,webmacroBraces,webmacroParse,webmacroInclude,webmacroSet,webmacroForeach,webmacroComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match webmacroVariable "\$[a-zA-Z0-9.()]*;\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match webmacroNumber "[-+]\=\d\+[lL]\=" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword webmacroBoolean true false contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match webmacroSpecial "\\." contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn region webmacroString contained start=+"+ end=+"+ contains=webmacroSpecial,webmacroVariable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn region webmacroString contained start=+'+ end=+'+ contains=webmacroSpecial,webmacroVariable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn region webmacroList contained matchgroup=Structure start="\[" matchgroup=Structure end="\]" contains=webmacroString,webmacroVariable,webmacroNumber,webmacroBoolean,webmacroList
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn region webmacroIf start="#if" start="#else" end="{"me=e-1 contains=webmacroVariable,webmacroNumber,webmacroString,webmacroBoolean,webmacroList nextgroup=webmacroBraces
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn region webmacroForeach start="#foreach" end="{"me=e-1 contains=webmacroVariable,webmacroNumber,webmacroString,webmacroBoolean,webmacroList nextgroup=webmacroBraces
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match webmacroSet "#set .*$" contains=webmacroVariable,webmacroNumber,webmacroNumber,webmacroBoolean,webmacroString,webmacroList
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match webmacroInclude "#include .*$" contains=webmacroVariable,webmacroNumber,webmacroNumber,webmacroBoolean,webmacroString,webmacroList
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match webmacroParse "#parse .*$" contains=webmacroVariable,webmacroNumber,webmacroNumber,webmacroBoolean,webmacroString,webmacroList
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn region webmacroUse matchgroup=PreProc start="#use .*" matchgroup=PreProc end="^-.*" contains=webmacroHash,@HtmlTop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn region webmacroBraces matchgroup=Structure start="{" matchgroup=Structure end="}" contained transparent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match webmacroBracesError "[{}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match webmacroComment "##.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match webmacroHash "[#{}\$]" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " 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
54 if version >= 508 || !exists("did_webmacro_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 let did_webmacro_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 HiLink webmacroComment CommentTitle
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 HiLink webmacroVariable PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 HiLink webmacroIf webmacroStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 HiLink webmacroForeach webmacroStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 HiLink webmacroSet webmacroStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 HiLink webmacroInclude webmacroStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink webmacroParse webmacroStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink webmacroStatement Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink webmacroNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink webmacroBoolean Boolean
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink webmacroSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink webmacroString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink webmacroBracesError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 let b:current_syntax = "webmacro"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 if main_syntax == 'webmacro'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 unlet main_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 endif