Mercurial > vim
comparison runtime/syntax/rexx.vim @ 1624:18ee39301b82 v7.2a
updated for version 7.2a
author | vimboss |
---|---|
date | Tue, 24 Jun 2008 22:58:06 +0000 |
parents | 1cdd2661f34c |
children | c3036f1dca68 |
comparison
equal
deleted
inserted
replaced
1623:53938adac247 | 1624:18ee39301b82 |
---|---|
2 " Language: Rexx | 2 " Language: Rexx |
3 " Maintainer: Thomas Geulig <geulig@nentec.de> | 3 " Maintainer: Thomas Geulig <geulig@nentec.de> |
4 " Last Change: 2005 Dez 9, added some <http://www.ooRexx.org>-coloring, | 4 " Last Change: 2005 Dez 9, added some <http://www.ooRexx.org>-coloring, |
5 " line comments, do *over*, messages, directives, | 5 " line comments, do *over*, messages, directives, |
6 " highlighting classes, methods, routines and requires | 6 " highlighting classes, methods, routines and requires |
7 " 2007 Oct 17, added support for new ooRexx 3.2 features | |
7 " Rony G. Flatscher <rony.flatscher@wu-wien.ac.at> | 8 " Rony G. Flatscher <rony.flatscher@wu-wien.ac.at> |
8 " | 9 " |
9 " URL: http://www.geulig.de/vim/rexx.vim | 10 " URL: http://www.geulig.de/vim/rexx.vim |
10 " | 11 " |
11 " Special Thanks to Dan Sharp <dwsharp@hotmail.com> and Rony G. Flatscher | 12 " Special Thanks to Dan Sharp <dwsharp@hotmail.com> and Rony G. Flatscher |
25 setlocal iskeyword+=. | 26 setlocal iskeyword+=. |
26 setlocal iskeyword+=! | 27 setlocal iskeyword+=! |
27 setlocal iskeyword+=? | 28 setlocal iskeyword+=? |
28 | 29 |
29 " ---rgf, position important: must be before comments etc. ! | 30 " ---rgf, position important: must be before comments etc. ! |
30 syn match rexxOperator "[-=|\/\\\+\*\[\],;<>&\~]" | 31 syn match rexxOperator "[=|\/\\\+\*\[\],;:<>&\~%\-]" |
31 | 32 |
32 syn match rexxIdentifier "\<[a-zA-Z\!\?_]\([a-zA-Z0-9._?!]\)*\>" | 33 " rgf syn match rexxIdentifier "\<[a-zA-Z\!\?_]\([a-zA-Z0-9._?!]\)*\>" |
33 syn match rexxEnvironmentSymbol "\<\.\+\([a-zA-Z0-9._?!]\)*\>" | 34 syn match rexxIdentifier "\<\K\k*\>" |
34 | 35 syn match rexxEnvironmentSymbol "\<\.\k\+\>" |
35 | 36 |
36 " A Keyword is the first symbol in a clause. A clause begins at the start | 37 " A Keyword is the first symbol in a clause. A clause begins at the start |
37 " of a line or after a semicolon. THEN, ELSE, OTHERWISE, and colons are always | 38 " of a line or after a semicolon. THEN, ELSE, OTHERWISE, and colons are always |
38 " followed by an implied semicolon. | 39 " followed by an implied semicolon. |
39 syn match rexxClause "\(^\|;\|:\|then \|else \|otherwise \)\s*\w\+" contains=ALLBUT,rexxParse2,rexxRaise2 | 40 syn match rexxClause "\(^\|;\|:\|then \|else \|when \|otherwise \)\s*\S*" contains=ALLBUT,rexxParse2,rexxRaise2,rexxForward2 |
40 | |
41 | 41 |
42 " Considered keywords when used together in a phrase and begin a clause | 42 " Considered keywords when used together in a phrase and begin a clause |
43 syn match rexxParse "\<parse\s*\(\(upper\|lower\|caseless\)\s*\)\=\(arg\|linein\|pull\|source\|var\|\<value\>\|version\)\>" | 43 syn match rexxParse "\<parse\s*\(\(upper\|lower\|caseless\)\s*\)\?\(arg\|linein\|pull\|source\|var\|\<value\>\|version\)\>" containedin=rexxClause contains=rexxParse2 |
44 syn match rexxParse2 "\<with\>" contained containedin=rexxParse | 44 syn match rexxParse2 "\<with\>" containedin=rexxParse |
45 | |
46 | 45 |
47 syn match rexxKeyword contained "\<numeric \(digits\|form \(scientific\|engineering\|value\)\|fuzz\)\>" | 46 syn match rexxKeyword contained "\<numeric \(digits\|form \(scientific\|engineering\|value\)\|fuzz\)\>" |
48 syn match rexxKeyword contained "\<\(address\|trace\)\( value\)\=\>" | 47 syn match rexxKeyword contained "\<\(address\|trace\)\( value\)\?\>" |
49 syn match rexxKeyword contained "\<procedure\(\s*expose\)\=\>" | 48 syn match rexxKeyword contained "\<procedure\(\s*expose\)\?\>" |
50 syn match rexxKeyword contained "\<do\>\(\s*forever\)\=\>" | 49 |
51 syn match rexxKeyword contained "\<use\>\s*\<arg\>" | 50 syn match rexxKeyword contained "\<\(do\|loop\)\>\(\s\+label\s\+\k*\)\?\(\s\+forever\)\?\>" |
51 syn match rexxKeyword contained "\<use\>\s*\(strict\s*\)\?\<arg\>" | |
52 | 52 |
53 " Another keyword phrase, separated to aid highlighting in rexxFunction | 53 " Another keyword phrase, separated to aid highlighting in rexxFunction |
54 syn match rexxKeyword contained "\<signal\(\s*\(on\|off\)\s*\(any\|error\|failure\|halt\|lostdigits\|nomethod\|nostring\|notready\|novalue\|syntax\|user\s*\k*\)\(\s\+name\)\=\)\=\>" | 54 syn match rexxRegularCallSignal contained "\<\(call\|signal\)\s\(\s*on\>\|\s*off\>\)\@!\(\k\+\ze\|\ze(\)\(\s*\|;\|$\|(\)" |
55 syn match rexxKeyword2 contained "\<call\(\s*\(on\|off\)\s*\(any\|error\|failure\|halt\|notready\|user\s*\k*\)\(\s\+name\)\=\)\=\>" | 55 syn region rexxLabel contained start="\<\(call\|signal\)\>\s*\zs\(\k*\|(\)" end="\ze\(\s*\|;\|$\|(\)" containedin=rexxRegularCallSignal |
56 | 56 |
57 syn match rexxExceptionHandling contained "\<\(call\|signal\)\>\s\+\<\(on\|off\)\>.*\(;\|$\)" | |
58 | |
59 " hilite label given after keyword "name" | |
60 syn match rexxLabel "name\s\+\zs\k\+\ze" containedin=rexxExceptionHandling | |
61 " hilite condition name (serves as label) | |
62 syn match rexxLabel "\<\(call\|signal\)\>\s\+\<\(on\|off\)\>\s*\zs\k\+\ze\s*\(;\|$\)" containedin=rexxExceptionHandling | |
63 " user exception handling, hilite user defined name | |
64 syn region rexxLabel contained start="user\s\+\zs\k" end="\ze\(\s\|;\|$\)" containedin=rexxExceptionHandling | |
57 | 65 |
58 " Considered keywords when they begin a clause | 66 " Considered keywords when they begin a clause |
59 syn match rexxKeyword contained "\<\(arg\|do\|drop\|end\|exit\|expose\|forward\|if\|interpret\|iterate\|leave\|nop\)\>" | 67 syn match rexxKeywordStatements "\<\(arg\|catch\|do\|drop\|end\|exit\|expose\|finally\|forward\|if\|interpret\|iterate\|leave\|loop\|nop\)\>" |
60 syn match rexxKeyword contained "\<\(options\|pull\|push\|queue\|raise\|reply\|return\|say\|select\|trace\)\>" | 68 syn match rexxKeywordStatements "\<\(options\|pull\|push\|queue\|raise\|reply\|return\|say\|select\|trace\)\>" |
69 | |
70 " Conditional keywords starting a new statement | |
71 syn match rexxConditional "\<\(then\|else\|when\|otherwise\)\(\s*\|;\|\_$\|\)\>" contains=rexxKeywordStatements | |
61 | 72 |
62 " Conditional phrases | 73 " Conditional phrases |
63 syn match rexxConditional "\(^\s*\| \)\(to\|by\|for\|until\|while\|then\|when\|otherwise\|else\|over\)\( \|\s*$\)" | 74 syn match rexxLoopKeywords "\<\(to\|by\|for\|until\|while\|over\)\>" containedin=doLoopSelectLabelRegion |
64 syn match rexxConditional contained "\<\(to\|by\|for\|until\|while\|then\|when\|otherwise\|else\|over\)\>" | |
65 | 75 |
66 " must be after Conditional phrases! | 76 " must be after Conditional phrases! |
67 syn match rexxKeyword ".*\<\(then\|else\)\s*\<do\>" | 77 syn match doLoopSelectLabelRegion "\<\(do\|loop\|select\)\>\s\+\(label\s\+\)\?\(\s\+\k\+\s\+\zs\<over\>\)\?\k*\(\s\+forever\)\?\(\s\|;\|$\)" |
78 | |
79 " color label's name | |
80 syn match rexxLabel2 "\<\(do\|loop\|select\)\>\s\+label\s\+\zs\k*\ze" containedin=doLoopSelectLabelRegion | |
81 | |
82 " make sure control variable is normal | |
83 syn match rexxControlVariable "\<\(do\|loop\)\>\(\s\+label\s\+\k*\)\?\s\+\zs.*\ze\s\+\<over\>" containedin=doLoopSelectLabelRegion | |
84 | |
85 " make sure control variable assignment is normal | |
86 syn match rexxStartValueAssignment "\<\(do\|loop\)\>\(\s\+label\s\+\k*\)\?\s\+\zs.*\ze\(=.*\)\?\s\+\<to\>" containedin=doLoopSelectLabelRegion | |
87 | |
88 " highlight label name | |
89 syn match endIterateLeaveLabelRegion "\<\(end\|leave\|iterate\)\>\(\s\+\K\k*\)" contains=rexxLabel2 | |
90 syn match rexxLabel2 "\<\(end\|leave\|iterate\)\>\s\+\zs\k*\ze" containedin=endIterateLeaveLabelRegion | |
91 | |
92 " Guard statement | |
93 syn match rexxGuard "\(^\|;\|:\)\s*\<guard\>\s\+\<\(on\|off\)\>" | |
94 | |
95 " Trace statement | |
96 syn match rexxTrace "\(^\|;\|:\)\s*\<trace\>\s\+\<\K\k*\>" | |
68 | 97 |
69 " Raise statement | 98 " Raise statement |
70 syn match rexxRaise "\(^\|;\|:\)\s\+\<raise\>\s*\<\(propagate\|error\|failure\|syntax\|user\)\>\=" | 99 syn match rexxRaise "\(^\|;\|:\)\s\+\<raise\>\s*\<\(propagate\|error\|failure\|syntax\|user\)\>\?" contains=rexxRaise2 |
71 syn match rexxRaise2 "\<\(additional\|array\|description\|exit\|return\)\>" contained containedin=rexxRaise | 100 syn match rexxRaise2 "\<\(additional\|array\|description\|exit\|propagate\|return\)\>" containedin=rexxRaise |
72 | 101 |
73 " Forward statement keywords | 102 " Forward statement |
74 syn match rexxForward "\(^\|;\|:\)\<forward\>\s*" | 103 syn match rexxForward "\(^\|;\|:\)\<forward\>\s*" contains=rexxForward2 |
75 syn match rexxForward2 "\<\(arguments\|array\|continue\|message\|class\|to\)\>" contained containedin=rexxForward | 104 syn match rexxForward2 "\<\(arguments\|array\|continue\|message\|class\|to\)\>" contained |
76 | 105 |
77 " Functions/Procedures | 106 " Functions/Procedures |
78 syn match rexxFunction "\<\w*\(/\*\s*\*/\)*("me=e-1 contains=rexxComment,rexxConditional,rexxKeyword,rexxIdentifier | 107 syn match rexxFunction "\<\<[a-zA-Z\!\?_]\k*\>("me=e-1 |
79 syn match rexxFunction "\<\<[a-zA-Z\!\?_]\([a-zA-Z0-9._?!]\)*\>("me=e-1 | |
80 syn match rexxFunction "\<call\s\+\k\+\>" contains=rexxKeyword2 | |
81 syn match rexxFunction "[()]" | 108 syn match rexxFunction "[()]" |
82 | 109 |
83 " String constants | 110 " String constants |
84 syn region rexxString start=+"+ skip=+""+ end=+"\(x\|b\)\=+ oneline | 111 syn region rexxString start=+"+ skip=+""+ end=+"\(x\|b\)\?+ oneline |
85 syn region rexxString start=+'+ skip=+''+ end=+'\(x\|b\)\=+ oneline | 112 syn region rexxString start=+'+ skip=+''+ end=+'\(x\|b\)\?+ oneline |
86 | 113 |
114 syn region rexxParen transparent start='(' end=')' contains=ALLBUT,rexxParenError,rexxTodo,rexxLabel,rexxKeyword | |
87 " Catch errors caused by wrong parenthesis | 115 " Catch errors caused by wrong parenthesis |
88 syn region rexxParen transparent start='(' end=')' contains=ALLBUT,rexxParenError,rexxTodo,rexxLabel,rexxKeyword | |
89 syn match rexxParenError ")" | 116 syn match rexxParenError ")" |
90 syn match rexxInParen "[\\[\\]{}]" | 117 syn match rexxInParen "[\\[\\]{}]" |
91 | 118 |
92 " Comments | 119 " Comments |
93 syn region rexxComment start="/\*" end="\*/" contains=rexxTodo,rexxComment | 120 syn region rexxComment start="/\*" end="\*/" contains=rexxTodo,rexxComment |
94 syn match rexxCommentError "\*/" | 121 syn match rexxCommentError "\*/" |
95 syn match rexxLineComment /--.*/ | 122 syn region rexxLineComment start="--" end="\_$" oneline |
123 | |
124 " Highlight User Labels | |
125 " check for labels between comments, labels stated in a statement in the middle of a line | |
126 syn match rexxLabel "\(\_^\|;\)\s*\(\/\*.*\*\/\)*\s*\k\+\s*\(\/\*.*\*\/\)*\s*:"me=e-1 contains=rexxTodo,rexxComment | |
96 | 127 |
97 syn keyword rexxTodo contained TODO FIXME XXX | 128 syn keyword rexxTodo contained TODO FIXME XXX |
98 | |
99 | 129 |
100 " ooRexx messages | 130 " ooRexx messages |
101 syn region rexxMessageOperator start="\(\~\|\~\~\)" end="\(\S\|\s\)"me=e-1 | 131 syn region rexxMessageOperator start="\(\~\|\~\~\)" end="\(\S\|\s\)"me=e-1 |
102 syn match rexxMessage "\(\~\|\~\~\)\s*\<\.*[a-zA-Z]\([a-zA-Z0-9._?!]\)*\>" contains=rexxMessageOperator | 132 syn match rexxMessage "\(\~\|\~\~\)\s*\<\.*[a-zA-Z]\([a-zA-Z0-9._?!]\)*\>" contains=rexxMessageOperator |
103 | 133 |
104 " Highlight User Labels | 134 " line continuations, take care of (line-)comments after it |
105 syn match rexxLabel "^\s*\k*\s*:"me=e-1 | |
106 | |
107 syn match rexxLineContinue ",\ze\s*\(--.*\|\/\*.*\)*$" | 135 syn match rexxLineContinue ",\ze\s*\(--.*\|\/\*.*\)*$" |
136 | |
108 " the following is necessary, otherwise three consecutive dashes will cause it to highlight the first one | 137 " the following is necessary, otherwise three consecutive dashes will cause it to highlight the first one |
109 syn match rexxLineContinue "-\ze\(\s+--.*\|\s*\/\*.*\)*$" | 138 syn match rexxLineContinue "-\ze-\@!\s*\(--.*\|\s*\/\*.*\)\?$" |
110 | 139 |
111 " Special Variables | 140 " Special Variables |
112 syn keyword rexxSpecialVariable sigl rc result self super | 141 syn keyword rexxSpecialVariable sigl rc result self super |
142 syn keyword rexxSpecialVariable .environment .error .input .local .methods .output .rs .stderr .stdin .stdout .stdque | |
113 | 143 |
114 " Constants | 144 " Constants |
115 syn keyword rexxConst .true .false .nil | 145 syn keyword rexxConst .true .false .nil .endOfLine .line |
116 | 146 |
117 " ooRexx builtin classes, first define dot to be o.k. in keywords | 147 syn match rexxNumber "\(-\|+\)\?\s*\zs\<\(\d\+\.\?\|\d*\.\d\+\(E\(+\|-\)\d\{2,2}\)\?\)\?\>" |
118 syn keyword rexxBuiltinClass .object .class .method .message | 148 |
119 syn keyword rexxBuiltinClass .monitor .alarm | 149 " ooRexx builtin classes (as of version 3.2.0, fall 2007), first define dot to be o.k. in keywords |
120 syn keyword rexxBuiltinClass .stem .stream .string | 150 syn keyword rexxBuiltinClass .Alarm .ArgUtil .Array .Bag .CaselessColumnComparator |
121 syn keyword rexxBuiltinClass .mutablebuffer | 151 syn keyword rexxBuiltinClass .CaselessComparator .CaselessDescendingComparator .CircularQueue |
122 syn keyword rexxBuiltinClass .array .list .queue .directory .table .set | 152 syn keyword rexxBuiltinClass .Class .Collection .ColumnComparator .Comparable .Comparator |
123 syn keyword rexxBuiltinClass .relation .bag .supplier .regularExpressions | 153 syn keyword rexxBuiltinClass .DateTime .DescendingComparator .Directory .InputOutputStream |
154 syn keyword rexxBuiltinClass .InputStream .InvertingComparator .List .MapCollection | |
155 syn keyword rexxBuiltinClass .Message .Method .Monitor .MutableBuffer .Object | |
156 syn keyword rexxBuiltinClass .OrderedCollection .OutputStream .Properties .Queue | |
157 syn keyword rexxBuiltinClass .Relation .RexxQueue .Set .SetCollection .Stem .Stream | |
158 syn keyword rexxBuiltinClass .StreamSupplier .String .Supplier .Table .TimeSpan | |
124 | 159 |
125 " Windows-only classes | 160 " Windows-only classes |
126 syn keyword rexxBuiltinClass .OLEObject .MenuObject .WindowsClipboard .WindowsEventLog | 161 syn keyword rexxBuiltinClass .AdvancedControls .AnimatedButton .BaseDialog .ButtonControl |
127 syn keyword rexxBuiltinClass .WindowsManager .WindowObject .WindowsProgramManager | 162 syn keyword rexxBuiltinClass .CategoryDialog .CheckBox .CheckList .ComboBox .DialogControl |
128 | 163 syn keyword rexxBuiltinClass .DialogExtensions .DlgArea .DlgAreaU .DynamicDialog |
129 | 164 syn keyword rexxBuiltinClass .EditControl .InputBox .IntegerBox .ListBox .ListChoice |
130 " ooRexx directives, ---rgf location important, otherwise directives in top of | 165 syn keyword rexxBuiltinClass .ListControl .MenuObject .MessageExtensions .MultiInputBox |
131 " file not matched! | 166 syn keyword rexxBuiltinClass .MultiListChoice .PasswordBox .PlainBaseDialog .PlainUserDialog |
132 syn region rexxClass start="::\s*class\s*"ms=e+1 end="\ze\(\s\|;\|$\)" | 167 syn keyword rexxBuiltinClass .ProgressBar .ProgressIndicator .PropertySheet .RadioButton |
133 syn region rexxMethod start="::\s*method\s*"ms=e+1 end="\ze\(\s\|;\|$\)" | 168 syn keyword rexxBuiltinClass .RcDialog .ResDialog .ScrollBar .SingleSelection .SliderControl |
134 syn region rexxRequires start="::\s*requires\s*"ms=e+1 end="\ze\(\s\|;\|$\)" | 169 syn keyword rexxBuiltinClass .StateIndicator .StaticControl .TabControl .TimedMessage |
135 syn region rexxRoutine start="::\s*routine\s*"ms=e+1 end="\ze\(\s\|;\|$\)" | 170 syn keyword rexxBuiltinClass .TreeControl .UserDialog .VirtualKeyCodes .WindowBase |
136 | 171 syn keyword rexxBuiltinClass .WindowExtensions .WindowObject .WindowsClassesBase .WindowsClipboard |
137 syn region rexxDirective start="\(^\|;\)\s*::\s*\w\+" end="\($\|;\)" contains=rexxString,rexxComment,rexxLineComment,rexxClass,rexxMethod,rexxRoutine,rexxRequires keepend | 172 syn keyword rexxBuiltinClass .WindowsEventLog .WindowsManager .WindowsProgramManager .WindowsRegistry |
138 | 173 |
139 | 174 " ooRexx directives, ---rgf location important, otherwise directives in top of file not matched! |
140 | 175 syn region rexxClassDirective start="::\s*class\s*"ms=e+1 end="\ze\(\s\|;\|$\)" |
141 if !exists("rexx_minlines") | 176 syn region rexxMethodDirective start="::\s*method\s*"ms=e+1 end="\ze\(\s\|;\|$\)" |
142 " let rexx_minlines = 10 | 177 syn region rexxRequiresDirective start="::\s*requires\s*"ms=e+1 end="\ze\(\s\|;\|$\)" |
143 let rexx_minlines = 500 | 178 syn region rexxRoutineDirective start="::\s*routine\s*"ms=e+1 end="\ze\(\s\|;\|$\)" |
144 endif | 179 syn region rexxAttributeDirective start="::\s*attribute\s*"ms=e+1 end="\ze\(\s\|;\|$\)" |
145 exec "syn sync ccomment rexxComment minlines=" . rexx_minlines | 180 |
181 syn region rexxDirective start="\(^\|;\)\s*::\s*\w\+" end="\($\|;\)" contains=rexxString,rexxComment,rexxLineComment,rexxClassDirective,rexxMethodDirective,rexxRoutineDirective,rexxRequiresDirective,rexxAttributeDirective keepend | |
182 | |
183 syn region rexxVariable start="\zs\<\(\.\)\@!\K\k\+\>\ze\s*\(=\|,\|)\|%\|\]\|\\\||\|&\|+=\|-=\|<\|>\)" end="\(\_$\|.\)"me=e-1 | |
184 syn match rexxVariable "\(=\|,\|)\|%\|\]\|\\\||\|&\|+=\|-=\|<\|>\)\s*\zs\K\k*\ze" | |
185 | |
186 " rgf, 2007-07-22: unfortunately, the entire region is colored (not only the | |
187 " patterns), hence useless (vim 7.0)! (syntax-docs hint that that should work) | |
188 " attempt: just colorize the parenthesis in matching colors, keep content | |
189 " transparent to keep the formatting already done to it! | |
190 " syn region par1 matchgroup=par1 start="(" matchgroup=par1 end=")" transparent contains=par2 | |
191 " syn region par2 matchgroup=par2 start="(" matchgroup=par2 end=")" transparent contains=par3 contained | |
192 " syn region par3 matchgroup=par3 start="(" matchgroup=par3 end=")" transparent contains=par4 contained | |
193 " syn region par4 matchgroup=par4 start="(" matchgroup=par4 end=")" transparent contains=par5 contained | |
194 " syn region par5 matchgroup=par5 start="(" matchgroup=par5 end=")" transparent contains=par1 contained | |
195 | |
196 " this will colorize the entire region, removing any colorizing already done! | |
197 " syn region par1 matchgroup=par1 start="(" end=")" contains=par2 | |
198 " syn region par2 matchgroup=par2 start="(" end=")" contains=par3 contained | |
199 " syn region par3 matchgroup=par3 start="(" end=")" contains=par4 contained | |
200 " syn region par4 matchgroup=par4 start="(" end=")" contains=par5 contained | |
201 " syn region par5 matchgroup=par5 start="(" end=")" contains=par1 contained | |
202 | |
203 hi par1 ctermfg=red guifg=red | |
204 hi par2 ctermfg=blue guifg=blue | |
205 hi par3 ctermfg=darkgreen guifg=darkgreen | |
206 hi par4 ctermfg=darkyellow guifg=darkyellow | |
207 hi par5 ctermfg=darkgrey guifg=darkgrey | |
208 | |
209 " line continuation (trailing comma or single dash) | |
210 syn sync linecont "\(,\|-\ze-\@!\)\ze\s*\(--.*\|\/\*.*\)*$" | |
211 | |
212 " if !exists("rexx_minlines") | |
213 " let rexx_minlines = 500 | |
214 " endif | |
215 " exec "syn sync ccomment rexxComment minlines=" . rexx_minlines | |
216 | |
217 " always scan from start, PCs are powerful enough for that in 2007 ! | |
218 exec "syn sync fromstart" | |
146 | 219 |
147 " Define the default highlighting. | 220 " Define the default highlighting. |
148 " For version 5.7 and earlier: only when not done already | 221 " For version 5.7 and earlier: only when not done already |
149 " For version 5.8 and later: only when an item doesn't have highlighting yet | 222 " For version 5.8 and later: only when an item doesn't have highlighting yet |
150 if version >= 508 || !exists("did_rexx_syn_inits") | 223 if version >= 508 || !exists("did_rexx_syn_inits") |
153 command -nargs=+ HiLink hi link <args> | 226 command -nargs=+ HiLink hi link <args> |
154 else | 227 else |
155 command -nargs=+ HiLink hi def link <args> | 228 command -nargs=+ HiLink hi def link <args> |
156 endif | 229 endif |
157 | 230 |
231 " make binary and hex strings stand out | |
232 hi rexxStringConstant term=bold,underline ctermfg=5 cterm=bold guifg=darkMagenta gui=bold | |
233 | |
234 HiLink rexxLabel2 Function | |
235 HiLink doLoopSelectLabelRegion rexxKeyword | |
236 HiLink endIterateLeaveLabelRegion rexxKeyword | |
237 HiLink rexxLoopKeywords rexxKeyword " Todo | |
238 | |
239 HiLink rexxNumber Normal | |
240 " HiLink rexxIdentifier DiffChange | |
241 | |
242 HiLink rexxRegularCallSignal Statement | |
243 HiLink rexxExceptionHandling Statement | |
244 | |
158 HiLink rexxLabel Function | 245 HiLink rexxLabel Function |
159 HiLink rexxCharacter Character | 246 HiLink rexxCharacter Character |
160 HiLink rexxParenError rexxError | 247 HiLink rexxParenError rexxError |
161 HiLink rexxInParen rexxError | 248 HiLink rexxInParen rexxError |
162 HiLink rexxCommentError rexxError | 249 HiLink rexxCommentError rexxError |
163 HiLink rexxError Error | 250 HiLink rexxError Error |
164 HiLink rexxKeyword Statement | 251 HiLink rexxKeyword Statement |
165 HiLink rexxKeyword2 rexxKeyword | 252 HiLink rexxKeywordStatements Statement |
253 | |
166 HiLink rexxFunction Function | 254 HiLink rexxFunction Function |
167 HiLink rexxString String | 255 HiLink rexxString String |
168 HiLink rexxComment Comment | 256 HiLink rexxComment Comment |
169 HiLink rexxTodo Todo | 257 HiLink rexxTodo Todo |
170 HiLink rexxSpecialVariable Special | 258 HiLink rexxSpecialVariable Special |
171 HiLink rexxConditional rexxKeyword | 259 HiLink rexxConditional rexxKeyword |
172 | 260 |
173 HiLink rexxOperator Operator | 261 HiLink rexxOperator Operator |
174 HiLink rexxMessageOperator rexxOperator | 262 HiLink rexxMessageOperator rexxOperator |
175 HiLink rexxLineComment RexxComment | 263 HiLink rexxLineComment Comment |
176 | 264 |
177 HiLink rexxLineContinue WildMenu | 265 HiLink rexxLineContinue WildMenu |
178 | 266 |
179 HiLink rexxDirective rexxKeyword | 267 HiLink rexxDirective rexxKeyword |
180 HiLink rexxClass Type | 268 HiLink rexxClassDirective Type |
181 HiLink rexxMethod rexxFunction | 269 HiLink rexxMethodDirective rexxFunction |
182 HiLink rexxRequires Include | 270 HiLink rexxAttributeDirective rexxFunction |
183 HiLink rexxRoutine rexxFunction | 271 HiLink rexxRequiresDirective Include |
272 HiLink rexxRoutineDirective rexxFunction | |
184 | 273 |
185 HiLink rexxConst Constant | 274 HiLink rexxConst Constant |
186 HiLink rexxTypeSpecifier Type | 275 HiLink rexxTypeSpecifier Type |
187 HiLink rexxBuiltinClass rexxTypeSpecifier | 276 HiLink rexxBuiltinClass rexxTypeSpecifier |
188 | 277 |
190 HiLink rexxMessage rexxFunction | 279 HiLink rexxMessage rexxFunction |
191 | 280 |
192 HiLink rexxParse rexxKeyword | 281 HiLink rexxParse rexxKeyword |
193 HiLink rexxParse2 rexxParse | 282 HiLink rexxParse2 rexxParse |
194 | 283 |
284 HiLink rexxGuard rexxKeyword | |
285 HiLink rexxTrace rexxKeyword | |
286 | |
195 HiLink rexxRaise rexxKeyword | 287 HiLink rexxRaise rexxKeyword |
196 HiLink rexxRaise2 rexxRaise | 288 HiLink rexxRaise2 rexxRaise |
197 | 289 |
198 HiLink rexxForward rexxKeyword | 290 HiLink rexxForward rexxKeyword |
199 HiLink rexxForward2 rexxForward | 291 HiLink rexxForward2 rexxForward |