vyre-libs 0.7.2

vyre Category A library ecosystem - pure-IR compositions over foundation IR and primitive-owned kernels
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Substrate-neutral parsing primitives (AST, delimiters, bracket matching).

pub mod ast;

pub(crate) fn ascii_whitespace_expr(value: vyre_foundation::ir::Expr) -> vyre_foundation::ir::Expr {
    use vyre_foundation::ir::Expr;
    let byte_eq = |candidate: Expr, byte: u8| Expr::eq(candidate, Expr::u32(u32::from(byte)));
    Expr::or(
        byte_eq(value.clone(), b' '),
        Expr::or(
            byte_eq(value.clone(), b'\n'),
            Expr::or(byte_eq(value.clone(), b'\r'), byte_eq(value, b'\t')),
        ),
    )
}