From bc6ae542938474cca22e083bc1dffe5dd9c9d44d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Pant=C5=AF=C4=8Dek?= Date: Sat, 1 Apr 2023 19:52:18 +0200 Subject: [PATCH] Member record meta-validity documentation. --- MODULES.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/MODULES.md b/MODULES.md index f2b3684..6149812 100644 --- a/MODULES.md +++ b/MODULES.md @@ -150,6 +150,52 @@ Sets the value of given ```key``` in dictionary stored as section ```sec``` in given ```mr``` structure to the new ```value``` if and only if it is not already present. + (member-source mr) + +* ```mr``` - a member record structure + +Returns a list of strings representing the source file of this member +record. + + (member-record-info mr key [default]) + +* ```mr``` - a member record structure +* ```key``` - key (symbol) to retrieve +* ```default``` - optional default value + +Like ```dict-ref``` returns the value associated with ```key``` in +section ```'info```. If ```default``` is provided, it is passed on to +the underlying ```dict-ref```. + + (member-missing-keys mr) + +* ```mr``` - a member record structure + +Returns a list of keys (symbols) from within the ```'info``` section +of given ```mr``` that have ```#f``` values (indicating they are +missing mandatory fields in the source). + + (member-has-highlights? mr) + +* ```mr``` - a member record structure + +Returns ```#t``` if given ```mr``` has at least one source highlight. + + (member-record-usable? mr) + +* ```mr``` - a member record structure + +Returns ```#t``` if it is possible to work with this member - mainly +that the ```'info``` section contains the ```'member``` key. + + (member-has-problems? mr) + +* ```mr``` - a member record structure + +Returns ```#t``` if there are any ```'error``` type highlights in +```mr```, or it is not ```member-record-usable?``` or the +```member-id``` is not 4-digit prime number. + ### Member Parser ### Members Directory