Skip to main content

Checker

Struct Checker 

Source
pub struct Checker { /* private fields */ }

Implementations§

Source§

impl Checker

Source

pub fn new() -> Self

Source

pub fn with_strict(self, strict: bool) -> Self

Source

pub fn with_working_dir<P: Into<PathBuf>>(self, dir: P) -> Self

Source

pub fn with_shape_cache( self, cache: Rc<RefCell<BTreeMap<PathBuf, Shape>>>, ) -> Self

Source

pub fn with_import_stack(self, stack: Vec<PathBuf>) -> Self

Source

pub fn with_symbol_table(self, symbol_table: BTreeMap<Rc<str>, Shape>) -> Self

Source

pub fn pop_shape(&mut self) -> Option<Shape>

Source

pub fn result(self) -> Result<BTreeMap<Rc<str>, Shape>, BuildError>

Returns the accumulated symbol table if type checking succeeded, or the first type error encountered (which is typically the root cause).

Trait Implementations§

Source§

impl Visitor for Checker

Source§

fn visit_import(&mut self, _i: &mut ImportDef)

Source§

fn leave_import(&mut self)

Source§

fn visit_include(&mut self, _i: &mut IncludeDef)

Source§

fn leave_include(&mut self)

Source§

fn visit_fail(&mut self, _f: &mut FailDef)

Source§

fn leave_fail(&mut self)

Source§

fn visit_expression(&mut self, expr: &mut Expression)

Source§

fn leave_expression(&mut self, expr: &Expression)

Source§

fn visit_statement(&mut self, stmt: &mut Statement)

Source§

fn leave_statement(&mut self, _stmt: &Statement)

Source§

fn visit_value(&mut self, _val: &mut Value)

Source§

fn leave_value(&mut self, _val: &Value)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Walker for T
where T: Visitor,

Source§

fn walk_statement_list(&mut self, stmts: Vec<&mut Statement>)

Source§

fn walk_statement(&mut self, stmt: &mut Statement)

Source§

fn walk_fieldset(&mut self, fs: &mut FieldList)

Source§

fn walk_expression(&mut self, expr: &mut Expression)

Source§

fn walk_value(&mut self, val: &mut Value)