Skip to main content

Crate parsyng_proc_macros

Crate parsyng_proc_macros 

Source
Expand description

Implementation of the proc_macro, proc_macro_attribute and the proc_macro_derive procedural macros, and Parse, ToTokens derive macros for parsyng.

This crate only depends on the compiler’s proc_macro, not on parsyng-core, so that both compile in parallel: it walks just the outline of its input (see tokens) and passes every other token through.

Attribute Macros§

proc_macro_
Helper attribute to build new procedural macros. This replaces the standard library’s #[proc_macro] attribute.
proc_macro_attribute_
Helper attribute to build new procedural macro attributes. This replaces the standard library’s #[proc_macro_attribute] attribute.
proc_macro_derive_
Helper attribute to build new derive macros. This replaces the standard library’s #[proc_macro_derive] attribute.

Derive Macros§

Parse
Derives Parse by parsing each field, in declaration order, with its own Parse implementation.
ToTokens
Derives ToTokens by appending each field’s own tokens, in declaration order.