blob: 513c2b2008f566e97dcc7cb28402a8b9a11caa1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// SPDX-License-Identifier: MIT
// Copyright (c) 2023 Robin Jarry
extern crate proc_macro;
use proc_macro::TokenStream;
use proc_macro_error::proc_macro_error;
use syn::{parse_macro_input, DeriveInput};
mod attrs;
mod derives;
mod doc_comments;
mod dummies;
mod item;
mod spanned;
#[proc_macro_derive(IniMap, attributes(key, default, parse_with))]
#[proc_macro_error]
pub fn ini(input: TokenStream) -> TokenStream {
let input: DeriveInput = parse_macro_input!(input);
derives::derive_ini(&input).into()
}
|