blob: b0231236dd78470596bc743db64c84a800334207 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
dkearns0cc61082024-01-28 04:20:46 +11002" Language: ANT build file (xml)
3" Maintainer: Doug Kearns <dougkearns@gmail.com>
4" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
5" Last Change: 2024 Jan 27
6" Filenames: build.xml
Bram Moolenaar071d4272004-06-13 20:20:40 +00007
8" Quit when a syntax file was already loaded
9if exists("b:current_syntax")
10 finish
11endif
12
13let s:ant_cpo_save = &cpo
14set cpo&vim
15
16runtime! syntax/xml.vim
17
18syn case ignore
19
20if !exists('*AntSyntaxScript')
21 fun AntSyntaxScript(tagname, synfilename)
22 unlet b:current_syntax
23 let s:include = expand("<sfile>:p:h").'/'.a:synfilename
24 if filereadable(s:include)
25 exe 'syn include @ant'.a:tagname.' '.s:include
26 else
27 exe 'syn include @ant'.a:tagname." $VIMRUNTIME/syntax/".a:synfilename
28 endif
29
30 exe 'syn region ant'.a:tagname
31 \." start=#<script[^>]\\{-}language\\s*=\\s*['\"]".a:tagname."['\"]\\(>\\|[^>]*[^/>]>\\)#"
32 \.' end=#</script>#'
33 \.' fold'
34 \.' contains=@ant'.a:tagname.',xmlCdataStart,xmlCdataEnd,xmlTag,xmlEndTag'
35 \.' keepend'
36 exe 'syn cluster xmlRegionHook add=ant'.a:tagname
37 endfun
38endif
39
40" TODO: add more script languages here ?
41call AntSyntaxScript('javascript', 'javascript.vim')
42call AntSyntaxScript('jpython', 'python.vim')
43
44
45syn cluster xmlTagHook add=antElement
46
dkearns0cc61082024-01-28 04:20:46 +110047syn keyword antElement WsdlToDotnet addfiles and ant antcall antstructure apply archives arg argument
48syn keyword antElement assertions attrib attribute available basename bcc blgenclient bootclasspath
49syn keyword antElement borland bottom buildnumber buildpath buildpathelement bunzip2 bzip2 cab
50syn keyword antElement catalogpath cc cccheckin cccheckout cclock ccmcheckin ccmcheckintask ccmcheckout
51syn keyword antElement ccmcreatetask ccmkattr ccmkbl ccmkdir ccmkelem ccmklabel ccmklbtype
52syn keyword antElement ccmreconfigure ccrmtype ccuncheckout ccunlock ccupdate checksum chgrp chmod
53syn keyword antElement chown classconstants classes classfileset classpath commandline comment
54syn keyword antElement compilerarg compilerclasspath concat concatfilter condition copy copydir
55syn keyword antElement copyfile coveragepath csc custom cvs cvschangelog cvspass cvstagdiff cvsversion
56syn keyword antElement daemons date defaultexcludes define delete deletecharacters deltree depend
57syn keyword antElement depends dependset depth description different dirname dirset disable dname
58syn keyword antElement doclet doctitle dtd ear echo echoproperties ejbjar element enable entity entry
59syn keyword antElement env equals escapeunicode exclude excludepackage excludesfile exec execon
60syn keyword antElement existing expandproperties extdirs extension extensionSet extensionset factory
61syn keyword antElement fail filelist filename filepath fileset filesmatch filetokenizer filter
62syn keyword antElement filterchain filterreader filters filterset filtersfile fixcrlf footer format
63syn keyword antElement from ftp generic genkey get gjdoc grant group gunzip gzip header headfilter http
64syn keyword antElement ignoreblank ilasm ildasm import importtypelib include includesfile input iplanet
65syn keyword antElement iplanet-ejbc isfalse isreference isset istrue jar jarlib-available
66syn keyword antElement jarlib-manifest jarlib-resolve java javac javacc javadoc javadoc2 jboss jdepend
67syn keyword antElement jjdoc jjtree jlink jonas jpcoverage jpcovmerge jpcovreport jsharpc jspc
68syn keyword antElement junitreport jvmarg lib libfileset linetokenizer link loadfile loadproperties
69syn keyword antElement location macrodef mail majority manifest map mapper marker mergefiles message
70syn keyword antElement metainf method mimemail mkdir mmetrics modified move mparse none not options or
71syn keyword antElement os outputproperty package packageset parallel param patch path pathconvert
72syn keyword antElement pathelement patternset permissions prefixlines present presetdef project
73syn keyword antElement property propertyfile propertyref propertyset pvcs pvcsproject record reference
74syn keyword antElement regexp rename renameext replace replacefilter replaceregex replaceregexp
75syn keyword antElement replacestring replacetoken replacetokens replacevalue replyto report resource
76syn keyword antElement revoke rmic root rootfileset rpm scp section selector sequential serverdeploy
77syn keyword antElement setproxy signjar size sleep socket soscheckin soscheckout sosget soslabel source
78syn keyword antElement sourcepath sql src srcfile srcfilelist srcfiles srcfileset sshexec stcheckin
79syn keyword antElement stcheckout stlabel stlist stringtokenizer stripjavacomments striplinebreaks
80syn keyword antElement striplinecomments style subant substitution support symlink sync sysproperty
81syn keyword antElement syspropertyset tabstospaces tag taglet tailfilter tar tarfileset target
82syn keyword antElement targetfile targetfilelist targetfileset taskdef tempfile test testlet text title
83syn keyword antElement to token tokenfilter touch transaction translate triggers trim tstamp type
84syn keyword antElement typedef unjar untar unwar unzip uptodate url user vbc vssadd vsscheckin
85syn keyword antElement vsscheckout vsscp vsscreate vssget vsshistory vsslabel waitfor war wasclasspath
86syn keyword antElement webapp webinf weblogic weblogictoplink websphere whichresource wlclasspath
87syn keyword antElement wljspc wsdltodotnet xmlcatalog xmlproperty xmlvalidate xslt zip zipfileset
88syn keyword antElement zipgroupfileset
Bram Moolenaar071d4272004-06-13 20:20:40 +000089
90hi def link antElement Statement
91
92let b:current_syntax = "ant"
93
94let &cpo = s:ant_cpo_save
95unlet s:ant_cpo_save
96
97" vim: ts=8