pub struct AnalysisResult {
pub ast: Option<Schema>,
pub ir: Option<SchemaIr>,
pub diagnostics: Vec<Diagnostic>,
pub tokens: Vec<Token>,
}Expand description
The result of a full analysis pass over a .nautilus source string.
All three fields may be present simultaneously:
astisSomeeven when there are parse errors (partial AST from error recovery).irisSomeonly when there are no validation errors.diagnosticsis non-empty whenever any problem was found.
Fields§
§ast: Option<Schema>Parsed AST (partial when parse errors occurred).
ir: Option<SchemaIr>Fully validated IR (only present when diagnostics is empty).
diagnostics: Vec<Diagnostic>All problems found: lex errors + parse errors + validation errors.
tokens: Vec<Token>Token stream produced by the lexer (best-effort; may be incomplete on lex errors).
Trait Implementations§
Source§impl Clone for AnalysisResult
impl Clone for AnalysisResult
Source§fn clone(&self) -> AnalysisResult
fn clone(&self) -> AnalysisResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AnalysisResult
impl RefUnwindSafe for AnalysisResult
impl Send for AnalysisResult
impl Sync for AnalysisResult
impl Unpin for AnalysisResult
impl UnsafeUnpin for AnalysisResult
impl UnwindSafe for AnalysisResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more