Browse Source

chore: remove comment from syn tree

Jonathan Kelley 2 years ago
parent
commit
d22577082c
2 changed files with 0 additions and 5 deletions
  1. 0 2
      packages/rsx/src/lib.rs
  2. 0 3
      packages/rsx/src/node.rs

+ 0 - 2
packages/rsx/src/lib.rs

@@ -297,8 +297,6 @@ impl DynamicMapping {
 
             BodyNode::Text(text) if text.is_static() => {}
 
-            BodyNode::Comment(_) => {}
-
             BodyNode::RawExpr(_)
             | BodyNode::Text(_)
             | BodyNode::ForLoop(_)

+ 0 - 3
packages/rsx/src/node.rs

@@ -38,7 +38,6 @@ pub enum BodyNode {
     IfChain(ExprIf),
     Text(IfmtInput),
     RawExpr(Expr),
-    Comment(UserComment),
 }
 
 impl BodyNode {
@@ -54,7 +53,6 @@ impl BodyNode {
             BodyNode::RawExpr(exp) => exp.span(),
             BodyNode::ForLoop(fl) => fl.for_token.span(),
             BodyNode::IfChain(f) => f.if_token.span(),
-            BodyNode::Comment(c) => c.span,
         }
     }
 }
@@ -143,7 +141,6 @@ impl Parse for BodyNode {
 impl ToTokens for BodyNode {
     fn to_tokens(&self, tokens: &mut TokenStream2) {
         match &self {
-            BodyNode::Comment(_) => {}
             BodyNode::Element(el) => el.to_tokens(tokens),
             BodyNode::Component(comp) => comp.to_tokens(tokens),
             BodyNode::Text(txt) => tokens.append_all(quote! {