Add a code generator for making tests of the examples.

This commit is contained in:
2023-06-04 17:28:24 -07:00
parent 8aa1465c35
commit 7efd2fb796
4 changed files with 88 additions and 0 deletions

7
src/examples.rs Normal file
View File

@@ -0,0 +1,7 @@
use codespan_reporting::files::SimpleFiles;
use crate::backend::Backend;
use crate::ir::Program as IR;
use crate::syntax::Program as Syntax;
use cranelift_jit::JITModule;
include!(concat!(env!("OUT_DIR"), "/examples.rs"));

View File

@@ -63,6 +63,8 @@
//!
pub mod backend;
pub mod eval;
#[cfg(test)]
mod examples;
pub mod ir;
pub mod syntax;