hotwire haku2 into rkgk

really a bodge job right now and it crashes but it's a start
This commit is contained in:
りき萌 2025-06-04 00:28:21 +02:00
parent 550227da34
commit 5de4f9d7c6
9 changed files with 178 additions and 71 deletions

View file

@ -306,6 +306,24 @@ impl Defs {
panic!("image must be a subset of the current defs")
});
}
pub fn serialize_defs(&self) -> String {
let mut result = String::new();
for def in &self.defs {
result.push_str(def);
result.push('\n');
}
result
}
pub fn serialize_tags(&self) -> String {
let mut result = String::new();
for tag in &self.tags {
result.push_str(tag);
result.push('\n');
}
result
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]

View file

@ -47,7 +47,7 @@ pub struct Compiler<'a> {
#[derive(Debug, Clone, Copy)]
pub struct ClosureSpec {
pub(crate) local_count: u8,
pub local_count: u8,
}
impl<'a> Compiler<'a> {