Update highlighting

This commit is contained in:
2026-04-10 19:37:41 +10:00
parent 16569d7355
commit 605d0a87b1

View File

@@ -5,37 +5,41 @@ if exists("b:current_syntax")
endif
" Keywords
syn keyword solsticeConditional if
syn keyword solsticeRepeat while
syn keyword solsticeKeyword def struct return use
syn keyword solsticeType int string bool double char
syn keyword solsticeBoolean true false
syn keyword solsKeyword puts if while def lambda return use struct ground
syn keyword solsBool true false
" Built-in functions
syn keyword solsticeBuiltin puts print println input
" Types
syn keyword solsType int double string char bool fun template object
" Data Types
syn match solsticeNumber "\d\+\(\.\d\+\)\="
syn region solsticeString start=/"/ end=/"/
syn match solsticeCharacter /'[^']'/
" 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 solsticeOperator "==\|!=\|>=\|<=\|++\|--\|+\=\|-\=\|\*=\|\/="
syn match solsticeOperator "[><=+\-*/]"
syn match solsOperator /+\|-\|\*\|\/\|=\|!\|>\|<\|+=\|-=\|\*=\|\/=\|++\|--\|==\|!=\|>=\|<=/
" Delimiters
syn match solsticeDelimiter "[{()}]"
syn match solsDelimiter /[{}(),;]/
hi def link solsticeConditional Conditional
hi def link solsticeRepeat Repeat
hi def link solsticeKeyword Keyword
hi def link solsticeType Type
hi def link solsticeBoolean Boolean
hi def link solsticeBuiltin Function
hi def link solsticeNumber Number
hi def link solsticeString String
hi def link solsticeCharacter Character
hi def link solsticeOperator Operator
hi def link solsticeDelimiter Delimiter
" 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"