_diffctx/config/
parsers.rs1use once_cell::sync::Lazy;
2
3pub struct ParsersConfig {
4 pub generic_max_lines: usize,
5 pub sub_fragment_threshold_lines: u32,
6 pub sub_fragment_target_lines: u32,
7 pub max_sub_depth: u32,
8 pub max_recursion_depth: u32,
9 pub container_search_max_depth: u32,
10 pub min_fragment_lines: u32,
11}
12
13impl Default for ParsersConfig {
14 fn default() -> Self {
15 Self {
16 generic_max_lines: 200,
17 sub_fragment_threshold_lines: 30,
18 sub_fragment_target_lines: 20,
19 max_sub_depth: 3,
20 max_recursion_depth: 500,
21 container_search_max_depth: 3,
22 min_fragment_lines: 1,
23 }
24 }
25}
26
27pub static PARSERS: Lazy<ParsersConfig> = Lazy::new(ParsersConfig::default);