sin 0.0.2

Sin aims to be an alternative to the proc-macro2/syn ecosystem geared towards developer UX and custom syntax parsing.
Documentation
  • Coverage
  • 100%
    1 out of 1 items documented0 out of 0 items with examples
  • Size
  • Source code size: 4.18 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 993.22 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • sam0x17/sin
    6 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • sam0x17

Sin

Sin (a perversion of dtolnay's syn crate), aims to be a compatible (via optional features), friendly alternative to the proc-macro2 / syn / quote ecosystem. The goal of sin is to provide all of the same features, but without some of the limitations of syn. For example, sin::parse will be implemented for all underlying sin types without the need for awkward situational macros such as parenthesized!, parse_inner, etc., and implementing sin::parse will require implementing sin's equivalent of quote::ToTokens, meaning anything in the sin ecosystem that can be parsed can also be turned back into tokens automatically. Compatibility with the proc-macro2 ecosystem will also be provided via feature-gated From<TokenStream2> and To<TokenStream2> implementations.

Where the proc-macro2/syn ecosystem aims to provide accurate+complete parsing of valid Rust syntax, including complex structures like functions, impl blocks, etc, sin aims to maximize the developer UX to make syntax parsing a joy, while at the same time catering to those who wish to parse arbitrary syntax that may not necessarily be valid Rust code. Thus sin aims to be the tool you reach for when you want to define and parse custom syntax in Rust proc and attribute macros, including implementing support for non-Rust grammars.

Sin is a work in progress. The first usable version will be 0.1.0.