xref: /vim-8.2.3635/runtime/syntax/cl.vim (revision 6c35beaa)
1" Vim syntax file
2" Language:		CL
3"			(pronounced alphabetically, and NOT known as Clever)
4"			(CL was created by Multibase, http://www.mbase.com.au)
5" Filename extensions:	*.ent
6"			*.eni
7" Maintainer:		Philip Uren	<[email protected]> Remove SPAX spam block
8" Version:              4
9" Last Change:		May 11 2012
10
11" For version 5.x: Clear all syntax items
12" For version 6.x: Quit when a syntax file was already loaded
13if version < 600
14    syntax clear
15elseif exists("b:current_syntax")
16    finish
17endif
18
19if version >= 600
20    setlocal iskeyword=@,48-57,_,-,
21else
22    set iskeyword=@,48-57,_,-,
23endif
24
25syn case ignore
26
27syn sync lines=300
28
29"If/else/elsif/endif and while/wend mismatch errors
30syn match   clifError	    "\<wend\>"
31syn match   clifError	    "\<elsif\>"
32syn match   clifError	    "\<else\>"
33syn match   clifError	    "\<endif\>"
34
35syn match   clSpaceError    "\s\+$"
36
37" If and while regions
38syn region  clLoop	transparent matchgroup=clWhile start="\<while\>" matchgroup=clWhile end="\<wend\>" contains=ALLBUT,clBreak,clProcedure
39syn region  clIf	transparent matchgroup=clConditional start="\<if\>" matchgroup=clConditional end="\<endif\>"   contains=ALLBUT,clBreak,clProcedure
40
41" Make those TODO notes and debugging stand out!
42syn keyword clTodo	contained   TODO BUG DEBUG FIX
43syn match   clNeedsWork	contained   "NEED[S]*\s\s*WORK"
44syn keyword clDebug	contained   debug
45
46syn match   clComment	"#.*$"	    contains=clTodo,clNeedsWork
47syn region  clProcedure	oneline	    start="^\s*[{}]" end="$"
48syn match   clInclude	"^\s*include\s.*"
49
50" We don't put "debug" in the clSetOptions;
51" we contain it in clSet so we can make it stand out.
52syn keyword clSetOptions    transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim
53syn match   clSet	"^\s*set\s.*" contains=clSetOptions,clDebug
54
55syn match   clPreProc	"^\s*#P.*"
56
57syn keyword clConditional   else elsif
58syn keyword clWhile	continue endloop
59" 'break' needs to be a region so we can sync on it above.
60syn region  clBreak	oneline start="^\s*break" end="$"
61
62syn match   clOperator	"[!;|)(:.><+*=-]"
63
64syn match   clNumber	"\<\d\+\(u\=l\=\|lu\|f\)\>"
65
66syn region  clString	matchgroup=clQuote  start=+"+ end=+"+	skip=+\\"+
67syn region  clString	matchgroup=clQuote  start=+'+ end=+'+	skip=+\\'+
68
69syn keyword clReserved	ERROR EXIT INTERRUPT LOCKED LREPLY MODE MCOL MLINE MREPLY NULL REPLY V1 V2 V3 V4 V5 V6 V7 V8 V9 ZERO BYPASS GOING_BACK AAUTO ABORT ABORT ALIGN BIGE CONVERT FNUM GOBACK HANGUP JUSTIFY NEXIT OUTPUT RAUTO RAWDISPLAY RAWPRINT REPEAT SKIP TAB TRIM LCOUNT PCOUNT PLINES SLINES SCOLS MATCH LMATCH
70
71syn keyword clFunction	asc asize chr name random slen srandom day getarg getcgi getenv lcase scat sconv sdel skey smult srep substr sword trim ucase match
72
73syn keyword clStatement	clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do
74
75" Define the default highlighting.
76" For version 5.7 and earlier: only when not done already
77" For version 5.8 and later: only when an item doesn't have highlighting yet
78if  version >= 508 || !exists("did_cl_syntax_inits")
79    if	version < 508
80	let did_cl_syntax_inits = 1
81	command -nargs=+ HiLink hi link <args>
82    else
83	command -nargs=+ HiLink hi def link <args>
84    endif
85
86    HiLink clifError	Error
87    HiLink clSpaceError	Error
88    HiLink clWhile	Repeat
89    HiLink clConditional    Conditional
90    HiLink clDebug	Debug
91    HiLink clNeedsWork	Todo
92    HiLink clTodo	Todo
93    HiLink clComment	Comment
94    HiLink clProcedure	Procedure
95    HiLink clBreak	Procedure
96    HiLink clInclude	Include
97    HiLink clSetOption	Statement
98    HiLink clSet	Identifier
99    HiLink clPreProc	PreProc
100    HiLink clOperator	Operator
101    HiLink clNumber	Number
102    HiLink clString	String
103    HiLink clQuote	Delimiter
104    HiLink clReserved	Identifier
105    HiLink clFunction	Function
106    HiLink clStatement	Statement
107
108    delcommand HiLink
109endif
110
111let b:current_syntax = "cl"
112
113" vim: ts=8 sw=4
114