mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-04 14:28:22 +00:00
Add #[recursive]
(#1522)
Co-authored-by: Ifeanyi Ubah <ify1992@yahoo.com>
This commit is contained in:
parent
c973df35d6
commit
84e82e6e2e
8 changed files with 93 additions and 2 deletions
|
@ -78,7 +78,10 @@ fn derive_visit(input: proc_macro::TokenStream, visit_type: &VisitType) -> proc_
|
|||
|
||||
let expanded = quote! {
|
||||
// The generated impl.
|
||||
// Note that it uses [`recursive::recursive`] to protect from stack overflow.
|
||||
// See tests in https://github.com/apache/datafusion-sqlparser-rs/pull/1522/ for more info.
|
||||
impl #impl_generics sqlparser::ast::#visit_trait for #name #ty_generics #where_clause {
|
||||
#[cfg_attr(feature = "recursive-protection", recursive::recursive)]
|
||||
fn visit<V: sqlparser::ast::#visitor_trait>(
|
||||
&#modifier self,
|
||||
visitor: &mut V
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue