diff options
Diffstat (limited to 'src/subtokenize.rs')
-rw-r--r-- | src/subtokenize.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/subtokenize.rs b/src/subtokenize.rs index 8aa4df1..a78f5e2 100644 --- a/src/subtokenize.rs +++ b/src/subtokenize.rs @@ -95,12 +95,14 @@ pub fn subtokenize(events: &mut Vec<Event>, parse_state: &ParseState) -> bool { tokenizer.define_skip(&enter.point); } - let func = match state { - State::Fn(func) => func, - _ => unreachable!("cannot be ok/nok"), - }; - - state = tokenizer.push(enter.point.index, events[index + 1].point.index, func); + state = tokenizer.push( + enter.point.index, + events[index + 1].point.index, + match state { + State::Fn(func) => func, + _ => unreachable!("cannot be ok/nok"), + }, + ); link_index = link_curr.next; } |