Rust: extract isRef for SelfParam

This commit is contained in:
Paolo Tranquilli
2024-12-16 14:12:13 +01:00
parent aaf0cd5dee
commit 4c4a8d7619
19 changed files with 111 additions and 32 deletions

View File

@@ -35,6 +35,7 @@ fn property_name(type_name: &str, field_name: &str) -> String {
(_, "then_branch") => "then",
(_, "else_branch") => "else_",
("ArrayType", "ty") => "element_type_repr",
("SelfParam", "is_amp") => "is_ref",
(_, "ty") => "type_repr",
_ => field_name,
};
@@ -363,6 +364,13 @@ fn get_fields(node: &AstNodeSrc) -> Vec<FieldInfo> {
is_many: false,
});
}
"SelfParam" => {
result.push(FieldInfo {
name: "is_amp".to_string(),
tp: "predicate".to_string(),
is_many: false,
});
}
_ => {}
}