Skip to content

Commit

Permalink
refactor(ast_tools): rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Oct 19, 2024
1 parent 6e356e9 commit 85443d4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tasks/ast_tools/src/derives/estree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ impl Derive for DeriveESTree {
}

fn derive(&mut self, def: &TypeDef, _: &LateCtx) -> TokenStream {
let type_def = match def {
let ts_type_def = match def {
TypeDef::Enum(def) => typescript_enum(def),
TypeDef::Struct(def) => typescript_struct(def),
};
let type_def = quote! {
let ts_type_def = quote! {
#[wasm_bindgen::prelude::wasm_bindgen(typescript_custom_section)]
const TS_APPEND_CONTENT: &'static str = #type_def;
const TS_APPEND_CONTENT: &'static str = #ts_type_def;
};
if let TypeDef::Struct(def) = def {
if def
Expand All @@ -38,7 +38,7 @@ impl Derive for DeriveESTree {
.as_ref()
.is_some_and(|e| e == &ESTreeStructAttribute::CustomSerialize)
{
return type_def;
return ts_type_def;
}
}

Expand All @@ -58,7 +58,7 @@ impl Derive for DeriveESTree {
#body
}
}
#type_def
#ts_type_def
}
} else {
quote! {
Expand All @@ -70,7 +70,7 @@ impl Derive for DeriveESTree {
#body
}
}
#type_def
#ts_type_def
}
}
}
Expand Down

0 comments on commit 85443d4

Please sign in to comment.