Custom marshal enc/decoding impl

This commit is contained in:
Noa 2022-12-15 13:25:02 -06:00
parent 50b5388711
commit 41b465dee1
14 changed files with 913 additions and 229 deletions

View file

@ -26,7 +26,6 @@ itertools = { workspace = true }
log = { workspace = true }
num-bigint = { workspace = true }
num-traits = { workspace = true }
thiserror = { workspace = true }
unicode_names2 = { workspace = true }
unic-emoji-char = "0.9.0"

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>,