All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.6.0 - 2025-01-31
- Add
Combinator::bind_with
. - Implement
Iterator
forParser
.
- Remove
Combinator::bind_default
, useCombinator::bind_with
instead. - Remove
Parser::parse
, useParser::next
instead.
0.5.0 - 2025-01-28
- Add trait
Digest
. - Add
Input::shift_unchecked
. - Add
AcceptedContext::output
. - Add
combinator::bytes
. - Add
Eat<u8>
,Eat<&[u8]>
,Eat<&[u8;N]>
,Eat<Vec<u8>>
. - Add
take
/Take
. - Add
Till<u8>
,Till<&[u8]>
,Till<&[u8;N]>
,Till<Vec<u8>>
. - Add
recur
/recur_unchecked
/Recur
/RecurUnchecked
/RecurSetter
. - Add
NoSep
. - Add
Parser::builder
.
Instant
now take a generic paramTextRef
instead of a lifetime param.Input
now take an additional generic paramTextRef
instead of a lifetime param.- The
rest
ofInput::instant
is no longer guaranteed to be non-empty. Input::new
will returnInput
directly instead of anOption
.Action
will now take an additional generic paramText
.AcceptedContext::output
will always be a struct instead of a reference.eat
will no longer acceptusize
, usetake
instead.- Rewrite
Mul
. Combinator::fold
now only exists forCombinator<Mul>
and will return aCombinator<Mul>
.Combinator::fold
'sfold
now takeacc
as the first param andvalue
as the second param.Parser
now take an additional generic paramTextRef
instead of a lifetime param.Snapshot
now take an additional generic paramTextRef
instead of a lifetime param.
Combinator::optional
now will work properly with empty rest string.
- Remove
Input::new_unchecked
andInput::next
. - Remove implementation of
Action
for&mut Action
. - Remove
Eat<&String>
. UseEat<&str>
andeat(s.as_str())
instead. - Remove
eat_unchecked
. Usewrap
instead. - Remove
Sep
,Fold
andInlineFold
.
0.4.0 - 2025-01-10
- Add
Combinator::fold
.
Combinator::sep
now should be used aftermul
and will return a combinator.
- Remove
combinator * (repeat, init, fold)
syntax for inline fold. UseCombinator::fold
instead for better type inference.
0.3.0 - 2025-01-05
- Add
Input::validate
. - Implement
Action
for&dyn Action
,&mut dyn Action
,Box<dyn Action>
andRc<dyn Action>
. - Add
Combinator::action
. - Add
WrapUnchecked
,Wrap
,Next
,EatUnchecked
. eat
,add
andbitor
can accept&String
.- Add
When
,Prevent
,Reject
,Optional
,Boundary
,Prepare
,Then
,Catch
,Finally
,Map
,Tuple
,Bind
,BindDefault
,Select
,Range
,Pop
.
- Make
Action::State
andAction::Heap
become generic params. - Provided combinator constructors will return concrete types instead of
impl
types to retain trait information. Eat
andTill
are now structs instead of traits.- Combinator repetition with
Fold
will be implemented separately to improve performance and simplify type signature.
- Remove
Input::shift_unchecked
andInput::shift
. - Remove
C!
macro. - Remove
eater
andeater_unchecked
. Usewrap
instead. - Remove
EatChar
,EatStr
,EatString
,EatUsize
. UseEat<T>
instead.
0.2.0 - 2025-01-01
- Add
Input::instant
. - Implement
Action
for&Action
and&mut Action
. - Add
Combinator::pop
.
Input::new
andInput::new_unchecked
will requireInstant
instead ofstart
andrest
.Fold
requires 2 generic params:State
andHeap
.Fold::fold
and inline fold will provideinput
.- Move
parser::Instant
toinstant::Instant
.
- Remove
Input::start
andInput::rest
, useInput::instant
instead.
0.1.0 - 2024-12-29
- Add
Input::new_unchecked
. - Add
Input::reborrow
. - Add
Input::shift
andInput::shift_unchecked
. - Add
Output::digested
. - Implement
Action
forBox<Action>
,Rc<Action>
. - Add
C!(@T)
andC!(Kind, @T)
syntax. - Add
AcceptedContext::input
,AcceptedContext::start
,AcceptedContext::state
,AcceptedContext::heap
,AcceptedContext::rest
,AcceptedContext::take
,AcceptedContext::split
. - Add
Combinator::range
to include the byte range of digested text in the output. - Add
Combinator::when
as the opposite ofCombinator::prevent
. - Add
Combinator::finally
to modifyInput
after execution. - Add
wrap_unchecked
. - Implement
From<char>
,From<String>
,From<usize>
andFrom<&str>
forCombinator
. - Implement
Eat
forEatChar
,EatStr
,EatString
,EatUsize
. - Add
Combinator::sep
. - All provided combinators are now
const
. - Add
Instant::digest_unchecked
. - Add
Parser::digest_unchecked
,Parser::digest_with_unchecked
. Parser::reload_with
can acceptNone
as the new state.
- Rename
Node
toWithRange
, rename its fieldkind
todata
. - Rename
Parse
toAction
, rename its methodparse
toexec
. Action::exec
will consume theInput
.- Mark
Action
unsafe. - Rewrite
Output
, remove it's lifetime param. - Make generic param
State
andHeap
of theParse
trait become associated type. - Rename
Action::Kind
toAction::Value
, renameOutput::kind
toOutput::value
. - Rename
Combinator!
toC!
. - Rename
Combinator::rollback
toCombinator::catch
. - Make fields of
AcceptedContext
private. wrap
will check if theOutput::digested
is valid. Usewrap_unchecked
for the unchecked version.EatUsize
will eat by chars instead of bytes.- Rewrite
Till
trait to make it safe. - Combinator repetition with
Fold
will be implemented by using inline fold. - Make
Repeat::validate
unsafe. - Simplify generic params of
Combinator
andParser
. Parser::parse
andParser::peek
will returnparse::Output
instead ofWithRange
.
- Remove
Input::reload
, useInput::shift
instead. - Remove
Output::rest
. - Remove
Action
trait implementation for plain closures. Usewrap
instead to create aCombinator
from a closure. - Remove
combinator::Builder
. - Remove
C!(_, State, Heap)
syntax. - Remove
combinator * (repeat, sep)
syntax. - Remove
Instant::update
.
0.0.1 - 2024-11-24
- The
Parse
trait and the relatedInput
andOutput
struct. - The
Combinator
struct and the same name macro. - Built-in combinators:
eat
,next
,till
,eat_unchecked
,eater
,eater_unchecked
,wrap
. - Overloaded operators:
|
,+
and*
forCombinator
. - The basic
Parser
, withBuilder
,Instant
andSnapshot
support.