1 2 3 4 5 6 7 8 9 10 11 12 13 14
| let context_table =
["let", Let; "type", Type; "module", Module; "class", Class;
"if", If; "then", Then; "else", Else;
"for", For; "while", While;
"match", Match; "try", Try;
"with", With; "with", With_fields; "function", Function; "fun", Fun
(* missing : Top, With_fields, Body, TBody, Infix *) ]
@ List.map (fun (op, cl) -> op, Paren(op, cl)) paren_table
@ List.map (fun (op, cl) -> op, Begin(op, cl)) begin_table
where paren_table =
["(",")"; "{","}"; "[","]"; "[|","|]"]
and begin_table =
["begin","end"; "struct","end"; "sig","end";
"object","end"; "do","done"] |
Partager