1 ## Here is an example for C/C++/Obj-C.
3 syntax "Objective-C" "\.(m|mm|h)$"
5 color type "\b(float|double|CGFloat|id|bool|BOOL|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline|Class|SEL|IMP)\b"
6 color type "\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\b"
7 color type "\b[A-Z][A-Z][[:alnum:]]*\b"
8 color type "\b[A-Za-z0-9_]*_t\b"
9 color type "\bdispatch_[a-zA-Z0-9_]*_t\b"
11 color statement "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__" "__unused" "_Nonnull" "_Nullable" "__block" "__builtin.*"
12 color statement "\b(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\b"
13 color statement "\b(for|if|while|do|else|case|default|switch)\b"
14 color statement "\b(try|throw|catch|operator|new|delete)\b"
15 color statement "\b(goto|continue|break|return)\b"
16 color statement "\b(nonatomic|atomic|readonly|readwrite|strong|weak|assign)\b"
17 color statement "@(encode|end|interface|implementation|class|selector|protocol|synchronized|try|catch|finally|property|optional|required|import|autoreleasepool)"
19 color preproc "^[[:space:]]*#[[:space:]]*(define|include|import|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma).*$"
20 color preproc "__[A-Z0-9_]*__"
22 color special "^[[:space:]]*[#|@][[:space:]]*(import|include)[[:space:]]*[\"|<].*\/?[>|\"][[:space:]]*$"
24 color statement "[.:;,+*|=!\%\[\]]" "<" ">" "/" "-" "&"
26 color constant.number "\b(-?)?[0-9]+\b" "\b\[0-9]+\.[0-9]+\b" "\b0x[0-9A-F]+\b"
27 color constant "@\[(\\.|[^\]])*\]" "@\{(\\.|[^\}])*\}" "@\((\\.|[^\)])*\)"
28 color constant "\b<(\\.[^\>])*\>\b"
29 color constant "\b(nil|NULL|YES|NO|TRUE|true|FALSE|false|self)\b"
30 color constant "\bk[[:alnum]]*\b"
31 color constant.string "\"(\\.|[^\"])*\"" "@\"(\\.|[^\"])*\"" "'.'"
35 color comment start="/\*" end="\*/"