-
Notifications
You must be signed in to change notification settings - Fork 0
/
treestack.vim
34 lines (25 loc) · 922 Bytes
/
treestack.vim
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
if exists("b:current_syntax")
finish
endif
syntax keyword tskKeyword if else while fn break continue return
highlight link tskKeyword Keyword
" Integer with - + or nothing in front
syn match tskNumber '\d\+'
syn match tskNumber '[-+]\d\+'
highlight link tskNumber Constant
syn region tskString start=+"+ end=+"+ skip=+\\"+
syn region tskString start=+'+ end=+'+ skip=+\\'+
highlight link tskString Constant
syn match tskComment ";.*$"
highlight link tskComment Comment
syn region tskWord start="[a-zA-Z_]" end="[^a-zA-Z_]"
highlight link tskWord Identifier
" syn region tskFunc start="fn " hs=e+1 end=" "he=s-1
" highlight link tskFunc Type
syn match tskOp "[!&*+%,./<=>?@\\^`|-]"
highlight link tskOp Operator
syn match tskMove "[\[\]\{}()]"
highlight link tskMove Function
syn region tskPointer start="[*&\\^][a-zA-Z_]" end="[^a-zA-Z_]"me=e-1
highlight link tskPointer Operator
let b:current_syntax = "tsk"