Enum knightrs::ParseError[][src]

pub enum ParseError {
    NothingToParse,
    UnknownTokenStart {
        chr: char,
        line: usize,
    },
    UnterminatedQuote {
        line: usize,
    },
    MissingFunctionArgument {
        func: char,
        number: usize,
        line: usize,
    },
    InvalidString {
        line: usize,
        err: InvalidChar,
    },
}

The error type used to indicate an error whilst parsing Knight source code.

Variants

NothingToParse

Indicates that the end of stream was reached before a value could be parsed.

UnknownTokenStart

Indicates that an invalid character was encountered.

Show fields

Fields of UnknownTokenStart

chr: char

The invalid character that was encountered.

line: usize

The line that the invalid character occurred on.

UnterminatedQuote

A starting quote was found without an associated ending quote.

Show fields

Fields of UnterminatedQuote

line: usize

The line number the string started on.

MissingFunctionArgument

A function was parsed, but one of its arguments was not able to be parsed.

Show fields

Fields of MissingFunctionArgument

func: char

The function whose argument is missing.

number: usize

The argument number.

line: usize

The line number the function started on.

InvalidString

An invalid character was encountered in a RcString literal.

Show fields

Fields of InvalidString

line: usize

The line whence the string started.

err: InvalidChar

The error itself.

Trait Implementations

impl Debug for ParseError[src]

impl Display for ParseError[src]

impl Error for ParseError[src]

impl From<ParseError> for Error[src]

Auto Trait Implementations

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> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = Infallible

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,