Update get_consumed to use the new wrapped input type.
This commit is contained in:
@@ -50,6 +50,12 @@ impl<'s> OrgSource<'s> {
|
||||
pub fn is_at_start_of_line(&self) -> bool {
|
||||
self.start == self.start_of_line
|
||||
}
|
||||
|
||||
pub fn get_until(&self, other: OrgSource<'s>) -> OrgSource<'s> {
|
||||
assert!(other.start >= self.start);
|
||||
assert!(other.end <= self.end);
|
||||
self.slice(..(other.start - self.start))
|
||||
}
|
||||
}
|
||||
|
||||
impl<'s> InputTake for OrgSource<'s> {
|
||||
@@ -118,7 +124,6 @@ where
|
||||
.map(|idx| self.start + idx + 1)
|
||||
.unwrap_or(self.start_of_line);
|
||||
|
||||
// TODO: calculate updated values for WrappedInput
|
||||
OrgSource {
|
||||
full_source: self.full_source,
|
||||
start: new_start,
|
||||
|
||||
Reference in New Issue
Block a user