From d479a062d0230dd5097119133581ab1517a8c0c7 Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Mon, 13 Jul 2020 14:35:13 +0200 Subject: [PATCH] fix: Increase recursion limit This helps with demangling some heavily-nested types. I do see some types that have generics nested 7 levels deep or more. Some boost and std types can also lead to very deep nesting. --- src/ast.rs | 2 +- tests/tests.rs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ast.rs b/src/ast.rs index fdd5855..6498dda 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -177,7 +177,7 @@ pub struct ParseContext { impl Default for ParseContext { fn default() -> ParseContext { ParseContext { - max_recursion: 64, + max_recursion: 96, state: Cell::new(ParseContextState::default()), } } diff --git a/tests/tests.rs b/tests/tests.rs index df7f2c9..1071bfd 100755 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -564,3 +564,8 @@ demangles!( ___ZN19URLConnectionClient33_clientInterface_cancelConnectionEP16dispatch_queue_sU13block_pointerFvvE_block_invoke14, "invocation function for block in URLConnectionClient::_clientInterface_cancelConnection(dispatch_queue_s*, void () block_pointer)" ); + +demangles!( + _ZNK8xxxxxxxx14xxxxxxxxxxxxxxINS_14xxxxxxxxxxxxxxINS1_INS1_INS1_INS1_INS1_INS_10xxxxxxxxxxE32xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxEES3_EE22xxxxxxxxxxxxxxxxxxxxxxEES6_EE13xxxxxxxxxxxxxEE17xxxxxxxxxxxxxxxxxEE14xxxxxxxxxxxxxxE8xxxxxxxxE7xxxxxxxRKN4xxxx5xxxxxEb, + "xxxxxxxx::xxxxxxxxxxxxxx, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>, xxxxxxxxxxxxxxxxxxxxxx>, xxxxxxxxxxxxxxxxxxxxxx>, xxxxxxxxxxxxx>, xxxxxxxxxxxxxxxxx>, xxxxxxxxxxxxxx>::xxxxxxxx(xxxxxxx, xxxx::xxxxx const&, bool) const" +);