Parse type aliases
This commit is contained in:
@@ -138,7 +138,9 @@ pub struct Relation<'db> {
|
||||
/// Parses [TypeAlias] from an [AstNode].
|
||||
#[salsa::tracked]
|
||||
pub fn type_alias<'db>(db: &'db dyn Database, ast: AstNode) -> TypeAlias<'db> {
|
||||
todo!()
|
||||
let name = ast.expect_field(db, "name").with_contents(db);
|
||||
let ty = ty(db, ast.expect_field(db, "type"));
|
||||
TypeAlias::new(db, name, ty)
|
||||
}
|
||||
|
||||
/// An abstract type alias (syntax representation).
|
||||
|
||||
Reference in New Issue
Block a user