Proof of concept parsing: print all labels
This commit is contained in:
@@ -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()?)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user