magc/compiler/compilelets/
mod.rs1use crate::types::{Expression, CompilerResult};
2use strontium::machine::instruction::Instruction;
3
4use super::Compiler;
5
6mod call;
7mod literal;
8mod value_pattern;
9
10pub use self::call::CallCompilelet;
11pub use self::literal::LiteralCompilelet;
12pub use self::value_pattern::ValuePatternCompilelet;
13
14pub trait Compilelet {
15 fn compile(
16 &self,
17 compiler: &mut Compiler,
18 expression: Expression,
19 target_register: Option<String>,
20 ) -> CompilerResult<Vec<Instruction>>;
21}