pub struct SourceMapBuilder { /* private fields */ }Expand description
Builder for constructing a SourceMap during code generation.
Implementations§
Source§impl SourceMapBuilder
impl SourceMapBuilder
Sourcepub fn record_line(&mut self, logos_span: Span)
pub fn record_line(&mut self, logos_span: Span)
Record a mapping from current Rust line to LOGOS span.
Sourcepub fn record_var(
&mut self,
rust_name: &str,
logos_name: Symbol,
span: Span,
role: OwnershipRole,
)
pub fn record_var( &mut self, rust_name: &str, logos_name: Symbol, span: Span, role: OwnershipRole, )
Record a variable origin.
Sourcepub fn current_line(&self) -> u32
pub fn current_line(&self) -> u32
Get current line number.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SourceMapBuilder
impl RefUnwindSafe for SourceMapBuilder
impl Send for SourceMapBuilder
impl Sync for SourceMapBuilder
impl Unpin for SourceMapBuilder
impl UnwindSafe for SourceMapBuilder
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