Removed println!() from inside FASM codegen.

This commit is contained in:
Goren Barak 2023-11-19 17:41:51 -05:00
parent af2785eabf
commit 73b3d406eb
2 changed files with 2 additions and 2 deletions

View file

@ -124,6 +124,5 @@ pub fn fasm_codegen(exprs: &Vec<Expr>, not_a_function: bool) -> String {
}
let asm = format!("{}{}{}", asm_start, asm_text, asm_data);
println!("{}", asm);
asm
}

View file

@ -7,5 +7,6 @@ use crate::parse::ast::*;
pub mod parse;
fn main() {
fasm_codegen(&vec![Expr::VarDefinition(VarDefinition {name: "goren", value: Value::Number(10)}), Expr::MathExpr(Math { left: Value::Var(VarReference { name: "goren"}), right: Value::Number(17), operator: MathOperator::OP_MULT}), Expr::FunDefinition(FunDefinition {name: "adder", contents: vec![Expr::MathExpr(Math {left: Value::Param(ParamReference {param_number: 0}), right: Value::Param(ParamReference {param_number: 1}), operator: MathOperator::OP_ADD})]}), Expr::Breakpoint], true);
let fc = fasm_codegen(&vec![Expr::VarDefinition(VarDefinition {name: "goren", value: Value::Number(10)}), Expr::MathExpr(Math { left: Value::Var(VarReference { name: "goren"}), right: Value::Number(17), operator: MathOperator::OP_MULT}), Expr::FunDefinition(FunDefinition {name: "adder", contents: vec![Expr::MathExpr(Math {left: Value::Param(ParamReference {param_number: 0}), right: Value::Param(ParamReference {param_number: 1}), operator: MathOperator::OP_ADD})]}), Expr::Breakpoint], true);
println!("{}", fc);
}