Releases: stoically/syn-rsx
v0.9.0
BREAKING
-
Node
was converted to anenum
similar tosyn
'sExpr
. 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 theNode::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, sinceNodeName
already implementssyn::spanned::Spanned
, which gives you thespan
method if you import the trait accordingly. -
NodeName::Colon
andNodeName::Dash
were merged intoNodeName::Punctuated
. This was done to allow attribute names likeon:some-event
. Thanks @gbj for working on it. (#34)
v0.9.0-beta.2
See CHANGELOG
v0.9.0-beta.1
See CHANGELOG
v0.9.0-alpha.1
See CHANGELOG
v0.8.1
v0.8.0
BREAKING
- New
NodeType
andNodeName
enum variants ParserConfig
no longer implementsClone
andDebug
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 asParseStream
and lets you optionally convert it to aTokenStream
. That makes it possible to have custom syntax in blocks. More details in #9
v0.8.0-beta.2
v0.8.0-beta.1
BREAKING
- New
NodeType
enum variants ParserConfig
no longer implementsClone
andDebug
Features