tidos_macro 0.7.2

Procedural macros for the Tidos component framework.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::tokens::Component;
use proc_macro2::TokenStream;
use quote::{quote, ToTokens, TokenStreamExt};

impl ToTokens for Component {
	fn to_tokens(&self, tokens: &mut TokenStream) {
		let children = &self.children;
		
		tokens.append_all(quote! {
			String::new() #( + #children )*
		});
	}
}