well, it compiles. fails on run, though

This commit is contained in:
🪞👃🪞 2025-01-18 16:32:04 +01:00
parent a362028ae7
commit d14d67172c
6 changed files with 96 additions and 185 deletions

View file

@ -1,10 +1,10 @@
use crate::*;
pub trait TryFromAtom<T>: Sized {
fn try_from_atom (state: &T, value: Value) -> Option<Self> {
pub trait TryFromAtom<'a, T>: Sized {
fn try_from_atom (state: &'a T, value: Value<'a>) -> Option<Self> {
if let Value::Exp(0, iter) = value { return Self::try_from_expr(state, iter) }
None
}
fn try_from_expr (_state: &T, _iter: TokenIter) -> Option<Self> {
fn try_from_expr (_state: &'a T, _iter: TokenIter<'a>) -> Option<Self> {
None
}
}