mod.rs 659 B

123456789101112131415161718192021222324252627
  1. //! Html body
  2. //! -------
  3. //!
  4. //!
  5. //! Since both HTML and RSX serialize to the same node structure, the HTML parser uses the same types as RSX,
  6. //! but has a different Parse implementation.
  7. use crate::rsx::*;
  8. use quote::ToTokens;
  9. use syn::parse::Parse;
  10. pub struct HtmlBody(RsxBody);
  11. impl Parse for HtmlBody {
  12. fn parse(input: syn::parse::ParseStream) -> syn::Result<Self> {
  13. todo!()
  14. }
  15. }
  16. impl ToTokens for HtmlBody {
  17. fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) {
  18. self.0.to_tokens(tokens)
  19. }
  20. }
  21. pub struct HtmlNode(BodyNode);
  22. pub struct HtmlAmbigiousElement(AmbiguousElement);
  23. pub struct HtmlComponent(Component);