wip: overcomplicating it on the way to simplifying it ultimately

This commit is contained in:
🪞👃🪞 2025-01-18 13:38:21 +01:00
parent 92fcb0af8f
commit dc7b713108
8 changed files with 475 additions and 386 deletions

View file

@ -145,12 +145,8 @@ pub trait ViewContext<'a, E: Output>: Sized + Send + Sync
}
#[macro_export] macro_rules! try_delegate {
($s:ident, $atom:expr, $T:ty) => {
if $atom.kind() == TokenKind::Exp {
if let [head, tail @ ..] = $atom.as_slice() {
if let Some(value) = <$T>::try_from_atoms($s, head, tail) {
return Some(value.boxed())
}
}
if let Some(value) = <$T>::try_from_atoms($s, $atom) {
return Some(value.boxed())
}
}
}