forked from Orchid/orchid
Significantly extended stdlib
This commit is contained in:
@@ -13,7 +13,7 @@ use orchid_base::tree::{Paren, Token};
|
||||
use orchid_base::{clone, sym};
|
||||
use orchid_extension::atom::TAtom;
|
||||
use orchid_extension::conv::{ToExpr, TryFromExpr};
|
||||
use orchid_extension::gen_expr::{call, sym_ref};
|
||||
use orchid_extension::gen_expr::{call, new_atom, sym_ref};
|
||||
use orchid_extension::parser::{PSnippet, ParsCtx, ParsedLine, Parser};
|
||||
|
||||
use crate::macros::let_line::{dealias_mac_v, parse_tokv};
|
||||
@@ -133,7 +133,7 @@ impl Parser for MacroLine {
|
||||
let macro_input =
|
||||
MacTok::S(Paren::Round, with_reporter(dealias_mac_v(&body_mactree, &ctx)).await?)
|
||||
.at(body_sr.pos());
|
||||
Ok(call(sym_ref(sym!(macros::resolve)), [macro_input.to_gen().await]))
|
||||
Ok(call(sym_ref(sym!(macros::resolve)), [new_atom(macro_input)]))
|
||||
}))
|
||||
}
|
||||
let mac_cell = Rc::new(OnceCell::new());
|
||||
@@ -165,7 +165,7 @@ impl Parser for MacroLine {
|
||||
rules,
|
||||
})))
|
||||
};
|
||||
mac_cell.get_or_init(mac_future).await.clone().to_gen().await
|
||||
mac_cell.get_or_init(mac_future).await.clone().map(new_atom).to_gen().await
|
||||
}))
|
||||
}
|
||||
Ok(lines)
|
||||
|
||||
Reference in New Issue
Block a user