-
Notifications
You must be signed in to change notification settings - Fork 0
/
snupl.vim
51 lines (40 loc) · 1.09 KB
/
snupl.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
46
47
48
49
50
51
" Vim syntax file
" Language: SnuPL/1
" Maintainer: Hyunjin Jeong <das01063@snu.ac.kr>
" Latest Revision: 29 May 2016
" Version: 0.1
" Quit when a syntax file was already loaded.
if exists("b:current_syntax")
finish
endif
" SnuPL keywords
" Statement keywords
syn keyword spStatements return end begin
syn keyword spConditional if else then
syn keyword spRepeat while do
syn match spStatements "\."
" Type keywords
syn keyword spType integer boolean char var
" Boolean keywords
syn keyword spBoolean true false
" Function keywords
syn keyword spProcedure module procedure function
" Comment
syn match spComment "//.*"
" Number
syn match spNumber "\v<\d+>"
" String
syn region spString start="\"" skip=+\\"+ end="\""
" Character
syn region spCharacter start="'" skip=+\\'+ end="'"
" Highlights
hi def link spStatements Statement
hi def link spConditional Conditional
hi def link spRepeat Repeat
hi def link spType Type
hi def link spBoolean Boolean
hi def link spProcedure Function
hi def link spComment Comment
hi def link spNumber Number
hi def link spCharacter Character
hi def link spString String