mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
wip: overcomplicating it on the way to simplifying it ultimately
This commit is contained in:
parent
92fcb0af8f
commit
dc7b713108
8 changed files with 475 additions and 386 deletions
|
|
@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue