include_js_coreType Alias JSParseError
Source pub type JSParseError = ParseError;
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,
},
}
When it expected a certain kind of token, but got another as part of something
When a token is unexpected
When there is an abrupt end to the parsing
Unimplemented syntax error