Syn Rsx Versions Save

syn-powered parser for JSX-like TokenStreams

v0.7.3

3 years ago

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.0

3 years ago

Breaking changes

  • parse and parse2 no longer take a config as second argument. Instead parse_with_config and parse2_with_config exist for this purpose
  • ParserConfig is configured by calling methods instead of having to construct it fully
  • Braced blocks are allowed in attribute position (<div {attribute} />) and as such node attributes can also be of type NodeType::Block

Features

  • Node method name_span: Returns Span if the name is Some
  • NodeName method span: Returns the Span
  • ParserConfig options
    • number_of_top_level_nodes: Exact number of required top level nodes
    • type_of_top_level_nodes: Enforce the NodeType of top level nodes
  • Better error reporting on empty input

v0.6.0

3 years ago

Breaking change

  • Renamed NodeName::Dashed to NodeName::Dash

Features

  • Parser support for NodeName::Colon, e.g. <div on:click={foo} />