Struct valkyrie_ast::LetBindNode
source · pub struct LetBindNode {
pub pattern: PatternNode,
pub type_hint: Option<ExpressionKind>,
pub body: Option<ExpressionKind>,
pub span: Range<u32>,
}Expand description
let mut pattern = expression
let x;
let x: i32;
let x = 1;
let x: i32 = 1;
let mut x: i32 = 1;
let (x, ) = 1
let Some(x) = expr;
Fields§
§pattern: PatternNodeThe annotation of the variable
type_hint: Option<ExpressionKind>The type of the variable
body: Option<ExpressionKind>The default value of the variable
span: Range<u32>The range of the node
Implementations§
source§impl LetBindNode
impl LetBindNode
pub fn canonicalization(self) -> Vec<VariableDeclaration>
Trait Implementations§
source§impl Clone for LetBindNode
impl Clone for LetBindNode
source§fn clone(&self) -> LetBindNode
fn clone(&self) -> LetBindNode
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 Debug for LetBindNode
impl Debug for LetBindNode
source§impl From<LetBindNode> for StatementKind
impl From<LetBindNode> for StatementKind
source§fn from(o: LetBindNode) -> Self
fn from(o: LetBindNode) -> Self
Converts to this type from the input type.
source§impl Hash for LetBindNode
impl Hash for LetBindNode
source§impl PartialEq for LetBindNode
impl PartialEq for LetBindNode
source§fn eq(&self, other: &LetBindNode) -> bool
fn eq(&self, other: &LetBindNode) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for LetBindNode
impl StructuralPartialEq for LetBindNode
Auto Trait Implementations§
impl RefUnwindSafe for LetBindNode
impl Send for LetBindNode
impl Sync for LetBindNode
impl Unpin for LetBindNode
impl UnwindSafe for LetBindNode
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