First steps for the macro system

This commit is contained in:
2025-08-01 18:32:55 +02:00
parent f87185ef88
commit 051b5e666f
18 changed files with 356 additions and 166 deletions

View File

@@ -39,7 +39,7 @@ pub async fn parse_folder(
));
};
let name = ctx.i.i(os_str_to_string(name_os, &ctx.i, [sr]).await?).await;
let ns = ns.push(name.clone(), &ctx.i).await;
let ns = ns.suffix([name.clone()], &ctx.i).await;
let sr = SrcRange::new(0..0, &ns);
let mut items = Vec::new();
let mut stream = match fs::read_dir(path).await {
@@ -67,7 +67,7 @@ pub async fn parse_folder(
} else if path.extension() == Some(OsStr::new("orc")) {
let name_os = path.file_stem().expect("If there is an extension, there must be a stem");
let name = ctx.i.i(os_str_to_string(name_os, &ctx.i, [sr]).await?).await;
let ns = ns.push(name, &ctx.i).await;
let ns = ns.suffix([name], &ctx.i).await;
let sr = SrcRange::new(0..0, &ns);
let mut file = match File::open(path).await {
Err(e) => return Err(async_io_err(e, &ctx.i, [sr]).await),