aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/cli/src/words.rs6
-rw-r--r--lib/mihi/src/word.rs2
2 files changed, 8 insertions, 0 deletions
diff --git a/crates/cli/src/words.rs b/crates/cli/src/words.rs
index 83e2b5a..3789076 100644
--- a/crates/cli/src/words.rs
+++ b/crates/cli/src/words.rs
@@ -218,6 +218,7 @@ fn prompt_declension(cat: &Category, declension: Declension) -> Result<Declensio
Declension::Third,
Declension::Fourth,
Declension::Fifth,
+ Declension::Other,
];
idx = declension as usize - 1;
}
@@ -355,6 +356,11 @@ fn ask_for_word_based_on(enunciated: String, word: Word) -> Result<Word, String>
],
Some(Declension::Fourth) => vec!["fus"],
Some(Declension::Fifth) => vec!["ies", "es"],
+ // NOTE: for the 'other' declension we only allow to enter
+ // 'indeclinable' words, as that's the only thing that can be
+ // added from now on (e.g. things like 'ego' have been manually
+ // inserted).
+ Some(Declension::Other) => vec!["indeclinable"],
_ => panic!("shouldn't be here :D"),
};
if options.len() == 1 {
diff --git a/lib/mihi/src/word.rs b/lib/mihi/src/word.rs
index b12609b..750562f 100644
--- a/lib/mihi/src/word.rs
+++ b/lib/mihi/src/word.rs
@@ -198,6 +198,8 @@ pub enum Declension {
Third,
Fourth,
Fifth,
+
+ // Used for highly irregular words (e.g. 'īnstar').
Other,
}