cl-ast: allow TyRef to be mutable

yaml.rs: Print AddrOf and TyRef the same way
This commit is contained in:
2024-04-16 20:35:27 -05:00
parent 75adbd6473
commit 98868d3960
4 changed files with 12 additions and 8 deletions

View File

@@ -461,8 +461,8 @@ pub mod yamlify {
fn yaml(&self, y: &mut Yamler) {
let Self { count, mutable, expr } = self;
y.key("AddrOf")
.yaml(mutable)
.pair("count", count)
.yaml(mutable)
.pair("expr", expr);
}
}
@@ -588,8 +588,11 @@ pub mod yamlify {
}
impl Yamlify for TyRef {
fn yaml(&self, y: &mut Yamler) {
let Self { count, to } = self;
y.key("TyRef").pair("count", count).pair("to", to);
let Self { count, mutable, to } = self;
y.key("TyRef")
.pair("count", count)
.yaml(mutable)
.pair("to", to);
}
}
impl Yamlify for TyFn {