Various progress, doesnt compile

Added prelude, made lambdas a single-token prefix like NS, made progress on implementations, removed const line type
This commit is contained in:
2025-07-31 00:30:41 +02:00
parent 19f2c6426a
commit 769c6cfc9f
31 changed files with 450 additions and 250 deletions

View File

@@ -0,0 +1,20 @@
use orchid_extension::atom::TypAtom;
use orchid_extension::atom_owned::get_own_instance;
use orchid_extension::tree::{GenMember, comments, fun, prefix};
use crate::Int;
use crate::macros::instantiate_tpl::InstantiateTplCall;
use crate::macros::mactree::MacTree;
pub fn gen_macro_lib() -> Vec<GenMember> {
prefix("macros", [comments(
["This is an internal function, you can't obtain a value of its argument type.", "hidden"],
fun(true, "instantiate_tpl", |tpl: TypAtom<MacTree>, right: Int| async move {
InstantiateTplCall {
tpl: get_own_instance(tpl).await,
argc: right.0.try_into().unwrap(),
argv: Vec::new(),
}
}),
)])
}