aboutsummaryrefslogtreecommitdiff
path: root/vim/syntax/sil.vim
blob: c4967988b6bce83e7bf711ac5e1d97998971cd9c (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
30
31
32
33
34
35
36
37
38
39
40
41
42
" Clean syntax file
" Language: Simple imperative language
" Author:   Camil Staps <info@camilstaps.nl>

if exists("b:current_syntax")
  finish
endif

let s:cpo_save = &cpo
set cpo&vim

syn include @ABC syntax/abc.vim

syn keyword silConditional  if else while
syn keyword silStatement    return
syn keyword silType         Bool Int Void

syn match   silOperator     "[-~@#$%^?!+*<>\/|&=:.]\+" display

syn match   silInteger      "\<\d\+\>" display
syn keyword silBool         True False

syn match   silABC          "|\~.*$" contains=@ABC transparent

syn region  silComment      start="//"  end="$"   contains=@Spell oneline display
syn region  silComment      start="/\*" end="\*/" contains=@Spell fold keepend extend

hi def link silConditional  Conditional
hi def link silStatement    Statement
hi def link silType         Type

hi def link silOperator     Operator

hi def link silInteger      Number
hi def link silBool         Boolean

hi def link silComment      Comment

let b:current_syntax = 'sil'

let &cpo = s:cpo_save
unlet s:cpo_save