Preserve the order of type and classes definitions
This commit is contained in:
parent
073ccc2603
commit
845d084658
1 changed files with 4 additions and 4 deletions
|
@ -197,15 +197,15 @@ let rec copy_array pass dest src = match dest.l_ty with
|
|||
*)
|
||||
|
||||
let program_types p =
|
||||
let add_type acc pd = match pd with
|
||||
let add_type pd acc = match pd with
|
||||
| Ptype ty -> ty :: acc
|
||||
| _ -> acc
|
||||
in
|
||||
List.fold_left add_type [] p.p_desc
|
||||
List.fold_right add_type p.p_desc []
|
||||
|
||||
let program_classes p =
|
||||
let add_class acc pd = match pd with
|
||||
let add_class pd acc = match pd with
|
||||
| Pclass cd -> cd :: acc
|
||||
| _ -> acc
|
||||
in
|
||||
List.fold_left add_class [] p.p_desc
|
||||
List.fold_right add_class p.p_desc []
|
||||
|
|
Loading…
Reference in a new issue