60 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			VimL
		
	
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			VimL
		
	
	
	
	
	
if exists("b:current_syntax")
 | 
						|
	finish
 | 
						|
endif
 | 
						|
 | 
						|
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
 | 
						|
syn keyword qcStorageClass local var const noref static
 | 
						|
syn keyword qcAttribute    noreturn inline eraseable noerase accumulate last alias deprecated coverage
 | 
						|
 | 
						|
syn keyword qcConstant TRUE FALSE
 | 
						|
 | 
						|
syn match qcNumbers   display transparent "\<\d\|\.\d" contains=qcNumber,qcHexNumber
 | 
						|
syn match qcHexNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
 | 
						|
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
 | 
						|
 | 
						|
hi def link qcAttribute    qcStorageClass
 | 
						|
hi def link qcBuiltin      PreProc
 | 
						|
hi def link qcComment      Comment
 | 
						|
hi def link qcConditional  Conditional
 | 
						|
hi def link qcConstant     Constant
 | 
						|
hi def link qcFrame        Number
 | 
						|
hi def link qcLabel        Label
 | 
						|
hi def link qcLineComment  qcComment
 | 
						|
hi def link qcNumber       Number
 | 
						|
hi def link qcPragma       PreProc
 | 
						|
hi def link qcQuaked       Label
 | 
						|
hi def link qcRepeat       Repeat
 | 
						|
hi def link qcSpecial      SpecialChar
 | 
						|
hi def link qcStatement    Statement
 | 
						|
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
 | 
						|
hi def link qcVector       String
 | 
						|
 | 
						|
let b:current_syntax = "quakec"
 |