blob: 3a7d26e8966d3e1af72ae448b78fd3d7a9c80f99 [file] [log] [blame]
Bram Moolenaar61036992005-10-12 20:54:52 +00001" Vim syntax file
2" Language: trustees
3" Maintainer: Nima Talebi <nima@it.net.au>
Bram Moolenaard592deb2022-06-17 15:42:40 +01004" Last Change: 2022 Jun 14
Bram Moolenaar61036992005-10-12 20:54:52 +00005
Bram Moolenaar89bcfda2016-08-30 23:26:57 +02006" quit when a syntax file was already loaded
7if exists("b:current_syntax")
Bram Moolenaar61036992005-10-12 20:54:52 +00008 finish
9endif
10
11syntax case match
12syntax sync minlines=0 maxlines=0
13
14" Errors & Comments
15syntax match tfsError /.*/
16highlight link tfsError Error
17syntax keyword tfsSpecialComment TODO XXX FIXME contained
18highlight link tfsSpecialComment Todo
19syntax match tfsComment ~\s*#.*~ contains=tfsSpecialComment
20highlight link tfsComment Comment
21
22" Operators & Delimiters
23highlight link tfsSpecialChar Operator
24syntax match tfsSpecialChar ~[*!+]~ contained
25highlight link tfsDelimiter Delimiter
26syntax match tfsDelimiter ~:~ contained
27
28" Trustees Rules - Part 1 of 3 - The Device
29syntax region tfsRuleDevice matchgroup=tfsDeviceContainer start=~\[/~ end=~\]~ nextgroup=tfsRulePath oneline
30highlight link tfsRuleDevice Label
31highlight link tfsDeviceContainer PreProc
32
33" Trustees Rules - Part 2 of 3 - The Path
34syntax match tfsRulePath ~/[-_a-zA-Z0-9/]*~ nextgroup=tfsRuleACL contained contains=tfsDelimiter
35highlight link tfsRulePath String
36
37" Trustees Rules - Part 3 of 3 - The ACLs
38syntax match tfsRuleACL ~\(:\(\*\|[+]\{0,1\}[a-zA-Z0-9/]\+\):[RWEBXODCU!]\+\)\+$~ contained contains=tfsDelimiter,tfsRuleWho,tfsRuleWhat
39syntax match tfsRuleWho ~\(\*\|[+]\{0,1\}[a-zA-Z0-9/]\+\)~ contained contains=tfsSpecialChar
40highlight link tfsRuleWho Identifier
41syntax match tfsRuleWhat ~[RWEBXODCU!]\+~ contained contains=tfsSpecialChar
42highlight link tfsRuleWhat Structure
Bram Moolenaard592deb2022-06-17 15:42:40 +010043
44let b:current_syntax = 'trustees'