Project

General

Profile

Revision 6efbcb73 src/lusic.ml

View differences:

src/lusic.ml
26 26
module HeaderMod = C_backend_header.EmptyMod
27 27
module Header = C_backend_header.Main (HeaderMod)
28 28

  
29
(* extracts a header from a program representing module own *)
30
let extract_header own prog =
29
(* extracts a header from a program representing module owner = dirname/basename *)
30
let extract_header dirname basename prog =
31
  let owner = dirname ^ "/" ^ basename in
31 32
 List.fold_right
32 33
   (fun decl header ->
33
     if decl.top_decl_itf || decl.top_decl_owner <> own then header else
34
(*Format.eprintf "Lusic.extract_header: owner = %s decl_owner = %s@." owner decl.top_decl_owner;*)
35
     if decl.top_decl_itf || decl.top_decl_owner <> owner then header else
34 36
    match decl.top_decl_desc with
35 37
    | Node nd        -> { decl with top_decl_desc = ImportedNode (Corelang.get_node_interface nd) } :: header 
36 38
    | ImportedNode _ -> header

Also available in: Unified diff