mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-19 11:05:45 +00:00
Custom marshal enc/decoding impl
This commit is contained in:
parent
8f425e9ce2
commit
b80bbec8e6
9 changed files with 857 additions and 204 deletions
|
@ -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>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue