xref: /vim-8.2.3635/runtime/syntax/ave.vim (revision aedfcbe1)
1" Vim syntax file
2" Copyright by Jan-Oliver Wagner
3" Language:	avenue
4" Maintainer:	Jan-Oliver Wagner <[email protected]>
5" Last change:	2001 May 10
6
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
10" development speed.
11" I use some technologies to automatically load avenue scripts
12" into ArcView.
13
14" For version 5.x: Clear all syntax items
15" For version 6.x: Quit when a syntax file was already loaded
16if version < 600
17  syntax clear
18elseif exists("b:current_syntax")
19  finish
20endif
21
22" Avenue is entirely case-insensitive.
23syn case ignore
24
25" The keywords
26
27syn keyword aveStatement	if then elseif else end break exit return
28syn keyword aveStatement	for each in continue while
29
30" String
31
32syn region aveString		start=+"+ end=+"+
33
34" Integer number
35syn match  aveNumber		"[+-]\=\<[0-9]\+\>"
36
37" Operator
38
39syn 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
42syn match aveOperator		"[^\.]not[^a-zA-Z]"
43
44" Variables
45
46syn keyword aveFixVariables	av nil self false true nl tab cr tab
47syn match globalVariables	"_[a-zA-Z][a-zA-Z0-9]*"
48syn match aveVariables		"[a-zA-Z][a-zA-Z0-9_]*"
49syn match aveConst		"#[A-Z][A-Z_]+"
50
51" Comments
52
53syn match aveComment	"'.*"
54
55" Typical Typos
56
57" for C programmers:
58syn match aveTypos	"=="
59syn match aveTypos	"!="
60
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
64if version >= 508 || !exists("did_ave_syn_inits")
65  if version < 508
66	let did_ave_syn_inits = 1
67	command -nargs=+ HiLink hi link <args>
68  else
69	command -nargs=+ HiLink hi def link <args>
70  endif
71
72  HiLink aveStatement		Statement
73
74  HiLink aveString		String
75  HiLink aveNumber		Number
76
77  HiLink aveFixVariables	Special
78  HiLink aveVariables		Identifier
79  HiLink globalVariables	Special
80  HiLink aveConst		Special
81
82  HiLink aveClassMethods	Function
83
84  HiLink aveOperator		Operator
85  HiLink aveComment		Comment
86
87  HiLink aveTypos		Error
88
89  delcommand HiLink
90endif
91
92let b:current_syntax = "ave"
93