new_syntax_error working without full compiler

Fix #4100
This commit is contained in:
Jeong YunWon 2022-08-23 02:04:56 +09:00
parent 4724cc63f7
commit a1640e4aa1
7 changed files with 66 additions and 106 deletions

View file

@ -17,6 +17,7 @@ itertools = "0.10.3"
log = "0.4.16"
num-complex = { version = "0.4.0", features = ["serde"] }
num-traits = "0.2.14"
thiserror = "1.0"
[dev-dependencies]
rustpython-parser = { path = "../parser" }

View file

@ -1,8 +1,8 @@
use std::{error::Error, fmt};
use std::fmt;
pub type CodegenError = rustpython_compiler_core::BaseError<CodegenErrorType>;
#[derive(Debug)]
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum CodegenErrorType {
/// Invalid assignment, cannot store value in target.
@ -79,5 +79,3 @@ impl fmt::Display for CodegenErrorType {
}
}
}
impl Error for CodegenErrorType {}