Updated macro system to process and return mactree and then lower it separately to gexpr
Some checks failed
Rust / build (push) Has been cancelled
Some checks failed
Rust / build (push) Has been cancelled
This commit is contained in:
@@ -4,8 +4,11 @@ use crate::macros::utils::{build_macro, mactree, mactreev};
|
||||
|
||||
pub async fn gen_functional_macro_lib() -> Vec<GenMember> {
|
||||
prefix("std::fn", [build_macro(Some(4), ["|>"])
|
||||
.rule(mactreev!("...$" lhs 0 "std::fn::|>" "$" fun "...$" rhs 0), [
|
||||
async |cx, [lhs, fun, rhs]| cx.recur(mactree!(("push" fun ; "push" lhs ;) "pushv" rhs ;)),
|
||||
])
|
||||
.rule(
|
||||
mactreev!("...$" lhs 0 "std::fn::|>" "$" fun "...$" rhs 0),
|
||||
async |mut cx, [lhs, fun, rhs]| {
|
||||
Ok(cx.recur(mactree!("push" fun ; "push" lhs ; "pushv" rhs)).await)
|
||||
},
|
||||
)
|
||||
.finish()])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user