Enum isbfc::Token [] [src]

pub enum Token {
    Output,
    Input,
    Loop(Vec<Token>),
    Move(i32),
    Add(i32i32),
    Set(i32i32),
    MulCopy(i32i32i32),
    Scan(i32),
    LoadOut(i32i32),
    LoadOutSet(i32),
    If(i32Vec<Token>),
}

A Token in isbfc's intermediate representation.

Variants

Output Writes output buffer to stdout

Input Reads one byte from stdin to the current cell

Loop(content) Runs content in loop while current cell is not zero

Move(offset) Moves data pointer by offset cells

Add(offset, value) Adds value to cell at offset

Set(offset, value) Sets cell at offset to value

MulCopy(src, dest, mul) Adds product of mul and the value at offset src to the cell at offset dest

Scan(offset) Equivalent to Loop(Move(offset))

LoadOut(offset, add) Appends the value of the cell at offset plus add to the output buffer

LoadOutSet(value) Appends the constant value value to the output buffer

LoadOutSet(offset, content) Runs content if the cell at offset is not zero

Trait Implementations

impl Clone for Token
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Token
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Token
[src]

impl Debug for Token
[src]

Formats the value using the given formatter.