aboutsummaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/util/slice.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/slice.rs b/src/util/slice.rs
index d899dac..13b664d 100644
--- a/src/util/slice.rs
+++ b/src/util/slice.rs
@@ -42,6 +42,11 @@ impl<'a> Position<'a> {
enter_index -= 1;
}
}
+
+ /// To do.
+ pub fn to_indices(&self) -> (usize, usize) {
+ (self.start.index, self.end.index)
+ }
}
/// Chars belonging to a range.