pub trait Locatable {
// Required methods
fn current_position(&self) -> Position;
fn last_position(&self) -> Position;
fn get_location_from(&self, start: Position) -> SourceLocation;
}
Expand description
This trait produces a compiler’s current position and selects a range.
Required Methods§
Sourcefn current_position(&self) -> Position
fn current_position(&self) -> Position
Returns the scanner’s current position in the source.
fn last_position(&self) -> Position
Sourcefn get_location_from(&self, start: Position) -> SourceLocation
fn get_location_from(&self, start: Position) -> SourceLocation
Returns the scanner’s source location from the start position.