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

@ -32,7 +32,9 @@ impl<E: Output, A: Content<E>, B: Content<E>> Content<E> for Bsp<A, B> {
}
}
try_from_expr!(<'a, E>: Bsp<RenderBox<'a, E>, RenderBox<'a, E>>: |state, iter| {
if let Some((Token { value: Value::Key(key), .. }, _)) = iter.next() {
panic!("bsp:\n{iter:#?}\n{:#?}", iter.peek());
if let Some(Token { value: Value::Key(key), .. }) = iter.peek() {
let iter = iter.clone().next().unwrap().1;
match key {
"bsp/n" => return Some(Self::n(
state.get_content(&iter.next()?.0.value).expect("no south"),