nom v1.1.0 Release Notes
Release Date: 2016-01-01 // over 8 years ago-
๐ This release adds a lot of features related to
&str
parsing. The previous versions ๐ were focused on&[u8]
and bit streams parsing, but there's a need for more text ๐ parsing with nom. The parsing functions likealpha
,digit
and others will now accept either a&[u8]
or a&str
, so there is no breaking change on that part.๐ There are also a few performance improvements and documentation fixes.
Thanks
- ๐ @Binero for pushing the work on
&str
parsing - @meh for fixing
Option
andVec
imports - ๐ @hoodie for a documentation fix
- ๐ @joelself for some documentation fixes
- @vberger for his traits magic making nom functions more generic
โ Added
- string related parsers:
tag_s!
,take_s!
,is_a_s!
,is_not_s!
,take_while_s!
,take_while1_s!
,take_till_s!
- ๐
value!
is a combinator that always returns the same value. If a child parser is passed as second argument, that value is returned when the child parser succeeds
๐ Changed
tag!
will now compare even on partial input. If it expects "abcd" but receives "ef", it will now return anError
instead ofIncomplete
many0!
and others will preallocate a larger vector to avoid some copies and reallocationsalpha
,digit
,alphanumeric
,space
andmultispace
now accept as input a&[u8]
or a&str
. Additionally, they return an error if they receive an empty inputtake_while!
,take_while1!
,take_while_s!
,take_while1_s!
wilreturn an error on empty input
๐ Fixed
- โก๏ธ if the child parser of
many0!
ormany1!
returnsIncomplete
, it will returnIncomplete
too, possibly updating the needed size Option,
Some
,None
andVec
are now used with full path imports
- ๐ @Binero for pushing the work on