pub struct SourcePos {
pub file: String,
pub line: u32,
pub column: u32,
pub length: u32,
}Expand description
Source position in original Oxur code
Fields§
§file: StringSource file path (or “<repl>” for REPL input)
line: u321-indexed line number
column: u321-indexed column number
length: u32Length of the span (for error highlighting)
Implementations§
Trait Implementations§
Source§impl From<&Span> for SourcePos
Convert a single-line Span to SourcePos
impl From<&Span> for SourcePos
Convert a single-line Span to SourcePos
§Panics
Panics if the span is multi-line.
impl Eq for SourcePos
impl StructuralPartialEq for SourcePos
Auto Trait Implementations§
impl Freeze for SourcePos
impl RefUnwindSafe for SourcePos
impl Send for SourcePos
impl Sync for SourcePos
impl Unpin for SourcePos
impl UnwindSafe for SourcePos
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