From 297784cb925b1196d89479fa24c898703ae598d6 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 26 Jul 2022 12:39:38 +0200 Subject: Refactor to simplify tokenizer --- src/subtokenize.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/subtokenize.rs') diff --git a/src/subtokenize.rs b/src/subtokenize.rs index a1ec90a..8aa4df1 100644 --- a/src/subtokenize.rs +++ b/src/subtokenize.rs @@ -100,16 +100,13 @@ pub fn subtokenize(events: &mut Vec, parse_state: &ParseState) -> bool { _ => unreachable!("cannot be ok/nok"), }; - state = tokenizer.push( - enter.point.index, - events[index + 1].point.index, - func, - link_curr.next == None, - ); + state = tokenizer.push(enter.point.index, events[index + 1].point.index, func); link_index = link_curr.next; } + tokenizer.flush(state, true); + // Now, loop through all subevents to figure out which parts // belong where and fix deep links. let mut subindex = 0; -- cgit