Enum boa::syntax::parser::error::ParseError[][src]

pub enum ParseError {
    Expected {
        expected: Box<[TokenKind]>,
        found: Token,
        context: &'static str,
    },
    Unexpected {
        found: Token,
        message: Option<&'static str>,
    },
    AbruptEnd,
    Lex {
        err: LexError,
    },
    General {
        message: &'static str,
        position: Position,
    },
    Unimplemented {
        message: &'static str,
        position: Position,
    },
}
Expand description

ParseError is an enum which represents errors encounted during parsing an expression

Variants

Expected

When it expected a certain kind of token, but got another as part of something

Fields of Expected

expected: Box<[TokenKind]>found: Tokencontext: &'static str
Unexpected

When a token is unexpected

Fields of Unexpected

found: Tokenmessage: Option<&'static str>
AbruptEnd

When there is an abrupt end to the parsing

Lex

A lexing error.

Fields of Lex

err: LexError
General

Catch all General Error

Fields of General

message: &'static strposition: Position
Unimplemented

Unimplemented syntax error

Fields of Unimplemented

message: &'static strposition: Position

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.