Add ? to C operator highlighting
This commit is contained in:
parent
1eceb9c847
commit
01735f9e25
@ -7,13 +7,14 @@
|
|||||||
" ^ ^ ^ ^ ^ ^
|
" ^ ^ ^ ^ ^ ^
|
||||||
syn match cDelimiter '[()\[\]{}:;]'
|
syn match cDelimiter '[()\[\]{}:;]'
|
||||||
" Match single character operators, ordering within the [] is important
|
" 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: / < >
|
" 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\)'
|
syn match cOperator '\(\s\zs\/\s\ze\|\s\zs<\s\ze\|\s\zs>\s\ze\)'
|
||||||
" Match multi character operators
|
" Match multi character operators
|
||||||
syn match cOperator '\(+=\|-=\|\*=\|/=\|%=\|\ˆ=\|&=\||=\|<<\|>>\|>>=\)'
|
syn match cOperator '\(+=\|-=\|\*=\|/=\|%=\|\ˆ=\|&=\||=\|<<\|>>\|>>=\)'
|
||||||
syn match cOperator '\(<<=\|==\|!=\|<=\|>=\|&&\|||\|++\|--\|->\*\|->\)'
|
syn match cOperator '\(<<=\|==\|!=\|<=\|>=\|&&\|||\|++\|--\|->\*\|->\)'
|
||||||
|
" TODO: Match : in ternary operator as cOperator
|
||||||
" Match function expressions: expr()
|
" Match function expressions: expr()
|
||||||
" ^^^^
|
" ^^^^
|
||||||
syn match cFunction '\w[A-Za-z0-9_]*\ze\s*('
|
syn match cFunction '\w[A-Za-z0-9_]*\ze\s*('
|
||||||
|
Loading…
x
Reference in New Issue
Block a user