forked from solstice/solstice
46 lines
1.1 KiB
VimL
46 lines
1.1 KiB
VimL
" Vim highlight file for Solstice (.sols)
|
|
|
|
if exists("b:current_syntax")
|
|
finish
|
|
endif
|
|
|
|
" Keywords
|
|
syn keyword solsKeyword puts if while def lambda return use struct ground
|
|
syn keyword solsBool true false
|
|
|
|
" Types
|
|
syn keyword solsType int double string char bool fun template object
|
|
|
|
" Strings and chars
|
|
syn region solsString start=/"/ skip=/\\"/ end=/"/
|
|
syn region solsChar start=/'/ skip=/\\'/ end=/'/
|
|
|
|
" Numbers
|
|
syn match solsFloat /\<[0-9]\+\.[0-9]*\>/
|
|
syn match solsInt /\<[0-9]\+\>/
|
|
|
|
" Operators
|
|
syn match solsOperator /+\|-\|\*\|\/\|=\|!\|>\|<\|+=\|-=\|\*=\|\/=\|++\|--\|==\|!=\|>=\|<=/
|
|
|
|
" Delimiters
|
|
syn match solsDelimiter /[{}(),;]/
|
|
|
|
" Comments
|
|
syn match solsComment /\/\/.*$/
|
|
syn match solsComment /#.*$/
|
|
|
|
" Highlight links
|
|
hi def link solsKeyword Keyword
|
|
hi def link solsBool Boolean
|
|
hi def link solsType Type
|
|
hi def link solsString String
|
|
hi def link solsChar Character
|
|
hi def link solsFloat Float
|
|
hi def link solsInt Number
|
|
hi def link solsOperator Operator
|
|
hi def link solsDelimiter Delimiter
|
|
hi def link solsComment Comment
|
|
|
|
let b:current_syntax = "solstice"
|
|
|