ft(interpreter): impl simple stack init

This commit is contained in:
2025-06-25 16:19:23 +09:00
parent 0db309b668
commit 13cb907977
5 changed files with 101 additions and 32 deletions

View File

@@ -36,11 +36,23 @@ struct Args {
/// Dump progress of disassembly, in case of encountering an error.
#[arg(short, long, global = true, action)]
dump: bool,
/// argv passed to the program, which will be interpreted
#[arg(trailing_var_arg = true, global = true)]
argv: Vec<String>,
}
fn main() {
Builder::new()
.format(|buf, record| writeln!(buf, "{}: {}", record.level(), record.args()))
.format(|buf, record| {
writeln!(
buf,
"{} {}: {}",
record.target(),
record.level(),
record.args()
)
})
.parse_default_env()
.init();