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
//! Structured representation of an RLM FINAL() answer.
//!
//! The oracle validator parses the raw answer string into one of
//! these variants so it can choose the right verification strategy
//! (grep diff, AST comparison, or "skip").
//!
//! # Examples
//!
//! ```ignore
//! let fmt = FinalAnswerFormat::parse("42:async fn foo()\n100:pub struct Bar");
//! match fmt {
//! FinalAnswerFormat::LineNumberedMatches { matches } => { /* verify */ }
//! _ => { /* skip */ }
//! }
//! ```
pub use extract_count_from_text;
/// A parsed FINAL() answer, classified by its structure.
///
/// Constructed via [`FinalAnswerFormat::parse`] which tries each
/// format in priority order: line-numbered → count → JSON → text.
///
/// # Examples
///
/// ```ignore
/// let fmt = FinalAnswerFormat::parse("Found 15 async functions");
/// assert!(matches!(fmt, FinalAnswerFormat::CountResult { count: 15 }));
/// ```