[][src]Enum lasm::error::Error

pub enum Error {
    ProcedureNotDefined(String),
    RegisterNotDefined(String),
    InvalidLoadArg(String),
    InvalidPushArg(String),
    InvalidStoreArg(String),
    InvalidReferArg(String),
    InvalidFreeArg(String),
    InvalidAllocArg(String),
    InvalidIdentifer(String),
    InvalidProcedure(String),
    NoProcedureName(String),
    InvalidSize(String),
    Unknown(String),
    NoProcedureFound,
    UnmatchedLoop,
}

The Error type is used when assembling and parsing an assembly file

Variants

ProcedureNotDefined(String)

When a procedure that doesn't exist is called, this error is returned

RegisterNotDefined(String)

Using a register that has not been declared with the define keyword throws this error

InvalidLoadArg(String)

This is returned when an invalid argument to the ld instruction is supplied

InvalidPushArg(String)

This is returned when an invalid argument to the push instruction is supplied

InvalidStoreArg(String)

This is returned when an invalid argument to the st instruction is supplied

InvalidReferArg(String)

This is returned when an invalid argument to the refer instruction is supplied

InvalidFreeArg(String)

This is returned when an invalid argument to the free instruction is supplied

InvalidAllocArg(String)

This is returned when an invalid argument to the alloc instruction is supplied

InvalidIdentifer(String)

This is returned when an identifier is expected, but the identifier parser fails

InvalidProcedure(String)

This is returned when a valid procedure is expected, but the procedure parser fails

NoProcedureName(String)

This is returned when the proc keyword is not followed by a procedure name

InvalidSize(String)

This is returned when an integer is expected but not found

Unknown(String)

This is returned when an unknown parser error is returned

NoProcedureFound

This is returned when no procedures are found in the assembly file

UnmatchedLoop

This is returned when there are an odd number of loop and endloop keywords

Methods

impl Error[src]

pub const REGISTER_NOT_DEFINED: &'static str[src]

pub const INVALID_FREE_ARG: &'static str[src]

pub const INVALID_LOAD_ARG: &'static str[src]

pub const INVALID_PUSH_ARG: &'static str[src]

pub const INVALID_STORE_ARG: &'static str[src]

pub const INVALID_ALLOC_ARG: &'static str[src]

pub const INVALID_REFER_ARG: &'static str[src]

pub const INVALID_IDENTIFIER: &'static str[src]

pub const INVALID_PROCEDURE: &'static str[src]

pub const INVALID_SIZE: &'static str[src]

pub const NO_PROC_NAME: &'static str[src]

pub const NO_PROC_FOUND: &'static str[src]

Trait Implementations

impl Clone for Error[src]

impl Debug for Error[src]

impl Display for Error[src]

impl<'a> From<VerboseError<&'a str>> for Error[src]

impl PartialEq<Error> for Error[src]

impl StructuralPartialEq for Error[src]

Auto Trait Implementations

impl RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl UnwindSafe for Error

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.