From 8fc6dc82ac428a18d7b078306f0f82fdd985f883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20G=C5=82uszak?= Date: Tue, 23 Aug 2022 23:39:51 +0200 Subject: [PATCH] More cleanup --- calc-example/calc/src/main.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/calc-example/calc/src/main.rs b/calc-example/calc/src/main.rs index ee5b3083..27495343 100644 --- a/calc-example/calc/src/main.rs +++ b/calc-example/calc/src/main.rs @@ -1,5 +1,4 @@ use ir::{Diagnostics, SourceProgram}; -use salsa::DebugWithDb; // ANCHOR: jar_struct #[salsa::jar(db = Db)] @@ -33,17 +32,9 @@ mod ir; mod parser; mod type_check; -const PROGRAM: &str = r" -fn area_rectangle(w, h) = w * h -fn area_circle(r) = 3.14 * r * r -print area_rectangle(3, 4) -print area_circle(1) -print 11 * 2 -"; - pub fn main() { let mut db = db::Database::default(); - let source_program = SourceProgram::new(&mut db, PROGRAM.to_string()); + let source_program = SourceProgram::new(&mut db, String::new()); compile::compile(&db, source_program); let diagnostics = compile::compile::accumulated::(&db, source_program); eprintln!("{diagnostics:?}");