(
source: &str,
max_recursion_depth: u16,
)
| 546 | } |
| 547 | |
| 548 | fn parse_suite_with_recursion_limit( |
| 549 | source: &str, |
| 550 | max_recursion_depth: u16, |
| 551 | ) -> Result<Suite, ParseError> { |
| 552 | parse( |
| 553 | source, |
| 554 | ParseOptions::from(Mode::Module).with_max_recursion_depth(max_recursion_depth), |
| 555 | ) |
| 556 | .map(|parsed| parsed.try_into_module().unwrap().into_suite()) |
| 557 | } |
| 558 | |
| 559 | fn nested_format_spec(prefix: char, depth: usize) -> String { |
| 560 | let mut replacement_field = String::from("{spec}"); |