Custom marshal enc/decoding impl

This commit is contained in:
Noa 2022-12-15 13:25:02 -06:00
parent 8f425e9ce2
commit b80bbec8e6
9 changed files with 857 additions and 204 deletions

View file

@ -200,7 +200,7 @@ pub fn parse_tokens(
pub type ParseError = rustpython_compiler_core::BaseError<ParseErrorType>;
/// Represents the different types of errors that can occur during parsing.
#[derive(Debug, PartialEq, thiserror::Error)]
#[derive(Debug, PartialEq)]
pub enum ParseErrorType {
/// Parser encountered an unexpected end of input
Eof,
@ -215,6 +215,8 @@ pub enum ParseErrorType {
Lexical(LexicalErrorType),
}
impl std::error::Error for ParseErrorType {}
// Convert `lalrpop_util::ParseError` to our internal type
fn parse_error_from_lalrpop(
err: LalrpopError<Location, Tok, LexicalError>,