Type params gen

This commit is contained in:
2026-05-04 17:25:53 +02:00
parent c3844726fe
commit 0192844d27
3 changed files with 20 additions and 2 deletions
+11
View File
@@ -76,6 +76,17 @@ impl GetRust for TypeExpr {
fn get_rust(&self) -> String {
match self {
TypeExpr::Path(path) => get_static_type_path(path),
TypeExpr::PathParams(path, params) => {
format!(
"{}<{}>",
get_static_type_path(path),
params
.iter()
.map(|t| t.get_rust())
.collect::<Vec<_>>()
.join(", ")
)
}
TypeExpr::Tuple(types) => format!(
"({})",
types