Struct semantic_analyzer::ast::FunctionStatement
source · pub struct FunctionStatement<'a, E: ExtendedExpression> {
pub name: FunctionName<'a>,
pub parameters: Vec<FunctionParameter<'a>>,
pub result_type: Type<'a>,
pub body: Vec<BodyStatement<'a, E>>,
}Expand description
FunctionStatement it’s one of the most basic element of AST.
Basic entity of program logic. It contains function declaration and
function body.
Fields§
§name: FunctionName<'a>Function name
parameters: Vec<FunctionParameter<'a>>Function parameters
result_type: Type<'a>Function result type
body: Vec<BodyStatement<'a, E>>Function body
Trait Implementations§
source§impl<'a, E: Clone + ExtendedExpression> Clone for FunctionStatement<'a, E>
impl<'a, E: Clone + ExtendedExpression> Clone for FunctionStatement<'a, E>
source§fn clone(&self) -> FunctionStatement<'a, E>
fn clone(&self) -> FunctionStatement<'a, E>
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, E: Debug + ExtendedExpression> Debug for FunctionStatement<'a, E>
impl<'a, E: Debug + ExtendedExpression> Debug for FunctionStatement<'a, E>
source§impl<E: ExtendedExpression> From<FunctionStatement<'_, E>> for FunctionStatement
impl<E: ExtendedExpression> From<FunctionStatement<'_, E>> for FunctionStatement
source§fn from(value: FunctionStatement<'_, E>) -> Self
fn from(value: FunctionStatement<'_, E>) -> Self
Converts to this type from the input type.
source§impl<E: ExtendedExpression> GetLocation for FunctionStatement<'_, E>
impl<E: ExtendedExpression> GetLocation for FunctionStatement<'_, E>
fn location(&self) -> CodeLocation
source§impl<E: ExtendedExpression> GetName for FunctionStatement<'_, E>
impl<E: ExtendedExpression> GetName for FunctionStatement<'_, E>
source§impl<'a, E: PartialEq + ExtendedExpression> PartialEq for FunctionStatement<'a, E>
impl<'a, E: PartialEq + ExtendedExpression> PartialEq for FunctionStatement<'a, E>
source§fn eq(&self, other: &FunctionStatement<'a, E>) -> bool
fn eq(&self, other: &FunctionStatement<'a, E>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl<'a, E: ExtendedExpression> StructuralPartialEq for FunctionStatement<'a, E>
Auto Trait Implementations§
impl<'a, E> RefUnwindSafe for FunctionStatement<'a, E>where
E: RefUnwindSafe,
impl<'a, E> Send for FunctionStatement<'a, E>where
E: Send,
impl<'a, E> Sync for FunctionStatement<'a, E>where
E: Sync,
impl<'a, E> Unpin for FunctionStatement<'a, E>
impl<'a, E> UnwindSafe for FunctionStatement<'a, E>where
E: UnwindSafe,
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