mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 04:24:43 +00:00
impl Error for CompileError
This commit is contained in:
parent
7fad8d9eee
commit
792c0ca3b4
3 changed files with 22 additions and 2 deletions
|
@ -8,7 +8,10 @@ use erg_common::error::{ErrorCore, ErrorDisplay, ErrorKind::*, Location, MultiEr
|
|||
use erg_common::set::Set;
|
||||
use erg_common::traits::{Locational, Stream};
|
||||
use erg_common::vis::Visibility;
|
||||
use erg_common::{fmt_iter, fmt_option_map, fmt_vec, impl_stream_for_wrapper, switch_lang, Str};
|
||||
use erg_common::{
|
||||
fmt_iter, fmt_option_map, fmt_vec, impl_display_and_error, impl_stream_for_wrapper,
|
||||
switch_lang, Str,
|
||||
};
|
||||
|
||||
use erg_parser::error::{ParserRunnerError, ParserRunnerErrors};
|
||||
|
||||
|
@ -100,6 +103,8 @@ pub struct CompileError {
|
|||
pub caused_by: AtomicStr,
|
||||
}
|
||||
|
||||
impl_display_and_error!(CompileError);
|
||||
|
||||
impl From<ParserRunnerError> for CompileError {
|
||||
fn from(err: ParserRunnerError) -> Self {
|
||||
Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue