From 362dbb2e5cb494a5d4d639f5d45a2dbd51f49c8f Mon Sep 17 00:00:00 2001 From: H1ghBre4k3r Date: Sun, 10 Nov 2024 22:52:22 +0100 Subject: [PATCH] feat: make fields public in token macro implementation Update the `impl_token_macro` function to make the `position` and `value` fields public. This change enhances accessibility for users of the macro, allowing them to interact with these fields directly in their implementations. --- lachs_derive/src/token.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lachs_derive/src/token.rs b/lachs_derive/src/token.rs index 8a8bcb0..6fab65c 100644 --- a/lachs_derive/src/token.rs +++ b/lachs_derive/src/token.rs @@ -32,7 +32,7 @@ pub fn impl_token_macro(item: syn::Item, attrs: Punctuated) -> Tok let (fields, insertions) = if *attr_ident == "terminal" { ( quote! { - position: lachs::Span, + pub position: lachs::Span, }, { let literal = literal.value(); @@ -45,8 +45,8 @@ pub fn impl_token_macro(item: syn::Item, attrs: Punctuated) -> Tok } else if *attr_ident == "literal" { ( quote! { - position: lachs::Span, - value: String, + pub position: lachs::Span, + pub value: String, }, { let literal = literal.value();