Add unary ops and if-then-else to IR Generator
This commit is contained in:
parent
d929f49bc8
commit
2c62a19383
4 changed files with 116 additions and 26 deletions
|
@ -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}");
|
||||
}
|
||||
|
|
Reference in a new issue