Skip to content

Commit

Permalink
Move view.rs from sycamore-macro into sycamore-view-parser codegen.rs (
Browse files Browse the repository at this point in the history
…#762)

refactor(macro): move view.rs from macro into view-parser
  • Loading branch information
davidon-top authored Nov 18, 2024
1 parent 073d7c4 commit 6353f81
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/sycamore-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use syn::{parse_macro_input, DeriveInput};
mod component;
mod inline_props;
mod props;
mod view;

/// A macro for ergonomically creating complex UI complex layouts.
///
Expand All @@ -20,7 +19,7 @@ mod view;
pub fn view(input: TokenStream) -> TokenStream {
let root = parse_macro_input!(input as sycamore_view_parser::ir::Root);

view::Codegen {}.root(&root).into()
sycamore_view_parser::codegen::Codegen {}.root(&root).into()
}

/// A macro for creating components from functions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@

use proc_macro2::TokenStream;
use quote::quote;
use sycamore_view_parser::ir::{DynNode, Node, Prop, PropType, Root, TagIdent, TagNode, TextNode};
use syn::{Expr, Pat};

use crate::ir::{DynNode, Node, Prop, PropType, Root, TagIdent, TagNode, TextNode};

pub struct Codegen {
// TODO: configure mode: Client, Hydrate, SSR
}
Expand Down
1 change: 1 addition & 0 deletions packages/sycamore-view-parser/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Proc-macro support crate for Sycamore.

pub mod codegen;
pub mod ir;
pub mod parse;

0 comments on commit 6353f81

Please sign in to comment.