mirror of
https://github.com/Noratrieb/brainfuck.git
synced 2026-01-14 13:35:00 +01:00
remove SetNull from code
This commit is contained in:
parent
4d9648bf97
commit
46229fd74f
2 changed files with 0 additions and 5 deletions
|
|
@ -31,7 +31,6 @@ pub enum Stmt {
|
|||
Left(u32),
|
||||
Out,
|
||||
In,
|
||||
SetNull,
|
||||
SetN(u8),
|
||||
JmpIfZero(u32),
|
||||
JmpIfNonZero(u32),
|
||||
|
|
@ -91,7 +90,6 @@ fn ir_to_stmt<'c>(code: &mut Code<'c>, ir_stmt: &IrStmt<'_>) {
|
|||
StmtKind::Left(n) => Stmt::Left(u32::try_from(*n).unwrap()),
|
||||
StmtKind::Out => Stmt::Out,
|
||||
StmtKind::In => Stmt::In,
|
||||
StmtKind::SetN(0) => Stmt::SetNull,
|
||||
StmtKind::SetN(n) => Stmt::SetN(*n),
|
||||
StmtKind::Loop(instr) => {
|
||||
let skip_jmp_idx = code.stmts.len();
|
||||
|
|
|
|||
|
|
@ -84,9 +84,6 @@ where
|
|||
self.stdin.read_exact(&mut buf).unwrap();
|
||||
*self.elem_mut() = Wrapping(buf[0]);
|
||||
}
|
||||
Stmt::SetNull => {
|
||||
*self.elem_mut() = Wrapping(0);
|
||||
}
|
||||
Stmt::SetN(n) => {
|
||||
*self.elem_mut() = Wrapping(n);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue