Struct vhdl_parser::SrcPos
source · Expand description
Lexical position in a file
Fields
source: Source
The source
start: usize
The start character position
length: usize
The length of the token in characters
Implementations
sourceimpl SrcPos
impl SrcPos
sourcepub fn code_context(&self) -> String
pub fn code_context(&self) -> String
Create a string for pretty printing
pub fn show(&self, message: &str) -> String
sourcepub fn combine_into(self, other: &dyn AsRef<Self>) -> Self
pub fn combine_into(self, other: &dyn AsRef<Self>) -> Self
Combines two lexical positions into a larger legical position overlapping both The file name is assumed to be the same
pub fn combine(&self, other: &dyn AsRef<Self>) -> Self
Trait Implementations
impl Eq for SrcPos
impl StructuralEq for SrcPos
impl StructuralPartialEq for SrcPos
Auto Trait Implementations
impl !RefUnwindSafe for SrcPos
impl Send for SrcPos
impl Sync for SrcPos
impl Unpin for SrcPos
impl !UnwindSafe for SrcPos
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