diff options
Diffstat (limited to 'lib/configuration/ast.ml')
| -rw-r--r-- | lib/configuration/ast.ml | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/configuration/ast.ml b/lib/configuration/ast.ml index 5857902..36ba349 100644 --- a/lib/configuration/ast.ml +++ b/lib/configuration/ast.ml @@ -23,6 +23,7 @@ let get_content : setting -> string -> Model.Reference.t Model.Content.t option fun settings name -> Splay.find name settings.contents exception BrokenLink : ('a Type.Id.t * 'a * string) -> exn +exception NotImplemented : ('a Type.Id.t * 'a * string) -> exn (** Convert the content having fields referencing element by name into content having fields referencing other contents *) @@ -51,7 +52,19 @@ let rec convert : Model.Reference.v (fun () -> match get_content setting name with | Some v -> v - | None -> raise (BrokenLink (ty, value, name)))) + | None -> + (* Also check from the list catalog *) + begin match + List.find_opt setting.lists ~f:(fun { id; _ } -> + String.equal id name) + with + | Some v -> + ignore v; + raise_notrace + (NotImplemented (ty, value, name)) + | None -> + raise_notrace (BrokenLink (ty, value, name)) + end)) field); } in |
