From 650344c2c2b3356d1ef554e265bda8bf9a783466 Mon Sep 17 00:00:00 2001 From: yhirose Date: Wed, 3 Jun 2015 21:31:51 -0400 Subject: [PATCH] Added vim sytax highlight files. --- language/cul.vim | 37 +++++++++++++++++++++++++++++++++++++ peg.vim | 24 ++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 language/cul.vim create mode 100644 peg.vim diff --git a/language/cul.vim b/language/cul.vim new file mode 100644 index 0000000..52a07ed --- /dev/null +++ b/language/cul.vim @@ -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" diff --git a/peg.vim b/peg.vim new file mode 100644 index 0000000..97c44b2 --- /dev/null +++ b/peg.vim @@ -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"