1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
use Arc as Rc;
use crate*;
use crate;
use Error;
/// Iron — B4: hard cap on parser recursion depth. 128 is comfortably
/// above any hand-written Aver shape (the deepest production
/// expression in the corpus measures ~12 levels) and comfortably
/// below the threshold where the parser starts unwinding the test
/// runner's 2 MiB thread stack on the next nested `(`. The
/// trade-off is intentional — users hit the typed error long
/// before the runtime hits SIGSEGV, and the 2 MiB worker stack
/// `cargo test` allocates per thread is the binding constraint,
/// not the 8 MiB main-thread default in standalone CLI runs.
pub const MAX_PARSE_DEPTH: u32 = 64;