Add document

This commit is contained in:
2025-08-10 16:58:44 +08:00
parent f602ddb4b5
commit cfc1dbf507
43 changed files with 516 additions and 13 deletions

View File

@@ -2,6 +2,9 @@
name = "msg_tool_macro"
version = "0.1.0"
edition = "2024"
repository = "https://github.com/lifegpc/msg-tool"
description = "A procedural macro for the msg-tool project."
license = "MIT"
[lib]
proc-macro = true

View File

@@ -29,6 +29,7 @@ impl syn::parse::Parse for PackStruct {
}
#[proc_macro]
/// Implements `StructUnpack` and `StructPack` traits for numeric types.
pub fn struct_unpack_impl_for_num(item: TokenStream) -> TokenStream {
let i = syn::parse_macro_input!(item as syn::Ident);
let output = quote::quote! {
@@ -647,6 +648,7 @@ pub fn struct_unpack_derive(input: TokenStream) -> TokenStream {
#[cfg(feature = "artemis-arc")]
#[proc_macro]
/// Generates a list of Artemis Arc extensions for the PFS file format.
pub fn gen_artemis_arc_ext(_: TokenStream) -> TokenStream {
let mut exts = Vec::new();
exts.push(quote::quote! { "pfs" });