blob: e6b77f77f39430d96d3de05657d41f6492b3025a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
if exists("b:current_syntax")
finish
endif
syn keyword usStatement break next ret
syn keyword usStructure let global
syn keyword usLiteral true false zilch nada
syn keyword usConditional else elseif
syn keyword usOperator and or
syn keyword usTodo TODO FIXME HACK XXX
syn region usIfEnd transparent matchgroup=usConditional start="\<if\>" end="\<end\>" contains=TOP
syn region usRepeatEnd transparent matchgroup=usRepeat start="\<loop\>" end="\<end\>" contains=TOP
syn region usDoEnd transparent matchgroup=usStatement start="\<do\>" end="\<end\>" contains=TOP
syn region usFunEnd transparent matchgroup=usStructure start="\<fun\>" end="\<end\>" contains=TOP
syn region usString start=/"/ end=/"/ contains=usSpecial
syn region usString start=/'/ end=/'/ contains=usSpecial
syn match usFunction /[a-zA-Z_][a-zA-Z0-9_:]*\ze(/
syn match usLabel /<[a-zA-Z_][a-zA-Z0-9_:]*>$/
syn match usSpecial contained /\\[\\"'tnr]/
syn match usComment /\#.*/ contains=usTodo
syn match usNumber /\<\d\+\>/
syn match usNumber /\<\d\+\.\d*/
syn match usOperator /=|\+=|-=|\*=|\/=|%=||\+|-|\*|\/|%|<|>|<=|>=|==|!=|!|\.|\.\./
hi def link usStructure Structure
hi def link usFunction Function
hi def link usStatement Statement
hi def link usLabel Label
hi def link usConditional Conditional
hi def link usRepeat Repeat
hi def link usModifier StorageClass
hi def link usString String
hi def link usSpecial Special
hi def link usOperator Operator
hi def link usNumber Constant
hi def link usLiteral Constant
hi def link usComment Comment
hi def link usTodo Todo
let b:current_syntax = 'microscript'
|