aboutsummaryrefslogtreecommitdiffhomepage
path: root/editors/vim/syntax/bruijn.vim
blob: d11cccc40ebb00d3eb0e28a59bdced4e2651a0bc (plain) (blame)
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
" Vim syntax file
" Language: Bruijn

if exists("b:current_syntax")
  finish
endif

syn match bruijnApplication /[()]/
syn match bruijnAbstraction /[[\]]/
syn match bruijnIndex display "\d"
syn match bruijnNumber /[+-]\d\+/
syn match bruijnDefinition /^\t*\S\+/
syn match bruijnKeyword /:test\|:import\|:print/
syn match bruijnNamespace /[A-Z][a-z]*\(\.\)\@=/
syn match bruijnNamespaceDelim /\([A-Z][a-z]*\)\@<=\./

syn region bruijnCommentLine start="^# " end="$"

hi def link bruijnIndex Special
hi def link bruijnNumber Number
hi def link bruijnDefinition Define
hi def link bruijnKeyword Macro
hi def link bruijnNamespace Type
hi def link bruijnNamespaceDelim Special
hi def link bruijnAbstraction Function
hi def link bruijnApplication String
hi def link bruijnCommentLine Comment

let b:current_syntax = "bruijn"