1 if !exists("main_syntax")
4 " elseif exists("b:current_syntax")
7 let main_syntax = 'ac3d'
10 "setlocal iskeyword=46,95,97-122
12 syn keyword ac3dIdentifier AC3Db
13 syn region ac3dMaterial start=+^MATERIAL+ end=+$+ contains=ac3dSTringS,ac3dStringD,ac3dMatKeyword
14 syn match ac3dError display +^OBJECT+
15 syn match ac3dObject display +^OBJECT\s\+\(world\|group\|poly\)\s*$+
16 syn match ac3dMaterial display +^SURF.*+
17 syn region ac3dStringS start=+'+ end=+'+
18 syn region ac3dStringD start=+"+ end=+"+
19 syn match ac3dFunction display +^\(crease\|mat\|texture\|texrep\|texoff\|url\|data\|refs\)+
20 syn match ac3dFunction display +^\(numvert\|numsurf\|kids\|name\|SURF\|loc\)+
21 syn keyword ac3dMatKeyword MATERIAL rgb amb emis spec shi trans
25 " Define the default highlighting.
26 " For version 5.7 and earlier: only when not done already
27 " For version 5.8 and later: only when an item doesn't have highlighting yet
28 if version >= 508 || !exists("did_ac3d_syn_inits")
30 let did_ac3d_syn_inits = 1
31 command -nargs=+ HiLink hi link <args>
33 command -nargs=+ HiLink hi def link <args>
35 HiLink ac3dMatKeyword Statement
36 HiLink ac3dStringS String
37 HiLink ac3dStringD String
38 HiLink ac3dIdentifier Identifier
39 HiLink ac3dObject Identifier
41 HiLink ac3dFunction Function
42 HiLink ac3dComment Comment
43 HiLink ac3dSpecial Special
44 HiLink ac3dCharacter Character
45 HiLink ac3dNumber Number
46 HiLink ac3dFloat Float
47 HiLink ac3dIdentifier Identifier
48 HiLink ac3dConditional Conditional
49 HiLink ac3dRepeat Repeat
50 HiLink ac3dOperator Operator
52 HiLink ac3dError Error
53 HiLink ac3dBoolean Boolean
57 let b:current_syntax = "ac3d"
58 if main_syntax == 'ac3d'