3513
|
1 " Vim syntax file
|
|
2 " Language: Zimbu
|
|
3 " Maintainer: Bram Moolenaar
|
6421
|
4 " Last Change: 2014 Nov 23
|
3513
|
5
|
|
6 if exists("b:current_syntax")
|
|
7 finish
|
|
8 endif
|
|
9
|
|
10 syn include @Ccode syntax/c.vim
|
|
11
|
|
12 syn keyword zimbuTodo TODO FIXME XXX contained
|
|
13 syn match zimbuNoBar "|" contained
|
|
14 syn match zimbuParam "|[^| ]\+|" contained contains=zimbuNoBar
|
6421
|
15 syn match zimbuNoBacktick "`" contained
|
|
16 syn match zimbuCode "`[^`]\+`" contained contains=zimbuNoBacktick
|
|
17 syn match zimbuComment "#.*$" contains=zimbuTodo,zimbuParam,zimbuCode,@Spell
|
|
18 syn match zimbuComment "/\*.\{-}\*/" contains=zimbuTodo,zimbuParam,zimbuCode,@Spell
|
3513
|
19
|
|
20 syn match zimbuChar "'\\\=.'"
|
|
21
|
|
22 syn keyword zimbuBasicType bool status
|
|
23 syn keyword zimbuBasicType int1 int2 int3 int4 int5 int6 int7
|
|
24 syn keyword zimbuBasicType int9 int10 int11 int12 int13 int14 int15
|
|
25 syn keyword zimbuBasicType int int8 int16 int32 int64 bigInt
|
|
26 syn keyword zimbuBasicType nat nat8 byte nat16 nat32 nat64 bigNat
|
|
27 syn keyword zimbuBasicType nat1 nat2 nat3 nat4 nat5 nat6 nat7
|
|
28 syn keyword zimbuBasicType nat9 nat10 nat11 nat12 nat13 nat14 nat15
|
|
29 syn keyword zimbuBasicType float float32 float64 float80 float128
|
|
30 syn keyword zimbuBasicType fixed1 fixed2 fixed3 fixed4 fixed5 fixed6
|
|
31 syn keyword zimbuBasicType fixed7 fixed8 fixed9 fixed10 fixed11 fixed12
|
|
32 syn keyword zimbuBasicType fixed13 fixed14 fixed15
|
|
33
|
6421
|
34 syn keyword zimbuCompType string varString
|
|
35 syn keyword zimbuCompType byteString varByteString
|
|
36 syn keyword zimbuCompType tuple array list dict dictList set callback
|
|
37 syn keyword zimbuCompType sortedList multiDict multiDictList multiSet
|
3513
|
38 syn keyword zimbuCompType complex complex32 complex64 complex80 complex128
|
|
39 syn keyword zimbuCompType proc func def thread evalThread lock cond pipe
|
|
40
|
6421
|
41 syn keyword zimbuType VAR dyn type USE GET
|
3513
|
42 syn match zimbuType "IO.File"
|
|
43 syn match zimbuType "IO.Stat"
|
|
44
|
6421
|
45 syn keyword zimbuStatement IF ELSE ELSEIF IFNIL WHILE REPEAT FOR IN TO STEP
|
3513
|
46 syn keyword zimbuStatement DO UNTIL SWITCH WITH
|
|
47 syn keyword zimbuStatement TRY CATCH FINALLY
|
|
48 syn keyword zimbuStatement GENERATE_IF GENERATE_ELSE GENERATE_ELSEIF
|
6421
|
49 syn keyword zimbuStatement GENERATE_ERROR
|
|
50 syn keyword zimbuStatement BUILD_IF BUILD_ELSE BUILD_ELSEIF
|
3513
|
51 syn keyword zimbuStatement CASE DEFAULT FINAL ABSTRACT VIRTUAL DEFINE REPLACE
|
|
52 syn keyword zimbuStatement IMPLEMENTS EXTENDS PARENT LOCAL
|
6421
|
53 syn keyword zimbuStatement PART ALIAS TYPE CONNECT WRAP
|
3513
|
54 syn keyword zimbuStatement BREAK CONTINUE PROCEED
|
6421
|
55 syn keyword zimbuStatement RETURN EXIT THROW DEFER
|
3513
|
56 syn keyword zimbuStatement IMPORT AS OPTIONS MAIN
|
6421
|
57 syn keyword zimbuStatement INTERFACE PIECE INCLUDE MODULE ENUM BITS
|
|
58 syn keyword zimbuStatement SHARED STATIC
|
|
59 syn keyword zimbuStatement LAMBDA
|
3513
|
60 syn match zimbuStatement "\<\(FUNC\|PROC\|DEF\)\>"
|
|
61 syn match zimbuStatement "\<CLASS\>"
|
|
62 syn match zimbuStatement "}"
|
|
63
|
|
64 syn match zimbuAttribute "@backtrace=no\>"
|
|
65 syn match zimbuAttribute "@backtrace=yes\>"
|
|
66 syn match zimbuAttribute "@abstract\>"
|
|
67 syn match zimbuAttribute "@earlyInit\>"
|
|
68 syn match zimbuAttribute "@default\>"
|
|
69 syn match zimbuAttribute "@define\>"
|
|
70 syn match zimbuAttribute "@replace\>"
|
|
71 syn match zimbuAttribute "@final\>"
|
6421
|
72 syn match zimbuAttribute "@primitive\>"
|
|
73 syn match zimbuAttribute "@notOnExit\>"
|
3513
|
74
|
|
75 syn match zimbuAttribute "@private\>"
|
|
76 syn match zimbuAttribute "@protected\>"
|
|
77 syn match zimbuAttribute "@public\>"
|
6421
|
78 syn match zimbuAttribute "@local\>"
|
3513
|
79 syn match zimbuAttribute "@file\>"
|
|
80 syn match zimbuAttribute "@directory\>"
|
|
81 syn match zimbuAttribute "@read=private\>"
|
|
82 syn match zimbuAttribute "@read=protected\>"
|
|
83 syn match zimbuAttribute "@read=public\>"
|
|
84 syn match zimbuAttribute "@read=file\>"
|
|
85 syn match zimbuAttribute "@read=directory\>"
|
|
86 syn match zimbuAttribute "@items=private\>"
|
|
87 syn match zimbuAttribute "@items=protected\>"
|
|
88 syn match zimbuAttribute "@items=public\>"
|
|
89 syn match zimbuAttribute "@items=file\>"
|
|
90 syn match zimbuAttribute "@items=directory\>"
|
|
91
|
6421
|
92 syn keyword zimbuMethod NEW EQUAL COPY COMPARE SIZE GET SET INIT EARLYINIT
|
3513
|
93
|
|
94 syn keyword zimbuOperator IS ISNOT ISA ISNOTA
|
|
95
|
6421
|
96 syn keyword zimbuModule ARG CHECK E GC IO LOG PROTO SYS HTTP ZC ZWT T TIME THREAD
|
|
97
|
|
98 syn match zimbuImport "\.\zsPROTO"
|
|
99 syn match zimbuImport "\.\zsCHEADER"
|
3513
|
100
|
6421
|
101 "syn match zimbuString +"\([^"\\]\|\\.\)*\("\|$\)+ contains=zimbuStringExpr
|
|
102 syn region zimbuString start=+"+ skip=+[^"\\]\|\\.+ end=+"\|$+ contains=zimbuStringExpr
|
3513
|
103 syn match zimbuString +R"\([^"]\|""\)*\("\|$\)+
|
6421
|
104 syn region zimbuLongString start=+''"+ end=+"''+
|
|
105 syn match zimbuStringExpr +\\([^)]*)+hs=s+2,he=e-1 contained contains=zimbuString,zimbuParenPairOuter
|
|
106 syn region zimbuParenPairOuter start=+(+ms=s+1 end=+)+me=e-1 contained contains=zimbuString,zimbuParenPair
|
|
107 syn region zimbuParenPair start=+(+ end=+)+ contained contains=zimbuString,zimbuParenPair
|
3513
|
108
|
|
109 syn keyword zimbuFixed TRUE FALSE NIL THIS THISTYPE FAIL OK
|
|
110 syn keyword zimbuError NULL
|
|
111
|
|
112 " trailing whitespace
|
|
113 syn match zimbuSpaceError display excludenl "\S\s\+$"ms=s+1
|
|
114 " mixed tabs and spaces
|
|
115 syn match zimbuSpaceError display " \+\t"
|
|
116 syn match zimbuSpaceError display "\t\+ "
|
|
117
|
6421
|
118 syn match zimbuUses contained "\<uses([a-zA-Z_ ,]*)"
|
|
119 syn match zimbuBlockgc contained "blockgc"
|
3513
|
120 syn match zimbuBlockComment contained " #.*"
|
|
121
|
6421
|
122 syn region zimbuCregion matchgroup=zimbuCblock start="^>>>" end="^<<<.*" contains=@Ccode,zimbuUses,zimbuBlockgc,zimbuBlockComment keepend
|
3513
|
123
|
6421
|
124 " Assume long strings and C regions don't take more than 200 lines.
|
|
125 syn sync minlines=200
|
|
126
|
|
127 " When we find the start of a long string, without a # or " before it, we are
|
|
128 " sure to be inside a long string.
|
|
129 syn sync match zimbuLongStringSync grouphere zimbuLongString +^[^"#]*''\"+
|
3513
|
130
|
|
131 hi def link zimbuBasicType Type
|
|
132 hi def link zimbuCompType Type
|
|
133 hi def link zimbuType Type
|
|
134 hi def link zimbuStatement Statement
|
|
135 hi def link zimbuOperator Statement
|
|
136 hi def link zimbuMethod PreProc
|
|
137 hi def link zimbuModule PreProc
|
6421
|
138 hi def link zimbuImport PreProc
|
3513
|
139 hi def link zimbuUses PreProc
|
6421
|
140 hi def link zimbuBlockgc PreProc
|
3513
|
141 hi def link zimbuAttribute PreProc
|
|
142 hi def link zimbuString Constant
|
6421
|
143 hi def link zimbuLongString Special
|
3513
|
144 hi def link zimbuChar Constant
|
|
145 hi def link zimbuFixed Constant
|
|
146 hi def link zimbuComment Comment
|
6421
|
147 hi def link zimbuCommentStart zimbuComment
|
3513
|
148 hi def link zimbuBlockComment Comment
|
|
149 hi def link zimbuCblock Comment
|
|
150 hi def link zimbuTodo Todo
|
|
151 hi def link zimbuParam Constant
|
6421
|
152 hi def link zimbuCode Statement
|
3513
|
153 hi def link zimbuNoBar Ignore
|
6421
|
154 hi def link zimbuNoBacktick Ignore
|
3513
|
155 hi def link zimbuSpaceError Error
|
|
156 hi def link zimbuError Error
|
|
157
|
|
158 let b:current_syntax = "zimbu"
|
|
159
|
|
160 " vim: ts=8
|