Selaa lähdekoodia

chore: remove unneeded files

Jonathan Kelley 2 vuotta sitten
vanhempi
commit
3fd08ef49e

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

@@ -17,10 +17,7 @@ mod component;
 mod element;
 mod ifmt;
 mod node;
-mod raw_expr;
 mod template;
-mod text;
-mod whitespace;
 
 // Re-export the namespaces into each other
 pub use component::*;

+ 1 - 1
packages/rsx/src/node.rs

@@ -1,4 +1,4 @@
-use crate::{raw_expr::RawExprNode, text::TextNode};
+// use crate::{raw_expr::RawExprNode, text::TextNode};
 
 use super::*;
 

+ 0 - 41
packages/rsx/src/raw_expr.rs

@@ -1,41 +0,0 @@
-use proc_macro2::{Span, TokenStream as TokenStream2};
-use quote::{ToTokens, TokenStreamExt};
-use syn::{parse::Parse, spanned::Spanned, Expr};
-
-use crate::whitespace::Whitespace;
-
-#[derive(Debug, PartialEq, Eq)]
-pub struct RawExprNode {
-    pub ws: Whitespace,
-    pub expr: Expr,
-}
-
-impl RawExprNode {
-    pub fn span(&self) -> Span {
-        self.expr.span()
-    }
-}
-
-impl Parse for RawExprNode {
-    fn parse(input: syn::parse::ParseStream) -> syn::Result<Self> {
-        let before_cursor = input.cursor();
-
-        let expr = input.parse()?;
-
-        let after = input.cursor();
-
-        dbg!(before_cursor.span().start(), after.span().end());
-
-        Ok(Self {
-            ws: Whitespace::default(),
-            expr,
-        })
-    }
-}
-
-impl ToTokens for RawExprNode {
-    fn to_tokens(&self, tokens: &mut TokenStream2) {
-        let expr = &self.expr;
-        tokens.append_all(quote::quote! { #expr });
-    }
-}

+ 0 - 33
packages/rsx/src/text.rs

@@ -1,33 +0,0 @@
-use proc_macro2::{Span, TokenStream as TokenStream2};
-use quote::{quote, ToTokens, TokenStreamExt};
-use syn::{parse::Parse, LitStr};
-
-use crate::whitespace::Whitespace;
-
-#[derive(Debug, PartialEq, Eq)]
-pub struct TextNode {
-    pub ws: Whitespace,
-    pub text: LitStr,
-}
-
-impl TextNode {
-    pub fn span(&self) -> Span {
-        self.text.span()
-    }
-}
-
-impl Parse for TextNode {
-    fn parse(input: syn::parse::ParseStream) -> syn::Result<Self> {
-        Ok(Self {
-            ws: Whitespace::default(),
-            text: input.parse()?,
-        })
-    }
-}
-
-impl ToTokens for TextNode {
-    fn to_tokens(&self, tokens: &mut TokenStream2) {
-        let text = &self.text;
-        tokens.append_all(quote! { #text });
-    }
-}

+ 0 - 17
packages/rsx/src/whitespace.rs

@@ -1,17 +0,0 @@
-#![allow(dead_code)]
-
-use proc_macro2::Span;
-
-#[derive(Debug, Default)]
-pub struct Whitespace {
-    span_start: Option<Span>,
-    span_end: Option<Span>,
-}
-
-// right now we dont care if whitespace is different, sorry
-impl Eq for Whitespace {}
-impl PartialEq for Whitespace {
-    fn eq(&self, _other: &Self) -> bool {
-        true
-    }
-}