1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Procedural macros for `uzor-framework`.
//!
//! Exports `view!` — JSX-mimicking DSL that lowers to `lm::*` builder calls
//! against the existing L3 `LayoutManager`. No new state, no second manager;
//! pure compile-time text-rewriting.
//!
//! The macro expects two implicit identifiers in scope:
//! - `layout: &mut LayoutManager<P>`
//! - `render: &mut dyn RenderContext`
//!
//! And one prop-supplied rect on the root node (`<row rect={r}>`), from which
//! children rects are derived via `uzor_framework::layout::row()/col()` flex
//! helpers.
extern crate proc_macro;
use TokenStream;
/// JSX-style view tree. Lowers to imperative `uzor_framework::lm::*` calls.
///
/// ```ignore
/// view! {
/// <col rect={body} gap=8>
/// <button text="Save" on_click={|| self.save()} />
/// <checkbox bind={&mut self.dark} label="Dark" />
/// </col>
/// }
/// ```