mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-15 09:48:53 +00:00
More cleanup
This commit is contained in:
parent
fdc8018234
commit
8fc6dc82ac
1 changed files with 1 additions and 10 deletions
|
@ -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::<Diagnostics>(&db, source_program);
|
||||
eprintln!("{diagnostics:?}");
|
||||
|
|
Loading…
Reference in a new issue