mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-02 21:44:34 +00:00
Implement assert casting
This commit is contained in:
parent
4e70e2e980
commit
de1180387c
13 changed files with 252 additions and 51 deletions
|
@ -11,6 +11,18 @@ use erg_common::{impl_display_and_error, impl_stream_for_wrapper, switch_lang};
|
|||
#[derive(Debug)]
|
||||
pub struct LexError(ErrorCore);
|
||||
|
||||
impl From<ErrorCore> for LexError {
|
||||
fn from(core: ErrorCore) -> Self {
|
||||
Self(core)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<LexError> for ErrorCore {
|
||||
fn from(err: LexError) -> Self {
|
||||
err.0
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct LexErrors(Vec<LexError>);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue