2 " Copyright by Jan-Oliver Wagner
4 " Maintainer: Jan-Oliver Wagner <Jan-Oliver.Wagner@intevation.de>
5 " Last change: 2001 May 10
7 " Avenue is the ArcView built-in language. ArcView is
8 " a desktop GIS by ESRI. Though it is a built-in language
9 " and a built-in editor is provided, the use of VIM increases
11 " I use some technologies to automatically load avenue scripts
14 " For version 5.x: Clear all syntax items
15 " For version 6.x: Quit when a syntax file was already loaded
18 elseif exists("b:current_syntax")
22 " Avenue is entirely case-insensitive.
27 syn keyword aveStatement if then elseif else end break exit return
28 syn keyword aveStatement for each in continue while
32 syn region aveString start=+"+ end=+"+
35 syn match aveNumber "[+-]\=\<[0-9]\+\>"
39 syn keyword aveOperator or and max min xor mod by
40 " 'not' is a kind of a problem: Its an Operator as well as a method
41 " 'not' is only marked as an Operator if not applied as method
42 syn match aveOperator "[^\.]not[^a-zA-Z]"
46 syn keyword aveFixVariables av nil self false true nl tab cr tab
47 syn match globalVariables "_[a-zA-Z][a-zA-Z0-9]*"
48 syn match aveVariables "[a-zA-Z][a-zA-Z0-9_]*"
49 syn match aveConst "#[A-Z][A-Z_]+"
53 syn match aveComment "'.*"
58 syn match aveTypos "=="
59 syn match aveTypos "!="
61 " Define the default highlighting.
62 " For version 5.7 and earlier: only when not done already
63 " For version 5.8 and later: only when an item doesn't have highlighting+yet
64 if version >= 508 || !exists("did_ave_syn_inits")
66 let did_ave_syn_inits = 1
67 command -nargs=+ HiLink hi link <args>
69 command -nargs=+ HiLink hi def link <args>
72 HiLink aveStatement Statement
74 HiLink aveString String
75 HiLink aveNumber Number
77 HiLink aveFixVariables Special
78 HiLink aveVariables Identifier
79 HiLink globalVariables Special
80 HiLink aveConst Special
82 HiLink aveClassMethods Function
84 HiLink aveOperator Operator
85 HiLink aveComment Comment
92 let b:current_syntax = "ave"