sin

Crates.iosin
lib.rssin
version0.0.2
sourcesrc
created_at2017-07-12 20:13:21.509457
updated_at2023-06-02 16:06:07.023493
descriptionSin aims to be an alternative to the proc-macro2/syn ecosystem geared towards developer UX and custom syntax parsing.
homepagehttps://sam0x17.dev
repositoryhttps://github.com/sam0x17/sin
max_upload_size
id23155
size4,522
Sam Johnson (sam0x17)

documentation

README

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.

Commit count: 90

cargo fmt