blob: 0572615be7abf0e0ac659c0287cd4ca7c52394b2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// yt - A fully featured command line YouTube client
//
// Copyright (C) 2026 Soispha Peetz <soispha@b-peetz.de>
// SPDX-License-Identifier: GPL-3.0-or-later
//
// This file is part of Yt.
//
// You should have received a copy of the License along with this program.
// If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
use proc_macro::TokenStream;
use quote::quote;
use syn::parse_macro_input;
use crate::parse::ParseBase;
mod generate;
mod parse;
#[proc_macro]
pub fn mk_config(input: TokenStream) -> TokenStream {
// eprintln!("{}", input);
let parsed = parse_macro_input!(input as ParseBase);
let config = generate::Config::from(parsed);
let expanded = quote! {#config};
TokenStream::from(expanded)
}
|