Module INTERNAL.Lookup

module Visitor = Cobol_common.Visitor
module TYPES : sig ... end

Type definitions to help representing and querying (partially) parsed COBOL programs.

val lexloc_of_qualname_in : filename:string -> Cobol_ptree.qualname -> Cobol_common.Srcloc.lexloc

lexloc_of_qualname_in ~filename qualname returns the full location of qualname, from the first qualifier to the last. This function is temporary and is expected to be replaced once a better way of getting this location is found.

val qualname_at_pos : filename:string -> Cobol_ptree.qualname -> Lsp.Types.Position.t -> Cobol_ptree.qualname

qualname_at_pos ~filename qualname pos returns the qualname built from all the qualifiers of qualname that are after or at position pos ion filename. This function is temporary and is expected to be replaced once a better way of finding the qualname is implemented.

val element_at_position : uri:Lsp.Uri.t -> Lsp.Types.Position.t -> Stdlib.Set.Make(Cobol_unit__.Unit_collections.M).t -> TYPES.element_at_position

element_at_position pos group seeks the compilation unit name and qualified name at the given position pos, in typed compilation group group.

val cobol_unit_at_pos : filename:string -> Lsp.Types.Position.t -> Stdlib.Set.Make(Cobol_unit__.Unit_collections.M).t -> Cobol_unit__.Unit_types.cobol_unit option
val last_cobol_unit_before_pos : filename:string -> Lsp.Types.Position.t -> Stdlib.Set.Make(Cobol_unit__.Unit_collections.M).t -> Cobol_unit__.Unit_types.cobol_unit option
val copy_at_pos : filename:string -> Lsp.Types.Position.t -> Cobol_ptree__.Compilation_group.compilation_group -> TYPES.copy_operation option
val type_at_pos : filename:string -> Lsp.Types.Position.t -> Stdlib.Set.Make(Cobol_unit__.Unit_collections.M).t -> TYPES.approx_typing_info list
val proc_at_pos : filename:string -> Lsp.Types.Position.t -> Stdlib.Set.Make(Cobol_unit__.Unit_collections.M).t -> TYPES.procedure_at_position