test top level expr parsing

This commit is contained in:
🪞👃🪞 2025-01-18 22:17:10 +01:00
parent d14d67172c
commit 9756862091
7 changed files with 129 additions and 82 deletions

View file

@ -6,7 +6,7 @@ impl<A> When<A> { pub fn new (c: bool, a: A) -> Self { Self(c, a) } }
pub struct Either<A, B>(pub bool, pub A, pub B);
impl<A, B> Either<A, B> { pub fn new (c: bool, a: A, b: B) -> Self { Self(c, a, b) } }
try_from_expr!(<'a, E>: When<RenderBox<'a, E>>: |state, iter| {
if let Some((Token { value: Value::Key("when"), .. }, _)) = iter.next() {
if let Some(Token { value: Value::Key("when"), .. }) = iter.peek() {
let iter = iter.clone();
let condition = iter.next();
if let Some((ref condition, _)) = condition {