puyo-3/src/main.rs
2026-01-07 00:26:18 -05:00

26 lines
435 B
Rust

use std::{env, error::Error};
use crate::{eval::run, parser::parse};
mod ast;
mod eval;
mod map;
mod parser;
mod symbol;
mod val;
#[cfg(test)]
mod tests;
fn main() -> Result<(), Box<dyn Error>> {
let src = &env::args().nth(1).expect("give me an argument now");
let res = parse(src);
eprintln!("-- ast");
for stmt in &res {
eprintln!("{stmt};");
}
eprintln!("-- /ast");
run(&res)?;
Ok(())
}