aboutsummaryrefslogtreecommitdiff
path: root/lib/naming/lang.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/naming/lang.ml')
-rw-r--r--lib/naming/lang.ml7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/naming/lang.ml b/lib/naming/lang.ml
index 147a49b..92c8a9a 100644
--- a/lib/naming/lang.ml
+++ b/lib/naming/lang.ml
@@ -14,6 +14,7 @@ type t = {
rank : table;
colour : table;
term : table;
+ rite : table;
chain : t option; (** consulted when this table misses *)
}
@@ -32,6 +33,7 @@ let season t k = get t (fun x -> x.season) k
let rank t k = get t (fun x -> x.rank) k
let colour t k = get t (fun x -> x.colour) k
let term t k = get t (fun x -> x.term) k
+let rite t k = get t (fun x -> x.rite) k
let weekday_key = [| "sunday"; "monday"; "tuesday"; "wednesday"; "thursday"; "friday"; "saturday" |]
@@ -58,7 +60,7 @@ let fallback_code t = t.fallback_code
let raw =
{ code = "raw"; fallback_code = None; celebration = empty_table; weekday = empty_table;
month = empty_table; season = empty_table; rank = empty_table; colour = empty_table;
- term = empty_table; chain = None }
+ term = empty_table; rite = empty_table; chain = None }
let with_fallback t base = { t with chain = Some base }
@@ -98,6 +100,7 @@ let of_string text =
rank = find "rank";
colour = find "colour";
term = find "term";
+ rite = find "rite";
chain = None })
let keys t =
@@ -105,5 +108,5 @@ let keys t =
List.concat
[ qualify "celebration" t.celebration; qualify "weekday" t.weekday;
qualify "month" t.month; qualify "season" t.season; qualify "rank" t.rank;
- qualify "colour" t.colour; qualify "term" t.term ]
+ qualify "colour" t.colour; qualify "term" t.term; qualify "rite" t.rite ]
|> List.sort compare