Expand description
Core library for zyn — AST, traits, types, and utilities for procedural macro development.
Re-exports§
pub use mark::Diagnostic;pub use mark::Result;pub use proc_macro2;pub use quote;pub use syn;pub use extract::*;pub use meta::*;
Modules§
- ast
- Template AST node types. Template AST node types.
- case
- Case conversion utilities. Case conversion functions and macros.
- debug
- Debug formatting and printing for template expansions. Debug formatting utilities for macro expansions.
- ext
- Extension traits for common
synAST types. Extension traits for commonsynAST types. - extract
- Extractors for resolving values from proc macro input. Extractors for resolving typed values from proc macro input.
- ident
- Internal identifier generation for template expansion. Internal identifier generation for template expansion.
- mark
- Types and implementations for marking spans. Diagnostic construction utilities.
- meta
- Attribute argument parsing types. Attribute argument parsing types.
- path
- Dot-separated path type for navigating nested
synmetadata. Dot-separated path type for navigating nestedsynmetadata. - pipes
- Built-in pipe types for template value transforms. Built-in pipe transforms for template value interpolation.
Macros§
- camel
- Converts a string or ident to camelCase.
- format_
ident - Formatting macro for constructing
Idents. - kebab
- Converts a string or ident to kebab-case.
- parse
- Parses tokens or string literals into a type. Wraps
syn::parse_strandsyn::parse2. - parse_
input - Parses a
proc_macro::TokenStreamin a proc macro entry point. Wrapssyn::parse_macro_input!. - pascal
- Converts a string or ident to PascalCase.
- screaming
- Converts a string or ident to SCREAMING_SNAKE_CASE.
- snake
- Converts a string or ident to snake_case.
Structs§
- Output
- The result of rendering an element or expanding a template.
- Output
Builder - Builder for constructing
Outputinstances. - Span
- A region of source code, along with macro expansion information.
- Template
- A parsed template AST. Created by parsing template syntax via
syn::parse2::<Template>(tokens). - Token
Stream - An abstract stream of tokens, or more concretely a sequence of token trees.
Enums§
- Input
- The proc macro input context. Wraps either a
DeriveInputor anItem.
Traits§
- Expand
- Internal trait for AST node expansion. Not part of the public API.
- Pipe
- Implemented by
#[zyn::pipe]types. Transforms a value in a pipe chain. - Render
- Implemented by
#[zyn::element]types. Renders the element with the givenInputcontext. - ToTokens
- Types that can be interpolated inside a
quote!invocation.