mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-23 04:15:31 +00:00
25 lines
573 B
VimL
25 lines
573 B
VimL
|
|
||
|
syn match pegBoth /=/
|
||
|
syn match pegM2U /->/
|
||
|
syn match pegU2M /<-/
|
||
|
|
||
|
syn match pegName /\v[a-zA-Z_][a-zA-Z0-9_]*/
|
||
|
|
||
|
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 pegBoth Statement
|
||
|
hi def link pegM2U Statement
|
||
|
hi def link pegU2M Statement
|
||
|
|
||
|
hi def link pegName Identifier
|
||
|
|
||
|
hi def link pegStringD String
|
||
|
hi def link pegStringS String
|
||
|
hi def link pegClass String
|
||
|
|
||
|
let b:current_syntax = "peg"
|