Module JavaFrontend__JSourceFileInfo

module Array : sig ... end
val incr_linenum : Stdlib.Lexing.lexbuf -> unit

classic Ocamllex function to update current lexbuf line at each end of line

val end_pos : Stdlib.Lexing.lexbuf -> int * int

position of the char just after lexbuf

val location_suffix : string -> Stdlib.Lexing.lexbuf -> int * int

return the exact position start of the suffix classname in lexbuf

val location_start : Stdlib.Lexing.lexbuf -> int * int

return the position start of lexbuf

type expr =
| AllocExpr
| OtherExpr

We traverse the structure of the source file by recording the encompassing blocks in a stack of frame. We use the stack to recover the full inner class name at bytecode level

type frame = {
short_class_name : string;
is_enum : bool;
next_anonymous_class : int;
opened_blocks : int;
exprs : expr list;
}
type state = {
stack : frame list;
record_location : classname:string -> col:int -> line:int -> unit;
}
val push : frame -> state -> state
exception Missing_opening_bracket
exception Missing_opening_parenthesis
val add_package : string -> state -> state
val pop_class : state -> state
val incr_next_anonymous : state -> state
val add_expr : expr -> state -> state
val pop_exprs : state -> expr * state
val in_field_declaration_area : state -> bool
val get_opened_blocks : state -> int
val is_enum : state -> bool
val get_next_anonymous_class : state -> string
val decr_opened_blocks : state -> state
val incr_opened_blocks : state -> state
val long_class_name : string -> state -> string
val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
val class_scan : state -> Stdlib.Lexing.lexbuf -> unit
val __ocaml_lex_class_scan_rec : state -> Stdlib.Lexing.lexbuf -> int -> unit
val do_at_next_left_bracket : (Stdlib.Lexing.lexbuf -> unit) -> Stdlib.Lexing.lexbuf -> unit
val __ocaml_lex_do_at_next_left_bracket_rec : (Stdlib.Lexing.lexbuf -> unit) -> Stdlib.Lexing.lexbuf -> int -> unit
val search_anonymous_class_body : state -> Stdlib.Lexing.lexbuf -> unit
val __ocaml_lex_search_anonymous_class_body_rec : state -> Stdlib.Lexing.lexbuf -> int -> unit
val found_entrance_of_anonymous_class : state -> Stdlib.Lexing.lexbuf -> unit
val __ocaml_lex_found_entrance_of_anonymous_class_rec : state -> Stdlib.Lexing.lexbuf -> int -> unit
val skip_well_parenthesized_angles : Core_kernel__Int.t -> (Stdlib.Lexing.lexbuf -> unit) -> Stdlib.Lexing.lexbuf -> unit
val __ocaml_lex_skip_well_parenthesized_angles_rec : Core_kernel__Int.t -> (Stdlib.Lexing.lexbuf -> unit) -> Stdlib.Lexing.lexbuf -> int -> unit
val skip_well_parenthesized_parentheses : Core_kernel__Int.t -> (Stdlib.Lexing.lexbuf -> unit) -> Stdlib.Lexing.lexbuf -> unit
val __ocaml_lex_skip_well_parenthesized_parentheses_rec : Core_kernel__Int.t -> (Stdlib.Lexing.lexbuf -> unit) -> Stdlib.Lexing.lexbuf -> int -> unit
val skip_string : (Stdlib.Lexing.lexbuf -> unit) -> Stdlib.Lexing.lexbuf -> unit
val __ocaml_lex_skip_string_rec : (Stdlib.Lexing.lexbuf -> unit) -> Stdlib.Lexing.lexbuf -> int -> unit
val skip_comments : (Stdlib.Lexing.lexbuf -> unit) -> Stdlib.Lexing.lexbuf -> unit
val __ocaml_lex_skip_comments_rec : (Stdlib.Lexing.lexbuf -> unit) -> Stdlib.Lexing.lexbuf -> int -> unit
val collect_class_location : JavaFrontend.JProgramDesc.t -> IBase.SourceFile.t -> Base.unit

We scan source file file and record location of each class declaration

val debug_on_file : Base.string -> Base.unit