forked from solstice/solstice
Update highlighting
This commit is contained in:
@@ -5,37 +5,41 @@ if exists("b:current_syntax")
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Keywords
|
" Keywords
|
||||||
syn keyword solsticeConditional if
|
syn keyword solsKeyword puts if while def lambda return use struct ground
|
||||||
syn keyword solsticeRepeat while
|
syn keyword solsBool true false
|
||||||
syn keyword solsticeKeyword def struct return use
|
|
||||||
syn keyword solsticeType int string bool double char
|
|
||||||
syn keyword solsticeBoolean true false
|
|
||||||
|
|
||||||
" Built-in functions
|
" Types
|
||||||
syn keyword solsticeBuiltin puts print println input
|
syn keyword solsType int double string char bool fun template object
|
||||||
|
|
||||||
" Data Types
|
" Strings and chars
|
||||||
syn match solsticeNumber "\d\+\(\.\d\+\)\="
|
syn region solsString start=/"/ skip=/\\"/ end=/"/
|
||||||
syn region solsticeString start=/"/ end=/"/
|
syn region solsChar start=/'/ skip=/\\'/ end=/'/
|
||||||
syn match solsticeCharacter /'[^']'/
|
|
||||||
|
" Numbers
|
||||||
|
syn match solsFloat /\<[0-9]\+\.[0-9]*\>/
|
||||||
|
syn match solsInt /\<[0-9]\+\>/
|
||||||
|
|
||||||
" Operators
|
" Operators
|
||||||
syn match solsticeOperator "==\|!=\|>=\|<=\|++\|--\|+\=\|-\=\|\*=\|\/="
|
syn match solsOperator /+\|-\|\*\|\/\|=\|!\|>\|<\|+=\|-=\|\*=\|\/=\|++\|--\|==\|!=\|>=\|<=/
|
||||||
syn match solsticeOperator "[><=+\-*/]"
|
|
||||||
|
|
||||||
" Delimiters
|
" Delimiters
|
||||||
syn match solsticeDelimiter "[{()}]"
|
syn match solsDelimiter /[{}(),;]/
|
||||||
|
|
||||||
hi def link solsticeConditional Conditional
|
" Comments
|
||||||
hi def link solsticeRepeat Repeat
|
syn match solsComment /\/\/.*$/
|
||||||
hi def link solsticeKeyword Keyword
|
syn match solsComment /#.*$/
|
||||||
hi def link solsticeType Type
|
|
||||||
hi def link solsticeBoolean Boolean
|
" Highlight links
|
||||||
hi def link solsticeBuiltin Function
|
hi def link solsKeyword Keyword
|
||||||
hi def link solsticeNumber Number
|
hi def link solsBool Boolean
|
||||||
hi def link solsticeString String
|
hi def link solsType Type
|
||||||
hi def link solsticeCharacter Character
|
hi def link solsString String
|
||||||
hi def link solsticeOperator Operator
|
hi def link solsChar Character
|
||||||
hi def link solsticeDelimiter Delimiter
|
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"
|
let b:current_syntax = "solstice"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user