ceevlang/syntax/ceev.vim

42 lines
1.2 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
2023-01-17 20:37:12 +00:00
syntax keyword ceevKeywords let unlet enter exit show hide left right center move
syntax keyword ceevTodos TODO
syntax keyword ceevConstant Character Location Image
2023-01-14 14:06:44 +00:00
2023-01-17 20:37:12 +00:00
" Includes
syntax region ceevSpecials start="%include" end="$"
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
2023-01-17 20:37:12 +00:00
highlight default link ceevSpecials Include
2023-01-14 14:06:44 +00:00
highlight default link ceevTypeNames Type
highlight default link ceevChar Character
highlight default link ceevEscapes SpecialChar
let b:current_syntax = "ceev"