Superbol_project.Config
module TYPES : sig ... end
include module type of TYPES
with type path = TYPES.path
and type config = TYPES.config
type config = TYPES.config = {
mutable cobol_config : Cobol_config.t;
mutable source_format : Cobol_config.source_format_spec;
mutable libpath : path list;
mutable libexts : string list;
mutable indent_config : (string * int) list;
toml_handle : Ezr_toml.toml_handle;
}
type t = config
val new_default : unit -> t
val load_file :
?verbose:bool ->
string ->
t Cobol_common.Diagnostics.with_diags
load_file ~verbose config_filename
loads the given project configuration file. Raises ERROR
or Sys_error
in case of failure.
val save : ?verbose:bool -> config_filename:string -> t -> unit
val reload :
?verbose:bool ->
config_filename:string ->
t ->
bool Cobol_common.Diagnostics.with_diags
reload ~verbose ~config_filename config
returns true
, possibly along diagnostics, if the reloaded configuration has changed.
val copybook_lookup_config_for :
filename:string ->
t ->
Cobol_common.Copybook.lookup_config
copybook_lookup_config_for ~filename project
constructs a copybook lookup configuration (that notably indicates directory names where copybooks are looked up) for a given source file name, in a project with the given configuration.
Those may also raise ERROR
val cobol_config_from_dialect_name :
verbose:bool ->
string ->
Cobol_config.t Cobol_common.Diagnostics.with_diags
val cobol_source_format : string -> Cobol_config.source_format_spec