questionable refactoring

This commit is contained in:
2025-03-23 18:40:07 -04:00
parent c766d34b6a
commit 0614d48fcc
14 changed files with 240 additions and 79 deletions

View File

@@ -13,6 +13,7 @@ impl FnLowerable for PExpr {
DataDef {
ty: Type::Bits(8).arr(data.len() as u32),
origin: Origin::File(l.span),
label: format!("string \"{}\"", s.replace("\n", "\\n"))
},
data,
);
@@ -26,6 +27,7 @@ impl FnLowerable for PExpr {
DataDef {
ty,
origin: Origin::File(l.span),
label: format!("char '{c}'"),
},
c.to_string().as_bytes().to_vec(),
);
@@ -40,6 +42,7 @@ impl FnLowerable for PExpr {
DataDef {
ty,
origin: Origin::File(l.span),
label: format!("num {n:?}")
},
n.whole.parse::<i64>().unwrap().to_le_bytes().to_vec(),
);