Expand description
Core library for zyn — AST, traits, types, and utilities for procedural macro development.
Re-exports§
pub use template::Template;pub use types::Input;pub use proc_macro2;pub use quote;pub use syn;pub use diagnostic::*;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 and printing for template expansions.
- diagnostic
- Diagnostic accumulation and emission. Diagnostic accumulation and emission.
- 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.
- meta
- Attribute argument parsing types. Attribute argument parsing types.
- pipes
- Built-in pipe types for template value transforms. Built-in pipe transforms for template value interpolation.
- template
- Template parsing and expansion. Template parsing and expansion.
- types
- Proc macro input types. Proc macro input types.
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§
- Span
- A region of source code, along with macro expansion information.
- Token
Stream - An abstract stream of tokens, or more concretely a sequence of token trees.
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.