Type expr parse refactor

This commit is contained in:
2026-05-04 17:45:23 +02:00
parent d263f1a41f
commit 0e84e1ca3d
2 changed files with 38 additions and 8 deletions
+7 -4
View File
@@ -17,12 +17,15 @@ pub enum TypePostfix {
}
#[derive(Debug, Clone, Serialize)]
pub enum TypeExpr {
Path(StaticPath, Vec<TypePostfix>),
PathParams(StaticPath, Vec<TypeExpr>, Vec<TypePostfix>),
Tuple(Vec<TypeExpr>, Vec<TypePostfix>),
pub enum TypeExprKind {
Path(StaticPath),
PathParams(StaticPath, Vec<TypeExpr>),
Tuple(Vec<TypeExpr>),
}
#[derive(Debug, Clone, Serialize)]
pub struct TypeExpr(pub TypeExprKind, pub Vec<TypePostfix>);
#[derive(Debug, Clone, Serialize)]
pub struct StaticPath(pub Vec<String>);