| 1 |
# Changelog |
| 2 |
|
| 3 |
All notable changes to this project will be documented in this file. |
| 4 |
|
| 5 |
|
| 6 |
## [Unreleased] |
| 7 |
|
| 8 |
## [0.4.1] - 2023-10-18 |
| 9 |
- Fixed incorrectly labeling `27f32` a float literals in docs. |
| 10 |
- Added hint to integer literal docs about parsing as `u128`. |
| 11 |
|
| 12 |
## [0.4.0] - 2023-03-05 |
| 13 |
### Added |
| 14 |
- Add ability to parse literals with arbitrary suffixes (e.g. `"foo"bla` or `23px`) |
| 15 |
- Add `suffix()` method to all literal types except `BoolLit` |
| 16 |
- Add `IntegerBase::value` |
| 17 |
- Add `from_suffix` and `suffix` methods to `FloatType` and `IntegerType` |
| 18 |
- Add `FromStr` and `Display` impls to `FloatType` and `IntegerType` |
| 19 |
|
| 20 |
### Changed |
| 21 |
- **Breaking**: Mark `FloatType` and `IntegerType` as `#[non_exhaustive]` |
| 22 |
- **Breaking**: Fix integer parsing for cases like `27f32`. `Literal::parse` |
| 23 |
and `IntegerLit::parse` will both identify this as an integer literal. |
| 24 |
- **Breaking**: Fix float parsing by correctly rejecting inputs like `27f32`. A |
| 25 |
float literal must have a period OR an exponent part, according to the spec. |
| 26 |
Previously decimal integers were accepted in `FloatLit::parse`. |
| 27 |
- Improved some parts of the docs |
| 28 |
|
| 29 |
### Removed |
| 30 |
- **Breaking**: Remove `OwnedLiteral` and `SharedLiteral` |
| 31 |
|
| 32 |
## [0.3.0] - 2022-12-19 |
| 33 |
### Breaking |
| 34 |
- Bump MSRV (minimal supported Rust version) to 1.54 |
| 35 |
|
| 36 |
### Added |
| 37 |
- Add `raw_input` and `into_raw_input` to non-bool `*Lit` types |
| 38 |
- Add `impl From<*Lit> for pm::Literal` (for non-bool literals) |
| 39 |
- Add `impl From<BoolLit> for pm::Ident` |
| 40 |
|
| 41 |
### Fixed |
| 42 |
- Fix link to reference and clarify bool literals ([#7](https://github.com/LukasKalbertodt/litrs/pull/7)) |
| 43 |
|
| 44 |
### Internals |
| 45 |
- Move lots of parsing code into non-generic functions (this hopefully reduces compile times) |
| 46 |
- To implement `[into_]raw_input` for integer and float literals, their |
| 47 |
internals were changed a bit so that they store the full input string now. |
| 48 |
|
| 49 |
## [0.2.3] - 2021-06-09 |
| 50 |
### Changed |
| 51 |
- Minor internal code change to bring MSRV from 1.52 to 1.42 |
| 52 |
|
| 53 |
## [0.2.2] - 2021-06-09 |
| 54 |
### Changed |
| 55 |
- Fixed (byte) string literal parsing by: |
| 56 |
- Correctly handling "string continue" sequences |
| 57 |
- Correctly converting `\n\r` into `\n` |
| 58 |
|
| 59 |
## [0.2.1] - 2021-06-04 |
| 60 |
### Changed |
| 61 |
- Fixed the `expected` value of the error returned from `TryFrom<TokenTree>` impls in some cases |
| 62 |
|
| 63 |
## [0.2.0] - 2021-05-28 |
| 64 |
### Changed |
| 65 |
- **Breaking**: rename `Error` to `ParseError`. That describes its purpose more |
| 66 |
closely and is particular useful now that other error types exist in the library. |
| 67 |
|
| 68 |
### Removed |
| 69 |
- **Breaking**: remove `proc-macro` feature and instead offer the corresponding |
| 70 |
`impl`s unconditionally. Since the feature didn't enable/disable a |
| 71 |
dependency (`proc-macro` is a compiler provided crate) and since apparently |
| 72 |
it works fine in `no_std` environments, I dropped this feature. I don't |
| 73 |
currently see a reason why the corresponding impls should be conditional. |
| 74 |
|
| 75 |
### Added |
| 76 |
- `TryFrom<TokenTree> for litrs::Literal` impls |
| 77 |
- `From<*Lit> for litrs::Literal` impls |
| 78 |
- `TryFrom<proc_macro[2]::Literal> for *Lit` |
| 79 |
- `TryFrom<TokenTree> for *Lit` |
| 80 |
- `InvalidToken` error type for all new `TryFrom` impls |
| 81 |
|
| 82 |
|
| 83 |
## [0.1.1] - 2021-05-25 |
| 84 |
### Added |
| 85 |
- `From` impls to create a `Literal` from references to proc-macro literal types: |
| 86 |
- `From<&proc_macro::Literal>` |
| 87 |
- `From<&proc_macro2::Literal>` |
| 88 |
- Better examples in README and repository |
| 89 |
|
| 90 |
## 0.1.0 - 2021-05-24 |
| 91 |
### Added |
| 92 |
- Everything |
| 93 |
|
| 94 |
|
| 95 |
[Unreleased]: https://github.com/LukasKalbertodt/litrs/compare/v0.4.1...HEAD |
| 96 |
[0.4.1]: https://github.com/LukasKalbertodt/litrs/compare/v0.4.0...v0.4.1 |
| 97 |
[0.4.0]: https://github.com/LukasKalbertodt/litrs/compare/v0.3.0...v0.4.0 |
| 98 |
[0.3.0]: https://github.com/LukasKalbertodt/litrs/compare/v0.2.3...v0.3.0 |
| 99 |
[0.2.3]: https://github.com/LukasKalbertodt/litrs/compare/v0.2.2...v0.2.3 |
| 100 |
[0.2.2]: https://github.com/LukasKalbertodt/litrs/compare/v0.2.1...v0.2.2 |
| 101 |
[0.2.1]: https://github.com/LukasKalbertodt/litrs/compare/v0.2.0...v0.2.1 |
| 102 |
[0.2.0]: https://github.com/LukasKalbertodt/litrs/compare/v0.1.1...v0.2.0 |
| 103 |
[0.1.1]: https://github.com/LukasKalbertodt/litrs/compare/v0.1.0...v0.1.1 |