[][src]Crate snax

Snax is JSX for Rust.

More specifically, it's a library for proc macro authors who want JSX-like syntax in their libraries.

For the current best example of how to use Snax, check out the current source of the ritz crate.

Requirements

Snax requires Rust 1.32 or newer.

License

Snax is available under the MIT license. See LICENSE.txt for details.

Structs

SnaxFragment

A fragment, which only contains children.

SnaxSelfClosingTag

A self-closing tag, which doesn't have children:

SnaxTag

A standard tag, which can have attributes and children.

Enums

ParseError
SnaxAttribute

An attribute that's present on either a SnaxTag or a SnaxSelfClosingTag.

SnaxItem

One complete block in the syntax.

Functions

parse

Attempts to parse a proc_macro2::TokenStream into a SnaxItem.