salsa/calc-example/calc/src/main.rs

29 lines
593 B
Rust
Raw Normal View History

2022-08-01 05:32:47 +00:00
// ANCHOR: jar_struct
#[salsa::jar(db = Db)]
pub struct Jar(
crate::ir::SourceProgram,
2022-08-19 09:53:33 +00:00
crate::ir::Program,
2022-08-01 05:32:47 +00:00
crate::ir::VariableId,
crate::ir::FunctionId,
crate::ir::Function,
crate::ir::Diagnostics,
crate::ir::Span,
2022-08-01 05:32:47 +00:00
crate::parser::parse_statements,
crate::type_check::type_check_program,
2022-08-01 05:32:47 +00:00
);
// ANCHOR_END: jar_struct
// ANCHOR: jar_db
pub trait Db: salsa::DbWithJar<Jar> {}
// ANCHOR_END: jar_db
// ANCHOR: jar_db_impl
impl<DB> Db for DB where DB: ?Sized + salsa::DbWithJar<Jar> {}
// ANCHOR_END: jar_db_impl
mod db;
mod ir;
mod parser;
pub fn main() {}