-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dagon.vim
45 lines (39 loc) · 1.48 KB
/
dagon.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
35
36
37
38
39
40
41
42
43
44
45
" Vim syntax file
" Language: Dagon
" Maintainer: Caleb Thompson
" Latest Revision: 16 January 2013
au BufRead,BufNewFile *.dg set filetype=dagon
if exists("b:current_syntax")
finish
endif
syntax keyword dagonConditional if elseif else while break
syntax keyword dagonBoolean true false
syntax keyword dagonKeyword void
syntax keyword dagonFunction print puts
syntax match dagonNumber '\d'
syntax match dagonFloat '\d+\.\d+'
syntax region String start="'" end="'"
syntax region String start='"' end='"'
syntax region Array start="\[" end="\]"
syntax match dagonComment "\v#.*$"
syntax match dagonConstant "\v[A-Z][A-Za-z]*"
syntax match dagonIdentifier "\v-?[a-z][a-z0-9-]+"
syntax match dagonFunctionDefinition "\v-?[a-z][a-z0-9-]+:"
syntax region dagonFunctionDefinitionArgumentList start="\v-?[a-z][a-z0-9-]+\(" end="):"
syntax region dagonFunctionCall start="\v-?[a-z][a-z0-9-]+\(" end=")"
syntax match dagonOperator "\v \*\* "
syntax match dagonOperator "\v \* "
syntax match dagonOperator "\v / "
syntax match dagonOperator "\v \+ "
syntax match dagonOperator "\v - "
syntax match dagonAssignment ": "
highlight link dagonConditional Conditional
highlight link dagonKeyword Keyword
highlight link dagonBoolean Boolean
highlight link dagonIdentifier dagonFunction
highlight link dagonFunctionDefinition dagonFunction
highlight link dagonFunction Function
highlight link dagonComment Comment
highlight link dagonOperator Operator
highlight link dagonConstant Constant
let b:current_syntax = "dagon"