diff options
| author | Sébastien Dailly <sebastien@dailly.me> | 2026-03-27 08:48:05 +0100 |
|---|---|---|
| committer | Sébastien Dailly <sebastien@dailly.me> | 2026-03-27 08:48:05 +0100 |
| commit | 830e7c5d27d161b91402414e6ecd49f1ed818bfb (patch) | |
| tree | 448864635d29b1ea66424cbb9e0816fbcf1e1907 /lib/configuration/ast.mli | |
Initial commit
Diffstat (limited to 'lib/configuration/ast.mli')
| -rw-r--r-- | lib/configuration/ast.mli | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/configuration/ast.mli b/lib/configuration/ast.mli new file mode 100644 index 0000000..5eda6f6 --- /dev/null +++ b/lib/configuration/ast.mli @@ -0,0 +1,30 @@ +type setting +type list' = { id : string; source : string } + +val init : unit -> setting + +val get_content : setting -> string -> Model.Reference.t Model.Content.t option +(** Get the content from the setting. *) + +val root_contents : setting -> Model.Reference.t Model.Content.t list +(** Extract all the content in the topological order. + + Only the root content are repored in the list *) + +val register_content : + 'a Type.Id.t -> setting -> ('a * string) Model.Content.t -> unit +(** Register a content and all the associated subcontent in the top level, + giving the possibility to fetch any content or subcontent by is’s name + without traversing the whole tree each time. *) + +exception BrokenLink : ('a Type.Id.t * 'a * string) -> exn +(** Exception raised when a reference in the configuration targets a + non-existing content *) + +val register_list : setting -> list' -> setting + +val check : setting -> (unit, exn) result +(** Check the setting and return the the error as an exception *) + +val tree : ?required:bool -> setting -> Graph_tree.t +val escaped : string -> string |
