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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! User-facing parse configuration.
/// Parse-time configuration knobs.
///
/// `ParseConfig` is plain data describing how a single parse call should
/// behave. It is independent of [`ParseContext`](super::ParseContext), which
/// owns the knowledge base; the same context can be reused across many calls
/// with different configs.
///
/// Two orthogonal axes control parsing, both with **`true` = stricter**:
///
/// - [`reject_unknown`](Self::reject_unknown): unknown command/environment names
/// become diagnostics (`true`) or `known: false` nodes (`false`).
/// - [`abort_on_error`](Self::abort_on_error): stop at the first error (`true`)
/// or continue parsing to collect every diagnostic (`false`, slower).
/// Recovery may return a read-only document containing `Error` nodes; use
/// [`ParseResult::try_into_document`](super::ParseResult::try_into_document)
/// when downstream code requires a complete tree.
///
/// Named extremes [`STRICT`](Self::STRICT) and [`LENIENT`](Self::LENIENT) cover
/// the two corners where both axes agree. For mixed settings, use struct-update
/// syntax, e.g. `ParseConfig { reject_unknown: true, ..Default::default() }`.