From 3a90a49518bbc53876d3f46d8763b2fe0f03d789 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 10 Aug 2022 10:54:43 +0200 Subject: Add `State::Retry` --- src/construct/partial_data.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/construct/partial_data.rs') diff --git a/src/construct/partial_data.rs b/src/construct/partial_data.rs index 5450ff2..a68f359 100644 --- a/src/construct/partial_data.rs +++ b/src/construct/partial_data.rs @@ -23,7 +23,7 @@ pub fn start(tokenizer: &mut Tokenizer) -> State { tokenizer.consume(); State::Next(StateName::DataInside) } - _ => at_break(tokenizer), + _ => State::Retry(StateName::DataAtBreak), } } @@ -48,7 +48,7 @@ pub fn at_break(tokenizer: &mut Tokenizer) -> State { } _ => { tokenizer.enter(Token::Data); - inside(tokenizer) + State::Retry(StateName::DataInside) } } } @@ -68,7 +68,7 @@ pub fn inside(tokenizer: &mut Tokenizer) -> State { if done { tokenizer.exit(Token::Data); - at_break(tokenizer) + State::Retry(StateName::DataAtBreak) } else { tokenizer.consume(); State::Next(StateName::DataInside) -- cgit