Releases: LukasKalbertodt/litrs
Releases · LukasKalbertodt/litrs
v0.5.1
v0.5.0
Note: this is supposed to be essentially a 1.0 release candidate. If there are no problems with this release, it will be released as 1.0 after some time.
- Breaking Bump MSRC from 1.54 to 1.56
- Breaking: Remove
proc-macro2
from default features - Breaking: Make
StringLit<String>::into_value
returnString
instead ofCow<'static, str>
.
MakeByteStringLit<String>::into_value
returnVec<u8>
instead ofCow<'static, [u8]>
. - Add support for C string literals
- Limit number of
#
as delimiter of raw string literals to 256 (to align with spec) - Fix license in
Cargo.toml
to use proper SPDX format (in #19, thanks @atouchet) - Fix error span for
InvalidStartOfUnicodeEscape
errors
v0.4.2
- Fix incorrect byte string value with non-ASCII
\xHH
byte string escapesByteStringLit::parse(r#"b"\xff""#).unwrap().value()
would return[0xc3, 0xbf]
instead of[0xff]
.
- Remove CR LF normalization to align with spec
- This is technically a breaking change, but released with a minor version bump as it just aligns with the specification. It is extremely unlikely to affect any real world use case.
- Fix incorrect error span for out-of-range Unicode escapes
v0.4.1
- Fixed incorrectly labeling
27f32
a float literals in docs. - Added hint to integer literal docs about parsing as
u128
.
v0.4.0
Added
- Add ability to parse literals with arbitrary suffixes (e.g.
"foo"bla
or23px
) - Add
suffix()
method to all literal types exceptBoolLit
- Add
IntegerBase::value
- Add
from_suffix
andsuffix
methods toFloatType
andIntegerType
- Add
FromStr
andDisplay
impls toFloatType
andIntegerType
Changed
- Breaking: Mark
FloatType
andIntegerType
as#[non_exhaustive]
- Breaking: Fix integer parsing for cases like
27f32
.Literal::parse
andIntegerLit::parse
will both identify this as an integer literal. - Breaking: Fix float parsing by correctly rejecting inputs like
27f32
. A
float literal must have a period OR an exponent part, according to the spec.
Previously decimal integers were accepted inFloatLit::parse
. - Improved some parts of the docs
Removed
- Breaking: Remove
OwnedLiteral
andSharedLiteral
v0.3.0
Breaking
- Bump MSRV (minimal supported Rust version) to 1.54
Added
- Add
raw_input
andinto_raw_input
to non-bool*Lit
types - Add
impl From<*Lit> for pm::Literal
(for non-bool literals) - Add
impl From<BoolLit> for pm::Ident
Fixed
- Fix link to reference and clarify bool literals (#7)
Internals
- Move lots of parsing code into non-generic functions (this hopefully reduces compile times)
- To implement
[into_]raw_input
for integer and float literals, their
internals were changed a bit so that they store the full input string now.
v0.2.3
See CHANGELOG.md
v0.2.2
See CHANGELOG.md
v0.2.1
See CHANGELOG.md
v0.2.0
See CHANGELOG.md