Commit | Line | Data |
---|---|---|
6464ec02 AT |
1 | " Vim syntax file |
2 | " Language: VVhitespace | |
3 | " Based on: https://vim.fandom.com/wiki/Creating_your_own_syntax_files | |
4 | ||
5 | if exists("b:current_syntax") | |
6 | finish | |
7 | endif | |
8 | ||
9 | let b:current_synax = "vvhitespace" | |
10 | ||
11 | " Stack IMP | |
12 | syn match stackIMP '^[sS][sS]' | |
13 | syn match stackIMP '^[sS][nN][sStTnN]' | |
14 | ||
15 | " Arithmetic IMP | |
16 | syn match arithIMP '^[tT][sS][sStT][sStTnN]' | |
17 | ||
18 | " Heap IMP | |
19 | syn match heapIMP '^[tT][tT][sStT]' | |
20 | ||
21 | " Control Flow IMP | |
22 | syn match controlIMP '^[nN][nNsStT][nNsStT]' | |
23 | ||
24 | " IO IMP | |
25 | syn match ioIMP '^[tT][nN][sStT][sStT]' | |
26 | ||
27 | " Label Definition | |
28 | syn match labelDef 'V[sStT]\+N' | |
29 | ||
30 | " Comments | |
31 | syn match commentBlock '|.*$' | |
32 | syn match commentBlock '@.*$' | |
33 | ||
34 | " Define colors using existing Highlight Groups. | |
35 | " To see a list of other Highlight Groups, type `:highlight` in vim. | |
36 | hi def link stackIMP Type | |
37 | hi def link arithIMP ModeMsg | |
38 | hi def link heapIMP Special | |
39 | hi def link controlIMP Constant | |
40 | hi def link ioIMP Keyword | |
41 | hi def link labelDef Function | |
42 | hi def link commentBlock NonText |