Enum isbfc::Token
[−]
[src]
pub enum Token { Output, Input, Loop(Vec<Token>), Move(i32), Add(i32, i32), Set(i32, i32), MulCopy(i32, i32, i32), Scan(i32), LoadOut(i32, i32), LoadOutSet(i32), If(i32, Vec<Token>), }
A Token in isbfc's intermediate representation.
Variants
Output
Output
Writes output buffer to stdout
Input
Input
Reads one byte from stdin to the current cell
Loop(Vec<Token>)
Loop(content)
Runs content in loop while current cell is not zero
Move(i32)
Move(offset)
Moves data pointer by offset cells
Add(i32, i32)
Add(offset, value)
Adds value to cell at offset
Set(i32, i32)
Set(offset, value)
Sets cell at offset to value
MulCopy(i32, i32, i32)
MulCopy(src, dest, mul)
Adds product of mul and the value at offset
src to the cell at offset dest
Scan(i32)
Scan(offset)
Equivalent to Loop(Move(offset))
LoadOut(i32, i32)
LoadOut(offset, add)
Appends the value of the cell at offset plus
add to the output buffer
LoadOutSet(i32)
LoadOutSet(value)
Appends the constant value value to the output buffer
If(i32, Vec<Token>)
LoadOutSet(offset, content)
Runs content if the cell at offset is not zero
Trait Implementations
impl Clone for Token
[src]
fn clone(&self) -> Token
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Token
[src]
fn eq(&self, __arg_0: &Token) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Token) -> bool
This method tests for !=
.