cpp-peglib/peg.vim

29 lines
629 B
VimL
Raw Permalink Normal View History

2015-06-04 01:31:51 +00:00
set commentstring=#\ %s
2020-08-07 14:21:57 +00:00
syn match pegAssign /<-/
syn match pegAssign2 /←/
2015-06-04 01:31:51 +00:00
syn match pegName /\v[a-zA-Z_][a-zA-Z0-9_]*/
2015-07-08 14:26:29 +00:00
syn match pegLineComment '#.*'
2015-06-04 01:31:51 +00:00
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 /\(*\|?\|+\|!\|\.\|\~\)/
2020-08-07 14:21:57 +00:00
hi def link pegAssign Statement
hi def link pegAssign2 Statement
2015-06-04 01:31:51 +00:00
hi def link pegName Identifier
2015-07-08 14:26:29 +00:00
hi def link pegLineComment Comment
2015-06-04 01:31:51 +00:00
hi def link pegStringD String
hi def link pegStringS String
hi def link pegClass String
let b:current_syntax = "peg"