wip: rethinking stack machine
This commit is contained in:
1 parent
70cd46dbb2
commit
62ae5d3bb9
7 files changed
+229
-86
No files matched your search
@@ -34,30 +34,16 @@ pub fn fc_to_builder<T: Properties>(_: FC<T>) -> T::Builder {
|
||||
T::builder()
|
||||
}
|
||||
|
||||
mod eliminate_bounds {
|
||||
|
||||
struct BNode<'a> {
|
||||
_p: &'a (),
|
||||
}
|
||||
|
||||
trait Broper {}
|
||||
impl Broper for () {}
|
||||
|
||||
struct Bontext<'a, P: Broper + 'a> {
|
||||
inner: &'a (),
|
||||
props: P,
|
||||
}
|
||||
|
||||
fn Bexample(c: Bontext<()>) -> BNode {
|
||||
todo!()
|
||||
}
|
||||
|
||||
struct MyBrops<'a> {
|
||||
_i: &'a (),
|
||||
}
|
||||
impl<'a> Broper for MyBrops<'a> {}
|
||||
|
||||
fn Bexample2<'a>(c: Bontext<'a, MyBrops<'a>>) -> BNode {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
/// Create inline fragments
|
||||
/// --
|
||||
///
|
||||
/// Fragments capture a series of children without rendering extra nodes.
|
||||
///
|
||||
///
|
||||
///
|
||||
pub static Fragment: FC<()> = |ctx| {
|
||||
use crate::prelude::*;
|
||||
ctx.render(LazyNodes::new(move |c| {
|
||||
crate::nodebuilder::vfragment(c, None, ctx.children())
|
||||
}))
|
||||
};
|
||||
@@ -50,7 +50,7 @@ pub(crate) mod innerlude {
|
||||
/// Re-export common types for ease of development use.
|
||||
/// Essential when working with the html! macro
|
||||
pub mod prelude {
|
||||
pub use crate::component::{fc_to_builder, Properties};
|
||||
pub use crate::component::{fc_to_builder, Fragment, Properties};
|
||||
use crate::nodes;
|
||||
pub use crate::virtual_dom::Context;
|
||||
pub use crate::virtual_dom::Scoped;
|
||||
|
||||
Reference in new issue
Block a user