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 like alpha, 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 and Vec 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 an Error instead of Incomplete
    • many0! and others will preallocate a larger vector to avoid some copies and reallocations
    • alpha, digit, alphanumeric, space and multispace now accept as input a &[u8] or a &str. Additionally, they return an error if they receive an empty input
    • take_while!, take_while1!, take_while_s!, take_while1_s! wilreturn an error on empty input

    ๐Ÿ›  Fixed

    • โšก๏ธ if the child parser of many0! or many1! returns Incomplete, it will return Incomplete too, possibly updating the needed size
    • Option, Some, None and Vec are now used with full path imports