Enum semantic_analyzer::ast::BodyStatement
source · pub enum BodyStatement<'a> {
LetBinding(LetBinding<'a>),
Binding(Binding<'a>),
FunctionCall(FunctionCall<'a>),
If(IfStatement<'a>),
Loop(Vec<LoopBodyStatement<'a>>),
Expression(Expression<'a>),
Return(Expression<'a>),
}Expand description
BodyStatement one of the basic AST elements.
It’s part of Function body.
Variants§
LetBinding(LetBinding<'a>)
Let-binding function declaration
Binding(Binding<'a>)
Binding function declaration
FunctionCall(FunctionCall<'a>)
Function call
If(IfStatement<'a>)
If-condition control flow statement
Loop(Vec<LoopBodyStatement<'a>>)
Loop control flow statement
Expression(Expression<'a>)
Expression statement
Return(Expression<'a>)
Return statement
Trait Implementations§
source§impl<'a> Clone for BodyStatement<'a>
impl<'a> Clone for BodyStatement<'a>
source§fn clone(&self) -> BodyStatement<'a>
fn clone(&self) -> BodyStatement<'a>
Returns a copy 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 moresource§impl<'a> Debug for BodyStatement<'a>
impl<'a> Debug for BodyStatement<'a>
source§impl From<BodyStatement<'_>> for BodyStatement
impl From<BodyStatement<'_>> for BodyStatement
source§fn from(value: BodyStatement<'_>) -> Self
fn from(value: BodyStatement<'_>) -> Self
Converts to this type from the input type.
source§impl<'a> PartialEq for BodyStatement<'a>
impl<'a> PartialEq for BodyStatement<'a>
source§fn eq(&self, other: &BodyStatement<'a>) -> bool
fn eq(&self, other: &BodyStatement<'a>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl<'a> StructuralPartialEq for BodyStatement<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for BodyStatement<'a>
impl<'a> Send for BodyStatement<'a>
impl<'a> Sync for BodyStatement<'a>
impl<'a> Unpin for BodyStatement<'a>
impl<'a> UnwindSafe for BodyStatement<'a>
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