salsa/examples/calc/main.rs

18 lines
448 B
Rust
Raw Normal View History

use db::CalcDatabaseImpl;
2024-07-17 13:25:04 +00:00
use ir::{Diagnostic, SourceProgram};
2024-07-15 11:51:40 +00:00
use salsa::Database as Db;
2022-08-01 05:32:47 +00:00
mod compile;
2022-08-01 05:32:47 +00:00
mod db;
mod ir;
mod parser;
mod type_check;
2022-08-01 05:32:47 +00:00
pub fn main() {
let db: CalcDatabaseImpl = Default::default();
let source_program = SourceProgram::new(&db, String::new());
compile::compile(&db, source_program);
2024-07-17 13:25:04 +00:00
let diagnostics = compile::compile::accumulated::<Diagnostic>(&db, source_program);
eprintln!("{diagnostics:?}");
}