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.
29 lines
434 B
29 lines
434 B
4 years ago
|
mod op;
|
||
|
mod cond;
|
||
4 years ago
|
mod flatten;
|
||
|
|
||
|
pub use flatten::Flatten;
|
||
4 years ago
|
pub use flatten::lower;
|
||
4 years ago
|
|
||
4 years ago
|
pub use op::HLOp;
|
||
4 years ago
|
pub use op::Op;
|
||
|
pub use cond::Cond;
|
||
4 years ago
|
use crate::data::literal::{RoutineName};
|
||
|
|
||
|
|
||
|
|
||
4 years ago
|
|
||
|
/// A higher-level instruction
|
||
4 years ago
|
#[derive(Debug, Clone, Eq, PartialEq)]
|
||
4 years ago
|
pub struct Instr {
|
||
4 years ago
|
pub op: HLOp,
|
||
4 years ago
|
pub branches: Option<Vec<(Cond, Vec<Instr>)>>,
|
||
|
}
|
||
|
|
||
|
/// A routine
|
||
|
pub struct Routine {
|
||
|
pub name: RoutineName,
|
||
|
pub body: Vec<Instr>,
|
||
|
}
|
||
|
|