brain 0.1.2

Compiler for the brain programming language. Compiles brain into optimized brainfuck code. Also includes a brainfuck interpreter.
Documentation
#[derive(Debug, PartialEq, Clone)]
pub enum Error {
    // Illegal redeclaration of a name
    IllegalRedeclaration {
        name: String,
    },

    // Name used before it was declared
    UndeclaredIdentifier {
        name: String,
    },

    // Tried to declare a zero size variable
    DeclaredZeroSize {
        name: String,
    },

    // Declaration contained a size, but it was invalid
    DeclaredIncorrectSize {
        name: String,
        expected: usize,
        actual: usize,
    },

    // The expression assigned to a variable `name` was the incorrect size
    IncorrectSizedExpression {
        name: String,
        expected: usize,
        actual: usize,
    },

    // Cannot assign a name to itself since that doesn't make any sense
    SelfAssignment {
        name: String,
    },

    // We do not support `in foo[]` since we do not have dynamic strings
    UnspecifiedInputSizeUnsupported {
        name: String,
    },

    // We do not support string literals as loop conditions since this doesn't
    // really make any sense
    LoopStringLiteralUnsupported {},

    // Conditions must be size one so we can tell if they are zero or non-zero
    ConditionSizeInvalid {
        expected: usize,
        actual: usize,
    },
}