-
Notifications
You must be signed in to change notification settings - Fork 1
/
square.vim
81 lines (66 loc) · 2.13 KB
/
square.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
" Vim syntax file
" Language: Square
" Forked from scheme.vim
if exists('b:current_syntax')
finish
endif
let s:cpo = &cpo
set cpo&vim
syn spell notoplevel
syn match squareParentheses "[^ '`\t\n()\[\]";]\+"
syn match squareParentheses "[)\]]"
syn match squareIdentifier /[^ '`\t\n()\[\]"|;][^ '`\t\n()\[\]"|;]*/
syn region squareString start=/\(\\\)\@<!'/ skip=/\\[\\']/ end=/'/ contains=@Spell
syn match squareNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
syn match squareNumber "-\=\<\d\+\%(_\d\+\)*\>"
syn match squareBoolean /true/
syn match squareBoolean /false/
syn match squareBoolean /nil/
syn match squareComment /;.*$/ contains=@Spell
syn region schemeForm matchgroup=schemeParentheses start="\[" end="\]" contains=ALL
syn cluster schemeSyntaxCluster contains=schemeFunction,schemeKeyword,schemeSyntax
syn keyword squareSyntax let
syn keyword squareSyntax begin
syn keyword squareSyntax if
syn keyword squareSyntax cond
syn keyword squareSyntax while
syn keyword squareSyntax print
syn keyword squareSyntax println
syn keyword squareSyntax callcc
syn keyword squareSyntax vec
syn keyword squareSyntax obj
syn keyword squareFunction +
syn keyword squareFunction -
syn keyword squareFunction *
syn keyword squareFunction /
syn keyword squareFunction +=
syn keyword squareFunction -=
syn keyword squareFunction *=
syn keyword squareFunction /=
syn keyword squareFunction <
syn keyword squareFunction <=
syn keyword squareFunction =
syn keyword squareFunction >
syn keyword squareFunction >=
syn keyword squareFunction %
syn keyword squareFunction %=
syn keyword squareFunction ==
syn keyword squareFunction !=
syn keyword squareFunction >>
syn keyword squareFunction <<
syn keyword squareFunction >>=
syn keyword squareFunction <<=
hi def link squareBoolean Boolean
hi def link squareComment Comment
hi def link squareFunction Function
hi def link squareIdentifier Normal
hi def link squareKeyword Type
hi def link squareNumber Number
hi def link squareParentheses Normal
hi def link squareString String
hi def link squareSyntax Statement
let b:did_square_syntax = 1
unlet b:did_square_syntax
let b:current_syntax = 'square'
let &cpo = s:cpo
unlet s:cpo