(&mut self, f: impl FnOnce(&mut Self) -> T)
| 963 | /// Grows the stack for recursive parser calls only after shallow nesting is exceeded. |
| 964 | #[inline] |
| 965 | fn with_recursion<T>(&mut self, f: impl FnOnce(&mut Self) -> T) -> T { |
| 966 | self.recursion_depth += 1; |
| 967 | |
| 968 | let result = if self.recursion_depth > Self::MAX_UNCHECKED_RECURSION_DEPTH { |
| 969 | self.grow_stack(f) |
| 970 | } else { |
| 971 | f(self) |
| 972 | }; |
| 973 | |
| 974 | self.recursion_depth -= 1; |
| 975 | result |
| 976 | } |
| 977 | |
| 978 | #[cold] |
| 979 | fn grow_stack<T>(&mut self, f: impl FnOnce(&mut Self) -> T) -> T { |
no test coverage detected