Crates.io | znap-syn |
lib.rs | znap-syn |
version | 0.1.37 |
source | src |
created_at | 2024-06-16 20:05:36.878207 |
updated_at | 2024-08-31 16:22:42.573363 |
description | Collection of utilities for parsing and code generation that power znap-macros |
homepage | |
repository | https://github.com/heavy-duty/znap |
max_upload_size | |
id | 1273806 |
size | 42,741 |
Parsing and generating code for macros in Rust
The znap-syn
module is a fundamental part of the znap library ecosystem, designed specifically for analyzing and generating code in Rust. This module is essential for the functionality of znap-macros
, a collection of macros that depends on znap-syn
for code generation and manipulation.
znap-syn
allows you to transform Rust code fragments into manipulable objects, which can then be used to apply specific logic and generate new code.
CollectionMod: A CollectionMod is a structured representation of a Rust module. This object contains:
ActionFn
: functions that define actions within the module.name
: the name of the module.raw
form: the normal structure of the module before being transformed.In addition to the CollectionMod
, znap-syn
handles other object types such as ActionStruct
, QueryStruct
, and ErrorEnum
. These are also derived from code snippets and used for various transformations and code generation.
Package | Description | Version | Docs |
---|---|---|---|
znap-syn |
Parsing and generating code for macros in Rust |