pub struct SyntaxError {
pub info: String,
pub hint: String,
pub span: SourceSpan,
}
Fields§
§info: String
§hint: String
§span: SourceSpan
Implementations§
Source§impl SyntaxError
impl SyntaxError
Sourcepub fn with_range(self, range: &Range<u32>) -> Self
pub fn with_range(self, range: &Range<u32>) -> Self
Set the file range
Sourcepub fn with_span(self, span: SourceSpan) -> Self
pub fn with_span(self, span: SourceSpan) -> Self
Set the file span
Source§impl SyntaxError
impl SyntaxError
pub fn as_error(self, kind: ReportKind) -> NyarError
pub fn as_report(&self, kind: ReportKind) -> Diagnostic
Trait Implementations§
Source§impl Clone for SyntaxError
impl Clone for SyntaxError
Source§fn clone(&self) -> SyntaxError
fn clone(&self) -> SyntaxError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SyntaxError
impl Debug for SyntaxError
Source§impl Display for SyntaxError
impl Display for SyntaxError
Source§impl From<ParseIntError> for SyntaxError
impl From<ParseIntError> for SyntaxError
Source§fn from(error: ParseIntError) -> Self
fn from(error: ParseIntError) -> Self
Converts to this type from the input type.
Source§impl From<SyntaxError> for NyarError
impl From<SyntaxError> for NyarError
Source§fn from(value: SyntaxError) -> Self
fn from(value: SyntaxError) -> Self
Converts to this type from the input type.
Source§impl Into<SyntaxError> for ForeignInterfaceError
impl Into<SyntaxError> for ForeignInterfaceError
Source§fn into(self) -> SyntaxError
fn into(self) -> SyntaxError
Converts this type into the (usually inferred) input type.
Source§impl PartialEq for SyntaxError
impl PartialEq for SyntaxError
impl Eq for SyntaxError
impl StructuralPartialEq for SyntaxError
Auto Trait Implementations§
impl Freeze for SyntaxError
impl RefUnwindSafe for SyntaxError
impl Send for SyntaxError
impl Sync for SyntaxError
impl Unpin for SyntaxError
impl UnwindSafe for SyntaxError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more