Void type
This commit is contained in:
@@ -200,6 +200,7 @@ impl GetMist for TypeExpr {
|
|||||||
Self::Dyn(ty) => {
|
Self::Dyn(ty) => {
|
||||||
format!("dyn {}", ty.get_mist())
|
format!("dyn {}", ty.get_mist())
|
||||||
}
|
}
|
||||||
|
Self::Void => "void".to_string(),
|
||||||
Self::Fn {
|
Self::Fn {
|
||||||
kind,
|
kind,
|
||||||
return_type,
|
return_type,
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ impl GetRust for TypeExpr {
|
|||||||
Self::Dyn(ty) => {
|
Self::Dyn(ty) => {
|
||||||
format!("dyn {}", ty.get_rust())
|
format!("dyn {}", ty.get_rust())
|
||||||
}
|
}
|
||||||
|
Self::Void => "()".to_string(),
|
||||||
Self::Fn {
|
Self::Fn {
|
||||||
kind,
|
kind,
|
||||||
return_type,
|
return_type,
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ pub enum TypeExpr {
|
|||||||
StaticFn(Vec<TypeExpr>, Option<Box<TypeExpr>>),
|
StaticFn(Vec<TypeExpr>, Option<Box<TypeExpr>>),
|
||||||
Tuple(Vec<TypeExpr>),
|
Tuple(Vec<TypeExpr>),
|
||||||
Lifetime(Identifier),
|
Lifetime(Identifier),
|
||||||
|
Void,
|
||||||
Fn {
|
Fn {
|
||||||
kind: FnKind,
|
kind: FnKind,
|
||||||
return_type: Box<TypeExpr>,
|
return_type: Box<TypeExpr>,
|
||||||
|
|||||||
Reference in New Issue
Block a user