Struct valkyrie_ast::ConstructNewNode
source · pub struct ConstructNewNode {
pub annotations: AnnotationNode,
pub namepath: NamePathNode,
pub generics: Vec<GenericCallTerm>,
pub arguments: ArgumentsList,
pub body: Vec<CollectorTerm>,
pub span: Range<u32>,
}
Expand description
new stack Type⦓G⦔(args) { body }
new stack Type<G>(**args) {
value,
pair(key, value),
key: value,
[1]: value,
[1, 2:3]: body,
}
let body = new stack Type<G>(*args);
body.collect(value);
body.collect(pair(key, value));
body.key = value; # call setter
body[1] = value; # call setter
body[1, 2:3] = value; # call setter
Fields§
§annotations: AnnotationNode
The annotations for new
constructor
namepath: NamePathNode
The constructed type
generics: Vec<GenericCallTerm>
new List<T>()
arguments: ArgumentsList
new Stack()
body: Vec<CollectorTerm>
new List<T> { ... }
span: Range<u32>
The range of the node
Trait Implementations§
source§impl Clone for ConstructNewNode
impl Clone for ConstructNewNode
source§fn clone(&self) -> ConstructNewNode
fn clone(&self) -> ConstructNewNode
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 ConstructNewNode
impl Debug for ConstructNewNode
source§impl From<ConstructNewNode> for ExpressionKind
impl From<ConstructNewNode> for ExpressionKind
source§fn from(o: ConstructNewNode) -> Self
fn from(o: ConstructNewNode) -> Self
Converts to this type from the input type.
source§impl Hash for ConstructNewNode
impl Hash for ConstructNewNode
source§impl PartialEq for ConstructNewNode
impl PartialEq for ConstructNewNode
source§fn eq(&self, other: &ConstructNewNode) -> bool
fn eq(&self, other: &ConstructNewNode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ValkyrieNode for ConstructNewNode
impl ValkyrieNode for ConstructNewNode
impl Eq for ConstructNewNode
impl StructuralPartialEq for ConstructNewNode
Auto Trait Implementations§
impl RefUnwindSafe for ConstructNewNode
impl Send for ConstructNewNode
impl Sync for ConstructNewNode
impl Unpin for ConstructNewNode
impl UnwindSafe for ConstructNewNode
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