Proof of concept parsing: print all labels

This commit is contained in:
2025-05-10 12:23:57 -07:00
parent 6d33bd5838
commit dbe4e8963e
2 changed files with 27 additions and 2 deletions
+8
View File
@@ -4,6 +4,7 @@ mod preprocess;
mod world;
use anyhow::anyhow;
use labels::labels::print_labels;
use preprocess::eval::Context;
use std::{env, error::Error, fs, path::PathBuf, process::exit};
use world::World;
@@ -46,6 +47,13 @@ fn main() -> Result<(), Box<dyn Error>> {
board.name.push_str(" (♪)");
}
for board in &world.boards {
println!("# Board: {}", board.name);
for stat in &board.stats {
print_labels(stat);
}
}
// Try to write a modified world file
fs::write("tmp.zzt", world.to_bytes()?)?;