mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
test top level expr parsing
This commit is contained in:
parent
d14d67172c
commit
9756862091
7 changed files with 129 additions and 82 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue