ceevlang/syntax/ceev.vim

38 lines
1.1 KiB
VimL
Raw Normal View History

if exists("b:current_syntax") | finish | endif
2023-01-14 14:06:44 +00:00
set iskeyword=a-z,A-Z,-,*,_,!,@
" Language keywords
syntax keyword ceevKeywords let unlet enter exit show hide
syntax keyword ceevTodos TODO
syntax keyword ceevConstant Character Location Image
2023-01-14 14:06:44 +00:00
" Comments
syntax region ceevCommentLine start="//" end="$" contains=ceevTodos
2023-01-14 14:06:44 +00:00
" String literals
syntax region ceevString start=/\v"/ skip=/\v\\./ end=/\v"/ contains=ceevEscapes
" Char literals
syntax region ceevChar start=/\v'/ skip=/\v\\./ end=/\v'/ contains=ceevEscapes
" Escape literals \n, \r, ....
syntax match ceevEscapes display contained "\\[nr\"']"
" Number literals
syntax region ceevNumber start=/\s\d/ skip=/\d/ end=/\s/
2023-01-14 14:06:44 +00:00
" Set highlights
highlight default link ceevTodos Todo
highlight default link ceevKeywords Keyword
highlight default link ceevConstant Constant
highlight default link ceevCommentLine Comment
highlight default link ceevString String
highlight default link ceevNumber Number
highlight default link ceevTypeNames Type
highlight default link ceevChar Character
highlight default link ceevEscapes SpecialChar
let b:current_syntax = "ceev"