summaryrefslogtreecommitdiff
path: root/xxx/vim-old/vim-potion/syntax/potion.vim
blob: 2ca9dbc214cfd0a9b3cf201a7200df2973e67415 (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
if exists("b:current_syntax")
    finish
endif

syntax keyword potionKeyword loop times to while
syntax keyword potionKeyword if elsif else
syntax keyword potionKeyword class return
syntax keyword potionFunction print join string

syntax match potionOperator "\v\."
syntax match potionOperator "\v:"
syntax match potionOperator "\v\="
syntax match potionOperator "\v\*"
syntax match potionOperator "\v/"
syntax match potionOperator "\v\+"
syntax match potionOperator "\v-"
syntax match potionOperator "\v\?"
syntax match potionOperator "\v\*\="
syntax match potionOperator "\v/\="
syntax match potionOperator "\v\+\="
syntax match potionOperator "\v-\="

syntax match potionNumber "\v\d+"
syntax match potionNumber "\v0x\x+"

syntax region potionString start=/\v"/ skip=/\v\\./ end=/\v"/

syntax match potionComment "\v#.*$"

highlight link potionString String
highlight link potionOperator Operator
highlight link potionKeyword Keyword
highlight link potionFunction Function
highlight link potionComment Comment
highlight link potionNumber Number

let b:current_syntax = "potion"