3513
|
1 " Vim syntax file
|
|
2 " Language: Zimbu
|
|
3 " Maintainer: Bram Moolenaar
|
3557
|
4 " Last Change: 2012 Jun 01
|
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
|
|
15 syn match zimbuComment "#.*$" contains=zimbuTodo,zimbuParam,@Spell
|
|
16
|
|
17 syn match zimbuChar "'\\\=.'"
|
|
18
|
|
19 syn keyword zimbuBasicType bool status
|
|
20 syn keyword zimbuBasicType int1 int2 int3 int4 int5 int6 int7
|
|
21 syn keyword zimbuBasicType int9 int10 int11 int12 int13 int14 int15
|
|
22 syn keyword zimbuBasicType int int8 int16 int32 int64 bigInt
|
|
23 syn keyword zimbuBasicType nat nat8 byte nat16 nat32 nat64 bigNat
|
|
24 syn keyword zimbuBasicType nat1 nat2 nat3 nat4 nat5 nat6 nat7
|
|
25 syn keyword zimbuBasicType nat9 nat10 nat11 nat12 nat13 nat14 nat15
|
|
26 syn keyword zimbuBasicType float float32 float64 float80 float128
|
|
27 syn keyword zimbuBasicType fixed1 fixed2 fixed3 fixed4 fixed5 fixed6
|
|
28 syn keyword zimbuBasicType fixed7 fixed8 fixed9 fixed10 fixed11 fixed12
|
|
29 syn keyword zimbuBasicType fixed13 fixed14 fixed15
|
|
30
|
|
31 syn keyword zimbuCompType string stringval cstring varstring
|
|
32 syn keyword zimbuCompType bytes varbytes
|
|
33 syn keyword zimbuCompType tuple array list dict multiDict set multiSet
|
|
34 syn keyword zimbuCompType complex complex32 complex64 complex80 complex128
|
|
35 syn keyword zimbuCompType proc func def thread evalThread lock cond pipe
|
|
36
|
|
37 syn keyword zimbuType VAR ANY USE GET
|
|
38 syn match zimbuType "IO.File"
|
|
39 syn match zimbuType "IO.Stat"
|
|
40
|
|
41 syn keyword zimbuStatement IF ELSE ELSEIF WHILE REPEAT FOR IN TO STEP
|
|
42 syn keyword zimbuStatement DO UNTIL SWITCH WITH
|
|
43 syn keyword zimbuStatement TRY CATCH FINALLY
|
|
44 syn keyword zimbuStatement GENERATE_IF GENERATE_ELSE GENERATE_ELSEIF
|
|
45 syn keyword zimbuStatement CASE DEFAULT FINAL ABSTRACT VIRTUAL DEFINE REPLACE
|
|
46 syn keyword zimbuStatement IMPLEMENTS EXTENDS PARENT LOCAL
|
|
47 syn keyword zimbuStatement PART ALIAS CONNECT WRAP
|
|
48 syn keyword zimbuStatement BREAK CONTINUE PROCEED
|
|
49 syn keyword zimbuStatement RETURN EXIT THROW
|
|
50 syn keyword zimbuStatement IMPORT AS OPTIONS MAIN
|
|
51 syn keyword zimbuStatement INTERFACE MODULE ENUM BITS SHARED
|
|
52 syn match zimbuStatement "\<\(FUNC\|PROC\|DEF\)\>"
|
|
53 syn match zimbuStatement "\<CLASS\>"
|
|
54 syn match zimbuStatement "}"
|
|
55
|
|
56 syn match zimbuAttribute "@backtrace=no\>"
|
|
57 syn match zimbuAttribute "@backtrace=yes\>"
|
|
58 syn match zimbuAttribute "@abstract\>"
|
|
59 syn match zimbuAttribute "@earlyInit\>"
|
|
60 syn match zimbuAttribute "@default\>"
|
|
61 syn match zimbuAttribute "@define\>"
|
|
62 syn match zimbuAttribute "@replace\>"
|
|
63 syn match zimbuAttribute "@final\>"
|
|
64
|
|
65 syn match zimbuAttribute "@private\>"
|
|
66 syn match zimbuAttribute "@protected\>"
|
|
67 syn match zimbuAttribute "@public\>"
|
|
68 syn match zimbuAttribute "@file\>"
|
|
69 syn match zimbuAttribute "@directory\>"
|
|
70 syn match zimbuAttribute "@read=private\>"
|
|
71 syn match zimbuAttribute "@read=protected\>"
|
|
72 syn match zimbuAttribute "@read=public\>"
|
|
73 syn match zimbuAttribute "@read=file\>"
|
|
74 syn match zimbuAttribute "@read=directory\>"
|
|
75 syn match zimbuAttribute "@items=private\>"
|
|
76 syn match zimbuAttribute "@items=protected\>"
|
|
77 syn match zimbuAttribute "@items=public\>"
|
|
78 syn match zimbuAttribute "@items=file\>"
|
|
79 syn match zimbuAttribute "@items=directory\>"
|
|
80
|
|
81 syn keyword zimbuMethod NEW EQUAL COPY COMPARE SIZE GET SET
|
|
82
|
|
83 syn keyword zimbuOperator IS ISNOT ISA ISNOTA
|
|
84
|
|
85 syn keyword zimbuModule ARG CHECK E IO PROTO SYS HTTP ZC ZWT TIME THREAD
|
|
86
|
|
87 syn match zimbuString +"\([^"\\]\|\\.\)*\("\|$\)+
|
|
88 syn match zimbuString +R"\([^"]\|""\)*\("\|$\)+
|
|
89 syn region zimbuString start=+'''+ end=+'''+
|
|
90
|
|
91 syn keyword zimbuFixed TRUE FALSE NIL THIS THISTYPE FAIL OK
|
|
92 syn keyword zimbuError NULL
|
|
93
|
|
94 " trailing whitespace
|
|
95 syn match zimbuSpaceError display excludenl "\S\s\+$"ms=s+1
|
|
96 " mixed tabs and spaces
|
|
97 syn match zimbuSpaceError display " \+\t"
|
|
98 syn match zimbuSpaceError display "\t\+ "
|
|
99
|
|
100 syn match zimbuUses contained "uses([a-zA-Z_ ,]*)"
|
|
101 syn match zimbuBlockComment contained " #.*"
|
|
102
|
|
103 syn region zimbuCregion matchgroup=zimbuCblock start="^>>>" end="^<<<.*" contains=@Ccode,zimbuUses,zimbuBlockComment keepend
|
|
104
|
|
105 syn sync minlines=2000
|
|
106
|
|
107 hi def link zimbuBasicType Type
|
|
108 hi def link zimbuCompType Type
|
|
109 hi def link zimbuType Type
|
|
110 hi def link zimbuStatement Statement
|
|
111 hi def link zimbuOperator Statement
|
|
112 hi def link zimbuMethod PreProc
|
|
113 hi def link zimbuModule PreProc
|
|
114 hi def link zimbuUses PreProc
|
|
115 hi def link zimbuAttribute PreProc
|
|
116 hi def link zimbuString Constant
|
|
117 hi def link zimbuChar Constant
|
|
118 hi def link zimbuFixed Constant
|
|
119 hi def link zimbuComment Comment
|
|
120 hi def link zimbuBlockComment Comment
|
|
121 hi def link zimbuCblock Comment
|
|
122 hi def link zimbuTodo Todo
|
|
123 hi def link zimbuParam Constant
|
|
124 hi def link zimbuNoBar Ignore
|
|
125 hi def link zimbuSpaceError Error
|
|
126 hi def link zimbuError Error
|
|
127
|
|
128 let b:current_syntax = "zimbu"
|
|
129
|
|
130 " vim: ts=8
|