Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

Commit

Permalink
codemap: added a -ocaml_mli_filter, useful when work on c-- source
Browse files Browse the repository at this point in the history
  • Loading branch information
pad committed Nov 9, 2010
1 parent 1bc48c9 commit 150f469
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions commons/file_type.ml
Expand Up @@ -286,3 +286,6 @@ let string_of_pl x =
| Web _ -> raise Todo
*)


let is_syncweb_obj_file file =
file =~ ".*md5sum_"
2 changes: 2 additions & 0 deletions commons/file_type.mli
Expand Up @@ -43,6 +43,8 @@ val file_type_of_file:

val is_textual_file:
Common.filename -> bool
val is_syncweb_obj_file:
Common.filename -> bool

(* specialisations *)
val webpl_type_of_file:
Expand Down
14 changes: 13 additions & 1 deletion h_program-visual/treemap_pl.ml
Expand Up @@ -278,7 +278,19 @@ let ocaml_filter_file file =
match File_type.file_type_of_file file with
| PL (ML _)
| PL (Makefile)
-> true
->
(* todo: should be done in file_type_of_file *)
not (File_type.is_syncweb_obj_file file)
| _ -> false

let ocaml_mli_filter_file file =
match File_type.file_type_of_file file with
| PL (ML "mli")
| PL (Makefile)
->
(* todo: should be done in file_type_of_file *)
not (File_type.is_syncweb_obj_file file) &&
not (file =~ ".*/commons/")
| _ -> false


Expand Down
1 change: 1 addition & 0 deletions h_program-visual/treemap_pl.mli
Expand Up @@ -12,6 +12,7 @@ val anamorphic_diviser_of_file:
val no_filter_file: Common.filename -> bool
val ex_filter_file: Common.filename -> bool
val ocaml_filter_file: Common.filename -> bool
val ocaml_mli_filter_file: Common.filename -> bool
val pad_filter_file: Common.filename -> bool

(* default treemap *)
Expand Down
3 changes: 3 additions & 0 deletions main_codemap.ml
Expand Up @@ -259,6 +259,9 @@ let options () = [
"-ocaml_filter", Arg.Unit (fun () ->
filter := Treemap_pl.ocaml_filter_file),
" ";
"-ocaml_mli_filter", Arg.Unit (fun () ->
filter := Treemap_pl.ocaml_mli_filter_file),
" ";

"-verbose" , Arg.Set Flag.verbose_visual,
" ";
Expand Down

0 comments on commit 150f469

Please sign in to comment.