[][src]Enum wain_syntax_text::parser::ParseErrorKind

pub enum ParseErrorKind<'source> {
    LexError(LexError<'source>),
    UnexpectedToken {
        got: Token<'source>,
        expected: &'static str,
    },
    UnexpectedEndOfFile {
        expected: &'static str,
    },
    UnexpectedKeyword(&'source str),
    InvalidValType(&'source str),
    MalformedUTF8Encoding,
    MissingParen {
        paren: char,
        got: Option<Token<'source>>,
        what: &'source str,
    },
    InvalidOperand {
        insn: &'static str,
        msg: &'static str,
    },
    NumberMustBePositive(NumBase, &'source str),
    CannotParseNum {
        reason: String,
        ty: &'static str,
    },
    MultipleEntrypoints(Start<'source>, Start<'source>),
    IdAlreadyDefined {
        id: &'source str,
        prev_idx: u32,
        what: &'static str,
        scope: &'static str,
    },
    ExpectEndOfFile {
        token: Token<'source>,
        after: &'static str,
    },
    ImportMustPrecedeOtherDefs {
        what: &'static str,
    },
    InvalidAlignment {
        src: &'source str,
    },
    IdBoundToParam(&'source str),
}

Variants

LexError(LexError<'source>)
UnexpectedToken

Fields of UnexpectedToken

got: Token<'source>expected: &'static str
UnexpectedEndOfFile

Fields of UnexpectedEndOfFile

expected: &'static str
UnexpectedKeyword(&'source str)
InvalidValType(&'source str)
MalformedUTF8Encoding
MissingParen

Fields of MissingParen

paren: chargot: Option<Token<'source>>what: &'source str
InvalidOperand

Fields of InvalidOperand

insn: &'static strmsg: &'static str
NumberMustBePositive(NumBase, &'source str)
CannotParseNum

Fields of CannotParseNum

reason: Stringty: &'static str
MultipleEntrypoints(Start<'source>, Start<'source>)
IdAlreadyDefined

Fields of IdAlreadyDefined

id: &'source strprev_idx: u32what: &'static strscope: &'static str
ExpectEndOfFile

Fields of ExpectEndOfFile

token: Token<'source>after: &'static str
ImportMustPrecedeOtherDefs

Fields of ImportMustPrecedeOtherDefs

what: &'static str
InvalidAlignment

Fields of InvalidAlignment

src: &'source str
IdBoundToParam(&'source str)

Auto Trait Implementations

impl<'source> RefUnwindSafe for ParseErrorKind<'source>

impl<'source> Send for ParseErrorKind<'source>

impl<'source> Sync for ParseErrorKind<'source>

impl<'source> Unpin for ParseErrorKind<'source>

impl<'source> UnwindSafe for ParseErrorKind<'source>

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, 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.