method complete_stats () =
(* When using this visitor no cyclomatic complexity is calculated
during the traversal of the AST. It has to be calculated AFTER
cisiting the entire global function. We revisit on site every tuple
of stats and calculate the last item. *)
let tout = !stats in
if tout <> [] then
let res = ref [] in
let do_it e =
let (fic,func,(a,b,c,d,e,f,g,h)) = e in
begin
if h <> 0 then
prerr_endline "metrics.complete_stats ERROR";
res := List.append !res [(fic,func,(a,b,c,d,e,f,g,a+c-g+2))]
end
in List.iter do_it tout;
stats := !res