| 576 |
576 |
|
Ok((self::action(action)?, quote!(.activate(#held))))
|
| 577 |
577 |
|
}
|
| 578 |
578 |
|
(Container::Row, Emission::Act { .. }) => Ok((act(emission)?, quote!(.act(#held)))),
|
|
579 |
+ |
// `act`'s held-back twin. A row shows what `act` puts in it and keeps
|
|
580 |
+ |
// what `offers` gives it until the host is asked, which is the whole of
|
|
581 |
+ |
// the difference and is why the two are one word apart. A member rather
|
|
582 |
+ |
// than a setting because a menu control is told the same things an
|
|
583 |
+ |
// inline one is: audiofiles' sidebar greys a vault's Delete when it is
|
|
584 |
+ |
// the last vault, and a control written as an expression in an argument
|
|
585 |
+ |
// cannot say that.
|
|
586 |
+ |
(Container::Row, Emission::Offers { .. }) => Ok((act(emission)?, quote!(.offers(#held)))),
|
| 579 |
587 |
|
// A control another shape built. `export_act::control` is the export
|
| 580 |
588 |
|
// portal's one sentence about saving a file, said once and offered
|
| 581 |
589 |
|
// under each card's own label, and a row holds acts rather than nodes.
|
| 1003 |
1011 |
|
let control = act(emission)?;
|
| 1004 |
1012 |
|
Ok(quote!(::quasi_router::Node::Act(#control)))
|
| 1005 |
1013 |
|
}
|
|
1014 |
+ |
Emission::Offers { action, .. } => Err(syn::Error::new(
|
|
1015 |
+ |
action.verb.span(),
|
|
1016 |
+ |
"`offers` is a control a row holds back; outside a row write `act`",
|
|
1017 |
+ |
)),
|
| 1006 |
1018 |
|
Emission::Include(supplier) => {
|
| 1007 |
1019 |
|
let supplier = hole(supplier)?;
|
| 1008 |
1020 |
|
Ok(quote!(::std::convert::Into::into(#supplier)))
|
| 1452 |
1464 |
|
|
| 1453 |
1465 |
|
/// One control: what it is called, what it does, and what it is like.
|
| 1454 |
1466 |
|
fn act(emission: &Emission) -> Result<TokenStream> {
|
| 1455 |
|
- |
let Emission::Act {
|
|
1467 |
+ |
let (Emission::Act {
|
| 1456 |
1468 |
|
label,
|
| 1457 |
1469 |
|
action,
|
| 1458 |
1470 |
|
body,
|
| 1459 |
|
- |
} = emission
|
|
1471 |
+ |
}
|
|
1472 |
+ |
| Emission::Offers {
|
|
1473 |
+ |
label,
|
|
1474 |
+ |
action,
|
|
1475 |
+ |
body,
|
|
1476 |
+ |
}) = emission
|
| 1460 |
1477 |
|
else {
|
| 1461 |
1478 |
|
return Err(syn::Error::new(
|
| 1462 |
1479 |
|
emission_span(emission),
|
| 1665 |
1682 |
|
Emission::Row { .. } | Emission::List(_) => Span::call_site(),
|
| 1666 |
1683 |
|
Emission::Form { action, .. } | Emission::Chip { action, .. } => action.verb.span(),
|
| 1667 |
1684 |
|
Emission::Field { kind, .. } => kind.span(),
|
| 1668 |
|
- |
Emission::Act { action, .. } => action.verb.span(),
|
|
1685 |
+ |
Emission::Act { action, .. } | Emission::Offers { action, .. } => action.verb.span(),
|
| 1669 |
1686 |
|
Emission::Guarded { guard, .. } => guard.span,
|
| 1670 |
1687 |
|
Emission::Given { .. } => Span::call_site(),
|
| 1671 |
1688 |
|
Emission::Region { kind, .. } => match kind {
|