wip: start replacing EdnViewData with EdnProvide

This commit is contained in:
🪞👃🪞 2025-01-12 15:26:37 +01:00
parent fc06fb863b
commit 1ff35baea9
8 changed files with 151 additions and 113 deletions

View file

@ -78,10 +78,12 @@ fn match_exp <'a, E: Output + 'a, State: EdnViewData<E>> (
) -> Box<dyn Render<E> + 'a> {
match (head, tail) {
(Key("when"), [c, a]) => When(s.get_bool(c.to_ref()),
(Key("when"), [c, a]) => When(
s.get_bool(c.to_ref()),
s.get_content(a.to_ref())).boxed(),
(Key("either"),[c, a, b]) => Either(s.get_bool(c.to_ref()),
(Key("either"),[c, a, b]) => Either(
s.get_bool(c.to_ref()),
s.get_content(a.to_ref()),
s.get_content(b.to_ref())).boxed(),