Source file visitor_ml.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
open Ast_ml
type visitor_in = {
kitem: item vin;
ktoplevel: toplevel vin;
kexpr: expr vin;
kpattern: pattern vin;
kty: ty vin;
kfield_decl: field_declaration vin;
kfield_expr: field_and_expr vin;
kfield_pat: field_pattern vin;
ktype_declaration: type_declaration vin;
klet_def: let_def vin;
klet_binding: let_binding vin;
kqualifier: qualifier vin;
kmodule_expr: module_expr vin;
kparameter: parameter vin;
kargument: argument vin;
kinfo: tok vin;
}
and 'a vin = ('a -> unit) * visitor_out -> 'a -> unit
and visitor_out = any -> unit
let default_visitor = {
kinfo = (fun (k,_) x -> k x);
kexpr = (fun (k,_) x -> k x);
kfield_decl = (fun (k,_) x -> k x);
kfield_expr = (fun (k,_) x -> k x);
kty = (fun (k,_) x -> k x);
ktype_declaration = (fun (k,_) x -> k x);
kitem = (fun (k,_) x -> k x);
klet_def = (fun (k,_) x -> k x);
kpattern = (fun (k,_) x -> k x);
klet_binding = (fun (k,_) x -> k x);
kqualifier = (fun (k,_) x -> k x);
kmodule_expr = (fun (k,_) x -> k x);
ktoplevel = (fun (k,_) x -> k x);
kparameter = (fun (k,_) x -> k x);
kargument = (fun (k,_) x -> k x);
kfield_pat = (fun (k,_) x -> k x);
}
let (mk_visitor: visitor_in -> visitor_out) = fun vin ->
let rec v_info x =
let k x = match x with { Parse_info.
token = _v_pinfox; transfo = _v_transfo
} ->
()
in
vin.kinfo (k, all_functions) x
and v_tok v = v_info v
and v_wrap: 'a. ('a -> unit) -> 'a wrap -> unit = fun _of_a (v1, v2) ->
let v1 = _of_a v1 and v2 = v_info v2 in ()
and v_wrap1 _of_a (v1, v2) = let v1 = _of_a v1 and v2 = v_info v2 in ()
and v_wrap2 _of_a (v1, v2) = let v1 = _of_a v1 and v2 = v_info v2 in ()
and v_wrap11 _of_a (v1, v2) = let v1 = _of_a v1 and v2 = v_info v2 in ()
and v_wrap12 _of_a (v1, v2) = let v1 = _of_a v1 and v2 = v_info v2 in ()
and v_wrap13 _of_a (v1, v2) = let v1 = _of_a v1 and v2 = v_info v2 in ()
and v_wrap14 _of_a (v1, v2) = let v1 = _of_a v1 and v2 = v_info v2 in ()
and v_wrap15 _of_a (v1, v2) = let v1 = _of_a v1 and v2 = v_info v2 in ()
and v_wrap16 _of_a (v1, v2) = let v1 = _of_a v1 and v2 = v_info v2 in ()
and v_wrap17 _of_a (v1, v2) = let v1 = _of_a v1 and v2 = v_info v2 in ()
and v_wrap18 _of_a (v1, v2) = let v1 = _of_a v1 and v2 = v_info v2 in ()
and v_paren _of_a (v1, v2, v3) =
let v1 = v_tok v1 and v2 = _of_a v2 and v3 = v_tok v3 in ()
and v_paren1 _of_a (v1, v2, v3) =
let v1 = v_tok v1 and v2 = _of_a v2 and v3 = v_tok v3 in ()
and v_paren2 _of_a (v1, v2, v3) =
let v1 = v_tok v1 and v2 = _of_a v2 and v3 = v_tok v3 in ()
and v_paren11 _of_a (v1, v2, v3) =
let v1 = v_tok v1 and v2 = _of_a v2 and v3 = v_tok v3 in ()
and v_paren12 _of_a (v1, v2, v3) =
let v1 = v_tok v1 and v2 = _of_a v2 and v3 = v_tok v3 in ()
and v_paren13 _of_a (v1, v2, v3) =
let v1 = v_tok v1 and v2 = _of_a v2 and v3 = v_tok v3 in ()
and v_brace _of_a (v1, v2, v3) =
let v1 = v_tok v1 and v2 = _of_a v2 and v3 = v_tok v3 in ()
and v_brace1 _of_a (v1, v2, v3) =
let v1 = v_tok v1 and v2 = _of_a v2 and v3 = v_tok v3 in ()
and v_brace11 _of_a (v1, v2, v3) =
let v1 = v_tok v1 and v2 = _of_a v2 and v3 = v_tok v3 in ()
and v_bracket: 'a. ('a -> unit) -> 'a bracket -> unit = fun
_of_a (v1, v2, v3) ->
let v1 = v_tok v1 and v2 = _of_a v2 and v3 = v_tok v3 in ()
and v_comma_list _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_comma_list1 _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_comma_list2 _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_comma_list11 _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_comma_list12 _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_and_list _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_and_list1 _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_and_list2 _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_and_list13 _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_pipe_list _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_pipe_list1 _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_pipe_list11 _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_pipe_list12 _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_pipe_list13 _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_semicolon_list: 'a. ('a -> unit) -> 'a semicolon_list -> unit = fun _of_a
-> Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_semicolon_list1 _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_semicolon_list2 _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_semicolon_list11 _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_semicolon_list12 _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_star_list _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_star_list1 _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_star_list2 _of_a = Ocaml.v_list (Ocaml.v_either _of_a v_tok)
and v_name = function | Name v1 -> let v1 = v_wrap1 Ocaml.v_string v1 in ()
and v_lname v = v_name v
and v_uname v = v_name v
and v_long_name (v1, v2) =
let v1 = v_qualifier v1 and v2 = v_name v2 in ()
and v_qualifier v =
let k _x =
Ocaml.v_list (fun (v1, v2) -> let v1 = v_name v1 and v2 = v_tok v2 in ()) v
in
vin.kqualifier (k, all_functions) v
and v_ty x =
let k x =
match x with
| TyName v1 -> let v1 = v_long_name v1 in ()
| TyVar ((v1, v2)) -> let v1 = v_tok v1 and v2 = v_name v2 in ()
| TyTuple v1 -> let v1 = v_star_list2 v_ty v1 in ()
| TyTuple2 v1 -> let v1 = v_paren (v_star_list2 v_ty) v1 in ()
| TyFunction ((v1, v2, v3)) ->
let v1 = v_ty v1 and v2 = v_tok v2 and v3 = v_ty v3 in ()
| TyApp ((v1, v2)) -> let v1 = v_ty_args v1 and v2 = v_long_name v2 in ()
| TyTodo -> ()
in
vin.kty (k, all_functions) x
and v_type_declaration x =
let k x =
match x with
| TyAbstract ((v1, v2)) -> let v1 = v_ty_params v1 and v2 = v_name v2 in ()
| TyDef ((v1, v2, v3, v4)) ->
let v1 = v_ty_params v1
and v2 = v_name v2
and v3 = v_tok v3
and v4 = v_type_def_kind v4
in ()
in
vin.ktype_declaration (k, all_functions) x
and v_type_def_kind =
function
| TyCore v1 -> let v1 = v_ty v1 in ()
| TyAlgebric v1 -> let v1 = v_pipe_list1 v_constructor_declaration v1 in ()
| TyRecord v1 ->
let v1 = v_brace1 (v_semicolon_list2 v_label_declaration) v1 in ()
and v_constructor_declaration (v1, v2) =
let v1 = v_name v1 and v2 = v_constructor_arguments v2 in ()
and v_constructor_arguments =
function
| NoConstrArg -> ()
| Of ((v1, v2)) -> let v1 = v_tok v1 and v2 = v_star_list1 v_ty v2 in ()
and
v_label_declaration x =
let k x =
match x with {
fld_mutable = v_fld_mutable;
fld_name = v_fld_name;
fld_tok = v_fld_tok;
fld_type = v_fld_type
} ->
let arg = Ocaml.v_option v_tok v_fld_mutable in
let arg = v_name v_fld_name in
let arg = v_tok v_fld_tok in let arg = v_ty v_fld_type in ()
in
vin.kfield_decl (k, all_functions) x
and v_ty_args =
function
| TyArg1 v1 -> let v1 = v_ty v1 in ()
| TyArgMulti v1 -> let v1 = v_paren2 (v_comma_list2 v_ty) v1 in ()
and v_ty_params =
function
| TyNoParam -> ()
| TyParam1 v1 -> let v1 = v_ty_parameter v1 in ()
| TyParamMulti v1 ->
let v1 = v_paren1 (v_comma_list1 v_ty_parameter) v1 in ()
and v_ty_parameter (v1, v2) = let v1 = v_tok v1 and v2 = v_name v2 in ()
and v_expr v =
let k x =
match x with
| C v1 -> let v1 = v_constant v1 in ()
| L v1 -> let v1 = v_long_name v1 in ()
| Constr ((v1, v2)) ->
let v1 = v_long_name v1 and v2 = Ocaml.v_option v_expr v2 in ()
| Tuple v1 -> let v1 = v_comma_list12 v_expr v1 in ()
| List v1 -> let v1 = v_bracket (v_semicolon_list v_expr) v1 in ()
| ParenExpr v1 -> let v1 = v_paren12 v_expr v1 in ()
| Sequence v1 -> let v1 = v_paren11 v_seq_expr v1 in ()
| Prefix ((v1, v2)) ->
let v1 = v_wrap18 Ocaml.v_string v1 and v2 = v_expr v2 in ()
| Infix ((v1, v2, v3)) ->
let v1 = v_expr v1
and v2 = v_wrap17 Ocaml.v_string v2
and v3 = v_expr v3
in ()
| FunCallSimple ((v1, v2)) ->
let v1 = v_long_name v1 and v2 = Ocaml.v_list v_argument v2 in ()
| FunCall ((v1, v2)) ->
let v1 = v_expr v1 and v2 = Ocaml.v_list v_argument v2 in ()
| RefAccess ((v1, v2)) -> let v1 = v_tok v1 and v2 = v_expr v2 in ()
| RefAssign ((v1, v2, v3)) ->
let v1 = v_expr v1 and v2 = v_tok v2 and v3 = v_expr v3 in ()
| FieldAccess ((v1, v2, v3)) ->
let v1 = v_expr v1 and v2 = v_tok v2 and v3 = v_long_name v3 in ()
| FieldAssign ((v1, v2, v3, v4, v5)) ->
let v1 = v_expr v1
and v2 = v_tok v2
and v3 = v_long_name v3
and v4 = v_tok v4
and v5 = v_expr v5
in ()
| Record v1 -> let v1 = v_brace11 v_record_expr v1 in ()
| ObjAccess ((v1, v2, v3)) ->
let v1 = v_expr v1 and v2 = v_tok v2 and v3 = v_name v3 in ()
| New ((v1, v2)) -> let v1 = v_tok v1 and v2 = v_long_name v2 in ()
| LetIn ((v1, v2, v3, v4, v5)) ->
let v1 = v_tok v1
and v2 = v_rec_opt v2
and v3 = v_and_list13 v_let_binding v3
and v4 = v_tok v4
and v5 = v_seq_expr v5
in ()
| Fun ((v1, v2, v3)) ->
let v1 = v_tok v1
and v2 = Ocaml.v_list v_parameter v2
and v3 = v_match_action v3
in ()
| Function ((v1, v2)) ->
let v1 = v_tok v1 and v2 = v_pipe_list13 v_match_case v2 in ()
| If ((v1, v2, v3, v4, v5)) ->
let v1 = v_tok v1
and v2 = v_seq_expr v2
and v3 = v_tok v3
and v4 = v_expr v4
and v5 =
Ocaml.v_option (fun (v1, v2) -> let v1 = v_tok v1 and v2 = v_expr v2 in ())
v5
in ()
| Match ((v1, v2, v3, v4)) ->
let v1 = v_tok v1
and v2 = v_seq_expr v2
and v3 = v_tok v3
and v4 = v_pipe_list12 v_match_case v4
in ()
| Try ((v1, v2, v3, v4)) ->
let v1 = v_tok v1
and v2 = v_seq_expr v2
and v3 = v_tok v3
and v4 = v_pipe_list11 v_match_case v4
in ()
| While ((v1, v2, v3, v4, v5)) ->
let v1 = v_tok v1
and v2 = v_seq_expr v2
and v3 = v_tok v3
and v4 = v_seq_expr v4
and v5 = v_tok v5
in ()
| For ((v1, v2, v3, v4, v5, v6, v7, v8, v9)) ->
let v1 = v_tok v1
and v2 = v_name v2
and v3 = v_tok v3
and v4 = v_seq_expr v4
and v5 = v_for_direction v5
and v6 = v_seq_expr v6
and v7 = v_tok v7
and v8 = v_seq_expr v8
and v9 = v_tok v9
in ()
| ExprTodo -> ()
in
vin.kexpr (k, all_functions) v
and v_constant =
function
| Int v1 -> let v1 = v_wrap16 Ocaml.v_string v1 in ()
| Float v1 -> let v1 = v_wrap15 Ocaml.v_string v1 in ()
| Char v1 -> let v1 = v_wrap14 Ocaml.v_string v1 in ()
| String v1 -> let v1 = v_wrap13 Ocaml.v_string v1 in ()
and v_record_expr =
function
| RecordNormal v1 -> let v1 = v_semicolon_list12 v_field_and_expr v1 in ()
| RecordWith ((v1, v2, v3)) ->
let v1 = v_expr v1
and v2 = v_tok v2
and v3 = v_semicolon_list11 v_field_and_expr v3
in ()
and v_field_and_expr v =
let k x =
match x with
| FieldExpr ((v1, v2, v3)) ->
let v1 = v_long_name v1 and v2 = v_tok v2 and v3 = v_expr v3 in ()
| FieldImplicitExpr v1 -> let v1 = v_long_name v1 in ()
in
vin.kfield_expr (k, all_functions) v
and v_argument v =
let k x = match x with
| ArgExpr v1 -> let v1 = v_expr v1 in ()
| ArgLabelTilde ((v1, v2)) -> let v1 = v_name v1 and v2 = v_expr v2 in ()
| ArgImplicitTildeExpr ((v1, v2)) ->
let v1 = v_tok v1 and v2 = v_name v2 in ()
| ArgImplicitQuestionExpr ((v1, v2)) ->
let v1 = v_tok v1 and v2 = v_name v2 in ()
| ArgLabelQuestion ((v1, v2)) -> let v1 = v_name v1 and v2 = v_expr v2 in ()
in
vin.kargument (k, all_functions) v
and v_match_action =
function
| Action ((v1, v2)) -> let v1 = v_tok v1 and v2 = v_seq_expr v2 in ()
| WhenAction ((v1, v2, v3, v4)) ->
let v1 = v_tok v1
and v2 = v_seq_expr v2
and v3 = v_tok v3
and v4 = v_seq_expr v4
in ()
and v_match_case (v1, v2) =
let v1 = v_pattern v1 and v2 = v_match_action v2 in ()
and v_for_direction =
function
| To v1 -> let v1 = v_tok v1 in ()
| Downto v1 -> let v1 = v_tok v1 in ()
and v_seq_expr v = v_semicolon_list1 v_expr v
and v_pattern x =
let k x = match x with
| PatVar v1 -> let v1 = v_name v1 in ()
| PatConstant v1 -> let v1 = v_signed_constant v1 in ()
| PatConstr ((v1, v2)) ->
let v1 = v_long_name v1 and v2 = Ocaml.v_option v_pattern v2 in ()
| PatConsInfix ((v1, v2, v3)) ->
let v1 = v_pattern v1 and v2 = v_tok v2 and v3 = v_pattern v3 in ()
| PatTuple v1 -> let v1 = v_comma_list11 v_pattern v1 in ()
| PatList v1 -> let v1 = v_bracket (v_semicolon_list v_pattern) v1 in ()
| PatUnderscore v1 -> let v1 = v_tok v1 in ()
| PatRecord v1 ->
let v1 = v_brace (v_semicolon_list v_field_pattern) v1 in ()
| PatAs ((v1, v2, v3)) ->
let v1 = v_pattern v1 and v2 = v_tok v2 and v3 = v_name v3 in ()
| PatDisj ((v1, v2, v3)) ->
let v1 = v_pattern v1 and v2 = v_tok v2 and v3 = v_pattern v3 in ()
| PatTyped ((v1, v2, v3, v4, v5)) ->
let v1 = v_tok v1
and v2 = v_pattern v2
and v3 = v_tok v3
and v4 = v_ty v4
and v5 = v_tok v5
in ()
| ParenPat v1 -> let v1 = v_paren13 v_pattern v1 in ()
| PatTodo -> ()
in
vin.kpattern (k, all_functions) x
and v_simple_pattern v = Ocaml.v_unit v
and v_labeled_simple_pattern v = v_parameter v
and v_parameter x =
let k x = match x with
| ParamPat v1 -> let v1 = v_pattern v1 in ()
| ParamTodo -> ()
in
vin.kparameter (k, all_functions) x
and v_field_pattern x =
let k x = match x with
| PatField ((v1, v2, v3)) ->
let v1 = v_long_name v1 and v2 = v_tok v2 and v3 = v_pattern v3 in ()
| PatImplicitField v1 -> let v1 = v_long_name v1 in ()
in
vin.kfield_pat (k, all_functions) x
and v_signed_constant =
function
| C2 v1 -> let v1 = v_constant v1 in ()
| CMinus ((v1, v2)) -> let v1 = v_tok v1 and v2 = v_constant v2 in ()
| CPlus ((v1, v2)) -> let v1 = v_tok v1 and v2 = v_constant v2 in ()
and v_let_binding x =
let k x = match x with
| LetClassic v1 -> let v1 = v_let_def v1 in ()
| LetPattern ((v1, v2, v3)) ->
let v1 = v_pattern v1 and v2 = v_tok v2 and v3 = v_seq_expr v3 in ()
in
vin.klet_binding (k, all_functions) x
and
v_let_def x =
let k x =
match x with
{
l_name = v_l_name;
l_params = v_l_args;
l_tok = v_l_tok;
l_body = v_l_body
} ->
let arg = v_name v_l_name in
let arg = Ocaml.v_list v_labeled_simple_pattern v_l_args in
let arg = v_tok v_l_tok in let arg = v_seq_expr v_l_body in ()
in
vin.klet_def (k, all_functions) x
and v_function_def v = Ocaml.v_unit v
and v_module_type v = Ocaml.v_unit v
and v_module_expr v =
let k v =
match v with
| ModuleName v1 ->
let v1 = v_long_name v1 in
()
| ModuleStruct (v1, v2, v3) ->
let v1 = v_tok v1 in
let v2 = Ocaml.v_list v_item v2 in
let v3 = v_tok v3 in
()
| ModuleTodo ->
()
in
vin.kmodule_expr (k, all_functions) v
and v_item x =
let k x =
match x with
| Type ((v1, v2)) ->
let v1 = v_tok v1 and v2 = v_and_list2 v_type_declaration v2 in ()
| Exception ((v1, v2, v3)) ->
let v1 = v_tok v1
and v2 = v_name v2
and v3 = v_constructor_arguments v3
in ()
| External ((v1, v2, v3, v4, v5, v6)) ->
let v1 = v_tok v1
and v2 = v_name v2
and v3 = v_tok v3
and v4 = v_ty v4
and v5 = v_tok v5
and v6 = Ocaml.v_list (v_wrap2 Ocaml.v_string) v6
in ()
| Open ((v1, v2)) -> let v1 = v_tok v1 and v2 = v_long_name v2 in ()
| Val ((v1, v2, v3, v4)) ->
let v1 = v_tok v1
and v2 = v_name v2
and v3 = v_tok v3
and v4 = v_ty v4
in ()
| Let ((v1, v2, v3)) ->
let v1 = v_tok v1
and v2 = v_rec_opt v2
and v3 = v_and_list1 v_let_binding v3
in ()
| Module ((v1, v2, v3, v4)) ->
let v1 = v_tok v1
and v2 = v_uname v2
and v3 = v_tok v3
and v4 = v_module_expr v4
in ()
| ItemTodo v -> v_info v
in
vin.kitem (k, all_functions) x
and v_sig_item v = v_item v
and v_struct_item v = v_item v
and v_rec_opt v = Ocaml.v_option v_tok v
and v_toplevel x =
let k = function
| TopItem v1 -> let v1 = v_item v1 in ()
| ScSc v1 -> let v1 = v_info v1 in ()
| TopSeqExpr v1 -> let v1 = v_seq_expr v1 in ()
| TopDirective v1 -> let v1 = v_info v1 in ()
in
vin.ktoplevel (k, all_functions) x
and v_program v = Ocaml.v_list v_toplevel v
and v_any = function
| Ty v1 -> let v1 = v_ty v1 in ()
| Expr v1 -> let v1 = v_expr v1 in ()
| Pattern v1 -> let v1 = v_pattern v1 in ()
| Item v1 -> let v1 = v_item v1 in ()
| Toplevel v1 -> let v1 = v_toplevel v1 in ()
| Program v1 -> let v1 = v_program v1 in ()
| TypeDeclaration v1 -> let v1 = v_type_declaration v1 in ()
| TypeDefKind v1 -> let v1 = v_type_def_kind v1 in ()
| MatchCase v1 -> let v1 = v_match_case v1 in ()
| FieldDeclaration v1 -> let v1 = v_label_declaration v1 in ()
| LetBinding v1 -> let v1 = v_let_binding v1 in ()
| Constant v1 -> let v1 = v_constant v1 in ()
| Argument v1 -> let v1 = v_argument v1 in ()
| Body v1 -> let v1 = v_seq_expr v1 in ()
| Info v1 -> let v1 = v_info v1 in ()
| InfoList v1 -> let v1 = Ocaml.v_list v_info v1 in ()
and all_functions x = v_any x
in
v_any