Struct erg_compiler::error::CompileError
source · [−]Fields
core: ErrorCore
input: Input
caused_by: AtomicStr
Implementations
sourceimpl CompileError
impl CompileError
pub const fn new(core: ErrorCore, input: Input, caused_by: AtomicStr) -> Self
pub fn compiler_bug(
errno: usize,
input: Input,
loc: Location,
fn_name: &str,
line: u32
) -> Self
pub fn stack_bug(
input: Input,
loc: Location,
stack_len: u32,
block_id: usize,
fn_name: &str
) -> Self
pub fn feature_error(
input: Input,
loc: Location,
name: &str,
caused_by: AtomicStr
) -> Self
pub fn system_exit() -> Self
Trait Implementations
sourceimpl Debug for CompileError
impl Debug for CompileError
sourceimpl ErrorDisplay for CompileError
impl ErrorDisplay for CompileError
fn core(&self) -> &ErrorCore
fn input(&self) -> &Input
sourcefn caused_by(&self) -> &str
fn caused_by(&self) -> &str
The block name the error caused. This will be None if the error occurred before semantic analysis. As for the internal error, do not put the fn name here. Read more
fn write_to_stderr(&self)
fn format_header(&self) -> String
fn format_code_and_pointer(&self) -> String
sourceimpl From<CompileError> for CompileErrors
impl From<CompileError> for CompileErrors
sourcefn from(err: CompileError) -> Self
fn from(err: CompileError) -> Self
Converts to this type from the input type.
sourceimpl From<ParserRunnerError> for CompileError
impl From<ParserRunnerError> for CompileError
sourcefn from(err: ParserRunnerError) -> Self
fn from(err: ParserRunnerError) -> Self
Converts to this type from the input type.
sourceimpl MultiErrorDisplay<CompileError> for CompileErrors
impl MultiErrorDisplay<CompileError> for CompileErrors
sourceimpl Stream<CompileError> for CompileErrors
impl Stream<CompileError> for CompileErrors
fn payload(self) -> Vec<CompileError>
fn ref_payload(&self) -> &Vec<CompileError>
fn ref_mut_payload(&mut self) -> &mut Vec<CompileError>
fn clear(&mut self)
fn len(&self) -> usize
fn size(&self) -> usize
fn is_empty(&self) -> bool
fn insert(&mut self, idx: usize, elem: T)
fn remove(&mut self, idx: usize) -> T
fn push(&mut self, elem: T)
fn append<S>(&mut self, s: &mut S)where
S: Stream<T>,
fn pop(&mut self) -> Option<T>
fn lpop(&mut self) -> Option<T>
fn get(&self, idx: usize) -> Option<&T>
fn get_mut(&mut self, idx: usize) -> Option<&mut T>
fn first(&self) -> Option<&T>
fn first_mut(&mut self) -> Option<&mut T>
fn last(&self) -> Option<&T>
fn last_mut(&mut self) -> Option<&mut T>
fn iter(&self) -> Iter<'_, T>
fn iter_mut(&mut self) -> IterMut<'_, T>
fn into_iter(self) -> IntoIter<T, Global>
fn take_all(&mut self) -> Vec<T, Global>
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = T>,
Auto Trait Implementations
impl RefUnwindSafe for CompileError
impl Send for CompileError
impl Sync for CompileError
impl Unpin for CompileError
impl UnwindSafe for CompileError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more