Update gen_decl.rs

This commit is contained in:
Shunsuke Shibayama 2023-03-16 02:23:35 +09:00
parent 59284b6ad5
commit f393ac4531

View file

@ -57,6 +57,9 @@ fn gen_chunk_decl(namespace: &str, chunk: Expr, code: &mut String) {
match chunk {
Expr::Def(def) => {
let name = def.sig.ident().inspect().replace('\0', "");
if name.starts_with('%') {
return;
}
let typ = def.sig.ident().ref_t().to_string();
let typ = escape_type(typ);
let decl = format!("{namespace}.{name}: {typ}");