integrate CodegenError to compiler-core::Error

This commit is contained in:
Jeong YunWon 2022-08-22 18:38:55 +09:00
parent 9d67b944cf
commit 1192a11d39
4 changed files with 24 additions and 22 deletions

View file

@ -11,7 +11,7 @@ pub use rustpython_codegen::compile::CompileOpts;
pub use rustpython_compiler_core::Mode;
#[derive(Debug, thiserror::Error)]
pub enum CodegenErrorType {
pub enum CompileErrorType {
#[error(transparent)]
Compile(#[from] rustpython_codegen::error::CodegenErrorType),
#[error(transparent)]
@ -20,7 +20,7 @@ pub enum CodegenErrorType {
#[derive(Debug, thiserror::Error)]
pub struct CompileError {
pub error: CodegenErrorType,
pub error: CompileErrorType,
pub source_path: String,
pub location: Location,
pub statement: Option<String>,