Add ? to C operator highlighting

This commit is contained in:
Kenneth Benzie 2016-09-04 23:24:14 +01:00
parent 1eceb9c847
commit 01735f9e25

View File

@ -7,13 +7,14 @@
" ^ ^ ^ ^ ^ ^
syn match cDelimiter '[()\[\]{}:;]'
" Match single character operators, ordering within the [] is important
syn match cOperator '[\*=\.\^\~+-,&|!%]'
syn match cOperator '[\*=\.\^\~+-,&|!%?]'
" Match single character operators if they are surrounded by white space: / < >
" ^ ^ ^
syn match cOperator '\(\s\zs\/\s\ze\|\s\zs<\s\ze\|\s\zs>\s\ze\)'
" Match multi character operators
syn match cOperator '\(+=\|-=\|\*=\|/=\|%=\|\ˆ=\|&=\||=\|<<\|>>\|>>=\)'
syn match cOperator '\(<<=\|==\|!=\|<=\|>=\|&&\|||\|++\|--\|->\*\|->\)'
" TODO: Match : in ternary operator as cOperator
" Match function expressions: expr()
" ^^^^
syn match cFunction '\w[A-Za-z0-9_]*\ze\s*('