forked from yhirose/cpp-peglib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpeg.vim
More file actions
28 lines (17 loc) · 629 Bytes
/
peg.vim
File metadata and controls
28 lines (17 loc) · 629 Bytes
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
set commentstring=#\ %s
syn match pegAssign /<-/
syn match pegAssign2 /←/
syn match pegName /\v[a-zA-Z_][a-zA-Z0-9_]*/
syn match pegLineComment '#.*'
syn region pegStringD start=/\v"/ skip=/\v\\./ end=/\v"/
syn region pegStringS start=/\v'/ skip=/\v\\./ end=/\v'/
syn region pegClass start=/\v\[/ skip=/\v\\./ end=/\v]/
"syn match pegOperator /\(*\|?\|+\|!\|\.\|\~\)/
hi def link pegAssign Statement
hi def link pegAssign2 Statement
hi def link pegName Identifier
hi def link pegLineComment Comment
hi def link pegStringD String
hi def link pegStringS String
hi def link pegClass String
let b:current_syntax = "peg"