Add some Default impl.
This commit is contained in:
parent
f3c3e40eb2
commit
608d89645e
@ -1,5 +1,47 @@
|
||||
pub mod node {
|
||||
include!(concat!(env!("OUT_DIR"), "/src/ast/node.rs"));
|
||||
|
||||
impl Default for Parameters {
|
||||
fn default() -> Self {
|
||||
Self::new(vec![])
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for GenericParameters {
|
||||
fn default() -> Self {
|
||||
Self::new(Box::new(IdentifierList::new(vec![])))
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for GenericArguments {
|
||||
fn default() -> Self {
|
||||
Self::new(Box::new(TypeUseList::new(vec![])))
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for ImplementsList {
|
||||
fn default() -> Self {
|
||||
Self::new(vec![])
|
||||
}
|
||||
}
|
||||
|
||||
impl ReturnType {
|
||||
pub fn void() -> Self {
|
||||
Self::new(Box::new(TypeUse::PrimitiveType(PrimitiveType::Void)))
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for ClassConstructor {
|
||||
fn default() -> Self {
|
||||
Self::new(vec![])
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for ClosureParameters {
|
||||
fn default() -> Self {
|
||||
Self::new(vec![])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub mod build {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user