(&mut self, f: impl FnOnce(&mut Self) -> T)
| 162 | /// Grows the stack for recursive parser calls only after shallow nesting is exceeded. |
| 163 | #[inline] |
| 164 | fn with_recursion<T>(&mut self, f: impl FnOnce(&mut Self) -> T) -> T { |
| 165 | self.recursion_depth += 1; |
| 166 | |
| 167 | let result = if self.recursion_depth > MAX_UNCHECKED_RECURSION_DEPTH { |
| 168 | self.grow_stack(f) |
| 169 | } else { |
| 170 | f(self) |
| 171 | }; |
| 172 | |
| 173 | self.recursion_depth -= 1; |
| 174 | result |
| 175 | } |
| 176 | |
| 177 | #[cold] |
| 178 | fn grow_stack<T>(&mut self, f: impl FnOnce(&mut Self) -> T) -> T { |
no test coverage detected