pub enum SimpleOp {
BalancedLoop {
b: SimpleBlock,
},
If {
b: SimpleBlock,
},
Add(BfNum),
Set(BfNum),
EqnSet(Equation),
Input,
Output,
OutputConst(Vec<u8>),
}Expand description
A simple operation (one that does not move the tape pointer)
Variants§
BalancedLoop
A simple balanced loop
Fields
§
b: SimpleBlockIf
A loop that excutes 0 or 1 times.
Fields
§
b: SimpleBlockAdd(BfNum)
A modification (fused +/- operations)
Set(BfNum)
A set operation (the optimiser figured out the exact value)
EqnSet(Equation)
A polyset operation: Something like x[2] = 2*x[1] + (-3)*x[3]
Input
Read input, one byte
Output
Write output, one byte
OutputConst(Vec<u8>)
Fixed output. We cannot use String, as BF may not use UTF-8.
We drop the BfNum here, as this makes output easier, and we will never need wrapping semantics on this again (we will only append/prepend values).
Trait Implementations§
impl Eq for SimpleOp
impl StructuralPartialEq for SimpleOp
Auto Trait Implementations§
impl Freeze for SimpleOp
impl RefUnwindSafe for SimpleOp
impl Send for SimpleOp
impl Sync for SimpleOp
impl Unpin for SimpleOp
impl UnwindSafe for SimpleOp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.