This commit is contained in:
nora 2022-07-04 08:38:14 +02:00
parent 1722a9ea0f
commit 1d56ed5dac
4 changed files with 26 additions and 28 deletions

View file

@ -33,6 +33,7 @@ pub struct Location {
}
#[derive(Debug, Clone, Copy, DebugPls)]
// tag::stmt[]
pub enum Stmt {
Mov { to: Place, from: Value },
Movb { to: Place, from: Value },
@ -45,6 +46,7 @@ pub enum Stmt {
Je { to: Location },
Cmp { lhs: Value, rhs: Value },
}
// end::stmt[]
struct CompileCtx {
stmts: Vec<Stmt>,