1
0
Fork 0

Add unary ops and if-then-else to IR Generator

This commit is contained in:
Vili Sinervä 2025-02-05 19:42:55 +02:00
parent d929f49bc8
commit 2c62a19383
No known key found for this signature in database
GPG key ID: DF8FEAF54EFAC996
4 changed files with 116 additions and 26 deletions

View file

@ -29,6 +29,7 @@ pub fn compile(code: &str) -> Vec<IrInstruction> {
pub fn start_compiler() {
let lines = io::stdin().lines();
for line in lines.map_while(Result::ok) {
println!();
for instruction in compile(&line) {
println!("{instruction}");
}