123456789101112131415161718192021222324252627282930313233343536373839404142434445464748(* Yoann Padioleau
*
* Copyright (C) 2012 Facebook
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation, with the
* special exception on linking described in file license.txt.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file
* license.txt for more details.
*)moduleFT=File_typemoduleV=Visitor_c(*****************************************************************************)(* Filenames *)(*****************************************************************************)letfind_source_files_of_dir_or_filesxs=Common.files_of_dir_or_files_no_vcs_nofilterxs|>List.filter(funfilename->matchFile_type.file_type_of_filefilenamewith|FT.PL(FT.C("l"|"y"))->false|FT.PL(FT.C_)->(* todo: fix syncweb so don't need this! *)not(FT.is_syncweb_obj_filefilename)|_->false)|>Common.sort(*****************************************************************************)(* ii_of_any *)(*****************************************************************************)letii_of_anyany=letglobals=ref[]inletvisitor=V.mk_visitor{V.default_visitorwithV.kinfo=(fun(_k,_)i->Common.pushiglobals)}invisitorany;List.rev!globals