From 695f90bf900015df1e2728445f833dabced838a9 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 24 Sep 2022 13:13:20 +0200 Subject: refactor: reorganize modules in the macros crate --- macros/src/injectable/named_attr_input.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 macros/src/injectable/named_attr_input.rs (limited to 'macros/src/injectable/named_attr_input.rs') diff --git a/macros/src/injectable/named_attr_input.rs b/macros/src/injectable/named_attr_input.rs new file mode 100644 index 0000000..5f7123c --- /dev/null +++ b/macros/src/injectable/named_attr_input.rs @@ -0,0 +1,21 @@ +use syn::parse::Parse; +use syn::{parenthesized, LitStr}; + +pub struct NamedAttrInput +{ + pub name: LitStr, +} + +impl Parse for NamedAttrInput +{ + fn parse(input: syn::parse::ParseStream) -> syn::Result + { + let content; + + parenthesized!(content in input); + + Ok(Self { + name: content.parse()?, + }) + } +} -- cgit v1.2.3-18-g5258