Bram Moolenaar | 6103699 | 2005-10-12 20:54:52 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: trustees |
| 3 | " Maintainer: Nima Talebi <nima@it.net.au> |
| 4 | " Last Change: 2005-10-12 |
| 5 | |
| 6 | if version < 600 |
| 7 | syntax clear |
| 8 | elseif exists("b:current_syntax") |
| 9 | finish |
| 10 | endif |
| 11 | |
| 12 | syntax case match |
| 13 | syntax sync minlines=0 maxlines=0 |
| 14 | |
| 15 | " Errors & Comments |
| 16 | syntax match tfsError /.*/ |
| 17 | highlight link tfsError Error |
| 18 | syntax keyword tfsSpecialComment TODO XXX FIXME contained |
| 19 | highlight link tfsSpecialComment Todo |
| 20 | syntax match tfsComment ~\s*#.*~ contains=tfsSpecialComment |
| 21 | highlight link tfsComment Comment |
| 22 | |
| 23 | " Operators & Delimiters |
| 24 | highlight link tfsSpecialChar Operator |
| 25 | syntax match tfsSpecialChar ~[*!+]~ contained |
| 26 | highlight link tfsDelimiter Delimiter |
| 27 | syntax match tfsDelimiter ~:~ contained |
| 28 | |
| 29 | " Trustees Rules - Part 1 of 3 - The Device |
| 30 | syntax region tfsRuleDevice matchgroup=tfsDeviceContainer start=~\[/~ end=~\]~ nextgroup=tfsRulePath oneline |
| 31 | highlight link tfsRuleDevice Label |
| 32 | highlight link tfsDeviceContainer PreProc |
| 33 | |
| 34 | " Trustees Rules - Part 2 of 3 - The Path |
| 35 | syntax match tfsRulePath ~/[-_a-zA-Z0-9/]*~ nextgroup=tfsRuleACL contained contains=tfsDelimiter |
| 36 | highlight link tfsRulePath String |
| 37 | |
| 38 | " Trustees Rules - Part 3 of 3 - The ACLs |
| 39 | syntax match tfsRuleACL ~\(:\(\*\|[+]\{0,1\}[a-zA-Z0-9/]\+\):[RWEBXODCU!]\+\)\+$~ contained contains=tfsDelimiter,tfsRuleWho,tfsRuleWhat |
| 40 | syntax match tfsRuleWho ~\(\*\|[+]\{0,1\}[a-zA-Z0-9/]\+\)~ contained contains=tfsSpecialChar |
| 41 | highlight link tfsRuleWho Identifier |
| 42 | syntax match tfsRuleWhat ~[RWEBXODCU!]\+~ contained contains=tfsSpecialChar |
| 43 | highlight link tfsRuleWhat Structure |