vim-quakec/syntax/quakec.vim

60 lines
2.2 KiB
VimL
Raw Normal View History

2019-09-16 16:25:15 -07:00
if exists("b:current_syntax")
finish
2018-01-24 08:56:53 -08:00
endif
2019-09-16 16:25:15 -07:00
syn keyword qcStatement goto break return continue
syn keyword qcConditional if else switch
syn keyword qcRepeat while for do
syn keyword qcLabel case default
syn keyword qcStructure struct union enum typedef
syn keyword qcTodo contained TODO FIXME XXX
syn keyword qcQuaked contained QUAKED
syn keyword qcType void float vector string entity
2019-09-16 17:20:27 -07:00
syn keyword qcStorageClass local var const noref static
syn keyword qcAttribute noreturn inline eraseable noerase accumulate last alias deprecated coverage
2019-09-16 16:25:15 -07:00
syn keyword qcConstant TRUE FALSE
2019-10-24 20:35:50 -07:00
syn match qcNumbers display transparent "\<\d\|\.\d" contains=qcNumber
syn match qcNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
2019-09-16 16:25:15 -07:00
syn match qcNumber display contained "\([0-9]\+\(\.[0-9]*f\=\)\=\|\.[0-9]\+f\=\)\>"
syn region qcVector display oneline start=+'+ end=+'+ keepend contains=@Spell
syn region qcString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=qcSpecial,@Spell
syn match qcSpecial display contained "\\\(x\x\+\|.\|$\)"
syn match qcBuiltin display "\#\d\+"
syn match qcFrame display "\$[^\d\W]\w*\>"
syn match qcPragma display "\$\(flags\|base\|cd\|frame\|modelname\|origin\|scale\|skin\)\>"
syn cluster qcCommentGroup contains=qcTodo,qcQuaked
syn region qcLineComment start="//" skip="\\$" end="$" keepend contains=@qcCommentGroup,@Spell
syn region qcComment start="/\*" end="\*/" contains=@qcCommentGroup,@Spell fold extend
syn sync ccomment qcComment minlines=10
2019-09-16 17:20:27 -07:00
hi def link qcAttribute qcStorageClass
hi def link qcBuiltin PreProc
2019-09-16 16:25:15 -07:00
hi def link qcComment Comment
hi def link qcConditional Conditional
2019-09-16 17:20:27 -07:00
hi def link qcConstant Constant
2019-09-16 16:25:15 -07:00
hi def link qcFrame Number
2019-09-16 17:20:27 -07:00
hi def link qcLabel Label
hi def link qcLineComment qcComment
hi def link qcNumber Number
2019-09-16 16:25:15 -07:00
hi def link qcPragma PreProc
2019-09-16 17:20:27 -07:00
hi def link qcQuaked Label
hi def link qcRepeat Repeat
hi def link qcSpecial SpecialChar
2019-09-16 16:25:15 -07:00
hi def link qcStatement Statement
2019-09-16 17:20:27 -07:00
hi def link qcStorageClass StorageClass
hi def link qcString String
hi def link qcStructure Structure
hi def link qcTodo Todo
hi def link qcType Type
2019-10-24 20:35:50 -07:00
hi def link qcVector Number
2018-01-24 08:56:53 -08:00
let b:current_syntax = "quakec"