| 56 |
56 |
|
Timeline,
|
| 57 |
57 |
|
/// One meter: its body says what it is like, and it emits nothing.
|
| 58 |
58 |
|
Meter,
|
|
59 |
+ |
/// One figure: its body says what it is like, and it emits nothing.
|
|
60 |
+ |
Figure,
|
| 59 |
61 |
|
}
|
| 60 |
62 |
|
|
| 61 |
63 |
|
pub fn declaration(declaration: &Declaration) -> Result<TokenStream> {
|
| 538 |
540 |
|
// Narrow on purpose. Everywhere else a field is still refused with the
|
| 539 |
541 |
|
// message that names the two legal homes, because a question in a cell
|
| 540 |
542 |
|
// or a row is a question nothing will ever read.
|
|
543 |
+ |
//
|
|
544 |
+ |
// A ranked member, which is `beside`'s third container and its second
|
|
545 |
+ |
// meaning of `Priority`: a run ranks everything it holds and a region
|
|
546 |
+ |
// ranks the members that say so. audiofiles' status band is the site --
|
|
547 |
+ |
// every fact in it is stated nowhere else on the window except the
|
|
548 |
+ |
// focused sample's tags, which the detail panel repeats in full, so a
|
|
549 |
+ |
// window with no room loses the repetition and keeps the rest.
|
|
550 |
+ |
(Container::Slot, Emission::Beside { priority, inner }) => Ok((
|
|
551 |
+ |
panel_member(inner)?,
|
|
552 |
+ |
quote!(.with_ranked(#held, ::quasi_router::layout::Priority::#priority)),
|
|
553 |
+ |
)),
|
| 541 |
554 |
|
(Container::Slot, other) => Ok((panel_member(other)?, quote!(.with(#held)))),
|
| 542 |
555 |
|
(Container::Screen, Emission::Region { name, kind, body }) => {
|
| 543 |
556 |
|
Ok((slot(name, kind, body)?, quote!(.with(#held))))
|
| 600 |
613 |
|
emission_span(other),
|
| 601 |
614 |
|
"a tag holds nothing: its body says what it is like",
|
| 602 |
615 |
|
)),
|
|
616 |
+ |
(Container::Figure, other) => Err(syn::Error::new(
|
|
617 |
+ |
emission_span(other),
|
|
618 |
+ |
"a figure holds nothing: its body says what it is like",
|
|
619 |
+ |
)),
|
| 603 |
620 |
|
(Container::Meter, other) => Err(syn::Error::new(
|
| 604 |
621 |
|
emission_span(other),
|
| 605 |
622 |
|
"a meter holds nothing: its body says what it is like",
|
| 889 |
906 |
|
)?;
|
| 890 |
907 |
|
Ok(quote!(::quasi_router::Node::Meter(#meter)))
|
| 891 |
908 |
|
}
|
|
909 |
+ |
Emission::Simple { member, args, body } if member == "tally" => {
|
|
910 |
+ |
// One number and what it counts, standing on its own. `Node::Figure`
|
|
911 |
+ |
// holds a `Figure`, so the body sets on the figure the way
|
|
912 |
+ |
// `proportion`'s sets on a `Meter`, and the member is named for what
|
|
913 |
+ |
// it says rather than for the type: `figure` is the setting a
|
|
914 |
+ |
// `stats` strip accretes with, so it cannot also be a member.
|
|
915 |
+ |
let args = args.iter().map(self::arg).collect::<Result<Vec<_>>>()?;
|
|
916 |
+ |
let figure = accrete(
|
|
917 |
+ |
body,
|
|
918 |
+ |
Container::Figure,
|
|
919 |
+ |
"e!(::quasi_router::screen::Figure::new(#(#args),*)),
|
|
920 |
+ |
)?;
|
|
921 |
+ |
Ok(quote!(::quasi_router::Node::Figure(#figure)))
|
|
922 |
+ |
}
|
| 892 |
923 |
|
Emission::Simple { member, args, body } if member == "underway" => {
|
| 893 |
924 |
|
// The one member whose name is not its constructor's. `Node::pending`
|
| 894 |
925 |
|
// is the third `StandIn` state, beside `empty` and `failed`, and
|