summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/tree.mli
blob: 7fa5fad7aba7bc108512a9c2a85c237719ded5f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
open Types

type special_export = Re_export_all | Fake_export_all

type exports = {
  export_ok : (context * string) list;
  export_auto : (context * string) list;
  export_tags : (string * (context * string) list) list;
  special_export : special_export option;
} 


type uses = (string * ((context * string) list option * pos)) list

type per_package = {
    file_name : string ;
    package_name : string ; has_package_name : bool ;
    vars_declared : (context * string, pos * bool ref) Hashtbl.t;
    imported : ((context * string) * (string * bool ref)) list option ref;
    exports : exports ;
    uses : uses ;
    required_packages : (string * pos) list ;
    body : fromparser list;
    isa : (string * pos) list option ;
    lines_starts : int list ;
    build_time : int ;
    from_cache : bool ;
    from_basedir : bool ;
  }

val ignore_package : string -> unit
val use_lib : string list ref
val uses_external_package : string -> bool
val findfile : string list -> string -> string

val get_global_info_from_package : bool -> int -> fromparser list -> per_package list
val get_vars_declaration : (context * string * string, pos) Hashtbl.t -> per_package -> unit

val die_with_pos : string * int * int -> string -> 'a
val warn_with_pos : string * int * int -> string -> unit

val fold_tree : ('a -> fromparser -> 'a option) -> 'a -> fromparser -> 'a
val from_qw : fromparser -> (context * string) list