include_js_core

Type Alias JSParseError

Source
pub type JSParseError = ParseError;

Aliased Type§

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

Variants§

§

Expected

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

Fields

§expected: Box<[TokenKind]>
§found: Token
§context: &'static str
§

Unexpected

When a token is unexpected

Fields

§found: Token
§message: Option<&'static str>
§

AbruptEnd

When there is an abrupt end to the parsing

§

Lex

A lexing error.

Fields

§err: Error
§

General

Catch all General Error

Fields

§message: &'static str
§position: Position
§

Unimplemented

Unimplemented syntax error

Fields

§message: &'static str
§position: Position