diff --git a/src/codegen/fasm.rs b/src/codegen/fasm.rs index 8629a17..2ac116e 100644 --- a/src/codegen/fasm.rs +++ b/src/codegen/fasm.rs @@ -124,6 +124,5 @@ pub fn fasm_codegen(exprs: &Vec, not_a_function: bool) -> String { } let asm = format!("{}{}{}", asm_start, asm_text, asm_data); - println!("{}", asm); asm } diff --git a/src/main.rs b/src/main.rs index bd08a98..fdb9362 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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); }