Fix: quick tweak to allow #[component] macro working

This commit is contained in:
Jonathan Kelley committed 2024-01-10 16:38:07 -08:00
1 parent 4a1a00b0f0
commit 2a7f3a4164
2 files changed
+7 -10

No files matched your search

+2 -5
View File
@@ -39,11 +39,8 @@ pub fn derive_typed_builder(input: TokenStream) -> TokenStream {
/// The rsx! macro makes it easy for developers to write jsx-style markup in their components.
#[proc_macro]
pub fn rsx(s: TokenStream) -> TokenStream {
match syn::parse::<rsx::CallBody>(s) {
Err(err) => err.to_compile_error().into(),
Ok(body) => body.to_token_stream().into(),
}
pub fn rsx(tokens: TokenStream) -> TokenStream {
render(tokens)
}
/// The render! macro makes it easy for developers to write jsx-style markup in their components.