Skip to content

Releases: stoically/syn-rsx

v0.9.0

10 Nov 13:36
734000a
Compare
Choose a tag to compare

BREAKING

  • Node was converted to an enum similar to syn's Expr. This was primarily done because the old API required manual documentation lookups to decide whether it is safe to unwrap a node name or value based on the Node::node_type. This is not really type safe or rusty, and hence the decision was made to move to a type safe API. There's also no measurable impact on performance. If you have feedback or concerns regarding this change, feel free to voice them in #26.

    Basically,

    match node.node_type {
      NodeType::Element => node.name_as_string().unwrap(),
      NodeType::Attribute => node.name_as_string().unwrap(),
      NodeType::Text => node.value_as_string().unwrap(),
      ...
    }

    becomes

    match node {
      Node::Element(element) => element.name.to_string(),
      Node::Attribute(attribute) => attribute.key.to_string(),
      Node::Text(text) => String::try_from(&text.value).unwrap(),
      ...
    }
  • NodeName::span was dropped, since NodeName already implements syn::spanned::Spanned, which gives you the span method if you import the trait accordingly.

  • NodeName::Colon and NodeName::Dash were merged into NodeName::Punctuated. This was done to allow attribute names like on:some-event. Thanks @gbj for working on it. (#34)

Everything else is in the CHANGELOG and the docs.

v0.9.0-beta.2

06 Nov 19:49
6668b3c
Compare
Choose a tag to compare
v0.9.0-beta.2 Pre-release
Pre-release

v0.9.0-beta.1

03 Nov 16:48
98cc893
Compare
Choose a tag to compare
v0.9.0-beta.1 Pre-release
Pre-release

v0.9.0-alpha.1

21 Oct 23:02
Compare
Choose a tag to compare
v0.9.0-alpha.1 Pre-release
Pre-release

v0.8.1

26 Jun 08:24
Compare
Choose a tag to compare
  • Removed Cargo.lock

v0.8.0

17 Feb 03:05
Compare
Choose a tag to compare

BREAKING

  • New NodeType and NodeName enum variants
  • ParserConfig no longer implements Clone and Debug

Features

  • Block in node name position (#10, #11, thanks @gbj)
  • Doctype declaration nodes (#6)
  • Comment nodes (#7)
  • Fragment nodes (#8)
  • transform_block configuration which takes a closure that receives raw block content as ParseStream and lets you optionally convert it to a TokenStream. That makes it possible to have custom syntax in blocks. More details in #9

v0.8.0-beta.2

04 Jan 09:26
Compare
Choose a tag to compare
v0.8.0-beta.2 Pre-release
Pre-release

BREAKING

  • New NodeName enum variant

Features

  • Block in node name position (#10, #11, thanks @gbj)

v0.8.0-beta.1

03 Jan 12:21
Compare
Choose a tag to compare
v0.8.0-beta.1 Pre-release
Pre-release

BREAKING

  • New NodeType enum variants
  • ParserConfig no longer implements Clone and Debug

Features

  • Doctype declaration node (#6)
  • Comment nodes (#7)
  • Fragment nodes (#8)
  • transform_block configuration which takes a closure that receives raw block content as ParseStream and lets you optionally convert it to a TokenStream. That makes it possible to have custom syntax in blocks. More details in #9

v0.7.3

30 Oct 15:18
ad02fcf
Compare
Choose a tag to compare

Features

  • value_as_block method on Node
  • Implemented quote::ToTokens on NodeName

Fixes

  • Correctly count top level nodes with number_of_top_level_nodes option

Refactoring

  • Performance optimization (50%+ faster, #5)
  • Switched ToString to Display on Node

v0.7.2

30 Oct 15:23
27080cc
Compare
Choose a tag to compare

Features

  • span method on NodeName
  • better error messages