pub struct SemanticSyntaxChecker { /* private fields */ }Implementations§
Source§impl SemanticSyntaxChecker
impl SemanticSyntaxChecker
pub fn new() -> SemanticSyntaxChecker
Source§impl SemanticSyntaxChecker
impl SemanticSyntaxChecker
Sourcepub fn visit_stmt<Ctx>(&mut self, stmt: &Stmt, ctx: &Ctx)where
Ctx: SemanticSyntaxContext,
pub fn visit_stmt<Ctx>(&mut self, stmt: &Stmt, ctx: &Ctx)where
Ctx: SemanticSyntaxContext,
Check stmt for semantic syntax errors and update the checker’s internal state.
Note that this method should only be called when traversing stmt and its children. For
example, if traversal of function bodies needs to be deferred, avoid calling visit_stmt on
the function itself until the deferred body is visited too. Failing to defer visit_stmt in
this case will break any internal state that depends on function scopes, such as async
context detection.
Sourcepub fn visit_expr<Ctx>(&mut self, expr: &Expr, ctx: &Ctx)where
Ctx: SemanticSyntaxContext,
pub fn visit_expr<Ctx>(&mut self, expr: &Expr, ctx: &Ctx)where
Ctx: SemanticSyntaxContext,
Check expr for semantic syntax errors and update the checker’s internal state.
Trait Implementations§
Source§impl Debug for SemanticSyntaxChecker
impl Debug for SemanticSyntaxChecker
Source§impl Default for SemanticSyntaxChecker
impl Default for SemanticSyntaxChecker
Source§fn default() -> SemanticSyntaxChecker
fn default() -> SemanticSyntaxChecker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SemanticSyntaxChecker
impl RefUnwindSafe for SemanticSyntaxChecker
impl Send for SemanticSyntaxChecker
impl Sync for SemanticSyntaxChecker
impl Unpin for SemanticSyntaxChecker
impl UnsafeUnpin for SemanticSyntaxChecker
impl UnwindSafe for SemanticSyntaxChecker
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more