module TomlReader = Read_conf.Make (Helpers.Toml.Decode) let t_of_toml : Otoml.t -> (ImporterSyntax.t, string) result = fun toml -> let version = Otoml.find_or ~default:ImporterSyntax.latest_version toml (Otoml.get_integer ~strict:false) [ "version" ] in match version with | n when n = ImporterSyntax.latest_version -> TomlReader.read toml | _ -> Printf.eprintf "Unsuported version : %d\n" version; exit 1 let expression_from_string s = Read_conf.ExpressionParser.of_string Read_conf.ExpressionParser.path s