blob: ea77ff98dbc91c07f0e6b3e952237258d12febfd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
(* File patterns *)
(* type *)
type filePattern = {
typename : string;
extensions : string list;
mactypes : string list
}
(* /type *)
let cCAMLtoTKfilePattern fp =
let typename = TkQuote (TkToken fp.typename) in
let extensions =
TkQuote (TkTokenList (List.map (fun x -> TkToken x) fp.extensions)) in
let mactypes =
match fp.mactypes with
| [] -> []
| [s] -> [TkToken s]
| _ -> [TkQuote (TkTokenList (List.map (fun x -> TkToken x) fp.mactypes))]
in
TkQuote (TkTokenList (typename :: extensions :: mactypes))
|