Struct ketos::lexer::CodeMap
[−]
[src]
pub struct CodeMap { /* fields omitted */ }
Contains source code of parsed programs
Methods
impl CodeMap
[src]
fn new() -> CodeMap
Creates a new CodeMap
.
fn add_source(&mut self, text: &str, path: Option<String>) -> BytePos
Adds a source to the codemap, returning its offset in the internal buffer.
fn clear(&mut self)
Clears all source from the codemap.
fn highlight_span(&self, span: Span) -> SpanDisplay
Trait Implementations
impl Clone for CodeMap
[src]
fn clone(&self) -> CodeMap
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more