mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-22 12:54:08 +00:00
deadend
This commit is contained in:
parent
e5e38f03bc
commit
06278c2efe
4 changed files with 195 additions and 25 deletions
|
@ -1,6 +1,6 @@
|
|||
use bumpalo::collections::vec::Vec;
|
||||
use bumpalo::Bump;
|
||||
use roc_region::all::{Located, Region};
|
||||
use roc_region::all::{Located, Position, Region};
|
||||
use std::fmt;
|
||||
use Progress::*;
|
||||
|
||||
|
@ -36,6 +36,13 @@ impl<'a> State<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_position(&self) -> Position {
|
||||
Position {
|
||||
row: self.line,
|
||||
col: self.column,
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns whether the parser has reached the end of the input
|
||||
pub fn has_reached_end(&self) -> bool {
|
||||
self.bytes.is_empty()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue