Struct conch_parser::parse::SourcePos
[−]
[src]
pub struct SourcePos { pub byte: usize, pub line: usize, pub col: usize, }
Indicates a character/token position in the original source.
Fields
byte: usize
The byte offset since the start of parsing.
line: usize
The line offset since the start of parsing, useful for error messages.
col: usize
The column offset since the start of parsing, useful for error messages.
Methods
impl SourcePos
[src]
fn new() -> SourcePos
Constructs a new, starting, source position
fn advance(&mut self, next: &Token)
Increments self using the length of the provided token.
Trait Implementations
impl Debug for SourcePos
[src]
impl PartialEq for SourcePos
[src]
fn eq(&self, __arg_0: &SourcePos) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SourcePos) -> bool
This method tests for !=
.
impl Eq for SourcePos
[src]
impl Copy for SourcePos
[src]
impl Clone for SourcePos
[src]
fn clone(&self) -> SourcePos
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