chore: remove unneeded files
This commit is contained in:
1 parent
63944ef4c9
commit
3fd08ef49e
5 files changed
+1
-95
No files matched your search
@@ -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,4 +1,4 @@
|
||||
use crate::{raw_expr::RawExprNode, text::TextNode};
|
||||
// use crate::{raw_expr::RawExprNode, text::TextNode};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
}
|
||||
@@ -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 });
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user