You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
427 B
25 lines
427 B
pub use cond::Cond;
|
|
pub use flatten::Flatten;
|
|
pub use flatten::lower;
|
|
pub use op::HLOp;
|
|
pub use op::Op;
|
|
|
|
use crate::asm::data::literal::RoutineName;
|
|
|
|
pub mod op;
|
|
pub mod cond;
|
|
mod flatten;
|
|
|
|
/// A higher-level instruction
|
|
#[derive(Debug, Clone)]
|
|
pub struct Instr {
|
|
pub op: HLOp,
|
|
pub branches: Option<Vec<(Cond, Vec<Instr>)>>,
|
|
}
|
|
|
|
/// A routine
|
|
pub struct Routine {
|
|
pub name: RoutineName,
|
|
pub body: Vec<Instr>,
|
|
}
|
|
|
|
|