pub struct SemanticAnalyzer<'t> { /* private fields */ }Expand description
A visitor that performs semantic analysis on an AST.
Implementations§
Source§impl<'t> SemanticAnalyzer<'t>
impl<'t> SemanticAnalyzer<'t>
Sourcepub fn new(text: &'t str) -> SemanticAnalyzer<'t>
pub fn new(text: &'t str) -> SemanticAnalyzer<'t>
Create a new semantic analyzer.
Trait Implementations§
Source§impl Visitor for SemanticAnalyzer<'_>
A visitor that performs semantic analysis on an AST.
impl Visitor for SemanticAnalyzer<'_>
A visitor that performs semantic analysis on an AST.
Source§fn visit_root(&mut self, root: &Root) -> Result<Self::Output, Self::Error>
fn visit_root(&mut self, root: &Root) -> Result<Self::Output, Self::Error>
This method is called on a root node.
Source§fn visit_condition(
&mut self,
condition: &Condition,
) -> Result<Self::Output, Self::Error>
fn visit_condition( &mut self, condition: &Condition, ) -> Result<Self::Output, Self::Error>
This method is called on a condition node.
Source§fn visit_action(
&mut self,
_action: &Action,
) -> Result<Self::Output, Self::Error>
fn visit_action( &mut self, _action: &Action, ) -> Result<Self::Output, Self::Error>
This method is called on an action node.
Source§fn visit_description(
&mut self,
_description: &Description,
) -> Result<Self::Output, Self::Error>
fn visit_description( &mut self, _description: &Description, ) -> Result<Self::Output, Self::Error>
This method is called on an action description node.
Auto Trait Implementations§
impl<'t> Freeze for SemanticAnalyzer<'t>
impl<'t> RefUnwindSafe for SemanticAnalyzer<'t>
impl<'t> Send for SemanticAnalyzer<'t>
impl<'t> Sync for SemanticAnalyzer<'t>
impl<'t> Unpin for SemanticAnalyzer<'t>
impl<'t> UnwindSafe for SemanticAnalyzer<'t>
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