automation_rs/automation_macro/src/lib.rs
Dreaded_X 98ab265fed
All checks were successful
Build and deploy / Build application (push) Successful in 6m20s
Check / Run checks (push) Successful in 2m19s
Build and deploy / Build container (push) Successful in 1m16s
Build and deploy / Deploy container (push) Has been skipped
Improved Lua macro situation
2024-07-25 00:49:10 +02:00

14 lines
438 B
Rust

#![feature(let_chains)]
#![feature(iter_intersperse)]
mod lua_device_config;
use lua_device_config::impl_lua_device_config_macro;
use syn::{parse_macro_input, DeriveInput};
#[proc_macro_derive(LuaDeviceConfig, attributes(device_config))]
pub fn lua_device_config_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let ast = parse_macro_input!(input as DeriveInput);
impl_lua_device_config_macro(&ast).into()
}