mirror of
https://github.com/RustPython/Parser.git
synced 2025-09-12 05:16:16 +00:00
codegen::{CompileError -> CodegenError}
This commit is contained in:
parent
3690272256
commit
cf10e800a6
4 changed files with 72 additions and 71 deletions
|
@ -8,7 +8,7 @@ Inspirational file: https://github.com/python/cpython/blob/main/Python/symtable.
|
|||
*/
|
||||
|
||||
use crate::{
|
||||
error::{CompileError, CompileErrorType},
|
||||
error::{CodegenError, CodegenErrorType},
|
||||
IndexMap,
|
||||
};
|
||||
use rustpython_ast::{self as ast, Location};
|
||||
|
@ -168,9 +168,9 @@ pub struct SymbolTableError {
|
|||
}
|
||||
|
||||
impl SymbolTableError {
|
||||
pub fn into_compile_error(self, source_path: String) -> CompileError {
|
||||
CompileError {
|
||||
error: CompileErrorType::SyntaxError(self.error),
|
||||
pub fn into_codegen_error(self, source_path: String) -> CodegenError {
|
||||
CodegenError {
|
||||
error: CodegenErrorType::SyntaxError(self.error),
|
||||
location: self.location,
|
||||
source_path,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue