this one at least compiles

This commit is contained in:
🪞👃🪞 2025-07-19 07:55:56 +03:00
parent a145e332de
commit 291b917970
7 changed files with 416 additions and 198 deletions

View file

@ -81,7 +81,7 @@ impl ExposeImpl {
/// Generated by [tengri_proc::expose].
impl ::tengri::dsl::FromDsl<#state> for #t {
fn try_from_dsl (state: &#state, dsl: &impl Dsl) -> Perhaps<Self> {
Ok(Some(match dsl.val() {
Ok(Some(match dsl.dsl() {
#arms
_ => { return Ok(None) }
}))
@ -93,7 +93,7 @@ impl ExposeImpl {
let formatted_type = format!("{}", quote! { #t });
if &formatted_type == "bool" {
return quote! {
::tengri::dsl::DslVal::Sym(s) => match s.as_ref() {
::tengri::dsl::Val::Sym(s) => match s.as_ref() {
":true" => true,
":false" => false,
#variants
@ -110,16 +110,16 @@ impl ExposeImpl {
Span::call_site()
);
return quote! {
::tengri::dsl::DslVal::Num(n) => TryInto::<#t>::try_into(n)
::tengri::dsl::Val::Num(n) => TryInto::<#t>::try_into(n)
.unwrap_or_else(|_|panic!(#num_err)),
::tengri::dsl::DslVal::Sym(s) => match s.as_ref() {
::tengri::dsl::Val::Sym(s) => match s.as_ref() {
#variants
_ => { return Ok(None) }
},
}
}
return quote! {
::tengri::dsl::DslVal::Sym(s) => match s.as_ref() {
::tengri::dsl::Val::Sym(s) => match s.as_ref() {
#variants
_ => { return Ok(None) }
},