2 " Language: Cocci (SmPL)
3 " Author: Alexander Færøy <ahf@0x90.dk>
4 " Copyright: Copyright (c) 2009 Alexander Færøy
5 " License: You may redistribute this under the same terms as Vim itself.
7 if &compatible || v:version < 603 || exists("b:current_syntax")
12 syn keyword CocciKeywords identifier type parameter constant expression contained
13 syn keyword CocciKeywords statement function local list fresh position idexpression contained
15 syn region CocciGroup matchgroup=CocciGroupDelim start="@[^@]*@" end="@@" contains=CocciKeywords
17 syn match CocciLineRemoved "^-.*"
18 syn match CocciLineAdded "^+.*"
19 syn match CocciComment "//.*"
22 syn match CocciOperator "\.\.\."
23 syn match CocciOperator "when"
27 syn match CocciError "^[ \t][+-].*"
30 hi def link CocciLineRemoved Special
31 hi def link CocciLineAdded Identifier
32 hi def link CocciError Error
33 hi def link CocciKeywords Keyword
34 hi def link CocciGroupDelim PreProc
35 hi def link CocciComment Comment
36 hi def link CocciOperator Operator
38 let b:current_syntax = "cocci"