roar 0.1.0

A toolkit for procedural world generation (with a focus on voxel games)
Documentation
use thiserror::Error;

pub type RoarResult<T> = Result<T, RoarError>;

#[derive(Debug, Error, PartialEq)]
pub enum RoarError {
    #[error("the parser encountered an unfamilliar opcode")]
    ParsingUnexpectedCode,
    #[error("the input section parser encountered an unexpected character")]
    ParsingInUnexpectedChar,
    #[error("the input section parser encountered an unexpected end of file")]
    ParsingInUnexpectedEof,
    #[error("tried to pull operation without any left in the buffer")]
    RuntimeNoOpsLeft,
    #[error("tried to pull a variable without any left in the input buffer")]
    RuntimeNoVarsLeft,
    #[error("tried to pull a constant without any left in the input section")]
    RuntimeNoConstsLeft,
    #[error("tried to pull from an empty stack")]
    RuntimeStackEmpty,
    #[error("the frame finished execution without any items left on the stack to return")]
    RuntimeFinishedWithoutReturnValue,
    #[error("tried to get empty index in memory")]
    IndexNotInMemory,
    #[error("tried to get a unanymous value of a non unanymous array")]
    ValueNotUnanymous,
    #[error("tried to unwrap a runtime value to the wrong type")]
    UnmatchedTypeUnwrap,
    #[error("unknown error")]
    Unknown,
}