mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 11:46:42 +01:00
this one at least compiles
This commit is contained in:
parent
a145e332de
commit
291b917970
7 changed files with 416 additions and 198 deletions
|
|
@ -76,7 +76,7 @@ impl ViewDef {
|
|||
fn builtins (&self) -> impl ToTokens {
|
||||
let Self(ViewMeta { output }, ViewImpl { block, exposed }) = self;
|
||||
let builtins = builtins_with_boxes_output(quote! { #output }).map(|builtin|quote! {
|
||||
::tengri::dsl::DslVal::Exp(_, expr) => return Ok(Some(
|
||||
::tengri::dsl::Val::Exp(_, expr) => return Ok(Some(
|
||||
#builtin::from_dsl(self, expr, ||Box::new("failed to load builtin".into()))?
|
||||
.boxed()
|
||||
)),
|
||||
|
|
@ -89,7 +89,7 @@ impl ViewDef {
|
|||
let exposed = exposed.iter().map(|(key, value)|write_quote(quote! {
|
||||
#key => return Ok(Some(self.#value().boxed())),
|
||||
}));
|
||||
quote! { ::tengri::dsl::DslVal::Sym(key) => match key.as_ref() { #(#exposed)* } }
|
||||
quote! { ::tengri::dsl::Val::Sym(key) => match key.as_ref() { #(#exposed)* } }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue