forked from Orchid/orchid
exec working up to halt
clean shutdown doesn't for some reason
This commit is contained in:
@@ -12,6 +12,7 @@ use orchid_base::parse::ParseCtx;
|
||||
use orchid_base::reqnot::Requester;
|
||||
|
||||
use crate::api;
|
||||
use crate::expr::BorrowedExprStore;
|
||||
use crate::parser::PTokTree;
|
||||
use crate::system::SysCtx;
|
||||
use crate::tree::GenTokTree;
|
||||
@@ -34,6 +35,7 @@ pub async fn err_not_applicable(i: &Interner) -> OrcErrv {
|
||||
}
|
||||
|
||||
pub struct LexContext<'a> {
|
||||
pub(crate) exprs: &'a BorrowedExprStore,
|
||||
pub ctx: SysCtx,
|
||||
pub text: &'a Tok<String>,
|
||||
pub id: api::ParsId,
|
||||
@@ -52,8 +54,14 @@ impl<'a> LexContext<'a> {
|
||||
let Some(lx) = self.ctx.reqnot().request(api::SubLex { pos: start, id: self.id }).await else {
|
||||
return Err(err_cascade(self.ctx.i()).await);
|
||||
};
|
||||
let tree =
|
||||
PTokTree::from_api(&lx.tree, &mut self.ctx.clone(), &mut (), &self.src, self.ctx.i()).await;
|
||||
let tree = PTokTree::from_api(
|
||||
&lx.tree,
|
||||
&mut (self.ctx.clone(), self.exprs),
|
||||
&mut (),
|
||||
&self.src,
|
||||
self.ctx.i(),
|
||||
)
|
||||
.await;
|
||||
Ok((&self.text[lx.pos as usize..], tree))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user