Module Cobol_lsp.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 in filename. This function is temporary and is expected to be replaced once a better way of finding the qualname is implemented.

val preproc_element_at_position : filename:string -> Lsp.Types.Position.t -> Cobol_parser.Outputs.artifacts -> TYPES.element_in_context option

preproc_element_at_position ~filename pos artifacts seeks a relevant syntactic element at position pos, using only parsing artifacts artifacts.

val element_at_position : filename:string -> Lsp.Types.Position.t -> Cobol_unit.Types.group -> Cobol_parser.Outputs.artifacts -> TYPES.element_at_position

element_at_position ~filename pos group artifacts seeks the compilation unit name and relevant syntactic element at the given position pos in filename, in typed compilation group group with associated parsing artifacts artifacts.

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