lisp-8bit/src/main.rs

20 lines
333 B
Rust
Raw Normal View History

2024-08-08 21:53:27 +02:00
mod assembler;
mod parser;
mod error;
pub use error::*;
fn main() {
2024-08-11 04:25:14 +02:00
let code = "(+ 1 (+ 5 5))".to_string();
2024-08-08 21:53:27 +02:00
2024-08-11 04:25:14 +02:00
let parsed = dbg!(parser::Parser::parse(code).unwrap());
let assembled = assembler::Assembler::assemble(parsed).unwrap();
for byte in assembled {
print!("{byte:#X}, ");
}
println!("");
2024-08-08 21:53:27 +02:00
}