|
3 | 3 | <!-- next-header -->
|
4 | 4 | ## [Unreleased] - ReleaseDate
|
5 | 5 |
|
| 6 | +### Migration Guide |
| 7 | + |
| 8 | +1. Upgrade to the latest 0.6 release |
| 9 | +2. Resolve all deprecations |
| 10 | +3. Replace `impl Parser<_, _, _>` with `impl ModalParser<_, _, _>` |
| 11 | +4. Upgrade to 0.7.0 |
| 12 | +5. Resolve any compiler errors |
| 13 | + - For custom errors, remove switch from `from_error_kind` to `from_input` and remove other `kind` parameters |
| 14 | + - For `seq!(<tuple>)`, you may need to add `mut` to shared parsers |
| 15 | + - For `Stream::peek*` calls, update for lack of `Stream` being returned |
| 16 | + - Where `ModalParser` couldn't be used, change `Parser<I, O, E>` to `Parser<I, O, ErrMode<E>>` |
| 17 | +6. Resolve all deprecations |
| 18 | + |
| 19 | +*If* you do not use `cut_err` or `Partial`, you can further clean up the code and improve performance by removing the use of `ErrMode` |
| 20 | +- Replace `ModalResult<O, E>` with `winnow::Result<O>` (if using default error type) or just `Result<O, E>` |
| 21 | +- Replace `impl ModalParser` with `impl Parser` |
| 22 | +- Remove uses of `ErrMode` |
| 23 | + |
| 24 | +### Compatibility |
| 25 | + |
| 26 | +- `escaped` and `take_escaped` now assert, rather than stop, on empty `normal` output |
| 27 | +- Some parsers used in `seq(<tuple>)` must now be `mut` |
| 28 | +- `Stream::peek_token`, `Stream::peek_slice`, `Stream::peek_finish` no longer return a clone of `Stream` |
| 29 | +- `trait Location`s functions have changed to improve parsing of lexed tokens |
| 30 | +- `ParserError::append` and `FromExternalError::from_external_error`s `kind` parameter has been removed |
| 31 | +- `ParserError`, `AsChar`, `ContainsToken`, `Stream` were added to the prelude |
| 32 | +- Some trait bounds changed |
| 33 | +- Deprecated functionality removed |
| 34 | +- Deprecated `escaped_transform` in favor of the new name `escaped` |
| 35 | + |
| 36 | +### Features |
| 37 | + |
| 38 | +- Decoupled `ErrMode` from the core traits through new `ModalError` trait and `ParserError` modal functions, allowing better performance and greater flexibility |
| 39 | +- Add `ParserError`, `AsChar`, `ContainsToken`, `Stream` to the prelude |
| 40 | +- Add `stream::TokenSlice` to help parsing of lexed tokens |
| 41 | +- Implement `ErrorConvert` for `ErrMode` |
| 42 | + |
| 43 | +### Fixes |
| 44 | + |
| 45 | +- Borrow parsers in `seq!(<tuple>)` so they can be used multiple times |
| 46 | +- `escaped` and `take_escaped` now assert, rather than stop, on empty `normal` output |
| 47 | +- Improve type inference for `Parser::by_ref`, `Parser::complete_err` |
| 48 | +- Improve error reports for `float` |
| 49 | +- Added an inherent `ParserError::append` to reduce boilerplate with custom errors |
| 50 | +- Added support for `TreeError` with `binary::bits` parsers |
| 51 | +- `escaped` can now have separate types for `normal` and `escaped` parsers |
| 52 | + |
| 53 | +### Documentation |
| 54 | + |
| 55 | +- Modernized reference examples |
| 56 | + |
6 | 57 | ## [0.6.26] - 2025-01-30
|
7 | 58 |
|
8 | 59 | ### Compatibility
|
|
0 commit comments