pub struct AnalysisContext {
pub program: ProgramModel,
pub is_valid: bool,
pub warnings: Vec<AnalysisWarning>,
}Expand description
Context information from analysis phase.
Fields§
§program: ProgramModelThe analyzed program model.
is_valid: boolWhether the analysis found no critical issues.
warnings: Vec<AnalysisWarning>All warnings encountered during analysis.
Implementations§
Source§impl AnalysisContext
impl AnalysisContext
Sourcepub fn new(program: ProgramModel) -> Self
pub fn new(program: ProgramModel) -> Self
Create a new analysis context for a program.
Sourcepub fn add_warning(
&mut self,
message: String,
file: String,
line: usize,
column: Option<usize>,
source_line: Option<String>,
)
pub fn add_warning( &mut self, message: String, file: String, line: usize, column: Option<usize>, source_line: Option<String>, )
Add a warning with source location.
Sourcepub fn mark_invalid(&mut self)
pub fn mark_invalid(&mut self)
Mark the context as invalid due to critical issues.
Sourcepub fn warning_count(&self) -> usize
pub fn warning_count(&self) -> usize
Get the number of warnings.
Sourcepub fn has_warnings(&self) -> bool
pub fn has_warnings(&self) -> bool
Check if there are any warnings.
Trait Implementations§
Source§impl Clone for AnalysisContext
impl Clone for AnalysisContext
Source§fn clone(&self) -> AnalysisContext
fn clone(&self) -> AnalysisContext
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 AnalysisContext
impl RefUnwindSafe for AnalysisContext
impl Send for AnalysisContext
impl Sync for AnalysisContext
impl Unpin for AnalysisContext
impl UnsafeUnpin for AnalysisContext
impl UnwindSafe for AnalysisContext
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