Base gui, player, side, top nav, song list
Super happy with this
This commit is contained in:
15
xmpd-derive/Cargo.toml
Normal file
15
xmpd-derive/Cargo.toml
Normal file
@@ -0,0 +1,15 @@
|
||||
[package]
|
||||
name = "xmpd-derive"
|
||||
edition = "2021"
|
||||
version.workspace = true
|
||||
repository.workspace = true
|
||||
license.workspace = true
|
||||
authors.workspace = true
|
||||
|
||||
[lib]
|
||||
proc-macro=true
|
||||
|
||||
[dependencies]
|
||||
quote = "1.0.37"
|
||||
syn = "2.0.87"
|
||||
# xmpd-gui.path = "../xmpd-gui"
|
||||
26
xmpd-derive/src/lib.rs
Normal file
26
xmpd-derive/src/lib.rs
Normal file
@@ -0,0 +1,26 @@
|
||||
use proc_macro::TokenStream;
|
||||
|
||||
#[macro_use]
|
||||
extern crate quote;
|
||||
#[macro_use]
|
||||
extern crate syn;
|
||||
extern crate proc_macro;
|
||||
|
||||
|
||||
#[proc_macro_derive(UiComponent)]
|
||||
pub fn ui_comp_impl(input: TokenStream) -> TokenStream {
|
||||
let ast: syn::DeriveInput = syn::parse(input).unwrap();
|
||||
|
||||
let name = &ast.ident;
|
||||
let vis = &ast.vis;
|
||||
let attr = &ast.attrs;
|
||||
let data = &ast.data;
|
||||
let generics = &ast.generics;
|
||||
|
||||
let gen = quote! {
|
||||
impl xmp
|
||||
|
||||
};
|
||||
|
||||
gen.into()
|
||||
}
|
||||
Reference in New Issue
Block a user