From c7a46d3cc22bd0b029ff97623cee31c6ec38fdfb Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 20 Jun 2022 18:14:15 +0200 Subject: Add support for line endings in string --- src/util/link.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/util/link.rs (limited to 'src/util/link.rs') diff --git a/src/util/link.rs b/src/util/link.rs new file mode 100644 index 0000000..917ce4d --- /dev/null +++ b/src/util/link.rs @@ -0,0 +1,8 @@ +//! To do. + +use crate::tokenizer::Event; + +pub fn link(events: &mut [Event], index: usize) { + events[index - 2].next = Some(index); + events[index].previous = Some(index - 2); +} -- cgit