fixed up some parsing and removed some edn mentions

This commit is contained in:
🪞👃🪞 2025-01-18 01:54:06 +01:00
parent 5e7b867aba
commit 452bdf9598
15 changed files with 290 additions and 292 deletions

View file

@ -46,16 +46,16 @@ impl TuiIn {
})
}
}
impl EdnInput for TuiIn {
fn matches_edn (&self, token: &str) -> bool {
impl AtomInput for TuiIn {
fn matches_atom (&self, token: &str) -> bool {
if let Some(event) = KeyMatcher::new(token).build() {
&event == self.event()
} else {
false
}
}
fn get_event (item: &EdnItem<impl AsRef<str>>) -> Option<Event> {
match item { EdnItem::Sym(s) => KeyMatcher::new(s).build(), _ => None }
fn get_event (item: &AtomItem<impl AsRef<str>>) -> Option<Event> {
match item { AtomItem::Sym(s) => KeyMatcher::new(s).build(), _ => None }
}
}
struct KeyMatcher {