Trait Analyzable

Source
pub trait Analyzable {
    // Required methods
    fn analyze(&mut self, parent: Option<Rc<Scope>>) -> AnalyzeReport;
    fn is_resolved(&self) -> bool;
}
Expand description

A trait for types that can be semantically analyzed.

Types implementing this trait can validate their semantic correctness and resolve symbol references within a given scope.

Required Methods§

Source

fn analyze(&mut self, parent: Option<Rc<Scope>>) -> AnalyzeReport

Performs semantic analysis on the type.

§Arguments
  • parent - Optional parent scope containing symbol definitions
§Returns
  • AnalyzeReport of the analysis. Empty if no errors are found.
Source

fn is_resolved(&self) -> bool

Returns true if all of the symbols have been resolved .

Implementations on Foreign Types§

Source§

impl<T: Analyzable> Analyzable for Option<T>

Source§

fn analyze(&mut self, parent: Option<Rc<Scope>>) -> AnalyzeReport

Source§

fn is_resolved(&self) -> bool

Source§

impl<T: Analyzable> Analyzable for Box<T>

Source§

fn analyze(&mut self, parent: Option<Rc<Scope>>) -> AnalyzeReport

Source§

fn is_resolved(&self) -> bool

Source§

impl<T: Analyzable> Analyzable for Vec<T>

Source§

fn analyze(&mut self, parent: Option<Rc<Scope>>) -> AnalyzeReport

Source§

fn is_resolved(&self) -> bool

Implementors§