Skip to content

Releases: LukasKalbertodt/litrs

v0.5.1

01 Aug 11:42
71bd8dc
Compare
Choose a tag to compare
  • Add Literal::raw_input

v0.5.0

25 Jul 18:01
1564210
Compare
Choose a tag to compare

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 return String instead of Cow<'static, str>.
    Make ByteStringLit<String>::into_value return Vec<u8> instead of Cow<'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

25 Jul 16:34
1dc8a3e
Compare
Choose a tag to compare
  • Fix incorrect byte string value with non-ASCII \xHH byte string escapes
    • ByteStringLit::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

18 Oct 18:59
5cecfbb
Compare
Choose a tag to compare
  • Fixed incorrectly labeling 27f32 a float literals in docs.
  • Added hint to integer literal docs about parsing as u128.

v0.4.0

05 Mar 17:34
458d6e1
Compare
Choose a tag to compare

Added

  • Add ability to parse literals with arbitrary suffixes (e.g. "foo"bla or 23px)
  • Add suffix() method to all literal types except BoolLit
  • Add IntegerBase::value
  • Add from_suffix and suffix methods to FloatType and IntegerType
  • Add FromStr and Display impls to FloatType and IntegerType

Changed

  • Breaking: Mark FloatType and IntegerType as #[non_exhaustive]
  • Breaking: Fix integer parsing for cases like 27f32. Literal::parse
    and IntegerLit::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 in FloatLit::parse.
  • Improved some parts of the docs

Removed

  • Breaking: Remove OwnedLiteral and SharedLiteral

v0.3.0

19 Dec 14:19
3cff8b4
Compare
Choose a tag to compare

Breaking

  • Bump MSRV (minimal supported Rust version) to 1.54

Added

  • Add raw_input and into_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

09 Jun 17:00
219f0ca
Compare
Choose a tag to compare

See CHANGELOG.md

v0.2.2

09 Jun 12:58
e248e76
Compare
Choose a tag to compare

See CHANGELOG.md

v0.2.1

04 Jun 16:46
773ccc7
Compare
Choose a tag to compare

See CHANGELOG.md

v0.2.0

28 May 18:19
61b9985
Compare
Choose a tag to compare

See CHANGELOG.md