101
101
(donothing Ast0.dotsDecl) (donothing Ast0.dotsCase)
102
102
(donothing Ast0.ident) expression (donothing Ast0.typeC) initialiser
103
103
(donothing Ast0.param) (donothing Ast0.decl) statement
104
(donothing Ast0.case_line) topfn in
104
(donothing Ast0.forinfo) (donothing Ast0.case_line) topfn in
105
105
res.VT0.combiner_rec_top_level e
107
107
(* --------------------------------------------------------------------- *)
141
141
| Ast0.InitTag(d) -> Ast0.get_index d
142
142
| Ast0.DeclTag(d) -> Ast0.get_index d
143
143
| Ast0.StmtTag(d) -> Ast0.get_index d
144
| Ast0.ForInfoTag(d) -> Ast0.get_index d
144
145
| Ast0.CaseLineTag(d) -> Ast0.get_index d
145
146
| Ast0.TopTag(d) -> Ast0.get_index d
146
147
| Ast0.IsoWhenTag(_) -> failwith "only within iso phase"
237
238
(* Ast0.IfThen(_,_,_,_,_,aft)
238
239
| Ast0.IfThenElse(_,_,_,_,_,_,_,aft)
239
240
| Ast0.While(_,_,_,_,_,aft)
240
| Ast0.For(_,_,_,_,_,_,_,_,_,aft)
241
| Ast0.For(_,_,_,_,_,_,_,_,aft)
241
242
| Ast0.Iterator(_,_,_,_,_,aft) ->
242
243
redo_branched (do_nothing r k s) aft*)
243
244
| Ast0.FunDecl((info,bef),fninfo,name,lp,params,rp,lbrace,body,rbrace) ->
244
245
(Toplevel,info,bef)::(k s)
245
| Ast0.Decl((info,bef),decl) -> (Decl,info,bef)::(k s)
246
| Ast0.Decl((info,bef),decl) ->
247
(Decl,info,bef)::(k s)
246
248
| Ast0.Nest(starter,stmt_dots,ender,whencode,multi) ->
247
249
mcode starter @ r.VT0.combiner_rec_statement_dots stmt_dots @
253
255
r.VT0.combiner_rec_statement s
254
256
| _ -> do_nothing r k s in
259
match Ast0.unwrap s with
260
Ast0.ForDecl((info,bef),decl) ->
261
(Decl,info,bef)::(k s)
256
264
let expression r k e =
257
265
match Ast0.unwrap e with
258
266
Ast0.NestExpr(starter,expr_dots,ender,whencode,multi) ->
313
321
V0.flat_combiner bind option_default
314
322
mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
315
323
edots idots pdots sdots ddots cdots
316
ident expression typeC initialiser param decl statement case_line do_top
324
ident expression typeC initialiser param decl statement forinfo
319
328
let call_collect_minus context_nodes :
437
449
let mk_storage x = Ast.StorageTag x
438
450
let mk_inc_file x = Ast.IncFileTag x
439
451
let mk_statement x = Ast.StatementTag (Ast0toast.statement x)
452
let mk_forinfo x = Ast.ForInfoTag (Ast0toast.forinfo x)
440
453
let mk_case_line x = Ast.CaseLineTag (Ast0toast.case_line x)
441
454
let mk_const_vol x = Ast.ConstVolTag x
442
455
let mk_token x info = Ast.Token (x,Some info)
518
531
(do_nothing mk_statement r k e) @ (info aft)
519
532
| Ast0.While(whl,lp,exp,rp,body,aft) ->
520
533
(do_nothing mk_statement r k e) @ (info aft)
521
| Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,aft) ->
534
| Ast0.For(fr,lp,first,e2,sem2,e3,rp,body,aft) ->
522
535
(do_nothing mk_statement r k e) @ (info aft)
523
536
| Ast0.Iterator(nm,lp,args,rp,body,aft) ->
524
537
(do_nothing mk_statement r k e) @ (info aft)
552
565
(do_nothing mk_ident) (do_nothing mk_expression)
553
566
(do_nothing mk_typeC) (do_nothing mk_init) (do_nothing mk_param)
554
567
(do_nothing mk_declaration)
555
stmt (do_nothing mk_case_line) toplevel
568
stmt (do_nothing mk_forinfo) (do_nothing mk_case_line) toplevel
557
570
let call_collect_plus context_nodes :
558
571
(int * (Ast0.info * Ast.count * Ast.anything) list) list =
1059
1075
(donothing r k e) @ (info aft)
1060
1076
| Ast0.While(whl,lp,exp,rp,body,aft) ->
1061
1077
(donothing r k e) @ (info aft)
1062
| Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,aft) ->
1078
| Ast0.For(fr,lp,first,e2,sem2,e3,rp,body,aft) ->
1063
1079
(donothing r k e) @ (info aft)
1064
1080
| Ast0.Iterator(nm,lp,args,rp,body,aft) ->
1065
1081
(donothing r k e) @ (info aft)
1069
1085
V0.flat_combiner bind option_default
1070
1086
mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
1071
1087
donothing donothing donothing donothing donothing donothing donothing
1073
donothing donothing donothing donothing stmt donothing donothing in
1089
donothing donothing donothing stmt donothing donothing donothing in
1074
1090
res.VT0.combiner_rec_top_level
1076
1092
(* --------------------------------------------------------------------- *)