Skip to main content

Crate zyn_core

Crate zyn_core 

Source
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 syn AST types. Extension traits for common syn AST 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 syn metadata. Dot-separated path type for navigating nested syn metadata.
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_str and syn::parse2.
parse_input
Parses a proc_macro::TokenStream in a proc macro entry point. Wraps syn::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.
OutputBuilder
Builder for constructing Output instances.
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).
TokenStream
An abstract stream of tokens, or more concretely a sequence of token trees.

Enums§

Input
The proc macro input context. Wraps either a DeriveInput or an Item.

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 given Input context.
ToTokens
Types that can be interpolated inside a quote! invocation.