mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 11:55:30 +00:00
Added vim sytax highlight files.
This commit is contained in:
parent
7d08ed92d9
commit
650344c2c2
37
language/cul.vim
Normal file
37
language/cul.vim
Normal file
@ -0,0 +1,37 @@
|
||||
|
||||
syn match culOperator "\%(+\|-\|/\|*\|=\|\^\|&\||\|!\|>\|<\|%\)=\?"
|
||||
syn match culDecNumber "\<[0-9][0-9_]*"
|
||||
syn match culFuncCall "\w\(\w\)*("he=e-1,me=e-1
|
||||
syn match culError ";"
|
||||
syn match culError "\s*$"
|
||||
syn match culLineComment "\(\/\/\|#\).*" contains=@Spell,javaScriptCommentTodo
|
||||
|
||||
syn keyword culKeyword fn
|
||||
syn keyword culSelf self
|
||||
syn keyword culConditional if else
|
||||
syn keyword culRepeat while
|
||||
syn keyword culBoolean true false
|
||||
syn keyword culCommentTodo TODO FIXME XXX TBD contained
|
||||
syn keyword culStorage mut
|
||||
|
||||
syn region culStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+
|
||||
syn region culStringD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+
|
||||
syn region culComment start="/\*" end="\*/" contains=@Spell,javaScriptCommentTodo
|
||||
|
||||
hi def link culBoolean Boolean
|
||||
hi def link culComment Comment
|
||||
hi def link culCommentTodo Todo
|
||||
hi def link culConditional Conditional
|
||||
hi def link culDecNumber Number
|
||||
hi def link culFuncCall Function
|
||||
hi def link culKeyword Keyword
|
||||
hi def link culLineComment Comment
|
||||
hi def link culOperator Operator
|
||||
hi def link culRepeat Repeat
|
||||
hi def link culSelf Constant
|
||||
hi def link culStorage StorageClass
|
||||
hi def link culStringD String
|
||||
hi def link culStringS String
|
||||
hi def link culError Error
|
||||
|
||||
let b:current_syntax = "cul"
|
24
peg.vim
Normal file
24
peg.vim
Normal file
@ -0,0 +1,24 @@
|
||||
|
||||
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"
|
Loading…
Reference in New Issue
Block a user