Enum webidl::ParseError [] [src]

pub enum ParseError<L, T, E> {
    InvalidToken {
        location: L,
    },
    UnrecognizedToken {
        token: Option<(L, T, L)>,
        expected: Vec<String>,
    },
    ExtraToken {
        token: (L, T, L),
    },
    User {
        error: E,
    },
}

Variants

Generated by the parser when it encounters a token (or EOF) it did not expect.

Fields of InvalidToken

Generated by the parser when it encounters a token (or EOF) it did not expect.

Fields of UnrecognizedToken

If this is Some, then an unexpected token of type T was observed, with a span given by the two L values. If this is None, then EOF was observed when it was not expected.

The set of expected tokens: these names are taken from the grammar and hence may not necessarily be suitable for presenting to the user.

Generated by the parser when it encounters additional, unexpected tokens.

Fields of ExtraToken

Custom error type.

Fields of User

Methods

impl<L, T, E> ParseError<L, T, E>
[src]

[src]

[src]

[src]

Trait Implementations

impl<L, T, E> Ord for ParseError<L, T, E> where
    E: Ord,
    L: Ord,
    T: Ord
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl<L, T, E> PartialOrd<ParseError<L, T, E>> for ParseError<L, T, E> where
    E: PartialOrd<E>,
    L: PartialOrd<L>,
    T: PartialOrd<T>, 
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<L, T, E> Display for ParseError<L, T, E> where
    E: Display,
    L: Display,
    T: Display
[src]

[src]

Formats the value using the given formatter. Read more

impl<L, T, E> Eq for ParseError<L, T, E> where
    E: Eq,
    L: Eq,
    T: Eq
[src]

impl<L, T, E> Error for ParseError<L, T, E> where
    E: Debug + Display,
    L: Debug + Display,
    T: Debug + Display
[src]

[src]

A short description of the error. Read more

1.0.0
[src]

The lower-level cause of this error, if any. Read more

impl<L, T, E> PartialEq<ParseError<L, T, E>> for ParseError<L, T, E> where
    E: PartialEq<E>,
    L: PartialEq<L>,
    T: PartialEq<T>, 
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<L, T, E> Clone for ParseError<L, T, E> where
    E: Clone,
    L: Clone,
    T: Clone
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<L, T, E> Debug for ParseError<L, T, E> where
    E: Debug,
    L: Debug,
    T: Debug
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<L, T, E> Send for ParseError<L, T, E> where
    E: Send,
    L: Send,
    T: Send

impl<L, T, E> Sync for ParseError<L, T, E> where
    E: Sync,
    L: Sync,
    T: Sync