Translate A instructions without symbols

This commit is contained in:
Hazem Krimi
2024-03-08 20:11:44 +01:00
parent 2117f916c9
commit 90b2a5f5e7
4 changed files with 80 additions and 31 deletions
+13 -9
View File
@@ -1,10 +1,14 @@
pub struct AInstruction {
pub decimal: String,
}
pub struct CInstruction {
pub dest: String,
pub comp: String,
pub jump: Option<String>,
}
pub enum Instruction {
AInstruction {
decimal: String
},
CInstruction {
dest: String,
comp: String,
jump: String
}
}
AInstruction(AInstruction),
CInstruction(CInstruction),
}