Void type

This commit is contained in:
2026-06-28 05:49:35 +02:00
parent 76541040c9
commit dbfcaa9b0d
3 changed files with 3 additions and 1 deletions
+1
View File
@@ -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,
+1 -1
View File
@@ -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,
+1
View File
@@ -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>,